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
2 changes: 1 addition & 1 deletion sdk/resources/arm-resources/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Microsoft
Copyright (c) 2020 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion sdk/resources/arm-resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fresources%2Farm-resources%2FREADME.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/resources/arm-resources/README.png)
3 changes: 3 additions & 0 deletions sdk/resources/arm-resources/src/models/deploymentsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ export {
Resource,
ResourceGroup,
ResourceGroupProperties,
ScopedDeployment,
Sku,
SubResource,
TagCount,
Tags,
TagsResource,
TagValue,
TemplateHashResult,
TemplateLink,
Expand Down
143 changes: 139 additions & 4 deletions sdk/resources/arm-resources/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,20 @@ export interface Deployment {
properties: DeploymentProperties;
}

/**
* Deployment operation parameters.
*/
export interface ScopedDeployment {
/**
* The location to store the deployment data.
*/
location: string;
/**
* The deployment properties.
*/
properties: DeploymentProperties;
}

/**
* The deployment export result.
*/
Expand Down Expand Up @@ -1110,6 +1124,37 @@ export interface WhatIfOperationResult {
error?: ErrorResponse;
}

/**
* key and value pairs for tags
*/
export interface Tags {
tags?: { [propertyName: string]: string };
}

/**
* Tag Request for Patch operation.
*/
export interface TagPatchRequest {
/**
* The operation type for the patch api. Possible values include: 'Replace', 'Merge', 'Delete'
*/
operation?: OperationEnum;
/**
* tags object passing in the request.
*/
properties?: Tags;
}

/**
* Tags for the resource.
*/
export interface TagsResource extends Resource {
/**
* tags property.
*/
properties: Tags;
}

/**
* Optional Parameters.
*/
Expand Down Expand Up @@ -1253,8 +1298,9 @@ export interface ResourcesListByResourceGroupOptionalParams extends msRest.Reque
* and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name,
* use: $filter=substringof('demo', name)<br><br>You can link more than one substringof together
* by adding and/or operators.<br><br>You can filter by tag names and values. For example, to
* filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq
* 'Value1'<br><br>You can use some properties together when filtering. The combinations you can
* filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When
* you filter by a tag name and value, the tags for each resource are not returned in the
* results.<br><br>You can use some properties together when filtering. The combinations you can
* use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and
* identity/principalId.
*/
Expand Down Expand Up @@ -1284,8 +1330,9 @@ export interface ResourcesListOptionalParams extends msRest.RequestOptionsBase {
* and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name,
* use: $filter=substringof('demo', name)<br><br>You can link more than one substringof together
* by adding and/or operators.<br><br>You can filter by tag names and values. For example, to
* filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq
* 'Value1'<br><br>You can use some properties together when filtering. The combinations you can
* filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When
* you filter by a tag name and value, the tags for each resource are not returned in the
* results.<br><br>You can use some properties together when filtering. The combinations you can
* use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and
* identity/principalId.
*/
Expand Down Expand Up @@ -1542,6 +1589,14 @@ export type PropertyChangeType = 'Create' | 'Delete' | 'Modify' | 'Array';
*/
export type ChangeType = 'Create' | 'Delete' | 'Ignore' | 'Deploy' | 'NoChange' | 'Modify';

/**
* Defines values for OperationEnum.
* Possible values include: 'Replace', 'Merge', 'Delete'
* @readonly
* @enum {string}
*/
export type OperationEnum = 'Replace' | 'Merge' | 'Delete';

/**
* Contains response data for the list operation.
*/
Expand Down Expand Up @@ -3092,6 +3147,26 @@ export type ResourceGroupsListResponse = ResourceGroupListResult & {
};
};

/**
* Contains response data for the beginExportTemplate operation.
*/
export type ResourceGroupsBeginExportTemplateResponse = ResourceGroupExportResult & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: ResourceGroupExportResult;
};
};

/**
* Contains response data for the listNext operation.
*/
Expand Down Expand Up @@ -3172,6 +3247,66 @@ export type TagsListResponse = TagsListResult & {
};
};

/**
* Contains response data for the resourceCreate operation.
*/
export type TagsResourceCreateResponse = TagsResource & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: TagsResource;
};
};

