Class: Azure::Resources::Mgmt::V2019_07_01::Deployments
- Inherits:
-
Object
- Object
- Azure::Resources::Mgmt::V2019_07_01::Deployments
- Includes:
- MsRestAzure
- Defined in:
- lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb
Overview
Provides operations for working with resources and resource groups.
Instance Attribute Summary collapse
-
#client ⇒ ResourceManagementClient
readonly
Reference to the ResourceManagementClient.
Instance Method Summary collapse
-
#begin_create_or_update(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources to a resource group.
-
#begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Deploys resources to a resource group.
-
#begin_create_or_update_at_management_group_scope(group_id, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at management group scope.
-
#begin_create_or_update_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Deploys resources at management group scope.
-
#begin_create_or_update_at_management_group_scope_with_http_info(group_id, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deploys resources at management group scope.
-
#begin_create_or_update_at_scope(scope, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at a given scope.
-
#begin_create_or_update_at_scope_async(scope, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Deploys resources at a given scope.
-
#begin_create_or_update_at_scope_with_http_info(scope, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deploys resources at a given scope.
-
#begin_create_or_update_at_subscription_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at subscription scope.
-
#begin_create_or_update_at_subscription_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Deploys resources at subscription scope.
-
#begin_create_or_update_at_subscription_scope_with_http_info(deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deploys resources at subscription scope.
-
#begin_create_or_update_at_tenant_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at tenant scope.
-
#begin_create_or_update_at_tenant_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Deploys resources at tenant scope.
-
#begin_create_or_update_at_tenant_scope_with_http_info(deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deploys resources at tenant scope.
-
#begin_create_or_update_with_http_info(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deploys resources to a resource group.
-
#begin_delete(resource_group_name, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
-
#begin_delete_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a deployment from the deployment history.
-
#begin_delete_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
-
#begin_delete_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a deployment from the deployment history.
-
#begin_delete_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a deployment from the deployment history.
-
#begin_delete_at_scope(scope, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
-
#begin_delete_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a deployment from the deployment history.
-
#begin_delete_at_scope_with_http_info(scope, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a deployment from the deployment history.
-
#begin_delete_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
-
#begin_delete_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a deployment from the deployment history.
-
#begin_delete_at_subscription_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a deployment from the deployment history.
-
#begin_delete_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
-
#begin_delete_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a deployment from the deployment history.
-
#begin_delete_at_tenant_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a deployment from the deployment history.
-
#begin_delete_with_http_info(resource_group_name, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a deployment from the deployment history.
-
#begin_what_if(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ WhatIfOperationResult
Returns changes that will be made by the deployment if executed at the scope of the resource group.
-
#begin_what_if_async(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Returns changes that will be made by the deployment if executed at the scope of the resource group.
-
#begin_what_if_at_subscription_scope(deployment_name, parameters, custom_headers: nil) ⇒ WhatIfOperationResult
Returns changes that will be made by the deployment if executed at the scope of the subscription.
-
#begin_what_if_at_subscription_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Returns changes that will be made by the deployment if executed at the scope of the subscription.
-
#begin_what_if_at_subscription_scope_with_http_info(deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Returns changes that will be made by the deployment if executed at the scope of the subscription.
-
#begin_what_if_with_http_info(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Returns changes that will be made by the deployment if executed at the scope of the resource group.
-
#calculate_template_hash(template, custom_headers: nil) ⇒ TemplateHashResult
Calculate the hash of the given template.
-
#calculate_template_hash_async(template, custom_headers: nil) ⇒ Concurrent::Promise
Calculate the hash of the given template.
-
#calculate_template_hash_with_http_info(template, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Calculate the hash of the given template.
-
#cancel(resource_group_name, deployment_name, custom_headers: nil) ⇒ Object
Cancels a currently running template deployment.
-
#cancel_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a currently running template deployment.
-
#cancel_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ Object
Cancels a currently running template deployment.
-
#cancel_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a currently running template deployment.
-
#cancel_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a currently running template deployment.
-
#cancel_at_scope(scope, deployment_name, custom_headers: nil) ⇒ Object
Cancels a currently running template deployment.
-
#cancel_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a currently running template deployment.
-
#cancel_at_scope_with_http_info(scope, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a currently running template deployment.
-
#cancel_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ Object
Cancels a currently running template deployment.
-
#cancel_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a currently running template deployment.
-
#cancel_at_subscription_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a currently running template deployment.
-
#cancel_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ Object
Cancels a currently running template deployment.
-
#cancel_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a currently running template deployment.
-
#cancel_at_tenant_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a currently running template deployment.
-
#cancel_with_http_info(resource_group_name, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a currently running template deployment.
-
#check_existence(resource_group_name, deployment_name, custom_headers: nil) ⇒ Boolean
Checks whether the deployment exists.
-
#check_existence_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the deployment exists.
-
#check_existence_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ Boolean
Checks whether the deployment exists.
-
#check_existence_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the deployment exists.
-
#check_existence_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the deployment exists.
-
#check_existence_at_scope(scope, deployment_name, custom_headers: nil) ⇒ Boolean
Checks whether the deployment exists.
-
#check_existence_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the deployment exists.
-
#check_existence_at_scope_with_http_info(scope, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the deployment exists.
-
#check_existence_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ Boolean
Checks whether the deployment exists.
-
#check_existence_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the deployment exists.
-
#check_existence_at_subscription_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the deployment exists.
-
#check_existence_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ Boolean
Checks whether the deployment exists.
-
#check_existence_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the deployment exists.
-
#check_existence_at_tenant_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the deployment exists.
-
#check_existence_with_http_info(resource_group_name, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the deployment exists.
-
#create_or_update(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources to a resource group.
-
#create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
the resources to.
-
#create_or_update_at_management_group_scope(group_id, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at management group scope.
-
#create_or_update_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
operation.
-
#create_or_update_at_scope(scope, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at a given scope.
-
#create_or_update_at_scope_async(scope, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
operation.
-
#create_or_update_at_subscription_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at subscription scope.
-
#create_or_update_at_subscription_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
operation.
-
#create_or_update_at_tenant_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at tenant scope.
-
#create_or_update_at_tenant_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
operation.
-
#delete(resource_group_name, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
-
#delete_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
deployment to delete.
-
#delete_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
-
#delete_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#delete_at_scope(scope, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
-
#delete_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#delete_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
-
#delete_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#delete_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
-
#delete_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#export_template(resource_group_name, deployment_name, custom_headers: nil) ⇒ DeploymentExportResult
Exports the template used for specified deployment.
-
#export_template_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Exports the template used for specified deployment.
-
#export_template_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ DeploymentExportResult
Exports the template used for specified deployment.
-
#export_template_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Exports the template used for specified deployment.
-
#export_template_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Exports the template used for specified deployment.
-
#export_template_at_scope(scope, deployment_name, custom_headers: nil) ⇒ DeploymentExportResult
Exports the template used for specified deployment.
-
#export_template_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Exports the template used for specified deployment.
-
#export_template_at_scope_with_http_info(scope, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Exports the template used for specified deployment.
-
#export_template_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ DeploymentExportResult
Exports the template used for specified deployment.
-
#export_template_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Exports the template used for specified deployment.
-
#export_template_at_subscription_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Exports the template used for specified deployment.
-
#export_template_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ DeploymentExportResult
Exports the template used for specified deployment.
-
#export_template_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Exports the template used for specified deployment.
-
#export_template_at_tenant_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Exports the template used for specified deployment.
-
#export_template_with_http_info(resource_group_name, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Exports the template used for specified deployment.
-
#get(resource_group_name, deployment_name, custom_headers: nil) ⇒ DeploymentExtended
Gets a deployment.
-
#get_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a deployment.
-
#get_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ DeploymentExtended
Gets a deployment.
-
#get_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a deployment.
-
#get_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a deployment.
-
#get_at_scope(scope, deployment_name, custom_headers: nil) ⇒ DeploymentExtended
Gets a deployment.
-
#get_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a deployment.
-
#get_at_scope_with_http_info(scope, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a deployment.
-
#get_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ DeploymentExtended
Gets a deployment.
-
#get_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a deployment.
-
#get_at_subscription_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a deployment.
-
#get_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ DeploymentExtended
Gets a deployment.
-
#get_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a deployment.
-
#get_at_tenant_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a deployment.
-
#get_with_http_info(resource_group_name, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a deployment.
-
#initialize(client) ⇒ Deployments
constructor
Creates and initializes a new instance of the Deployments class.
-
#list_at_management_group_scope(group_id, filter: nil, top: nil, custom_headers: nil) ⇒ Array<DeploymentExtended>
Get all the deployments for a management group.
-
#list_at_management_group_scope_as_lazy(group_id, filter: nil, top: nil, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a management group.
-
#list_at_management_group_scope_async(group_id, filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a management group.
-
#list_at_management_group_scope_next(next_page_link, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a management group.
-
#list_at_management_group_scope_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a management group.
-
#list_at_management_group_scope_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a management group.
-
#list_at_management_group_scope_with_http_info(group_id, filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a management group.
-
#list_at_scope(scope, filter: nil, top: nil, custom_headers: nil) ⇒ Array<DeploymentExtended>
Get all the deployments at the given scope.
-
#list_at_scope_as_lazy(scope, filter: nil, top: nil, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments at the given scope.
-
#list_at_scope_async(scope, filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments at the given scope.
-
#list_at_scope_next(next_page_link, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments at the given scope.
-
#list_at_scope_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments at the given scope.
-
#list_at_scope_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments at the given scope.
-
#list_at_scope_with_http_info(scope, filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments at the given scope.
-
#list_at_subscription_scope(filter: nil, top: nil, custom_headers: nil) ⇒ Array<DeploymentExtended>
Get all the deployments for a subscription.
-
#list_at_subscription_scope_as_lazy(filter: nil, top: nil, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a subscription.
-
#list_at_subscription_scope_async(filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a subscription.
-
#list_at_subscription_scope_next(next_page_link, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a subscription.
-
#list_at_subscription_scope_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a subscription.
-
#list_at_subscription_scope_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a subscription.
-
#list_at_subscription_scope_with_http_info(filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a subscription.
-
#list_at_tenant_scope(filter: nil, top: nil, custom_headers: nil) ⇒ Array<DeploymentExtended>
Get all the deployments at the tenant scope.
-
#list_at_tenant_scope_as_lazy(filter: nil, top: nil, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments at the tenant scope.
-
#list_at_tenant_scope_async(filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments at the tenant scope.
-
#list_at_tenant_scope_next(next_page_link, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments at the tenant scope.
-
#list_at_tenant_scope_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments at the tenant scope.
-
#list_at_tenant_scope_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments at the tenant scope.
-
#list_at_tenant_scope_with_http_info(filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments at the tenant scope.
-
#list_by_resource_group(resource_group_name, filter: nil, top: nil, custom_headers: nil) ⇒ Array<DeploymentExtended>
Get all the deployments for a resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, filter: nil, top: nil, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a resource group.
-
#list_by_resource_group_async(resource_group_name, filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a resource group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a resource group.
-
#validate(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentValidateResult
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_async(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_management_group_scope(group_id, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentValidateResult
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_management_group_scope_with_http_info(group_id, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_scope(scope, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentValidateResult
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_scope_async(scope, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_scope_with_http_info(scope, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_subscription_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentValidateResult
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_subscription_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_subscription_scope_with_http_info(deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_tenant_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentValidateResult
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_tenant_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_at_tenant_scope_with_http_info(deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#validate_with_http_info(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
-
#what_if(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ WhatIfOperationResult
Returns changes that will be made by the deployment if executed at the scope of the resource group.
-
#what_if_async(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
template will be deployed to.
-
#what_if_at_subscription_scope(deployment_name, parameters, custom_headers: nil) ⇒ WhatIfOperationResult
Returns changes that will be made by the deployment if executed at the scope of the subscription.
-
#what_if_at_subscription_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
Constructor Details
#initialize(client) ⇒ Deployments
Creates and initializes a new instance of the Deployments class.
17 18 19 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ ResourceManagementClient (readonly)
Returns reference to the ResourceManagementClient.
22 23 24 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 22 def client @client end |
Instance Method Details
#begin_create_or_update(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources to a resource group.
You can provide the template and parameters directly in the request or link to JSON files.
the resources to. The name is case insensitive. The resource group must already exist. operation. will be added to the HTTP request.
4926 4927 4928 4929 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4926 def begin_create_or_update(resource_group_name, deployment_name, parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Deploys resources to a resource group.
You can provide the template and parameters directly in the request or link to JSON files.
the resources to. The name is case insensitive. The resource group must already exist. operation. to the HTTP request.
4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4969 def begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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(:put, 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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_create_or_update_at_management_group_scope(group_id, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at management group scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
4323 4324 4325 4326 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4323 def begin_create_or_update_at_management_group_scope(group_id, deployment_name, parameters, custom_headers:nil) response = begin_create_or_update_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Deploys resources at management group scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. to the HTTP request.
4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4362 def begin_create_or_update_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'group_id is nil' if group_id.nil? fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '90'" if !group_id.nil? && group_id.length > 90 fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'groupId' => group_id,'deploymentName' => deployment_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, ) 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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_create_or_update_at_management_group_scope_with_http_info(group_id, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deploys resources at management group scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
4343 4344 4345 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4343 def begin_create_or_update_at_management_group_scope_with_http_info(group_id, deployment_name, parameters, custom_headers:nil) begin_create_or_update_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers:custom_headers).value! end |
#begin_create_or_update_at_scope(scope, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at a given scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
3841 3842 3843 3844 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3841 def begin_create_or_update_at_scope(scope, deployment_name, parameters, custom_headers:nil) response = begin_create_or_update_at_scope_async(scope, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_at_scope_async(scope, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Deploys resources at a given scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. to the HTTP request.
3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3880 def begin_create_or_update_at_scope_async(scope, deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{scope}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'scope' => scope,'deploymentName' => deployment_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, ) 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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_create_or_update_at_scope_with_http_info(scope, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deploys resources at a given scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
3861 3862 3863 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3861 def begin_create_or_update_at_scope_with_http_info(scope, deployment_name, parameters, custom_headers:nil) begin_create_or_update_at_scope_async(scope, deployment_name, parameters, custom_headers:custom_headers).value! end |
#begin_create_or_update_at_subscription_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at subscription scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
4565 4566 4567 4568 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4565 def begin_create_or_update_at_subscription_scope(deployment_name, parameters, custom_headers:nil) response = begin_create_or_update_at_subscription_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_at_subscription_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Deploys resources at subscription scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. to the HTTP request.
4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4602 def begin_create_or_update_at_subscription_scope_async(deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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(:put, 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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_create_or_update_at_subscription_scope_with_http_info(deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deploys resources at subscription scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
4584 4585 4586 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4584 def begin_create_or_update_at_subscription_scope_with_http_info(deployment_name, parameters, custom_headers:nil) begin_create_or_update_at_subscription_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! end |
#begin_create_or_update_at_tenant_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at tenant scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
4080 4081 4082 4083 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4080 def begin_create_or_update_at_tenant_scope(deployment_name, parameters, custom_headers:nil) response = begin_create_or_update_at_tenant_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_at_tenant_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Deploys resources at tenant scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. to the HTTP request.
4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4117 def begin_create_or_update_at_tenant_scope_async(deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_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, ) 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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_create_or_update_at_tenant_scope_with_http_info(deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deploys resources at tenant scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
4099 4100 4101 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4099 def begin_create_or_update_at_tenant_scope_with_http_info(deployment_name, parameters, custom_headers:nil) begin_create_or_update_at_tenant_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! end |
#begin_create_or_update_with_http_info(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deploys resources to a resource group.
You can provide the template and parameters directly in the request or link to JSON files.
the resources to. The name is case insensitive. The resource group must already exist. operation. will be added to the HTTP request.
4948 4949 4950 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4948 def begin_create_or_update_with_http_info(resource_group_name, deployment_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. Deleting a template deployment does not affect the state of the resource group. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
deployment to delete. The name is case insensitive. will be added to the HTTP request.
4805 4806 4807 4808 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4805 def begin_delete(resource_group_name, deployment_name, custom_headers:nil) response = begin_delete_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. Deleting a template deployment does not affect the state of the resource group. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
deployment to delete. The name is case insensitive. to the HTTP request.
4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4858 def begin_delete_async(resource_group_name, deployment_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id}, 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, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 || status_code == 204 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_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
4210 4211 4212 4213 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4210 def begin_delete_at_management_group_scope(group_id, deployment_name, custom_headers:nil) response = begin_delete_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! nil end |
#begin_delete_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
to the HTTP request.
4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4259 def begin_delete_at_management_group_scope_async(group_id, deployment_name, custom_headers:nil) fail ArgumentError, 'group_id is nil' if group_id.nil? fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '90'" if !group_id.nil? && group_id.length > 90 fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = 'providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'groupId' => group_id,'deploymentName' => deployment_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, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 || status_code == 204 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_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
4235 4236 4237 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4235 def begin_delete_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers:nil) begin_delete_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! end |
#begin_delete_at_scope(scope, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
3730 3731 3732 3733 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3730 def begin_delete_at_scope(scope, deployment_name, custom_headers:nil) response = begin_delete_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! nil end |
#begin_delete_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
to the HTTP request.
3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3779 def begin_delete_at_scope_async(scope, deployment_name, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = '{scope}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'scope' => scope,'deploymentName' => deployment_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, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 || status_code == 204 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_at_scope_with_http_info(scope, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
3755 3756 3757 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3755 def begin_delete_at_scope_with_http_info(scope, deployment_name, custom_headers:nil) begin_delete_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! end |
#begin_delete_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
4457 4458 4459 4460 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4457 def begin_delete_at_subscription_scope(deployment_name, custom_headers:nil) response = begin_delete_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! nil end |
#begin_delete_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
to the HTTP request.
4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4504 def begin_delete_at_subscription_scope_async(deployment_name, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id}, 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, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 || status_code == 204 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_at_subscription_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
4481 4482 4483 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4481 def begin_delete_at_subscription_scope_with_http_info(deployment_name, custom_headers:nil) begin_delete_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! end |
#begin_delete_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
3973 3974 3975 3976 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3973 def begin_delete_at_tenant_scope(deployment_name, custom_headers:nil) response = begin_delete_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! nil end |
#begin_delete_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
to the HTTP request.
4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4020 def begin_delete_at_tenant_scope_async(deployment_name, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = 'providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_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, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 || status_code == 204 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_at_tenant_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
3997 3998 3999 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3997 def begin_delete_at_tenant_scope_with_http_info(deployment_name, custom_headers:nil) begin_delete_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! end |
#begin_delete_with_http_info(resource_group_name, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. Deleting a template deployment does not affect the state of the resource group. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
deployment to delete. The name is case insensitive. will be added to the HTTP request.
4832 4833 4834 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4832 def begin_delete_with_http_info(resource_group_name, deployment_name, custom_headers:nil) begin_delete_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! end |
#begin_what_if(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ WhatIfOperationResult
Returns changes that will be made by the deployment if executed at the scope of the resource group.
template will be deployed to. The name is case insensitive. will be added to the HTTP request.
5061 5062 5063 5064 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5061 def begin_what_if(resource_group_name, deployment_name, parameters, custom_headers:nil) response = begin_what_if_async(resource_group_name, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_what_if_async(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Returns changes that will be made by the deployment if executed at the scope of the resource group.
template will be deployed to. The name is case insensitive. to the HTTP request.
5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5096 def begin_what_if_async(resource_group_name, deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentWhatIf.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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(: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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::WhatIfOperationResult.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_what_if_at_subscription_scope(deployment_name, parameters, custom_headers: nil) ⇒ WhatIfOperationResult
Returns changes that will be made by the deployment if executed at the scope of the subscription.
will be added to the HTTP request.
4688 4689 4690 4691 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4688 def begin_what_if_at_subscription_scope(deployment_name, parameters, custom_headers:nil) response = begin_what_if_at_subscription_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_what_if_at_subscription_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Returns changes that will be made by the deployment if executed at the scope of the subscription.
to the HTTP request.
4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4719 def begin_what_if_at_subscription_scope_async(deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentWhatIf.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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(: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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::WhatIfOperationResult.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_what_if_at_subscription_scope_with_http_info(deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Returns changes that will be made by the deployment if executed at the scope of the subscription.
will be added to the HTTP request.
4704 4705 4706 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 4704 def begin_what_if_at_subscription_scope_with_http_info(deployment_name, parameters, custom_headers:nil) begin_what_if_at_subscription_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! end |
#begin_what_if_with_http_info(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Returns changes that will be made by the deployment if executed at the scope of the resource group.
template will be deployed to. The name is case insensitive. will be added to the HTTP request.
5079 5080 5081 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5079 def begin_what_if_with_http_info(resource_group_name, deployment_name, parameters, custom_headers:nil) begin_what_if_async(resource_group_name, deployment_name, parameters, custom_headers:custom_headers).value! end |
#calculate_template_hash(template, custom_headers: nil) ⇒ TemplateHashResult
Calculate the hash of the given template.
will be added to the HTTP request.
3618 3619 3620 3621 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3618 def calculate_template_hash(template, custom_headers:nil) response = calculate_template_hash_async(template, custom_headers:custom_headers).value! response.body unless response.nil? end |
#calculate_template_hash_async(template, custom_headers: nil) ⇒ Concurrent::Promise
Calculate the hash of the given template.
to the HTTP request.
3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3645 def calculate_template_hash_async(template, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'template is nil' if template.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 = { client_side_validation: true, required: true, serialized_name: 'template', type: { name: 'Object' } } request_content = @client.serialize(request_mapper, template) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'providers/Microsoft.Resources/calculateTemplateHash' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], 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(: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::Resources::Mgmt::V2019_07_01::Models::TemplateHashResult.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 |
#calculate_template_hash_with_http_info(template, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Calculate the hash of the given template.
will be added to the HTTP request.
3632 3633 3634 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3632 def calculate_template_hash_with_http_info(template, custom_headers:nil) calculate_template_hash_async(template, custom_headers:custom_headers).value! end |
#cancel(resource_group_name, deployment_name, custom_headers: nil) ⇒ Object
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resource group partially deployed.
is case insensitive. will be added to the HTTP request.
3132 3133 3134 3135 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3132 def cancel(resource_group_name, deployment_name, custom_headers:nil) response = cancel_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! nil end |
#cancel_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resource group partially deployed.
is case insensitive. to the HTTP request.
3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3173 def cancel_async(resource_group_name, deployment_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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.Resources/deployments/{deploymentName}/cancel' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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 == 204 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 |
#cancel_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ Object
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
will be added to the HTTP request.
1687 1688 1689 1690 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1687 def cancel_at_management_group_scope(group_id, deployment_name, custom_headers:nil) response = cancel_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! nil end |
#cancel_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
to the HTTP request.
1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1726 def cancel_at_management_group_scope_async(group_id, deployment_name, custom_headers:nil) fail ArgumentError, 'group_id is nil' if group_id.nil? fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '90'" if !group_id.nil? && group_id.length > 90 fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = 'providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'groupId' => group_id,'deploymentName' => deployment_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, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 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 |
#cancel_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
will be added to the HTTP request.
1707 1708 1709 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1707 def cancel_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers:nil) cancel_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! end |
#cancel_at_scope(scope, deployment_name, custom_headers: nil) ⇒ Object
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
will be added to the HTTP request.
318 319 320 321 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 318 def cancel_at_scope(scope, deployment_name, custom_headers:nil) response = cancel_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! nil end |
#cancel_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
to the HTTP request.
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 397 398 399 400 401 402 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 357 def cancel_at_scope_async(scope, deployment_name, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = '{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'scope' => scope,'deploymentName' => deployment_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, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 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 |
#cancel_at_scope_with_http_info(scope, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
will be added to the HTTP request.
338 339 340 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 338 def cancel_at_scope_with_http_info(scope, deployment_name, custom_headers:nil) cancel_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! end |
#cancel_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ Object
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
will be added to the HTTP request.
2381 2382 2383 2384 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2381 def cancel_at_subscription_scope(deployment_name, custom_headers:nil) response = cancel_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! nil end |
#cancel_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
to the HTTP request.
2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2418 def cancel_at_subscription_scope_async(deployment_name, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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 == 204 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 |
#cancel_at_subscription_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
will be added to the HTTP request.
2400 2401 2402 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2400 def cancel_at_subscription_scope_with_http_info(deployment_name, custom_headers:nil) cancel_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! end |
#cancel_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ Object
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
will be added to the HTTP request.
1002 1003 1004 1005 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1002 def cancel_at_tenant_scope(deployment_name, custom_headers:nil) response = cancel_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! nil end |
#cancel_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
to the HTTP request.
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1039 def cancel_at_tenant_scope_async(deployment_name, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = 'providers/Microsoft.Resources/deployments/{deploymentName}/cancel' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_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, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 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 |
#cancel_at_tenant_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
will be added to the HTTP request.
1021 1022 1023 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1021 def cancel_at_tenant_scope_with_http_info(deployment_name, custom_headers:nil) cancel_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! end |
#cancel_with_http_info(resource_group_name, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a currently running template deployment.
You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resource group partially deployed.
is case insensitive. will be added to the HTTP request.
3153 3154 3155 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3153 def cancel_with_http_info(resource_group_name, deployment_name, custom_headers:nil) cancel_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! end |
#check_existence(resource_group_name, deployment_name, custom_headers: nil) ⇒ Boolean
Checks whether the deployment exists.
deployment to check. The name is case insensitive. will be added to the HTTP request.
2878 2879 2880 2881 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2878 def check_existence(resource_group_name, deployment_name, custom_headers:nil) response = check_existence_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_existence_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the deployment exists.
deployment to check. The name is case insensitive. to the HTTP request.
2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2909 def check_existence_async(resource_group_name, deployment_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:head, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.body = (status_code == 204) 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 |
#check_existence_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ Boolean
Checks whether the deployment exists.
will be added to the HTTP request.
1447 1448 1449 1450 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1447 def check_existence_at_management_group_scope(group_id, deployment_name, custom_headers:nil) response = check_existence_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_existence_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the deployment exists.
to the HTTP request.
1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1476 def check_existence_at_management_group_scope_async(group_id, deployment_name, custom_headers:nil) fail ArgumentError, 'group_id is nil' if group_id.nil? fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '90'" if !group_id.nil? && group_id.length > 90 fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = 'providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'groupId' => group_id,'deploymentName' => deployment_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:head, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.body = (status_code == 204) 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 |
#check_existence_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the deployment exists.
will be added to the HTTP request.
1462 1463 1464 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1462 def check_existence_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers:nil) check_existence_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! end |
#check_existence_at_scope(scope, deployment_name, custom_headers: nil) ⇒ Boolean
Checks whether the deployment exists.
will be added to the HTTP request.
82 83 84 85 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 82 def check_existence_at_scope(scope, deployment_name, custom_headers:nil) response = check_existence_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_existence_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the deployment exists.
to the HTTP request.
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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 111 def check_existence_at_scope_async(scope, deployment_name, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = '{scope}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'scope' => scope,'deploymentName' => deployment_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:head, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.body = (status_code == 204) 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 |
#check_existence_at_scope_with_http_info(scope, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the deployment exists.
will be added to the HTTP request.
97 98 99 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 97 def check_existence_at_scope_with_http_info(scope, deployment_name, custom_headers:nil) check_existence_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! end |
#check_existence_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ Boolean
Checks whether the deployment exists.
will be added to the HTTP request.
2153 2154 2155 2156 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2153 def check_existence_at_subscription_scope(deployment_name, custom_headers:nil) response = check_existence_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_existence_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the deployment exists.
to the HTTP request.
2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2180 def check_existence_at_subscription_scope_async(deployment_name, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:head, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.body = (status_code == 204) 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 |
#check_existence_at_subscription_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the deployment exists.
will be added to the HTTP request.
2167 2168 2169 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2167 def check_existence_at_subscription_scope_with_http_info(deployment_name, custom_headers:nil) check_existence_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! end |
#check_existence_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ Boolean
Checks whether the deployment exists.
will be added to the HTTP request.
776 777 778 779 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 776 def check_existence_at_tenant_scope(deployment_name, custom_headers:nil) response = check_existence_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_existence_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the deployment exists.
to the HTTP request.
803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 803 def check_existence_at_tenant_scope_async(deployment_name, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = 'providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:head, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.body = (status_code == 204) 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 |
#check_existence_at_tenant_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the deployment exists.
will be added to the HTTP request.
790 791 792 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 790 def check_existence_at_tenant_scope_with_http_info(deployment_name, custom_headers:nil) check_existence_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! end |
#check_existence_with_http_info(resource_group_name, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the deployment exists.
deployment to check. The name is case insensitive. will be added to the HTTP request.
2894 2895 2896 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2894 def check_existence_with_http_info(resource_group_name, deployment_name, custom_headers:nil) check_existence_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! end |
#create_or_update(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources to a resource group.
You can provide the template and parameters directly in the request or link to JSON files.
the resources to. The name is case insensitive. The resource group must already exist. operation. will be added to the HTTP request.
2978 2979 2980 2981 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2978 def create_or_update(resource_group_name, deployment_name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
the resources to. The name is case insensitive. The resource group must already exist. operation. will be added to the HTTP request.
response.
2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2996 def create_or_update_async(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:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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 |
#create_or_update_at_management_group_scope(group_id, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at management group scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
1541 1542 1543 1544 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1541 def create_or_update_at_management_group_scope(group_id, deployment_name, parameters, custom_headers:nil) response = create_or_update_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
operation. will be added to the HTTP request.
response.
1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1557 def create_or_update_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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 |
#create_or_update_at_scope(scope, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at a given scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
174 175 176 177 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 174 def create_or_update_at_scope(scope, deployment_name, parameters, custom_headers:nil) response = create_or_update_at_scope_async(scope, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_at_scope_async(scope, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
operation. will be added to the HTTP request.
response.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 190 def create_or_update_at_scope_async(scope, deployment_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_at_scope_async(scope, deployment_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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 |
#create_or_update_at_subscription_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at subscription scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
2242 2243 2244 2245 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2242 def create_or_update_at_subscription_scope(deployment_name, parameters, custom_headers:nil) response = create_or_update_at_subscription_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_at_subscription_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
operation. will be added to the HTTP request.
response.
2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2257 def create_or_update_at_subscription_scope_async(deployment_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_at_subscription_scope_async(deployment_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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 |
#create_or_update_at_tenant_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentExtended
Deploys resources at tenant scope.
You can provide the template and parameters directly in the request or link to JSON files.
operation. will be added to the HTTP request.
864 865 866 867 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 864 def create_or_update_at_tenant_scope(deployment_name, parameters, custom_headers:nil) response = create_or_update_at_tenant_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_at_tenant_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
operation. will be added to the HTTP request.
response.
879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 879 def create_or_update_at_tenant_scope_async(deployment_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_at_tenant_scope_async(deployment_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. Deleting a template deployment does not affect the state of the resource group. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
deployment to delete. The name is case insensitive. will be added to the HTTP request.
2836 2837 2838 2839 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2836 def delete(resource_group_name, deployment_name, custom_headers:nil) response = delete_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
deployment to delete. The name is case insensitive. will be added to the HTTP request.
response.
2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2851 def delete_async(resource_group_name, deployment_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, deployment_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 |
#delete_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
1407 1408 1409 1410 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1407 def delete_at_management_group_scope(group_id, deployment_name, custom_headers:nil) response = delete_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! nil end |
#delete_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1421 def delete_at_management_group_scope_async(group_id, deployment_name, custom_headers:nil) # Send request promise = begin_delete_at_management_group_scope_async(group_id, deployment_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 |
#delete_at_scope(scope, deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
42 43 44 45 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 42 def delete_at_scope(scope, deployment_name, custom_headers:nil) response = delete_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! nil end |
#delete_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 56 def delete_at_scope_async(scope, deployment_name, custom_headers:nil) # Send request promise = begin_delete_at_scope_async(scope, deployment_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 |
#delete_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
2115 2116 2117 2118 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2115 def delete_at_subscription_scope(deployment_name, custom_headers:nil) response = delete_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! nil end |
#delete_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2128 def delete_at_subscription_scope_async(deployment_name, custom_headers:nil) # Send request promise = begin_delete_at_subscription_scope_async(deployment_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 |
#delete_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ Object
Deletes a deployment from the deployment history.
A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
will be added to the HTTP request.
738 739 740 741 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 738 def delete_at_tenant_scope(deployment_name, custom_headers:nil) response = delete_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! nil end |
#delete_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 751 def delete_at_tenant_scope_async(deployment_name, custom_headers:nil) # Send request promise = begin_delete_at_tenant_scope_async(deployment_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 |
#export_template(resource_group_name, deployment_name, custom_headers: nil) ⇒ DeploymentExportResult
Exports the template used for specified deployment.
is case insensitive. will be added to the HTTP request.
3409 3410 3411 3412 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3409 def export_template(resource_group_name, deployment_name, custom_headers:nil) response = export_template_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#export_template_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Exports the template used for specified deployment.
is case insensitive. to the HTTP request.
3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3440 def export_template_async(resource_group_name, deployment_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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.Resources/deployments/{deploymentName}/exportTemplate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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::Resources::Mgmt::V2019_07_01::Models::DeploymentExportResult.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 |
#export_template_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ DeploymentExportResult
Exports the template used for specified deployment.
will be added to the HTTP request.
1907 1908 1909 1910 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1907 def export_template_at_management_group_scope(group_id, deployment_name, custom_headers:nil) response = export_template_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#export_template_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Exports the template used for specified deployment.
to the HTTP request.
1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1936 def export_template_at_management_group_scope_async(group_id, deployment_name, custom_headers:nil) fail ArgumentError, 'group_id is nil' if group_id.nil? fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '90'" if !group_id.nil? && group_id.length > 90 fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = 'providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'groupId' => group_id,'deploymentName' => deployment_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, ) 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExportResult.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 |
#export_template_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Exports the template used for specified deployment.
will be added to the HTTP request.
1922 1923 1924 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1922 def export_template_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers:nil) export_template_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! end |
#export_template_at_scope(scope, deployment_name, custom_headers: nil) ⇒ DeploymentExportResult
Exports the template used for specified deployment.
will be added to the HTTP request.
534 535 536 537 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 534 def export_template_at_scope(scope, deployment_name, custom_headers:nil) response = export_template_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#export_template_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Exports the template used for specified deployment.
to the HTTP request.
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 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 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 563 def export_template_at_scope_async(scope, deployment_name, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = '{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'scope' => scope,'deploymentName' => deployment_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, ) 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExportResult.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 |
#export_template_at_scope_with_http_info(scope, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Exports the template used for specified deployment.
will be added to the HTTP request.
549 550 551 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 549 def export_template_at_scope_with_http_info(scope, deployment_name, custom_headers:nil) export_template_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! end |
#export_template_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ DeploymentExportResult
Exports the template used for specified deployment.
will be added to the HTTP request.
2634 2635 2636 2637 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2634 def export_template_at_subscription_scope(deployment_name, custom_headers:nil) response = export_template_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#export_template_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Exports the template used for specified deployment.
to the HTTP request.
2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2661 def export_template_at_subscription_scope_async(deployment_name, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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::Resources::Mgmt::V2019_07_01::Models::DeploymentExportResult.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 |
#export_template_at_subscription_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Exports the template used for specified deployment.
will be added to the HTTP request.
2648 2649 2650 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2648 def export_template_at_subscription_scope_with_http_info(deployment_name, custom_headers:nil) export_template_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! end |
#export_template_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ DeploymentExportResult
Exports the template used for specified deployment.
will be added to the HTTP request.
1210 1211 1212 1213 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1210 def export_template_at_tenant_scope(deployment_name, custom_headers:nil) response = export_template_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#export_template_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Exports the template used for specified deployment.
to the HTTP request.
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1237 def export_template_at_tenant_scope_async(deployment_name, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = 'providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_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, ) 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExportResult.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 |
#export_template_at_tenant_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Exports the template used for specified deployment.
will be added to the HTTP request.
1224 1225 1226 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1224 def export_template_at_tenant_scope_with_http_info(deployment_name, custom_headers:nil) export_template_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! end |
#export_template_with_http_info(resource_group_name, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Exports the template used for specified deployment.
is case insensitive. will be added to the HTTP request.
3425 3426 3427 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3425 def export_template_with_http_info(resource_group_name, deployment_name, custom_headers:nil) export_template_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! end |
#get(resource_group_name, deployment_name, custom_headers: nil) ⇒ DeploymentExtended
Gets a deployment.
is case insensitive. will be added to the HTTP request.
3025 3026 3027 3028 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3025 def get(resource_group_name, deployment_name, custom_headers:nil) response = get_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a deployment.
is case insensitive. to the HTTP request.
3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3056 def get_async(resource_group_name, deployment_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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_at_management_group_scope(group_id, deployment_name, custom_headers: nil) ⇒ DeploymentExtended
Gets a deployment.
will be added to the HTTP request.
1585 1586 1587 1588 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1585 def get_at_management_group_scope(group_id, deployment_name, custom_headers:nil) response = get_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_at_management_group_scope_async(group_id, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a deployment.
to the HTTP request.
1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1614 def get_at_management_group_scope_async(group_id, deployment_name, custom_headers:nil) fail ArgumentError, 'group_id is nil' if group_id.nil? fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '90'" if !group_id.nil? && group_id.length > 90 fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = 'providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'groupId' => group_id,'deploymentName' => deployment_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, ) 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a deployment.
will be added to the HTTP request.
1600 1601 1602 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1600 def get_at_management_group_scope_with_http_info(group_id, deployment_name, custom_headers:nil) get_at_management_group_scope_async(group_id, deployment_name, custom_headers:custom_headers).value! end |
#get_at_scope(scope, deployment_name, custom_headers: nil) ⇒ DeploymentExtended
Gets a deployment.
will be added to the HTTP request.
218 219 220 221 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 218 def get_at_scope(scope, deployment_name, custom_headers:nil) response = get_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_at_scope_async(scope, deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a deployment.
to the HTTP request.
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 247 def get_at_scope_async(scope, deployment_name, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = '{scope}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'scope' => scope,'deploymentName' => deployment_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, ) 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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_at_scope_with_http_info(scope, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a deployment.
will be added to the HTTP request.
233 234 235 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 233 def get_at_scope_with_http_info(scope, deployment_name, custom_headers:nil) get_at_scope_async(scope, deployment_name, custom_headers:custom_headers).value! end |
#get_at_subscription_scope(deployment_name, custom_headers: nil) ⇒ DeploymentExtended
Gets a deployment.
will be added to the HTTP request.
2284 2285 2286 2287 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2284 def get_at_subscription_scope(deployment_name, custom_headers:nil) response = get_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_at_subscription_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a deployment.
to the HTTP request.
2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2311 def get_at_subscription_scope_async(deployment_name, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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}/providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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_at_subscription_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a deployment.
will be added to the HTTP request.
2298 2299 2300 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2298 def get_at_subscription_scope_with_http_info(deployment_name, custom_headers:nil) get_at_subscription_scope_async(deployment_name, custom_headers:custom_headers).value! end |
#get_at_tenant_scope(deployment_name, custom_headers: nil) ⇒ DeploymentExtended
Gets a deployment.
will be added to the HTTP request.
906 907 908 909 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 906 def get_at_tenant_scope(deployment_name, custom_headers:nil) response = get_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_at_tenant_scope_async(deployment_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a deployment.
to the HTTP request.
933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 933 def get_at_tenant_scope_async(deployment_name, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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 = 'providers/Microsoft.Resources/deployments/{deploymentName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_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, ) 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::Resources::Mgmt::V2019_07_01::Models::DeploymentExtended.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_at_tenant_scope_with_http_info(deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a deployment.
will be added to the HTTP request.
920 921 922 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 920 def get_at_tenant_scope_with_http_info(deployment_name, custom_headers:nil) get_at_tenant_scope_async(deployment_name, custom_headers:custom_headers).value! end |
#get_with_http_info(resource_group_name, deployment_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a deployment.
is case insensitive. will be added to the HTTP request.
3041 3042 3043 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3041 def get_with_http_info(resource_group_name, deployment_name, custom_headers:nil) get_async(resource_group_name, deployment_name, custom_headers:custom_headers).value! end |
#list_at_management_group_scope(group_id, filter: nil, top: nil, custom_headers: nil) ⇒ Array<DeploymentExtended>
Get all the deployments for a management group.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
2008 2009 2010 2011 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2008 def list_at_management_group_scope(group_id, filter:nil, top:nil, custom_headers:nil) first_page = list_at_management_group_scope_as_lazy(group_id, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end |
#list_at_management_group_scope_as_lazy(group_id, filter: nil, top: nil, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a management group.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
response.
5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5678 def list_at_management_group_scope_as_lazy(group_id, filter:nil, top:nil, custom_headers:nil) response = list_at_management_group_scope_async(group_id, 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_at_management_group_scope_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_at_management_group_scope_async(group_id, filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a management group.
can use $filter=provisioningState eq ‘state’. all deployments. to the HTTP request.
2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2043 def list_at_management_group_scope_async(group_id, filter:nil, top:nil, custom_headers:nil) fail ArgumentError, 'group_id is nil' if group_id.nil? fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '90'" if !group_id.nil? && group_id.length > 90 fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 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 = 'providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'groupId' => group_id}, query_params: {'$filter' => filter,'$top' => top,'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::Resources::Mgmt::V2019_07_01::Models::DeploymentListResult.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_at_management_group_scope_next(next_page_link, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a management group.
to List operation. will be added to the HTTP request.
5355 5356 5357 5358 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5355 def list_at_management_group_scope_next(next_page_link, custom_headers:nil) response = list_at_management_group_scope_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_at_management_group_scope_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a management group.
to List operation. to the HTTP request.
5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5384 def list_at_management_group_scope_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::Resources::Mgmt::V2019_07_01::Models::DeploymentListResult.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_at_management_group_scope_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a management group.
to List operation. will be added to the HTTP request.
5370 5371 5372 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5370 def list_at_management_group_scope_next_with_http_info(next_page_link, custom_headers:nil) list_at_management_group_scope_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_at_management_group_scope_with_http_info(group_id, filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a management group.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
2026 2027 2028 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2026 def list_at_management_group_scope_with_http_info(group_id, filter:nil, top:nil, custom_headers:nil) list_at_management_group_scope_async(group_id, filter:filter, top:top, custom_headers:custom_headers).value! end |
#list_at_scope(scope, filter: nil, top: nil, custom_headers: nil) ⇒ Array<DeploymentExtended>
Get all the deployments at the given scope.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
633 634 635 636 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 633 def list_at_scope(scope, filter:nil, top:nil, custom_headers:nil) first_page = list_at_scope_as_lazy(scope, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end |
#list_at_scope_as_lazy(scope, filter: nil, top: nil, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments at the given scope.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
response.
5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5629 def list_at_scope_as_lazy(scope, filter:nil, top:nil, custom_headers:nil) response = list_at_scope_async(scope, 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_at_scope_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_at_scope_async(scope, filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments at the given scope.
can use $filter=provisioningState eq ‘state’. all deployments. to the HTTP request.
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 668 def list_at_scope_async(scope, filter:nil, top:nil, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.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 = '{scope}/providers/Microsoft.Resources/deployments/' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'scope' => scope}, query_params: {'$filter' => filter,'$top' => top,'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::Resources::Mgmt::V2019_07_01::Models::DeploymentListResult.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_at_scope_next(next_page_link, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments at the given scope.
to List operation. will be added to the HTTP request.
5175 5176 5177 5178 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5175 def list_at_scope_next(next_page_link, custom_headers:nil) response = list_at_scope_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_at_scope_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments at the given scope.
to List operation. to the HTTP request.
5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5204 def list_at_scope_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::Resources::Mgmt::V2019_07_01::Models::DeploymentListResult.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_at_scope_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments at the given scope.
to List operation. will be added to the HTTP request.
5190 5191 5192 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5190 def list_at_scope_next_with_http_info(next_page_link, custom_headers:nil) list_at_scope_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_at_scope_with_http_info(scope, filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments at the given scope.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
651 652 653 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 651 def list_at_scope_with_http_info(scope, filter:nil, top:nil, custom_headers:nil) list_at_scope_async(scope, filter:filter, top:top, custom_headers:custom_headers).value! end |
#list_at_subscription_scope(filter: nil, top: nil, custom_headers: nil) ⇒ Array<DeploymentExtended>
Get all the deployments for a subscription.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
2730 2731 2732 2733 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2730 def list_at_subscription_scope(filter:nil, top:nil, custom_headers:nil) first_page = list_at_subscription_scope_as_lazy(filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end |
#list_at_subscription_scope_as_lazy(filter: nil, top: nil, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a subscription.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
response.
5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5702 def list_at_subscription_scope_as_lazy(filter:nil, top:nil, custom_headers:nil) response = list_at_subscription_scope_async(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_at_subscription_scope_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_at_subscription_scope_async(filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a subscription.
can use $filter=provisioningState eq ‘state’. all deployments. to the HTTP request.
2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2763 def list_at_subscription_scope_async(filter:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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}/providers/Microsoft.Resources/deployments/' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$top' => top,'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::Resources::Mgmt::V2019_07_01::Models::DeploymentListResult.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_at_subscription_scope_next(next_page_link, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a subscription.
to List operation. will be added to the HTTP request.
5445 5446 5447 5448 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5445 def list_at_subscription_scope_next(next_page_link, custom_headers:nil) response = list_at_subscription_scope_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_at_subscription_scope_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a subscription.
to List operation. to the HTTP request.
5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5474 def list_at_subscription_scope_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::Resources::Mgmt::V2019_07_01::Models::DeploymentListResult.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_at_subscription_scope_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a subscription.
to List operation. will be added to the HTTP request.
5460 5461 5462 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5460 def list_at_subscription_scope_next_with_http_info(next_page_link, custom_headers:nil) list_at_subscription_scope_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_at_subscription_scope_with_http_info(filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a subscription.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
2747 2748 2749 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2747 def list_at_subscription_scope_with_http_info(filter:nil, top:nil, custom_headers:nil) list_at_subscription_scope_async(filter:filter, top:top, custom_headers:custom_headers).value! end |
#list_at_tenant_scope(filter: nil, top: nil, custom_headers: nil) ⇒ Array<DeploymentExtended>
Get all the deployments at the tenant scope.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
1305 1306 1307 1308 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1305 def list_at_tenant_scope(filter:nil, top:nil, custom_headers:nil) first_page = list_at_tenant_scope_as_lazy(filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end |
#list_at_tenant_scope_as_lazy(filter: nil, top: nil, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments at the tenant scope.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
response.
5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5653 def list_at_tenant_scope_as_lazy(filter:nil, top:nil, custom_headers:nil) response = list_at_tenant_scope_async(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_at_tenant_scope_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_at_tenant_scope_async(filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments at the tenant scope.
can use $filter=provisioningState eq ‘state’. all deployments. to the HTTP request.
1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1338 def list_at_tenant_scope_async(filter:nil, top:nil, custom_headers: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 = 'providers/Microsoft.Resources/deployments/' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], query_params: {'$filter' => filter,'$top' => top,'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::Resources::Mgmt::V2019_07_01::Models::DeploymentListResult.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_at_tenant_scope_next(next_page_link, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments at the tenant scope.
to List operation. will be added to the HTTP request.
5265 5266 5267 5268 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5265 def list_at_tenant_scope_next(next_page_link, custom_headers:nil) response = list_at_tenant_scope_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_at_tenant_scope_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments at the tenant scope.
to List operation. to the HTTP request.
5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5294 def list_at_tenant_scope_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::Resources::Mgmt::V2019_07_01::Models::DeploymentListResult.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_at_tenant_scope_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments at the tenant scope.
to List operation. will be added to the HTTP request.
5280 5281 5282 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5280 def list_at_tenant_scope_next_with_http_info(next_page_link, custom_headers:nil) list_at_tenant_scope_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_at_tenant_scope_with_http_info(filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments at the tenant scope.
can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
1322 1323 1324 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1322 def list_at_tenant_scope_with_http_info(filter:nil, top:nil, custom_headers:nil) list_at_tenant_scope_async(filter:filter, top:top, custom_headers:custom_headers).value! end |
#list_by_resource_group(resource_group_name, filter: nil, top: nil, custom_headers: nil) ⇒ Array<DeploymentExtended>
Get all the deployments for a resource group.
deployments to get. The name is case insensitive. can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
3515 3516 3517 3518 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3515 def list_by_resource_group(resource_group_name, filter:nil, top:nil, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_resource_group_as_lazy(resource_group_name, filter: nil, top: nil, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a resource group.
deployments to get. The name is case insensitive. can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
response.
5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5728 def list_by_resource_group_as_lazy(resource_group_name, filter:nil, top:nil, custom_headers:nil) response = list_by_resource_group_async(resource_group_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_by_resource_group_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_resource_group_async(resource_group_name, filter: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a resource group.
deployments to get. The name is case insensitive. can use $filter=provisioningState eq ‘state’. all deployments. to the HTTP request.
3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3552 def list_by_resource_group_async(resource_group_name, filter:nil, top:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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.Resources/deployments/' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$top' => top,'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::Resources::Mgmt::V2019_07_01::Models::DeploymentListResult.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_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ DeploymentListResult
Get all the deployments for a resource group.
to List operation. will be added to the HTTP request.
5535 5536 5537 5538 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5535 def list_by_resource_group_next(next_page_link, custom_headers:nil) response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all the deployments for a resource group.
to List operation. to the HTTP request.
5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5564 def list_by_resource_group_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::Resources::Mgmt::V2019_07_01::Models::DeploymentListResult.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_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a resource group.
to List operation. will be added to the HTTP request.
5550 5551 5552 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 5550 def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_resource_group_with_http_info(resource_group_name, filter: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all the deployments for a resource group.
deployments to get. The name is case insensitive. can use $filter=provisioningState eq ‘state’. all deployments. will be added to the HTTP request.
3534 3535 3536 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3534 def list_by_resource_group_with_http_info(resource_group_name, filter:nil, top:nil, custom_headers:nil) list_by_resource_group_async(resource_group_name, filter:filter, top:top, custom_headers:custom_headers).value! end |
#validate(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentValidateResult
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
template will be deployed to. The name is case insensitive. will be added to the HTTP request.
3237 3238 3239 3240 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3237 def validate(resource_group_name, deployment_name, parameters, custom_headers:nil) response = validate_async(resource_group_name, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#validate_async(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
template will be deployed to. The name is case insensitive. to the HTTP request.
3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3272 def validate_async(resource_group_name, deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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(: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 == 400 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::Resources::Mgmt::V2019_07_01::Models::DeploymentValidateResult.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 == 400 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentValidateResult.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 |
#validate_at_management_group_scope(group_id, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentValidateResult
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
will be added to the HTTP request.
1787 1788 1789 1790 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1787 def validate_at_management_group_scope(group_id, deployment_name, parameters, custom_headers:nil) response = validate_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#validate_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
to the HTTP request.
1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1820 def validate_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'group_id is nil' if group_id.nil? fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '90'" if !group_id.nil? && group_id.length > 90 fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1 fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'groupId' => group_id,'deploymentName' => deployment_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(: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 == 400 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::Resources::Mgmt::V2019_07_01::Models::DeploymentValidateResult.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 == 400 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentValidateResult.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 |
#validate_at_management_group_scope_with_http_info(group_id, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
will be added to the HTTP request.
1804 1805 1806 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1804 def validate_at_management_group_scope_with_http_info(group_id, deployment_name, parameters, custom_headers:nil) validate_at_management_group_scope_async(group_id, deployment_name, parameters, custom_headers:custom_headers).value! end |
#validate_at_scope(scope, deployment_name, parameters, custom_headers: nil) ⇒ DeploymentValidateResult
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
will be added to the HTTP request.
416 417 418 419 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 416 def validate_at_scope(scope, deployment_name, parameters, custom_headers:nil) response = validate_at_scope_async(scope, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#validate_at_scope_async(scope, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
to the HTTP request.
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 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 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 449 def validate_at_scope_async(scope, deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/validate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'scope' => scope,'deploymentName' => deployment_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(: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 == 400 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::Resources::Mgmt::V2019_07_01::Models::DeploymentValidateResult.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 == 400 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentValidateResult.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 |
#validate_at_scope_with_http_info(scope, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
will be added to the HTTP request.
433 434 435 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 433 def validate_at_scope_with_http_info(scope, deployment_name, parameters, custom_headers:nil) validate_at_scope_async(scope, deployment_name, parameters, custom_headers:custom_headers).value! end |
#validate_at_subscription_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentValidateResult
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
will be added to the HTTP request.
2476 2477 2478 2479 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2476 def validate_at_subscription_scope(deployment_name, parameters, custom_headers:nil) response = validate_at_subscription_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#validate_at_subscription_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
to the HTTP request.
2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2507 def validate_at_subscription_scope_async(deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_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(: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 == 400 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::Resources::Mgmt::V2019_07_01::Models::DeploymentValidateResult.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 == 400 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentValidateResult.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 |
#validate_at_subscription_scope_with_http_info(deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
will be added to the HTTP request.
2492 2493 2494 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2492 def validate_at_subscription_scope_with_http_info(deployment_name, parameters, custom_headers:nil) validate_at_subscription_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! end |
#validate_at_tenant_scope(deployment_name, parameters, custom_headers: nil) ⇒ DeploymentValidateResult
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
will be added to the HTTP request.
1096 1097 1098 1099 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1096 def validate_at_tenant_scope(deployment_name, parameters, custom_headers:nil) response = validate_at_tenant_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#validate_at_tenant_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
to the HTTP request.
1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1127 def validate_at_tenant_scope_async(deployment_name, parameters, custom_headers:nil) fail ArgumentError, 'deployment_name is nil' if deployment_name.nil? fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1 fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.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? # Serialize Request request_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::Deployment.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'providers/Microsoft.Resources/deployments/{deploymentName}/validate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'deploymentName' => deployment_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(: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 == 400 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::Resources::Mgmt::V2019_07_01::Models::DeploymentValidateResult.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 == 400 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::DeploymentValidateResult.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 |
#validate_at_tenant_scope_with_http_info(deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
will be added to the HTTP request.
1112 1113 1114 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 1112 def validate_at_tenant_scope_with_http_info(deployment_name, parameters, custom_headers:nil) validate_at_tenant_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! end |
#validate_with_http_info(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
template will be deployed to. The name is case insensitive. will be added to the HTTP request.
3255 3256 3257 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3255 def validate_with_http_info(resource_group_name, deployment_name, parameters, custom_headers:nil) validate_async(resource_group_name, deployment_name, parameters, custom_headers:custom_headers).value! end |
#what_if(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ WhatIfOperationResult
Returns changes that will be made by the deployment if executed at the scope of the resource group.
template will be deployed to. The name is case insensitive. will be added to the HTTP request.
3364 3365 3366 3367 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3364 def what_if(resource_group_name, deployment_name, parameters, custom_headers:nil) response = what_if_async(resource_group_name, deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#what_if_async(resource_group_name, deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
template will be deployed to. The name is case insensitive. will be added to the HTTP request.
response.
3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 3380 def what_if_async(resource_group_name, deployment_name, parameters, custom_headers:nil) # Send request promise = begin_what_if_async(resource_group_name, deployment_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::WhatIfOperationResult.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#what_if_at_subscription_scope(deployment_name, parameters, custom_headers: nil) ⇒ WhatIfOperationResult
Returns changes that will be made by the deployment if executed at the scope of the subscription.
will be added to the HTTP request.
2593 2594 2595 2596 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2593 def what_if_at_subscription_scope(deployment_name, parameters, custom_headers:nil) response = what_if_at_subscription_scope_async(deployment_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#what_if_at_subscription_scope_async(deployment_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 |
# File 'lib/2019-07-01/generated/azure_mgmt_resources/deployments.rb', line 2607 def what_if_at_subscription_scope_async(deployment_name, parameters, custom_headers:nil) # Send request promise = begin_what_if_at_subscription_scope_async(deployment_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Resources::Mgmt::V2019_07_01::Models::WhatIfOperationResult.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |