diff --git a/sdk/resources/arm-resources/src/models/deploymentOperationsMappers.ts b/sdk/resources/arm-resources/src/models/deploymentOperationsMappers.ts index dc963f1e8398..000030dddb55 100644 --- a/sdk/resources/arm-resources/src/models/deploymentOperationsMappers.ts +++ b/sdk/resources/arm-resources/src/models/deploymentOperationsMappers.ts @@ -14,5 +14,6 @@ export { ErrorAdditionalInfo, ErrorResponse, HttpMessage, + StatusMessage, TargetResource } from "../models/mappers"; diff --git a/sdk/resources/arm-resources/src/models/deploymentsMappers.ts b/sdk/resources/arm-resources/src/models/deploymentsMappers.ts index 61286227b9da..4676bd4f1d64 100644 --- a/sdk/resources/arm-resources/src/models/deploymentsMappers.ts +++ b/sdk/resources/arm-resources/src/models/deploymentsMappers.ts @@ -9,7 +9,9 @@ export { Alias, AliasPath, + AliasPathMetadata, AliasPattern, + ApiProfile, BaseResource, BasicDependency, CloudError, @@ -21,7 +23,9 @@ export { DeploymentListResult, DeploymentProperties, DeploymentPropertiesExtended, + DeploymentsWhatIfAtManagementGroupScopeHeaders, DeploymentsWhatIfAtSubscriptionScopeHeaders, + DeploymentsWhatIfAtTenantScopeHeaders, DeploymentsWhatIfHeaders, DeploymentValidateResult, DeploymentWhatIf, @@ -44,6 +48,7 @@ export { ResourceGroupProperties, ResourceReference, ScopedDeployment, + ScopedDeploymentWhatIf, Sku, SubResource, TagCount, diff --git a/sdk/resources/arm-resources/src/models/index.ts b/sdk/resources/arm-resources/src/models/index.ts index 0916795083fc..740247d04144 100644 --- a/sdk/resources/arm-resources/src/models/index.ts +++ b/sdk/resources/arm-resources/src/models/index.ts @@ -58,9 +58,18 @@ export interface ResourceGroupFilter { */ export interface TemplateLink { /** - * The URI of the template to deploy. + * The URI of the template to deploy. Use either the uri or id property, but not both. */ - uri: string; + uri?: string; + /** + * The resource id of a Template Spec. Use either the id or uri property, but not both. + */ + id?: string; + /** + * Applicable only if this template link references a Template Spec. This relativePath property + * can optionally be used to reference a Template Spec artifact by path. + */ + relativePath?: string; /** * If included, must match the ContentVersion in the template. */ @@ -238,6 +247,20 @@ export interface DeploymentWhatIf { properties: DeploymentWhatIfProperties; } +/** + * Deployment What-if operation parameters. + */ +export interface ScopedDeploymentWhatIf { + /** + * The location to store the deployment data. + */ + location: string; + /** + * The deployment properties. + */ + properties: DeploymentWhatIfProperties; +} + /** * The resource management error additional info. */ @@ -285,6 +308,40 @@ export interface ErrorResponse { readonly additionalInfo?: ErrorAdditionalInfo[]; } +/** + * An interface representing ApiProfile. + */ +export interface ApiProfile { + /** + * The profile version. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly profileVersion?: string; + /** + * The API version. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly apiVersion?: string; +} + +/** + * An interface representing AliasPathMetadata. + */ +export interface AliasPathMetadata { + /** + * The type of the token that the alias path is referring to. Possible values include: + * 'NotSpecified', 'Any', 'String', 'Object', 'Array', 'Integer', 'Number', 'Boolean' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: AliasPathTokenType; + /** + * The attributes of the token that the alias path is referring to. Possible values include: + * 'None', 'Modifiable' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly attributes?: AliasPathAttributes; +} + /** * The type of the pattern for an alias path. */ @@ -319,6 +376,11 @@ export interface AliasPath { * The pattern for an alias path. */ pattern?: AliasPattern; + /** + * The metadata of the alias path. If missing, fall back to the default metadata of the alias. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly metadata?: AliasPathMetadata; } /** @@ -345,6 +407,12 @@ export interface Alias { * The default pattern for an alias. */ defaultPattern?: AliasPattern; + /** + * The default alias path metadata. Applies to the default path and to any alias path that + * doesn't have metadata + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly defaultMetadata?: AliasPathMetadata; } /** @@ -367,6 +435,16 @@ export interface ProviderResourceType { * The API version. */ apiVersions?: string[]; + /** + * The default API version. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly defaultApiVersion?: string; + /** + * The API profiles for the resource provider. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly apiProfiles?: ApiProfile[]; /** * The additional capabilities offered by this resource type. */ @@ -483,10 +561,12 @@ export interface ResourceReference { */ export interface DeploymentPropertiesExtended { /** - * The state of the provisioning. + * Denotes the state of provisioning. Possible values include: 'NotSpecified', 'Accepted', + * 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + * 'Succeeded', 'Updating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; /** * The correlation ID of the deployment. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -987,6 +1067,20 @@ export interface HttpMessage { content?: any; } +/** + * Operation status message object. + */ +export interface StatusMessage { + /** + * Status of the deployment operation. + */ + status?: string; + /** + * The error reported by the operation. + */ + error?: ErrorResponse; +} + /** * Deployment operation properties. */ @@ -1019,15 +1113,17 @@ export interface DeploymentOperationProperties { */ readonly serviceRequestId?: string; /** - * Operation status code. + * Operation status code from the resource provider. This property may not be set if a response + * has not yet been received. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly statusCode?: string; /** - * Operation status message. + * Operation status message from the resource provider. This property is optional. It will only + * be provided if an error was received from the resource provider. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly statusMessage?: any; + readonly statusMessage?: StatusMessage; /** * The target resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1140,7 +1236,7 @@ export interface OperationDisplay { /** * Microsoft.Resources operation */ -export interface Operation { +export interface Operation1 { /** * Operation name: {provider}/{resource}/{operation} */ @@ -1252,7 +1348,7 @@ export interface TagsPatchResource { /** * The operation type for the patch API. Possible values include: 'Replace', 'Merge', 'Delete' */ - operation?: OperationEnum; + operation?: Operation; /** * The set of tags. */ @@ -1552,6 +1648,34 @@ export interface ResourceManagementClientOptions extends AzureServiceClientOptio baseUri?: string; } +/** + * Defines headers for WhatIfAtTenantScope operation. + */ +export interface DeploymentsWhatIfAtTenantScopeHeaders { + /** + * URL to get status of this long-running operation. + */ + location: string; + /** + * Number of seconds to wait before polling for status. + */ + retryAfter: string; +} + +/** + * Defines headers for WhatIfAtManagementGroupScope operation. + */ +export interface DeploymentsWhatIfAtManagementGroupScopeHeaders { + /** + * URL to get status of this long-running operation. + */ + location: string; + /** + * Number of seconds to wait before polling for status. + */ + retryAfter: string; +} + /** * Defines headers for WhatIfAtSubscriptionScope operation. */ @@ -1584,9 +1708,9 @@ export interface DeploymentsWhatIfHeaders { * @interface * Result of the request to list Microsoft.Resources operations. It contains a list of operations * and a URL link to get the next set of results. - * @extends Array + * @extends Array */ -export interface OperationListResult extends Array { +export interface OperationListResult extends Array { /** * URL to get the next set of operation list results if there are any. */ @@ -1695,6 +1819,23 @@ export type OnErrorDeploymentType = 'LastSuccessful' | 'SpecificDeployment'; */ export type WhatIfResultFormat = 'ResourceIdOnly' | 'FullResourcePayloads'; +/** + * Defines values for AliasPathTokenType. + * Possible values include: 'NotSpecified', 'Any', 'String', 'Object', 'Array', 'Integer', + * 'Number', 'Boolean' + * @readonly + * @enum {string} + */ +export type AliasPathTokenType = 'NotSpecified' | 'Any' | 'String' | 'Object' | 'Array' | 'Integer' | 'Number' | 'Boolean'; + +/** + * Defines values for AliasPathAttributes. + * Possible values include: 'None', 'Modifiable' + * @readonly + * @enum {string} + */ +export type AliasPathAttributes = 'None' | 'Modifiable'; + /** * Defines values for AliasPatternType. * Possible values include: 'NotSpecified', 'Extract' @@ -1711,6 +1852,15 @@ export type AliasPatternType = 'NotSpecified' | 'Extract'; */ export type AliasType = 'NotSpecified' | 'PlainText' | 'Mask'; +/** + * Defines values for ProvisioningState. + * Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', 'Created', + * 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'NotSpecified' | 'Accepted' | 'Running' | 'Ready' | 'Creating' | 'Created' | 'Deleting' | 'Deleted' | 'Canceled' | 'Failed' | 'Succeeded' | 'Updating'; + /** * Defines values for ResourceIdentityType. * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', @@ -1747,12 +1897,12 @@ export type PropertyChangeType = 'Create' | 'Delete' | 'Modify' | 'Array'; export type ChangeType = 'Create' | 'Delete' | 'Ignore' | 'Deploy' | 'NoChange' | 'Modify'; /** - * Defines values for OperationEnum. + * Defines values for Operation. * Possible values include: 'Replace', 'Merge', 'Delete' * @readonly * @enum {string} */ -export type OperationEnum = 'Replace' | 'Merge' | 'Delete'; +export type Operation = 'Replace' | 'Merge' | 'Delete'; /** * Contains response data for the list operation. @@ -2004,6 +2154,31 @@ export type DeploymentsValidateAtTenantScopeResponse = DeploymentValidateResult }; }; +/** + * Contains response data for the whatIfAtTenantScope operation. + */ +export type DeploymentsWhatIfAtTenantScopeResponse = WhatIfOperationResult & DeploymentsWhatIfAtTenantScopeHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: DeploymentsWhatIfAtTenantScopeHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WhatIfOperationResult; + }; +}; + /** * Contains response data for the exportTemplateAtTenantScope operation. */ @@ -2129,6 +2304,31 @@ export type DeploymentsValidateAtManagementGroupScopeResponse = DeploymentValida }; }; +/** + * Contains response data for the whatIfAtManagementGroupScope operation. + */ +export type DeploymentsWhatIfAtManagementGroupScopeResponse = WhatIfOperationResult & DeploymentsWhatIfAtManagementGroupScopeHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: DeploymentsWhatIfAtManagementGroupScopeHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WhatIfOperationResult; + }; +}; + /** * Contains response data for the exportTemplateAtManagementGroupScope operation. */ diff --git a/sdk/resources/arm-resources/src/models/mappers.ts b/sdk/resources/arm-resources/src/models/mappers.ts index 69a63e536f3f..7713e31525ab 100644 --- a/sdk/resources/arm-resources/src/models/mappers.ts +++ b/sdk/resources/arm-resources/src/models/mappers.ts @@ -85,12 +85,23 @@ export const TemplateLink: msRest.CompositeMapper = { className: "TemplateLink", modelProperties: { uri: { - required: true, serializedName: "uri", type: { name: "String" } }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + relativePath: { + serializedName: "relativePath", + type: { + name: "String" + } + }, contentVersion: { serializedName: "contentVersion", type: { @@ -376,6 +387,31 @@ export const DeploymentWhatIf: msRest.CompositeMapper = { } }; +export const ScopedDeploymentWhatIf: msRest.CompositeMapper = { + serializedName: "ScopedDeploymentWhatIf", + type: { + name: "Composite", + className: "ScopedDeploymentWhatIf", + modelProperties: { + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "DeploymentWhatIfProperties" + } + } + } + } +}; + export const ErrorAdditionalInfo: msRest.CompositeMapper = { serializedName: "ErrorAdditionalInfo", type: { @@ -457,6 +493,54 @@ export const ErrorResponse: msRest.CompositeMapper = { } }; +export const ApiProfile: msRest.CompositeMapper = { + serializedName: "ApiProfile", + type: { + name: "Composite", + className: "ApiProfile", + modelProperties: { + profileVersion: { + readOnly: true, + serializedName: "profileVersion", + type: { + name: "String" + } + }, + apiVersion: { + readOnly: true, + serializedName: "apiVersion", + type: { + name: "String" + } + } + } + } +}; + +export const AliasPathMetadata: msRest.CompositeMapper = { + serializedName: "AliasPathMetadata", + type: { + name: "Composite", + className: "AliasPathMetadata", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + attributes: { + readOnly: true, + serializedName: "attributes", + type: { + name: "String" + } + } + } + } +}; + export const AliasPattern: msRest.CompositeMapper = { serializedName: "AliasPattern", type: { @@ -518,6 +602,14 @@ export const AliasPath: msRest.CompositeMapper = { name: "Composite", className: "AliasPattern" } + }, + metadata: { + readOnly: true, + serializedName: "metadata", + type: { + name: "Composite", + className: "AliasPathMetadata" + } } } } @@ -570,6 +662,14 @@ export const Alias: msRest.CompositeMapper = { name: "Composite", className: "AliasPattern" } + }, + defaultMetadata: { + readOnly: true, + serializedName: "defaultMetadata", + type: { + name: "Composite", + className: "AliasPathMetadata" + } } } } @@ -621,6 +721,26 @@ export const ProviderResourceType: msRest.CompositeMapper = { } } }, + defaultApiVersion: { + readOnly: true, + serializedName: "defaultApiVersion", + type: { + name: "String" + } + }, + apiProfiles: { + readOnly: true, + serializedName: "apiProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiProfile" + } + } + } + }, capabilities: { serializedName: "capabilities", type: { @@ -1654,6 +1774,29 @@ export const HttpMessage: msRest.CompositeMapper = { } }; +export const StatusMessage: msRest.CompositeMapper = { + serializedName: "StatusMessage", + type: { + name: "Composite", + className: "StatusMessage", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + export const DeploymentOperationProperties: msRest.CompositeMapper = { serializedName: "DeploymentOperationProperties", type: { @@ -1718,7 +1861,8 @@ export const DeploymentOperationProperties: msRest.CompositeMapper = { readOnly: true, serializedName: "statusMessage", type: { - name: "Object" + name: "Composite", + className: "StatusMessage" } }, targetResource: { @@ -1893,11 +2037,11 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { +export const Operation1: msRest.CompositeMapper = { serializedName: "Operation", type: { name: "Composite", - className: "Operation", + className: "Operation1", modelProperties: { name: { serializedName: "name", @@ -2166,6 +2310,50 @@ export const TagsResource: msRest.CompositeMapper = { } }; +export const DeploymentsWhatIfAtTenantScopeHeaders: msRest.CompositeMapper = { + serializedName: "deployments-whatifattenantscope-headers", + type: { + name: "Composite", + className: "DeploymentsWhatIfAtTenantScopeHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + +export const DeploymentsWhatIfAtManagementGroupScopeHeaders: msRest.CompositeMapper = { + serializedName: "deployments-whatifatmanagementgroupscope-headers", + type: { + name: "Composite", + className: "DeploymentsWhatIfAtManagementGroupScopeHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + export const DeploymentsWhatIfAtSubscriptionScopeHeaders: msRest.CompositeMapper = { serializedName: "deployments-whatifatsubscriptionscope-headers", type: { @@ -2223,7 +2411,7 @@ export const OperationListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "Operation1" } } } diff --git a/sdk/resources/arm-resources/src/models/operationsMappers.ts b/sdk/resources/arm-resources/src/models/operationsMappers.ts index fb04a88e695f..7a144dbaf3be 100644 --- a/sdk/resources/arm-resources/src/models/operationsMappers.ts +++ b/sdk/resources/arm-resources/src/models/operationsMappers.ts @@ -10,7 +10,7 @@ export { CloudError, ErrorAdditionalInfo, ErrorResponse, - Operation, + Operation1, OperationDisplay, OperationListResult } from "../models/mappers"; diff --git a/sdk/resources/arm-resources/src/models/providersMappers.ts b/sdk/resources/arm-resources/src/models/providersMappers.ts index d85326cf880c..cfdd8646e308 100644 --- a/sdk/resources/arm-resources/src/models/providersMappers.ts +++ b/sdk/resources/arm-resources/src/models/providersMappers.ts @@ -9,7 +9,9 @@ export { Alias, AliasPath, + AliasPathMetadata, AliasPattern, + ApiProfile, CloudError, ErrorAdditionalInfo, ErrorResponse, diff --git a/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts b/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts index aa848f724f61..7bf581d38490 100644 --- a/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts +++ b/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts @@ -9,7 +9,9 @@ export { Alias, AliasPath, + AliasPathMetadata, AliasPattern, + ApiProfile, BaseResource, BasicDependency, CloudError, diff --git a/sdk/resources/arm-resources/src/models/resourcesMappers.ts b/sdk/resources/arm-resources/src/models/resourcesMappers.ts index f843f4e6bfbb..5cfea66214e4 100644 --- a/sdk/resources/arm-resources/src/models/resourcesMappers.ts +++ b/sdk/resources/arm-resources/src/models/resourcesMappers.ts @@ -9,7 +9,9 @@ export { Alias, AliasPath, + AliasPathMetadata, AliasPattern, + ApiProfile, BaseResource, BasicDependency, CloudError, diff --git a/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts b/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts index 39fb6b2cbe62..6eea094d94a5 100644 --- a/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts +++ b/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts @@ -9,7 +9,9 @@ export { Alias, AliasPath, + AliasPathMetadata, AliasPattern, + ApiProfile, BaseResource, BasicDependency, CloudError, diff --git a/sdk/resources/arm-resources/src/operations/deployments.ts b/sdk/resources/arm-resources/src/operations/deployments.ts index 571323f26ffd..6bcb9ee6f7b0 100644 --- a/sdk/resources/arm-resources/src/operations/deployments.ts +++ b/sdk/resources/arm-resources/src/operations/deployments.ts @@ -366,6 +366,19 @@ export class Deployments { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Returns changes that will be made by the deployment if executed at the scope of the tenant + * group. + * @param deploymentName The name of the deployment. + * @param parameters Parameters to validate. + * @param [options] The optional parameters + * @returns Promise + */ + whatIfAtTenantScope(deploymentName: string, parameters: Models.ScopedDeploymentWhatIf, options?: msRest.RequestOptionsBase): Promise { + return this.beginWhatIfAtTenantScope(deploymentName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Exports the template used for specified deployment. * @param deploymentName The name of the deployment. @@ -565,6 +578,20 @@ export class Deployments { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Returns changes that will be made by the deployment if executed at the scope of the management + * group. + * @param groupId The management group ID. + * @param deploymentName The name of the deployment. + * @param parameters Parameters to validate. + * @param [options] The optional parameters + * @returns Promise + */ + whatIfAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.ScopedDeploymentWhatIf, options?: msRest.RequestOptionsBase): Promise { + return this.beginWhatIfAtManagementGroupScope(groupId,deploymentName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Exports the template used for specified deployment. * @param groupId The management group ID. @@ -1210,6 +1237,25 @@ export class Deployments { options); } + /** + * Returns changes that will be made by the deployment if executed at the scope of the tenant + * group. + * @param deploymentName The name of the deployment. + * @param parameters Parameters to validate. + * @param [options] The optional parameters + * @returns Promise + */ + beginWhatIfAtTenantScope(deploymentName: string, parameters: Models.ScopedDeploymentWhatIf, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deploymentName, + parameters, + options + }, + beginWhatIfAtTenantScopeOperationSpec, + options); + } + /** * 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 @@ -1277,6 +1323,27 @@ export class Deployments { options); } + /** + * Returns changes that will be made by the deployment if executed at the scope of the management + * group. + * @param groupId The management group ID. + * @param deploymentName The name of the deployment. + * @param parameters Parameters to validate. + * @param [options] The optional parameters + * @returns Promise + */ + beginWhatIfAtManagementGroupScope(groupId: string, deploymentName: string, parameters: Models.ScopedDeploymentWhatIf, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + groupId, + deploymentName, + parameters, + options + }, + beginWhatIfAtManagementGroupScopeOperationSpec, + options); + } + /** * 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 @@ -2392,6 +2459,41 @@ const beginValidateAtTenantScopeOperationSpec: msRest.OperationSpec = { serializer }; +const beginWhatIfAtTenantScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Resources/deployments/{deploymentName}/whatIf", + urlParameters: [ + Parameters.deploymentName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ScopedDeploymentWhatIf, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WhatIfOperationResult, + headersMapper: Mappers.DeploymentsWhatIfAtTenantScopeHeaders + }, + 202: { + headersMapper: Mappers.DeploymentsWhatIfAtTenantScopeHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.DeploymentsWhatIfAtTenantScopeHeaders + } + }, + serializer +}; + const beginDeleteAtManagementGroupScopeOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}", @@ -2484,6 +2586,42 @@ const beginValidateAtManagementGroupScopeOperationSpec: msRest.OperationSpec = { serializer }; +const beginWhatIfAtManagementGroupScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf", + urlParameters: [ + Parameters.groupId, + Parameters.deploymentName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ScopedDeploymentWhatIf, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WhatIfOperationResult, + headersMapper: Mappers.DeploymentsWhatIfAtManagementGroupScopeHeaders + }, + 202: { + headersMapper: Mappers.DeploymentsWhatIfAtManagementGroupScopeHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.DeploymentsWhatIfAtManagementGroupScopeHeaders + } + }, + serializer +}; + const beginDeleteAtSubscriptionScopeOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", @@ -2605,7 +2743,8 @@ const beginWhatIfAtSubscriptionScopeOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.DeploymentsWhatIfAtSubscriptionScopeHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.DeploymentsWhatIfAtSubscriptionScopeHeaders } }, serializer @@ -2736,7 +2875,8 @@ const beginWhatIfOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.DeploymentsWhatIfHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.DeploymentsWhatIfHeaders } }, serializer diff --git a/sdk/resources/arm-resources/src/resourceManagementClientContext.ts b/sdk/resources/arm-resources/src/resourceManagementClientContext.ts index 0259767defe2..153cf9aa9ff5 100644 --- a/sdk/resources/arm-resources/src/resourceManagementClientContext.ts +++ b/sdk/resources/arm-resources/src/resourceManagementClientContext.ts @@ -44,7 +44,7 @@ export class ResourceManagementClientContext extends msRestAzure.AzureServiceCli super(credentials, options); - this.apiVersion = '2019-10-01'; + this.apiVersion = '2020-06-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";