/**
* Contains response data for the resourceUpdate operation.
*/
export type TagsResourceUpdateResponse = TagsResource & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: TagsResource;
};
};

/**
* Contains response data for the resourceGet operation.
*/
export type TagsResourceGetResponse = TagsResource & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: TagsResource;
};
};

/**
* Contains response data for the listNext operation.
*/
Expand Down
88 changes: 88 additions & 0 deletions sdk/resources/arm-resources/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,31 @@ export const Deployment: msRest.CompositeMapper = {
}
};

export const ScopedDeployment: msRest.CompositeMapper = {
serializedName: "ScopedDeployment",
type: {
name: "Composite",
className: "ScopedDeployment",
modelProperties: {
location: {
required: true,
serializedName: "location",
type: {
name: "String"
}
},
properties: {
required: true,
serializedName: "properties",
type: {
name: "Composite",
className: "DeploymentProperties"
}
}
}
}
};

export const DeploymentExportResult: msRest.CompositeMapper = {
serializedName: "DeploymentExportResult",
type: {
Expand Down Expand Up @@ -1849,6 +1874,69 @@ export const WhatIfOperationResult: msRest.CompositeMapper = {
}
};

export const Tags: msRest.CompositeMapper = {
serializedName: "Tags",
type: {
name: "Composite",
className: "Tags",
modelProperties: {
tags: {
serializedName: "tags",
type: {
name: "Dictionary",
value: {
type: {
name: "String"
}
}
}
}
}
}
};

export const TagPatchRequest: msRest.CompositeMapper = {
serializedName: "TagPatchRequest",
type: {
name: "Composite",
className: "TagPatchRequest",
modelProperties: {
operation: {
serializedName: "operation",
type: {
name: "String"
}
},
properties: {
serializedName: "properties",
type: {
name: "Composite",
className: "Tags"
}
}
}
}
};

export const TagsResource: msRest.CompositeMapper = {
serializedName: "TagsResource",
type: {
name: "Composite",
className: "TagsResource",
modelProperties: {
...Resource.type.modelProperties,
properties: {
required: true,
serializedName: "properties",
type: {
name: "Composite",
className: "Tags"
}
}
}
}
};

export const DeploymentsWhatIfAtSubscriptionScopeHeaders: msRest.CompositeMapper = {
serializedName: "deployments-whatifatsubscriptionscope-headers",
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export {
Sku,
SubResource,
TagCount,
Tags,
TagsResource,
TagValue,
TemplateLink
} from "../models/mappers";
2 changes: 2 additions & 0 deletions sdk/resources/arm-resources/src/models/resourcesMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export {
Sku,
SubResource,
TagCount,
Tags,
TagsResource,
TagValue,
TemplateLink
} from "../models/mappers";
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export {
SubResource,
TagCount,
TagDetails,
TagPatchRequest,
Tags,
TagsListResult,
TagsResource,
TagValue,
TemplateLink
} from "../models/mappers";
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ export class DeploymentOperations {

/**
* Gets a deployments operation.
* @param scope The scope of a deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param [options] The optional parameters
* @returns Promise<Models.DeploymentOperationsGetAtScopeResponse>
*/
getAtScope(scope: string, deploymentName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise<Models.DeploymentOperationsGetAtScopeResponse>;
/**
* @param scope The scope of a deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param callback The callback
*/
getAtScope(scope: string, deploymentName: string, operationId: string, callback: msRest.ServiceCallback<Models.DeploymentOperation>): void;
/**
* @param scope The scope of a deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The optional parameters
Expand All @@ -64,20 +64,20 @@ export class DeploymentOperations {

/**
* Gets all deployments operations for a deployment.
* @param scope The scope of a deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param [options] The optional parameters
* @returns Promise<Models.DeploymentOperationsListAtScopeResponse>
*/
listAtScope(scope: string, deploymentName: string, options?: Models.DeploymentOperationsListAtScopeOptionalParams): Promise<Models.DeploymentOperationsListAtScopeResponse>;
/**
* @param scope The scope of a deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param callback The callback
*/
listAtScope(scope: string, deploymentName: string, callback: msRest.ServiceCallback<Models.DeploymentOperationsListResult>): void;
/**
* @param scope The scope of a deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param options The optional parameters
* @param callback The callback
Expand Down
Loading