Class: Azure::ContainerRegistry::Mgmt::V2019_04_01::Runs
- Inherits:
-
Object
- Object
- Azure::ContainerRegistry::Mgmt::V2019_04_01::Runs
- Includes:
- MsRestAzure
- Defined in:
- lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb
Overview
Runs
Instance Attribute Summary collapse
-
#client ⇒ ContainerRegistryManagementClient
readonly
Reference to the ContainerRegistryManagementClient.
Instance Method Summary collapse
-
#begin_cancel(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Object
Cancel an existing run.
-
#begin_cancel_async(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Concurrent::Promise
Cancel an existing run.
-
#begin_cancel_with_http_info(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancel an existing run.
-
#begin_update(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers: nil) ⇒ Run
Patch the run properties.
-
#begin_update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
Patch the run properties.
-
#begin_update_with_http_info(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Patch the run properties.
-
#cancel(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Object
Cancel an existing run.
-
#cancel_async(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs.
-
#get(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Run
Gets the detailed information for a given run.
-
#get_async(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Concurrent::Promise
Gets the detailed information for a given run.
-
#get_log_sas_url(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ RunGetLogResult
Gets a link to download the run logs.
-
#get_log_sas_url_async(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Concurrent::Promise
Gets a link to download the run logs.
-
#get_log_sas_url_with_http_info(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a link to download the run logs.
-
#get_with_http_info(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the detailed information for a given run.
-
#initialize(client) ⇒ Runs
constructor
Creates and initializes a new instance of the Runs class.
-
#list(resource_group_name, registry_name, filter: nil, top: nil, custom_headers: nil) ⇒ Array<Run>
Gets all the runs for a registry.
-
#list_as_lazy(resource_group_name, registry_name, filter: nil, top: nil, custom_headers: nil) ⇒ RunListResult
Gets all the runs for a registry.
-
#list_async(resource_group_name, registry_name, filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the runs for a registry.
-
#list_next(next_page_link, custom_headers: nil) ⇒ RunListResult
Gets all the runs for a registry.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the runs for a registry.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the runs for a registry.
-
#list_with_http_info(resource_group_name, registry_name, filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the runs for a registry.
-
#update(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers: nil) ⇒ Run
Patch the run properties.
-
#update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs.
Constructor Details
#initialize(client) ⇒ Runs
Creates and initializes a new instance of the Runs class.
17 18 19 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ ContainerRegistryManagementClient (readonly)
Returns reference to the ContainerRegistryManagementClient.
22 23 24 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 22 def client @client end |
Instance Method Details
#begin_cancel(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Object
Cancel an existing run.
the container registry belongs. will be added to the HTTP request.
577 578 579 580 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 577 def begin_cancel(resource_group_name, registry_name, run_id, custom_headers:nil) response = begin_cancel_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value! nil end |
#begin_cancel_async(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Concurrent::Promise
Cancel an existing run.
the container registry belongs. to the HTTP request.
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 610 def begin_cancel_async(resource_group_name, registry_name, run_id, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'run_id is nil' if run_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'runId' => run_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_cancel_with_http_info(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancel an existing run.
the container registry belongs. will be added to the HTTP request.
594 595 596 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 594 def begin_cancel_with_http_info(resource_group_name, registry_name, run_id, custom_headers:nil) begin_cancel_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value! end |
#begin_update(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers: nil) ⇒ Run
Patch the run properties.
the container registry belongs. will be added to the HTTP request.
453 454 455 456 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 453 def begin_update(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:nil) response = begin_update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
Patch the run properties.
the container registry belongs. to the HTTP request.
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 488 def begin_update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'run_id is nil' if run_id.nil? fail ArgumentError, 'run_update_parameters is nil' if run_update_parameters.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ContainerRegistry::Mgmt::V2019_04_01::Models::RunUpdateParameters.mapper() request_content = @client.serialize(request_mapper, run_update_parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'runId' => run_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_04_01::Models::Run.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_04_01::Models::Run.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_update_with_http_info(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Patch the run properties.
the container registry belongs. will be added to the HTTP request.
471 472 473 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 471 def begin_update_with_http_info(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:nil) begin_update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:custom_headers).value! end |
#cancel(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Object
Cancel an existing run.
the container registry belongs. will be added to the HTTP request.
408 409 410 411 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 408 def cancel(resource_group_name, registry_name, run_id, custom_headers:nil) response = cancel_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value! nil end |
#cancel_async(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs. will be added to the HTTP request.
response.
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 424 def cancel_async(resource_group_name, registry_name, run_id, custom_headers:nil) # Send request promise = begin_cancel_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#get(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Run
Gets the detailed information for a given run.
the container registry belongs. will be added to the HTTP request.
152 153 154 155 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 152 def get(resource_group_name, registry_name, run_id, custom_headers:nil) response = get_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Concurrent::Promise
Gets the detailed information for a given run.
the container registry belongs. to the HTTP request.
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 185 def get_async(resource_group_name, registry_name, run_id, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'run_id is nil' if run_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'runId' => run_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_04_01::Models::Run.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_log_sas_url(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ RunGetLogResult
Gets a link to download the run logs.
the container registry belongs. will be added to the HTTP request.
305 306 307 308 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 305 def get_log_sas_url(resource_group_name, registry_name, run_id, custom_headers:nil) response = get_log_sas_url_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_log_sas_url_async(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ Concurrent::Promise
Gets a link to download the run logs.
the container registry belongs. to the HTTP request.
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 338 def get_log_sas_url_async(resource_group_name, registry_name, run_id, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'run_id is nil' if run_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/listLogSasUrl' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'runId' => run_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_04_01::Models::RunGetLogResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_log_sas_url_with_http_info(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a link to download the run logs.
the container registry belongs. will be added to the HTTP request.
322 323 324 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 322 def get_log_sas_url_with_http_info(resource_group_name, registry_name, run_id, custom_headers:nil) get_log_sas_url_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value! end |
#get_with_http_info(resource_group_name, registry_name, run_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the detailed information for a given run.
the container registry belongs. will be added to the HTTP request.
169 170 171 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 169 def get_with_http_info(resource_group_name, registry_name, run_id, custom_headers:nil) get_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value! end |
#list(resource_group_name, registry_name, filter: nil, top: nil, custom_headers: nil) ⇒ Array<Run>
Gets all the runs for a registry.
the container registry belongs. operators are not supported. The allowed string function is ‘contains’. All logical operators except ‘Not’, ‘Has’, ‘All’ are allowed. maximum number of runs to return. will be added to the HTTP request.
40 41 42 43 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 40 def list(resource_group_name, registry_name, filter:nil, top:nil, custom_headers:nil) first_page = list_as_lazy(resource_group_name, registry_name, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(resource_group_name, registry_name, filter: nil, top: nil, custom_headers: nil) ⇒ RunListResult
Gets all the runs for a registry.
the container registry belongs. operators are not supported. The allowed string function is ‘contains’. All logical operators except ‘Not’, ‘Has’, ‘All’ are allowed. maximum number of runs to return. will be added to the HTTP request.
766 767 768 769 770 771 772 773 774 775 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 766 def list_as_lazy(resource_group_name, registry_name, filter:nil, top:nil, custom_headers:nil) response = list_async(resource_group_name, registry_name, filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_async(resource_group_name, registry_name, filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the runs for a registry.
the container registry belongs. operators are not supported. The allowed string function is ‘contains’. All logical operators except ‘Not’, ‘Has’, ‘All’ are allowed. maximum number of runs to return. to the HTTP request.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 81 def list_async(resource_group_name, registry_name, filter:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_04_01::Models::RunListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next(next_page_link, custom_headers: nil) ⇒ RunListResult
Gets all the runs for a registry.
to List operation. will be added to the HTTP request.
670 671 672 673 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 670 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the runs for a registry.
to List operation. to the HTTP request.
699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 699 def list_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_04_01::Models::RunListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the runs for a registry.
to List operation. will be added to the HTTP request.
685 686 687 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 685 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_with_http_info(resource_group_name, registry_name, filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the runs for a registry.
the container registry belongs. operators are not supported. The allowed string function is ‘contains’. All logical operators except ‘Not’, ‘Has’, ‘All’ are allowed. maximum number of runs to return. will be added to the HTTP request.
61 62 63 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 61 def list_with_http_info(resource_group_name, registry_name, filter:nil, top:nil, custom_headers:nil) list_async(resource_group_name, registry_name, filter:filter, top:top, custom_headers:custom_headers).value! end |
#update(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers: nil) ⇒ Run
Patch the run properties.
the container registry belongs. will be added to the HTTP request.
258 259 260 261 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 258 def update(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:nil) response = update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs. will be added to the HTTP request.
response.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb', line 275 def update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:nil) # Send request promise = begin_update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ContainerRegistry::Mgmt::V2019_04_01::Models::Run.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |