Class: Azure::ContainerRegistry::Mgmt::V2018_02_01_preview::BuildSteps

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb

Overview

BuildSteps

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ BuildSteps

Creates and initializes a new instance of the BuildSteps class.

Parameters:

  • client

    service class for accessing basic functionality.



17
18
19
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 17

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientContainerRegistryManagementClient (readonly)

Returns reference to the ContainerRegistryManagementClient.

Returns:



22
23
24
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 22

def client
  @client
end

Instance Method Details

#begin_create(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers: nil) ⇒ BuildStep

Creates a build step for a build task.

the container registry belongs. task. build task. build step. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • build_step_create_parameters (BuildStep)

    The parameters for creating a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BuildStep)

    operation results.



551
552
553
554
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 551

def begin_create(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers:nil)
  response = begin_create_async(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_create_async(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Creates a build step for a build task.

the container registry belongs. task. build task. build step. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • build_step_create_parameters (BuildStep)

    The parameters for creating a

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
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
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 594

def begin_create_async(resource_group_name, registry_name, build_task_name, step_name, build_step_create_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, '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, 'build_task_name is nil' if build_task_name.nil?
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MaxLength': '50'" if !build_task_name.nil? && build_task_name.length > 50
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MinLength': '5'" if !build_task_name.nil? && build_task_name.length < 5
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !build_task_name.nil? && build_task_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
  fail ArgumentError, 'step_name is nil' if step_name.nil?
  fail ArgumentError, "'step_name' should satisfy the constraint - 'MaxLength': '50'" if !step_name.nil? && step_name.length > 50
  fail ArgumentError, "'step_name' should satisfy the constraint - 'MinLength': '5'" if !step_name.nil? && step_name.length < 5
  fail ArgumentError, "'step_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !step_name.nil? && step_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
  fail ArgumentError, 'build_step_create_parameters is nil' if build_step_create_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::V2018_02_01_preview::Models::BuildStep.mapper()
  request_content = @client.serialize(request_mapper,  build_step_create_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}/buildTasks/{buildTaskName}/steps/{stepName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'buildTaskName' => build_task_name,'stepName' => step_name},
      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(:put, path_template, options)

  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::V2018_02_01_preview::Models::BuildStep.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, 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::V2018_02_01_preview::Models::BuildStep.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_create_with_http_info(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Creates a build step for a build task.

the container registry belongs. task. build task. build step. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • build_step_create_parameters (BuildStep)

    The parameters for creating a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



573
574
575
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 573

def begin_create_with_http_info(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers:nil)
  begin_create_async(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers:custom_headers).value!
end

#begin_delete(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ Object

Deletes a build step from the build task.

the container registry belongs. task. build task. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



692
693
694
695
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 692

def begin_delete(resource_group_name, registry_name, build_task_name, step_name, custom_headers:nil)
  response = begin_delete_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers:custom_headers).value!
  nil
end

#begin_delete_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ Concurrent::Promise

Deletes a build step from the build task.

the container registry belongs. task. build task. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 731

def begin_delete_async(resource_group_name, registry_name, build_task_name, step_name, 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, '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, 'build_task_name is nil' if build_task_name.nil?
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MaxLength': '50'" if !build_task_name.nil? && build_task_name.length > 50
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MinLength': '5'" if !build_task_name.nil? && build_task_name.length < 5
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !build_task_name.nil? && build_task_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
  fail ArgumentError, 'step_name is nil' if step_name.nil?
  fail ArgumentError, "'step_name' should satisfy the constraint - 'MaxLength': '50'" if !step_name.nil? && step_name.length > 50
  fail ArgumentError, "'step_name' should satisfy the constraint - 'MinLength': '5'" if !step_name.nil? && step_name.length < 5
  fail ArgumentError, "'step_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !step_name.nil? && step_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).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}/buildTasks/{buildTaskName}/steps/{stepName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'buildTaskName' => build_task_name,'stepName' => step_name},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  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_delete_with_http_info(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Deletes a build step from the build task.

the container registry belongs. task. build task. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



712
713
714
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 712

def begin_delete_with_http_info(resource_group_name, registry_name, build_task_name, step_name, custom_headers:nil)
  begin_delete_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers:custom_headers).value!
end

#begin_update(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers: nil) ⇒ BuildStep

Updates a build step in a build task.

the container registry belongs. task. build task. parameters for updating a build step. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • build_step_update_parameters (BuildStepUpdateParameters)

    The

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BuildStep)

    operation results.



804
805
806
807
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 804

def begin_update(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers:nil)
  response = begin_update_async(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_update_async(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Updates a build step in a build task.

the container registry belongs. task. build task. parameters for updating a build step. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • build_step_update_parameters (BuildStepUpdateParameters)

    The

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 847

def begin_update_async(resource_group_name, registry_name, build_task_name, step_name, build_step_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, '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, 'build_task_name is nil' if build_task_name.nil?
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MaxLength': '50'" if !build_task_name.nil? && build_task_name.length > 50
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MinLength': '5'" if !build_task_name.nil? && build_task_name.length < 5
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !build_task_name.nil? && build_task_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
  fail ArgumentError, 'step_name is nil' if step_name.nil?
  fail ArgumentError, "'step_name' should satisfy the constraint - 'MaxLength': '50'" if !step_name.nil? && step_name.length > 50
  fail ArgumentError, "'step_name' should satisfy the constraint - 'MinLength': '5'" if !step_name.nil? && step_name.length < 5
  fail ArgumentError, "'step_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !step_name.nil? && step_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
  fail ArgumentError, 'build_step_update_parameters is nil' if build_step_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::V2018_02_01_preview::Models::BuildStepUpdateParameters.mapper()
  request_content = @client.serialize(request_mapper,  build_step_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}/buildTasks/{buildTaskName}/steps/{stepName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'buildTaskName' => build_task_name,'stepName' => step_name},
      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, options)

  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::V2018_02_01_preview::Models::BuildStep.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, 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::V2018_02_01_preview::Models::BuildStep.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_update_with_http_info(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Updates a build step in a build task.

the container registry belongs. task. build task. parameters for updating a build step. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • build_step_update_parameters (BuildStepUpdateParameters)

    The

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



826
827
828
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 826

def begin_update_with_http_info(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers:nil)
  begin_update_async(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers:custom_headers).value!
end

#create(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers: nil) ⇒ BuildStep

Creates a build step for a build task.

the container registry belongs. task. build task. build step. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • build_step_create_parameters (BuildStep)

    The parameters for creating a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BuildStep)

    operation results.



271
272
273
274
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 271

def create(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers:nil)
  response = create_async(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#create_async(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers: nil) ⇒ Concurrent::Promise

the container registry belongs. task. build task. build step. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • build_step_create_parameters (BuildStep)

    The parameters for creating a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 292

def create_async(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers:nil)
  # Send request
  promise = begin_create_async(resource_group_name, registry_name, build_task_name, step_name, build_step_create_parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::ContainerRegistry::Mgmt::V2018_02_01_preview::Models::BuildStep.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

#delete(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ Object

Deletes a build step from the build task.

the container registry belongs. task. build task. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



323
324
325
326
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 323

def delete(resource_group_name, registry_name, build_task_name, step_name, custom_headers:nil)
  response = delete_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers:custom_headers).value!
  nil
end

#delete_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ Concurrent::Promise

the container registry belongs. task. build task. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 342

def delete_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers:nil)
  # Send request
  promise = begin_delete_async(resource_group_name, registry_name, build_task_name, step_name, 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, build_task_name, step_name, custom_headers: nil) ⇒ BuildStep

Gets the build step for a build task.

the container registry belongs. task. build task. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BuildStep)

    operation results.



149
150
151
152
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 149

def get(resource_group_name, registry_name, build_task_name, step_name, custom_headers:nil)
  response = get_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#get_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ Concurrent::Promise

Gets the build step for a build task.

the container registry belongs. task. build task. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
244
245
246
247
248
249
250
251
252
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 188

def get_async(resource_group_name, registry_name, build_task_name, step_name, 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, '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, 'build_task_name is nil' if build_task_name.nil?
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MaxLength': '50'" if !build_task_name.nil? && build_task_name.length > 50
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MinLength': '5'" if !build_task_name.nil? && build_task_name.length < 5
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !build_task_name.nil? && build_task_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
  fail ArgumentError, 'step_name is nil' if step_name.nil?
  fail ArgumentError, "'step_name' should satisfy the constraint - 'MaxLength': '50'" if !step_name.nil? && step_name.length > 50
  fail ArgumentError, "'step_name' should satisfy the constraint - 'MinLength': '5'" if !step_name.nil? && step_name.length < 5
  fail ArgumentError, "'step_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !step_name.nil? && step_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).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}/buildTasks/{buildTaskName}/steps/{stepName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'buildTaskName' => build_task_name,'stepName' => step_name},
      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, options)

  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::V2018_02_01_preview::Models::BuildStep.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_with_http_info(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the build step for a build task.

the container registry belongs. task. build task. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



169
170
171
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 169

def get_with_http_info(resource_group_name, registry_name, build_task_name, step_name, custom_headers:nil)
  get_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers:custom_headers).value!
end

#list(resource_group_name, registry_name, build_task_name, custom_headers: nil) ⇒ Array<BuildStep>

List all the build steps for a given build task.

the container registry belongs. task. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<BuildStep>)

    operation results.



37
38
39
40
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 37

def list(resource_group_name, registry_name, build_task_name, custom_headers:nil)
  first_page = list_as_lazy(resource_group_name, registry_name, build_task_name, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_as_lazy(resource_group_name, registry_name, build_task_name, custom_headers: nil) ⇒ BuildStepList

List all the build steps for a given build task.

the container registry belongs. task. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BuildStepList)

    which provide lazy access to pages of the response.



1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 1124

def list_as_lazy(resource_group_name, registry_name, build_task_name, custom_headers:nil)
  response = list_async(resource_group_name, registry_name, build_task_name, 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, build_task_name, custom_headers: nil) ⇒ Concurrent::Promise

List all the build steps for a given build task.

the container registry belongs. task. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



72
73
74
75
76
77
78
79
80
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
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 72

def list_async(resource_group_name, registry_name, build_task_name, 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, '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, 'build_task_name is nil' if build_task_name.nil?
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MaxLength': '50'" if !build_task_name.nil? && build_task_name.length > 50
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MinLength': '5'" if !build_task_name.nil? && build_task_name.length < 5
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !build_task_name.nil? && build_task_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).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}/buildTasks/{buildTaskName}/steps'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'buildTaskName' => build_task_name},
      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, options)

  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::V2018_02_01_preview::Models::BuildStepList.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_build_arguments(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ Array<BuildArgument>

List the build arguments for a step including the secret arguments.

the container registry belongs. task. build task. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<BuildArgument>)

    operation results.



