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/index.ts b/sdk/resources/arm-resources/src/models/index.ts index 0916795083fc..d67271fceea8 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. */ @@ -483,10 +492,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 +998,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. */ @@ -1027,7 +1052,7 @@ export interface DeploymentOperationProperties { * Operation status message. * **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.** @@ -1711,6 +1736,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', @@ -3447,7 +3481,7 @@ export type ResourceGroupsListNextResponse = ResourceGroupListResult & { /** * Contains response data for the createOrUpdateValue operation. */ -export type TagsCreateOrUpdateValueResponse = TagValue & { +export type TagsOperationCreateOrUpdateValueResponse = TagValue & { /** * The underlying HTTP response. */ @@ -3467,7 +3501,7 @@ export type TagsCreateOrUpdateValueResponse = TagValue & { /** * Contains response data for the createOrUpdate operation. */ -export type TagsCreateOrUpdateResponse = TagDetails & { +export type TagsOperationCreateOrUpdateResponse = TagDetails & { /** * The underlying HTTP response. */ @@ -3487,7 +3521,7 @@ export type TagsCreateOrUpdateResponse = TagDetails & { /** * Contains response data for the list operation. */ -export type TagsListResponse = TagsListResult & { +export type TagsOperationListResponse = TagsListResult & { /** * The underlying HTTP response. */ @@ -3507,7 +3541,7 @@ export type TagsListResponse = TagsListResult & { /** * Contains response data for the createOrUpdateAtScope operation. */ -export type TagsCreateOrUpdateAtScopeResponse = TagsResource & { +export type TagsOperationCreateOrUpdateAtScopeResponse = TagsResource & { /** * The underlying HTTP response. */ @@ -3527,7 +3561,7 @@ export type TagsCreateOrUpdateAtScopeResponse = TagsResource & { /** * Contains response data for the updateAtScope operation. */ -export type TagsUpdateAtScopeResponse = TagsResource & { +export type TagsOperationUpdateAtScopeResponse = TagsResource & { /** * The underlying HTTP response. */ @@ -3547,7 +3581,7 @@ export type TagsUpdateAtScopeResponse = TagsResource & { /** * Contains response data for the getAtScope operation. */ -export type TagsGetAtScopeResponse = TagsResource & { +export type TagsOperationGetAtScopeResponse = TagsResource & { /** * The underlying HTTP response. */ @@ -3567,7 +3601,7 @@ export type TagsGetAtScopeResponse = TagsResource & { /** * Contains response data for the listNext operation. */ -export type TagsListNextResponse = TagsListResult & { +export type TagsOperationListNextResponse = TagsListResult & { /** * The underlying HTTP response. */ diff --git a/sdk/resources/arm-resources/src/models/mappers.ts b/sdk/resources/arm-resources/src/models/mappers.ts index 69a63e536f3f..77e00860abeb 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: { @@ -1654,6 +1665,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 +1752,8 @@ export const DeploymentOperationProperties: msRest.CompositeMapper = { readOnly: true, serializedName: "statusMessage", type: { - name: "Object" + name: "Composite", + className: "StatusMessage" } }, targetResource: { diff --git a/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts b/sdk/resources/arm-resources/src/models/tagsOperationMappers.ts similarity index 100% rename from sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts rename to sdk/resources/arm-resources/src/models/tagsOperationMappers.ts diff --git a/sdk/resources/arm-resources/src/operations/index.ts b/sdk/resources/arm-resources/src/operations/index.ts index a7cec76246cd..9a13395800df 100644 --- a/sdk/resources/arm-resources/src/operations/index.ts +++ b/sdk/resources/arm-resources/src/operations/index.ts @@ -13,5 +13,5 @@ export * from "./deployments"; export * from "./providers"; export * from "./resources"; export * from "./resourceGroups"; -export * from "./tagsOperations"; +export * from "./tagsOperation"; export * from "./deploymentOperations"; diff --git a/sdk/resources/arm-resources/src/operations/tagsOperations.ts b/sdk/resources/arm-resources/src/operations/tagsOperation.ts similarity index 90% rename from sdk/resources/arm-resources/src/operations/tagsOperations.ts rename to sdk/resources/arm-resources/src/operations/tagsOperation.ts index 74aec7cd47e6..8064d9497951 100644 --- a/sdk/resources/arm-resources/src/operations/tagsOperations.ts +++ b/sdk/resources/arm-resources/src/operations/tagsOperation.ts @@ -10,16 +10,16 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; -import * as Mappers from "../models/tagsOperationsMappers"; +import * as Mappers from "../models/tagsOperationMappers"; import * as Parameters from "../models/parameters"; import { ResourceManagementClientContext } from "../resourceManagementClientContext"; -/** Class representing a TagsOperations. */ -export class TagsOperations { +/** Class representing a TagsOperation. */ +export class TagsOperation { private readonly client: ResourceManagementClientContext; /** - * Create a TagsOperations. + * Create a TagsOperation. * @param {ResourceManagementClientContext} client Reference to the service client. */ constructor(client: ResourceManagementClientContext) { @@ -68,9 +68,9 @@ export class TagsOperations { * @param tagName The name of the tag. * @param tagValue The value of the tag to create. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdateValue(tagName: string, tagValue: string, options?: msRest.RequestOptionsBase): Promise; + createOrUpdateValue(tagName: string, tagValue: string, options?: msRest.RequestOptionsBase): Promise; /** * @param tagName The name of the tag. * @param tagValue The value of the tag to create. @@ -84,7 +84,7 @@ export class TagsOperations { * @param callback The callback */ createOrUpdateValue(tagName: string, tagValue: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdateValue(tagName: string, tagValue: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdateValue(tagName: string, tagValue: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { tagName, @@ -92,7 +92,7 @@ export class TagsOperations { options }, createOrUpdateValueOperationSpec, - callback) as Promise; + callback) as Promise; } /** @@ -103,9 +103,9 @@ export class TagsOperations { * @summary Creates a predefined tag name. * @param tagName The name of the tag to create. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdate(tagName: string, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(tagName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param tagName The name of the tag to create. * @param callback The callback @@ -117,14 +117,14 @@ export class TagsOperations { * @param callback The callback */ createOrUpdate(tagName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(tagName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate(tagName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { tagName, options }, createOrUpdateOperationSpec, - callback) as Promise; + callback) as Promise; } /** @@ -165,9 +165,9 @@ export class TagsOperations { * result. * @summary Gets a summary of tag usage under the subscription. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(options?: msRest.RequestOptionsBase): Promise; + list(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ @@ -177,13 +177,13 @@ export class TagsOperations { * @param callback The callback */ list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback) as Promise; + callback) as Promise; } /** @@ -193,9 +193,9 @@ export class TagsOperations { * @param scope The resource scope. * @param parameters * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdateAtScope(scope: string, parameters: Models.TagsResource, options?: msRest.RequestOptionsBase): Promise; + createOrUpdateAtScope(scope: string, parameters: Models.TagsResource, options?: msRest.RequestOptionsBase): Promise; /** * @param scope The resource scope. * @param parameters @@ -209,7 +209,7 @@ export class TagsOperations { * @param callback The callback */ createOrUpdateAtScope(scope: string, parameters: Models.TagsResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdateAtScope(scope: string, parameters: Models.TagsResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdateAtScope(scope: string, parameters: Models.TagsResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, @@ -217,7 +217,7 @@ export class TagsOperations { options }, createOrUpdateAtScopeOperationSpec, - callback) as Promise; + callback) as Promise; } /** @@ -230,9 +230,9 @@ export class TagsOperations { * @param scope The resource scope. * @param parameters * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - updateAtScope(scope: string, parameters: Models.TagsPatchResource, options?: msRest.RequestOptionsBase): Promise; + updateAtScope(scope: string, parameters: Models.TagsPatchResource, options?: msRest.RequestOptionsBase): Promise; /** * @param scope The resource scope. * @param parameters @@ -246,7 +246,7 @@ export class TagsOperations { * @param callback The callback */ updateAtScope(scope: string, parameters: Models.TagsPatchResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateAtScope(scope: string, parameters: Models.TagsPatchResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateAtScope(scope: string, parameters: Models.TagsPatchResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, @@ -254,16 +254,16 @@ export class TagsOperations { options }, updateAtScopeOperationSpec, - callback) as Promise; + callback) as Promise; } /** * @summary Gets the entire set of tags on a resource or subscription. * @param scope The resource scope. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getAtScope(scope: string, options?: msRest.RequestOptionsBase): Promise; + getAtScope(scope: string, options?: msRest.RequestOptionsBase): Promise; /** * @param scope The resource scope. * @param callback The callback @@ -275,14 +275,14 @@ export class TagsOperations { * @param callback The callback */ getAtScope(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getAtScope(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getAtScope(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, options }, getAtScopeOperationSpec, - callback) as Promise; + callback) as Promise; } /** @@ -321,9 +321,9 @@ export class TagsOperations { * @summary Gets a summary of tag usage under the subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -335,14 +335,14 @@ export class TagsOperations { * @param callback The callback */ listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback) as Promise; } } diff --git a/sdk/resources/arm-resources/src/resourceManagementClient.ts b/sdk/resources/arm-resources/src/resourceManagementClient.ts index 535cd08e4b20..f5bfabfd0b24 100644 --- a/sdk/resources/arm-resources/src/resourceManagementClient.ts +++ b/sdk/resources/arm-resources/src/resourceManagementClient.ts @@ -22,23 +22,24 @@ class ResourceManagementClient extends ResourceManagementClientContext { providers: operations.Providers; resources: operations.Resources; resourceGroups: operations.ResourceGroups; - tags: operations.TagsOperations; + tagsOperation: operations.TagsOperation; deploymentOperations: operations.DeploymentOperations; /** * Initializes a new instance of the ResourceManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. * @param subscriptionId The ID of the target subscription. + * @param subscriptionId1 The ID of the source subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ResourceManagementClientOptions) { - super(credentials, subscriptionId, options); + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, subscriptionId1: string, options?: Models.ResourceManagementClientOptions) { + super(credentials, subscriptionId, subscriptionId1, options); this.operations = new operations.Operations(this); this.deployments = new operations.Deployments(this); this.providers = new operations.Providers(this); this.resources = new operations.Resources(this); this.resourceGroups = new operations.ResourceGroups(this); - this.tags = new operations.TagsOperations(this); + this.tagsOperation = new operations.TagsOperation(this); this.deploymentOperations = new operations.DeploymentOperations(this); } } diff --git a/sdk/resources/arm-resources/src/resourceManagementClientContext.ts b/sdk/resources/arm-resources/src/resourceManagementClientContext.ts index 0259767defe2..385c49088144 100644 --- a/sdk/resources/arm-resources/src/resourceManagementClientContext.ts +++ b/sdk/resources/arm-resources/src/resourceManagementClientContext.ts @@ -18,21 +18,26 @@ const packageVersion = "3.0.0"; export class ResourceManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; subscriptionId: string; + subscriptionId1: string; apiVersion?: string; /** * Initializes a new instance of the ResourceManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. * @param subscriptionId The ID of the target subscription. + * @param subscriptionId1 The ID of the source subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ResourceManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, subscriptionId1: string, options?: Models.ResourceManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId == undefined) { throw new Error('\'subscriptionId\' cannot be null.'); } + if (subscriptionId1 == undefined) { + throw new Error('\'subscriptionId1\' cannot be null.'); + } if (!options) { options = {}; @@ -44,13 +49,14 @@ 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"; this.requestContentType = "application/json; charset=utf-8"; this.credentials = credentials; this.subscriptionId = subscriptionId; + this.subscriptionId1 = subscriptionId1; if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage;