Method: Azure::ARM::Resources::Deployments#create_or_update

Defined in:
lib/azure_mgmt_resources/deployments.rb

#create_or_update(resource_group_name, deployment_name, parameters, custom_headers = nil) ⇒ Concurrent::Promise

Create a named template deployment using a template.

is case insensitive. operation. uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. for the response.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group. The name

  • deployment_name (String)

    The name of the deployment.

  • parameters (Deployment)

    Additional parameters supplied to the

  • @client.api_version (String)

    Client Api Version.

  • @client.subscription_id (String)

    Gets subscription credentials which

  • @client.accept_language (String)

    Gets or sets the preferred language

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/azure_mgmt_resources/deployments.rb', line 238

def create_or_update(resource_group_name, deployment_name, parameters, custom_headers = nil)
  # Send request
  promise = begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      unless parsed_response.nil?
        parsed_response = DeploymentExtended.deserialize_object(parsed_response)
      end
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end