429
430
431
432
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 429

def list_build_arguments(resource_group_name, registry_name, build_task_name, step_name, custom_headers:nil)
  first_page = list_build_arguments_as_lazy(resource_group_name, registry_name, build_task_name, step_name, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_build_arguments_as_lazy(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ BuildArgumentList

List the build arguments for a step including the secret arguments.

the container registry belongs. task. build task. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BuildArgumentList)

    which provide lazy access to pages of the



1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 1151

def list_build_arguments_as_lazy(resource_group_name, registry_name, build_task_name, step_name, custom_headers:nil)
  response = list_build_arguments_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_build_arguments_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

#list_build_arguments_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ Concurrent::Promise

List the build arguments for a step including the secret arguments.

the container registry belongs. task. build task. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
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
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 468

def list_build_arguments_async(resource_group_name, registry_name, build_task_name, step_name, 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, '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, 'build_task_name is nil' if build_task_name.nil?
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MaxLength': '50'" if !build_task_name.nil? && build_task_name.length > 50
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'MinLength': '5'" if !build_task_name.nil? && build_task_name.length < 5
  fail ArgumentError, "'build_task_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !build_task_name.nil? && build_task_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
  fail ArgumentError, 'step_name is nil' if step_name.nil?
  fail ArgumentError, "'step_name' should satisfy the constraint - 'MaxLength': '50'" if !step_name.nil? && step_name.length > 50
  fail ArgumentError, "'step_name' should satisfy the constraint - 'MinLength': '5'" if !step_name.nil? && step_name.length < 5
  fail ArgumentError, "'step_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !step_name.nil? && step_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).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}/buildTasks/{buildTaskName}/steps/{stepName}/listBuildArguments'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'buildTaskName' => build_task_name,'stepName' => step_name},
      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, options)

  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::V2018_02_01_preview::Models::BuildArgumentList.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_build_arguments_next(next_page_link, custom_headers: nil) ⇒ BuildArgumentList

List the build arguments for a step including the secret arguments.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BuildArgumentList)

    operation results.



