Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ export {
ErrorAdditionalInfo,
ErrorResponse,
HttpMessage,
StatusMessage,
TargetResource
} from "../models/mappers";
50 changes: 43 additions & 7 deletions sdk/resources/arm-resources/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.**
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -1019,15 +1044,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.**
Expand Down Expand Up @@ -1711,6 +1738,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',
Expand Down
39 changes: 37 additions & 2 deletions sdk/resources/arm-resources/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -1718,7 +1752,8 @@ export const DeploymentOperationProperties: msRest.CompositeMapper = {
readOnly: true,
serializedName: "statusMessage",
type: {
name: "Object"
name: "Composite",
className: "StatusMessage"
}
},
targetResource: {
Expand Down
6 changes: 4 additions & 2 deletions sdk/resources/arm-resources/src/operations/deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,8 @@ const beginWhatIfAtSubscriptionScopeOperationSpec: msRest.OperationSpec = {
headersMapper: Mappers.DeploymentsWhatIfAtSubscriptionScopeHeaders
},
default: {
bodyMapper: Mappers.CloudError
bodyMapper: Mappers.CloudError,
headersMapper: Mappers.DeploymentsWhatIfAtSubscriptionScopeHeaders
}
},
serializer
Expand Down Expand Up @@ -2736,7 +2737,8 @@ const beginWhatIfOperationSpec: msRest.OperationSpec = {
headersMapper: Mappers.DeploymentsWhatIfHeaders
},
default: {
bodyMapper: Mappers.CloudError
bodyMapper: Mappers.CloudError,
headersMapper: Mappers.DeploymentsWhatIfHeaders
}
},
serializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down