1031
1032
1033
1034
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 1031

def list_build_arguments_next(next_page_link, custom_headers:nil)
  response = list_build_arguments_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_build_arguments_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

List the build arguments for a step including the secret arguments.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 1060

def list_build_arguments_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

  options = {
      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(:post, path_template, options)

  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::V2018_02_01_preview::Models::BuildArgumentList.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_build_arguments_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List the build arguments for a step including the secret arguments.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1046
1047
1048
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 1046

def list_build_arguments_next_with_http_info(next_page_link, custom_headers:nil)
  list_build_arguments_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_build_arguments_with_http_info(resource_group_name, registry_name, build_task_name, step_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List the build arguments for a step including the secret arguments.

the container registry belongs. task. build task. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



449
450
451
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 449

def list_build_arguments_with_http_info(resource_group_name, registry_name, build_task_name, step_name, custom_headers:nil)
  list_build_arguments_async(resource_group_name, registry_name, build_task_name, step_name, custom_headers:custom_headers).value!
end

#list_next(next_page_link, custom_headers: nil) ⇒ BuildStepList

List all the build steps for a given build task.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BuildStepList)

    operation results.



941
942
943
944
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 941

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

List all the build steps for a given build task.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 970

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

  options = {
      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, options)

  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::V2018_02_01_preview::Models::BuildStepList.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List all the build steps for a given build task.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



956
957
958
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 956

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, build_task_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List all the build steps for a given build task.

the container registry belongs. task. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



55
56
57
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 55

def list_with_http_info(resource_group_name, registry_name, build_task_name, custom_headers:nil)
  list_async(resource_group_name, registry_name, build_task_name, custom_headers:custom_headers).value!
end

#update(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers: nil) ⇒ BuildStep

Updates a build step in a build task.

the container registry belongs. task. build task. parameters for updating a build step. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • build_step_update_parameters (BuildStepUpdateParameters)

    The

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BuildStep)

    operation results.



375
376
377
378
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 375

def update(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers:nil)
  response = update_async(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#update_async(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise

the container registry belongs. task. build task. parameters for updating a build step. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • registry_name (String)

    The name of the container registry.

  • build_task_name (String)

    The name of the container registry build

  • step_name (String)

    The name of a build step for a container registry

  • build_step_update_parameters (BuildStepUpdateParameters)

    The

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
# File 'lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb', line 396

def update_async(resource_group_name, registry_name, build_task_name, step_name, build_step_update_parameters, custom_headers:nil)
  # Send request
  promise = begin_update_async(resource_group_name, registry_name, build_task_name, step_name, build_step_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::V2018_02_01_preview::Models::BuildStep.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