Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deploymentsCalculateTemplateHashSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCalculateTemplateHashSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deploymentsCalculateTemplateHashSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Calculate the hash of the given template.
*
* @summary Calculate the hash of the given template.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/CalculateTemplateHash.json
*/
function calculateTemplateHash() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const template = {
$schema: "http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview",
contentVersion: "1.0.0.0",
outputs: { string: { type: "string", value: "myvalue" } },
parameters: { string: { type: "string" } },
resources: [],
variables: {
array: [1, 2, 3, 4],
bool: true,
int: 42,
object: { object: { location: "West US", vmSize: "Large" } },
string: "string"
}
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.calculateTemplateHash(template);
console.log(result);
});
}
calculateTemplateHash().catch(console.error);
//# sourceMappingURL=deploymentsCalculateTemplateHashSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCalculateTemplateHashSample.js","sourceRoot":"","sources":["../../samples-dev/deploymentsCalculateTemplateHashSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,qBAAqB;;QAClC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,QAAQ,GAA4B;YACxC,OAAO,EACL,uFAAuF;YACzF,cAAc,EAAE,SAAS;YACzB,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;YACzD,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;YAC1C,SAAS,EAAE,EAAE;YACb,SAAS,EAAE;gBACT,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACnB,IAAI,EAAE,IAAI;gBACV,GAAG,EAAE,EAAE;gBACP,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;gBAC5D,MAAM,EAAE,QAAQ;aACjB;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACxE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,qBAAqB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deploymentsCreateOrUpdateAtManagementGroupScopeSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCreateOrUpdateAtManagementGroupScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deploymentsCreateOrUpdateAtManagementGroupScopeSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to You can provide the template and parameters directly in the request or link to JSON files.
*
* @summary You can provide the template and parameters directly in the request or link to JSON files.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PutDeploymentAtManagementGroup.json
*/
function createDeploymentAtManagementGroupScope() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const groupId = "my-management-group-id";
const deploymentName = "my-deployment";
const parameters = {
location: "eastus",
properties: {
mode: "Incremental",
parameters: {},
templateLink: { uri: "https://example.com/exampleTemplate.json" }
}
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginCreateOrUpdateAtManagementGroupScopeAndWait(groupId, deploymentName, parameters);
console.log(result);
});
}
createDeploymentAtManagementGroupScope().catch(console.error);
//# sourceMappingURL=deploymentsCreateOrUpdateAtManagementGroupScopeSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCreateOrUpdateAtManagementGroupScopeSample.js","sourceRoot":"","sources":["../../samples-dev/deploymentsCreateOrUpdateAtManagementGroupScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,sCAAsC;;QACnD,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,OAAO,GAAG,wBAAwB,CAAC;QACzC,MAAM,cAAc,GAAG,eAAe,CAAC;QACvC,MAAM,UAAU,GAAqB;YACnC,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE;gBACV,IAAI,EAAE,aAAa;gBACnB,UAAU,EAAE,EAAE;gBACd,YAAY,EAAE,EAAE,GAAG,EAAE,0CAA0C,EAAE;aAClE;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,gDAAgD,CACtF,OAAO,EACP,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,sCAAsC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deploymentsCreateOrUpdateAtScopeSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCreateOrUpdateAtScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deploymentsCreateOrUpdateAtScopeSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to You can provide the template and parameters directly in the request or link to JSON files.
*
* @summary You can provide the template and parameters directly in the request or link to JSON files.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PutDeploymentAtScope.json
*/
function createDeploymentAtAGivenScope() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const scope = "providers/Microsoft.Management/managementGroups/my-management-group-id";
const deploymentName = "my-deployment";
const parameters = {
location: "eastus",
properties: {
mode: "Incremental",
parameters: {},
templateLink: { uri: "https://example.com/exampleTemplate.json" }
},
tags: { tagKey1: "tag-value-1", tagKey2: "tag-value-2" }
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginCreateOrUpdateAtScopeAndWait(scope, deploymentName, parameters);
console.log(result);
});
}
createDeploymentAtAGivenScope().catch(console.error);
//# sourceMappingURL=deploymentsCreateOrUpdateAtScopeSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCreateOrUpdateAtScopeSample.js","sourceRoot":"","sources":["../../samples-dev/deploymentsCreateOrUpdateAtScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAc,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,6BAA6B;;QAC1C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,KAAK,GACT,wEAAwE,CAAC;QAC3E,MAAM,cAAc,GAAG,eAAe,CAAC;QACvC,MAAM,UAAU,GAAe;YAC7B,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE;gBACV,IAAI,EAAE,aAAa;gBACnB,UAAU,EAAE,EAAE;gBACd,YAAY,EAAE,EAAE,GAAG,EAAE,0CAA0C,EAAE;aAClE;YACD,IAAI,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE;SACzD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,iCAAiC,CACvE,KAAK,EACL,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,6BAA6B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deploymentsCreateOrUpdateAtSubscriptionScopeSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCreateOrUpdateAtSubscriptionScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deploymentsCreateOrUpdateAtSubscriptionScopeSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to You can provide the template and parameters directly in the request or link to JSON files.
*
* @summary You can provide the template and parameters directly in the request or link to JSON files.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PutDeploymentSubscriptionTemplateSpecsWithId.json
*/
function createADeploymentThatWillDeployATemplateSpecWithTheGivenResourceId() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000001";
const deploymentName = "my-deployment";
const parameters = {
location: "eastus",
properties: {
mode: "Incremental",
parameters: {},
templateLink: {
id: "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/TemplateSpecs/TemplateSpec-Name/versions/v1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginCreateOrUpdateAtSubscriptionScopeAndWait(deploymentName, parameters);
console.log(result);
});
}
createADeploymentThatWillDeployATemplateSpecWithTheGivenResourceId().catch(console.error);
//# sourceMappingURL=deploymentsCreateOrUpdateAtSubscriptionScopeSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCreateOrUpdateAtSubscriptionScopeSample.js","sourceRoot":"","sources":["../../samples-dev/deploymentsCreateOrUpdateAtSubscriptionScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAc,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,kEAAkE;;QAC/E,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,cAAc,GAAG,eAAe,CAAC;QACvC,MAAM,UAAU,GAAe;YAC7B,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE;gBACV,IAAI,EAAE,aAAa;gBACnB,UAAU,EAAE,EAAE;gBACd,YAAY,EAAE;oBACZ,EAAE,EACA,gKAAgK;iBACnK;aACF;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,6CAA6C,CACnF,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,kEAAkE,EAAE,CAAC,KAAK,CACxE,OAAO,CAAC,KAAK,CACd,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deploymentsCreateOrUpdateAtTenantScopeSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCreateOrUpdateAtTenantScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deploymentsCreateOrUpdateAtTenantScopeSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to You can provide the template and parameters directly in the request or link to JSON files.
*
* @summary You can provide the template and parameters directly in the request or link to JSON files.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PutDeploymentAtTenant.json
*/
function createDeploymentAtTenantScope() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const deploymentName = "tenant-dep01";
const parameters = {
location: "eastus",
properties: {
mode: "Incremental",
parameters: {},
templateLink: { uri: "https://example.com/exampleTemplate.json" }
},
tags: { tagKey1: "tag-value-1", tagKey2: "tag-value-2" }
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginCreateOrUpdateAtTenantScopeAndWait(deploymentName, parameters);
console.log(result);
});
}
createDeploymentAtTenantScope().catch(console.error);
//# sourceMappingURL=deploymentsCreateOrUpdateAtTenantScopeSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCreateOrUpdateAtTenantScopeSample.js","sourceRoot":"","sources":["../../samples-dev/deploymentsCreateOrUpdateAtTenantScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,6BAA6B;;QAC1C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,cAAc,GAAG,cAAc,CAAC;QACtC,MAAM,UAAU,GAAqB;YACnC,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE;gBACV,IAAI,EAAE,aAAa;gBACnB,UAAU,EAAE,EAAE;gBACd,YAAY,EAAE,EAAE,GAAG,EAAE,0CAA0C,EAAE;aAClE;YACD,IAAI,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE;SACzD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,uCAAuC,CAC7E,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,6BAA6B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deploymentsCreateOrUpdateSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCreateOrUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deploymentsCreateOrUpdateSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,123 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to You can provide the template and parameters directly in the request or link to JSON files.
*
* @summary You can provide the template and parameters directly in the request or link to JSON files.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PutDeploymentResourceGroup.json
*/
function createADeploymentThatWillDeployATemplateWithAUriAndQueryString() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000001";
const resourceGroupName = "my-resource-group";
const deploymentName = "my-deployment";
const parameters = {
properties: {
mode: "Incremental",
parameters: {},
templateLink: {
queryString: "sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=xxxxxxxx0xxxxxxxxxxxxx%2bxxxxxxxxxxxxxxxxxxxx%3d",
uri: "https://example.com/exampleTemplate.json"
}
}
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginCreateOrUpdateAndWait(resourceGroupName, deploymentName, parameters);
console.log(result);
});
}
createADeploymentThatWillDeployATemplateWithAUriAndQueryString().catch(console.error);
/**
* This sample demonstrates how to You can provide the template and parameters directly in the request or link to JSON files.
*
* @summary You can provide the template and parameters directly in the request or link to JSON files.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PutDeploymentResourceGroupTemplateSpecsWithId.json
*/
function createADeploymentThatWillDeployATemplateSpecWithTheGivenResourceId() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000001";
const resourceGroupName = "my-resource-group";
const deploymentName = "my-deployment";
const parameters = {
properties: {
mode: "Incremental",
parameters: {},
templateLink: {
id: "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/TemplateSpecs/TemplateSpec-Name/versions/v1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginCreateOrUpdateAndWait(resourceGroupName, deploymentName, parameters);
console.log(result);
});
}
createADeploymentThatWillDeployATemplateSpecWithTheGivenResourceId().catch(console.error);
/**
* This sample demonstrates how to You can provide the template and parameters directly in the request or link to JSON files.
*
* @summary You can provide the template and parameters directly in the request or link to JSON files.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PutDeploymentWithOnErrorDeploymentSpecificDeployment.json
*/
function createADeploymentThatWillRedeployAnotherDeploymentOnFailure() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "my-resource-group";
const deploymentName = "my-deployment";
const parameters = {
properties: {
mode: "Complete",
onErrorDeployment: {
type: "SpecificDeployment",
deploymentName: "name-of-deployment-to-use"
},
parameters: {},
templateLink: { uri: "https://example.com/exampleTemplate.json" }
}
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginCreateOrUpdateAndWait(resourceGroupName, deploymentName, parameters);
console.log(result);
});
}
createADeploymentThatWillRedeployAnotherDeploymentOnFailure().catch(console.error);
/**
* This sample demonstrates how to You can provide the template and parameters directly in the request or link to JSON files.
*
* @summary You can provide the template and parameters directly in the request or link to JSON files.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PutDeploymentWithOnErrorDeploymentLastSuccessful.json
*/
function createADeploymentThatWillRedeployTheLastSuccessfulDeploymentOnFailure() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "my-resource-group";
const deploymentName = "my-deployment";
const parameters = {
properties: {
mode: "Complete",
onErrorDeployment: { type: "LastSuccessful" },
parameters: {},
templateLink: { uri: "https://example.com/exampleTemplate.json" }
}
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginCreateOrUpdateAndWait(resourceGroupName, deploymentName, parameters);
console.log(result);
});
}
createADeploymentThatWillRedeployTheLastSuccessfulDeploymentOnFailure().catch(console.error);
//# sourceMappingURL=deploymentsCreateOrUpdateSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/deploymentsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAc,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,8DAA8D;;QAC3E,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,cAAc,GAAG,eAAe,CAAC;QACvC,MAAM,UAAU,GAAe;YAC7B,UAAU,EAAE;gBACV,IAAI,EAAE,aAAa;gBACnB,UAAU,EAAE,EAAE;gBACd,YAAY,EAAE;oBACZ,WAAW,EACT,2KAA2K;oBAC7K,GAAG,EAAE,0CAA0C;iBAChD;aACF;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,0BAA0B,CAChE,iBAAiB,EACjB,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,8DAA8D,EAAE,CAAC,KAAK,CACpE,OAAO,CAAC,KAAK,CACd,CAAC;AAEF;;;;;GAKG;AACH,SAAe,kEAAkE;;QAC/E,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,cAAc,GAAG,eAAe,CAAC;QACvC,MAAM,UAAU,GAAe;YAC7B,UAAU,EAAE;gBACV,IAAI,EAAE,aAAa;gBACnB,UAAU,EAAE,EAAE;gBACd,YAAY,EAAE;oBACZ,EAAE,EACA,gKAAgK;iBACnK;aACF;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,0BAA0B,CAChE,iBAAiB,EACjB,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,kEAAkE,EAAE,CAAC,KAAK,CACxE,OAAO,CAAC,KAAK,CACd,CAAC;AAEF;;;;;GAKG;AACH,SAAe,2DAA2D;;QACxE,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,cAAc,GAAG,eAAe,CAAC;QACvC,MAAM,UAAU,GAAe;YAC7B,UAAU,EAAE;gBACV,IAAI,EAAE,UAAU;gBAChB,iBAAiB,EAAE;oBACjB,IAAI,EAAE,oBAAoB;oBAC1B,cAAc,EAAE,2BAA2B;iBAC5C;gBACD,UAAU,EAAE,EAAE;gBACd,YAAY,EAAE,EAAE,GAAG,EAAE,0CAA0C,EAAE;aAClE;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,0BAA0B,CAChE,iBAAiB,EACjB,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,2DAA2D,EAAE,CAAC,KAAK,CACjE,OAAO,CAAC,KAAK,CACd,CAAC;AAEF;;;;;GAKG;AACH,SAAe,qEAAqE;;QAClF,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,cAAc,GAAG,eAAe,CAAC;QACvC,MAAM,UAAU,GAAe;YAC7B,UAAU,EAAE;gBACV,IAAI,EAAE,UAAU;gBAChB,iBAAiB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;gBAC7C,UAAU,EAAE,EAAE;gBACd,YAAY,EAAE,EAAE,GAAG,EAAE,0CAA0C,EAAE;aAClE;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,0BAA0B,CAChE,iBAAiB,EACjB,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,qEAAqE,EAAE,CAAC,KAAK,CAC3E,OAAO,CAAC,KAAK,CACd,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deploymentsWhatIfAtManagementGroupScopeSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsWhatIfAtManagementGroupScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deploymentsWhatIfAtManagementGroupScopeSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Returns changes that will be made by the deployment if executed at the scope of the management group.
*
* @summary Returns changes that will be made by the deployment if executed at the scope of the management group.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PostDeploymentWhatIfOnManagementGroup.json
*/
function predictTemplateChangesAtManagementGroupScope() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const groupId = "myManagementGruop";
const deploymentName = "exampleDeploymentName";
const parameters = {
location: "eastus",
properties: { mode: "Incremental", parameters: {}, templateLink: {} }
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginWhatIfAtManagementGroupScopeAndWait(groupId, deploymentName, parameters);
console.log(result);
});
}
predictTemplateChangesAtManagementGroupScope().catch(console.error);
//# sourceMappingURL=deploymentsWhatIfAtManagementGroupScopeSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsWhatIfAtManagementGroupScopeSample.js","sourceRoot":"","sources":["../../samples-dev/deploymentsWhatIfAtManagementGroupScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,4CAA4C;;QACzD,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,OAAO,GAAG,mBAAmB,CAAC;QACpC,MAAM,cAAc,GAAG,uBAAuB,CAAC;QAC/C,MAAM,UAAU,GAA2B;YACzC,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;SACtE,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,wCAAwC,CAC9E,OAAO,EACP,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,4CAA4C,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deploymentsWhatIfAtSubscriptionScopeSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsWhatIfAtSubscriptionScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deploymentsWhatIfAtSubscriptionScopeSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Returns changes that will be made by the deployment if executed at the scope of the subscription.
*
* @summary Returns changes that will be made by the deployment if executed at the scope of the subscription.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PostDeploymentWhatIfOnSubscription.json
*/
function predictTemplateChangesAtSubscriptionScope() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000001";
const deploymentName = "my-deployment";
const parameters = {
location: "westus",
properties: { mode: "Incremental", parameters: {}, templateLink: {} }
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginWhatIfAtSubscriptionScopeAndWait(deploymentName, parameters);
console.log(result);
});
}
predictTemplateChangesAtSubscriptionScope().catch(console.error);
//# sourceMappingURL=deploymentsWhatIfAtSubscriptionScopeSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsWhatIfAtSubscriptionScopeSample.js","sourceRoot":"","sources":["../../samples-dev/deploymentsWhatIfAtSubscriptionScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,yCAAyC;;QACtD,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,cAAc,GAAG,eAAe,CAAC;QACvC,MAAM,UAAU,GAAqB;YACnC,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;SACtE,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,qCAAqC,CAC3E,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,yCAAyC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deploymentsWhatIfAtTenantScopeSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsWhatIfAtTenantScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deploymentsWhatIfAtTenantScopeSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Returns changes that will be made by the deployment if executed at the scope of the tenant group.
*
* @summary Returns changes that will be made by the deployment if executed at the scope of the tenant group.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PostDeploymentWhatIfOnTenant.json
*/
function predictTemplateChangesAtManagementGroupScope() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const deploymentName = "exampleDeploymentName";
const parameters = {
location: "eastus",
properties: { mode: "Incremental", parameters: {}, templateLink: {} }
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginWhatIfAtTenantScopeAndWait(deploymentName, parameters);
console.log(result);
});
}
predictTemplateChangesAtManagementGroupScope().catch(console.error);
//# sourceMappingURL=deploymentsWhatIfAtTenantScopeSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsWhatIfAtTenantScopeSample.js","sourceRoot":"","sources":["../../samples-dev/deploymentsWhatIfAtTenantScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,4CAA4C;;QACzD,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,cAAc,GAAG,uBAAuB,CAAC;QAC/C,MAAM,UAAU,GAA2B;YACzC,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;SACtE,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,+BAA+B,CACrE,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,4CAA4C,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deploymentsWhatIfSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsWhatIfSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deploymentsWhatIfSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Returns changes that will be made by the deployment if executed at the scope of the resource group.
*
* @summary Returns changes that will be made by the deployment if executed at the scope of the resource group.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PostDeploymentWhatIfOnResourceGroup.json
*/
function predictTemplateChangesAtResourceGroupScope() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000001";
const resourceGroupName = "my-resource-group";
const deploymentName = "my-deployment";
const parameters = {
properties: { mode: "Incremental", parameters: {}, templateLink: {} }
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.deployments.beginWhatIfAndWait(resourceGroupName, deploymentName, parameters);
console.log(result);
});
}
predictTemplateChangesAtResourceGroupScope().catch(console.error);
//# sourceMappingURL=deploymentsWhatIfSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deploymentsWhatIfSample.js","sourceRoot":"","sources":["../../samples-dev/deploymentsWhatIfSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,0CAA0C;;QACvD,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,cAAc,GAAG,eAAe,CAAC;QACvC,MAAM,UAAU,GAAqB;YACnC,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;SACtE,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,kBAAkB,CACxD,iBAAiB,EACjB,cAAc,EACd,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,0CAA0C,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=providerResourceTypesListSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"providerResourceTypesListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/providerResourceTypesListSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the resource types for a specified resource provider.
*
* @summary List the resource types for a specified resource provider.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/GetProviderResourceTypes.json
*/
function getProviderResourceTypes() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceProviderNamespace = "Microsoft.TestRP";
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.providerResourceTypes.list(resourceProviderNamespace);
console.log(result);
});
}
getProviderResourceTypes().catch(console.error);
//# sourceMappingURL=providerResourceTypesListSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"providerResourceTypesListSample.js","sourceRoot":"","sources":["../../samples-dev/providerResourceTypesListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;QACrD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,IAAI,CACpD,yBAAyB,CAC1B,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=providersGetAtTenantScopeSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"providersGetAtTenantScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/providersGetAtTenantScopeSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets the specified resource provider at the tenant level.
*
* @summary Gets the specified resource provider at the tenant level.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/GetNamedProviderAtTenant.json
*/
function getAResourceProviderAtTenantScope() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const expand = "resourceTypes/aliases";
const resourceProviderNamespace = "Microsoft.Storage";
const options = { expand };
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.providers.getAtTenantScope(resourceProviderNamespace, options);
console.log(result);
});
}
getAResourceProviderAtTenantScope().catch(console.error);
//# sourceMappingURL=providersGetAtTenantScopeSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"providersGetAtTenantScopeSample.js","sourceRoot":"","sources":["../../samples-dev/providersGetAtTenantScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,iCAAiC;;QAC9C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,MAAM,GAAG,uBAAuB,CAAC;QACvC,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;QACtD,MAAM,OAAO,GAA4C,EAAE,MAAM,EAAE,CAAC;QACpE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,gBAAgB,CACpD,yBAAyB,EACzB,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iCAAiC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=providersGetSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"providersGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/providersGetSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets the specified resource provider.
*
* @summary Gets the specified resource provider.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/GetProvider.json
*/
function getProvider() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceProviderNamespace = "Microsoft.TestRP1";
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.providers.get(resourceProviderNamespace);
console.log(result);
});
}
getProvider().catch(console.error);
//# sourceMappingURL=providersGetSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"providersGetSample.js","sourceRoot":"","sources":["../../samples-dev/providersGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,WAAW;;QACxB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;QACtD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;QACrE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,WAAW,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=providersListSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"providersListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/providersListSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __asyncValues, __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets all resource providers for a subscription.
*
* @summary Gets all resource providers for a subscription.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/GetProviders.json
*/
function getProviders() {
var e_1, _a;
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const resArray = new Array();
try {
for (var _b = __asyncValues(client.providers.list()), _c; _c = yield _b.next(), !_c.done;) {
let item = _c.value;
resArray.push(item);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
console.log(resArray);
});
}
getProviders().catch(console.error);
//# sourceMappingURL=providersListSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"providersListSample.js","sourceRoot":"","sources":["../../samples-dev/providersListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,YAAY;;;QACzB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA,IAAA;gBAAnC,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,YAAY,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=providersProviderPermissionsSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"providersProviderPermissionsSample.d.ts","sourceRoot":"","sources":["../../samples-dev/providersProviderPermissionsSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the provider permissions.
*
* @summary Get the provider permissions.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/GetProviderPermissions.json
*/
function getProviderResourceTypes() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceProviderNamespace = "Microsoft.TestRP";
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.providers.providerPermissions(resourceProviderNamespace);
console.log(result);
});
}
getProviderResourceTypes().catch(console.error);
//# sourceMappingURL=providersProviderPermissionsSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"providersProviderPermissionsSample.js","sourceRoot":"","sources":["../../samples-dev/providersProviderPermissionsSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;QACrD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,mBAAmB,CACvD,yBAAyB,CAC1B,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=resourceGroupsCreateOrUpdateSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"resourceGroupsCreateOrUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/resourceGroupsCreateOrUpdateSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Creates or updates a resource group.
*
* @summary Creates or updates a resource group.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/CreateResourceGroup.json
*/
function createOrUpdateAResourceGroup() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "my-resource-group";
const parameters = { location: "eastus" };
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.resourceGroups.createOrUpdate(resourceGroupName, parameters);
console.log(result);
});
}
createOrUpdateAResourceGroup().catch(console.error);
//# sourceMappingURL=resourceGroupsCreateOrUpdateSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"resourceGroupsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/resourceGroupsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAiB,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,4BAA4B;;QACzC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,UAAU,GAAkB,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;QACzD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,cAAc,CACvD,iBAAiB,EACjB,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,4BAA4B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=resourceGroupsDeleteSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"resourceGroupsDeleteSample.d.ts","sourceRoot":"","sources":["../../samples-dev/resourceGroupsDeleteSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.
*
* @summary When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/ForceDeleteVMsAndVMSSInResourceGroup.json
*/
function forceDeleteAllTheVirtualMachinesAndVirtualMachineScaleSetsInAResourceGroup() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "my-resource-group";
const forceDeletionTypes = "Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets";
const options = { forceDeletionTypes };
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.resourceGroups.beginDeleteAndWait(resourceGroupName, options);
console.log(result);
});
}
forceDeleteAllTheVirtualMachinesAndVirtualMachineScaleSetsInAResourceGroup().catch(console.error);
/**
* This sample demonstrates how to When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.
*
* @summary When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/ForceDeleteVMsInResourceGroup.json
*/
function forceDeleteAllTheVirtualMachinesInAResourceGroup() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "my-resource-group";
const forceDeletionTypes = "Microsoft.Compute/virtualMachines";
const options = { forceDeletionTypes };
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.resourceGroups.beginDeleteAndWait(resourceGroupName, options);
console.log(result);
});
}
forceDeleteAllTheVirtualMachinesInAResourceGroup().catch(console.error);
//# sourceMappingURL=resourceGroupsDeleteSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"resourceGroupsDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/resourceGroupsDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,0EAA0E;;QACvF,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,kBAAkB,GACtB,6EAA6E,CAAC;QAChF,MAAM,OAAO,GAAuC,EAAE,kBAAkB,EAAE,CAAC;QAC3E,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAC3D,iBAAiB,EACjB,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,0EAA0E,EAAE,CAAC,KAAK,CAChF,OAAO,CAAC,KAAK,CACd,CAAC;AAEF;;;;;GAKG;AACH,SAAe,gDAAgD;;QAC7D,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,kBAAkB,GAAG,mCAAmC,CAAC;QAC/D,MAAM,OAAO,GAAuC,EAAE,kBAAkB,EAAE,CAAC;QAC3E,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAC3D,iBAAiB,EACjB,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,gDAAgD,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=resourceGroupsExportTemplateSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"resourceGroupsExportTemplateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/resourceGroupsExportTemplateSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,57 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Captures the specified resource group as a template.
*
* @summary Captures the specified resource group as a template.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/ExportResourceGroup.json
*/
function exportAResourceGroup() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "my-resource-group";
const parameters = {
options: "IncludeParameterDefaultValue,IncludeComments",
resources: ["*"]
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.resourceGroups.beginExportTemplateAndWait(resourceGroupName, parameters);
console.log(result);
});
}
exportAResourceGroup().catch(console.error);
/**
* This sample demonstrates how to Captures the specified resource group as a template.
*
* @summary Captures the specified resource group as a template.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/ExportResourceGroupWithFiltering.json
*/
function exportAResourceGroupWithFiltering() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "my-resource-group";
const parameters = {
options: "SkipResourceNameParameterization",
resources: [
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/My.RP/myResourceType/myFirstResource"
]
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.resourceGroups.beginExportTemplateAndWait(resourceGroupName, parameters);
console.log(result);
});
}
exportAResourceGroupWithFiltering().catch(console.error);
//# sourceMappingURL=resourceGroupsExportTemplateSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"resourceGroupsExportTemplateSample.js","sourceRoot":"","sources":["../../samples-dev/resourceGroupsExportTemplateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,UAAU,GAA0B;YACxC,OAAO,EAAE,8CAA8C;YACvD,SAAS,EAAE,CAAC,GAAG,CAAC;SACjB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,0BAA0B,CACnE,iBAAiB,EACjB,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,oBAAoB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAE5C;;;;;GAKG;AACH,SAAe,iCAAiC;;QAC9C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,UAAU,GAA0B;YACxC,OAAO,EAAE,kCAAkC;YAC3C,SAAS,EAAE;gBACT,qIAAqI;aACtI;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,0BAA0B,CACnE,iBAAiB,EACjB,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iCAAiC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=tagsCreateOrUpdateAtScopeSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tagsCreateOrUpdateAtScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/tagsCreateOrUpdateAtScopeSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,53 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to This operation allows adding or replacing the entire set of tags on the specified resource or subscription. The specified entity can have a maximum of 50 tags.
*
* @summary This operation allows adding or replacing the entire set of tags on the specified resource or subscription. The specified entity can have a maximum of 50 tags.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PutTagsResource.json
*/
function updateTagsOnAResource() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const scope = "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm";
const parameters = {
properties: { tags: { tagKey1: "tag-value-1", tagKey2: "tag-value-2" } }
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.tagsOperations.createOrUpdateAtScope(scope, parameters);
console.log(result);
});
}
updateTagsOnAResource().catch(console.error);
/**
* This sample demonstrates how to This operation allows adding or replacing the entire set of tags on the specified resource or subscription. The specified entity can have a maximum of 50 tags.
*
* @summary This operation allows adding or replacing the entire set of tags on the specified resource or subscription. The specified entity can have a maximum of 50 tags.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/PutTagsSubscription.json
*/
function updateTagsOnASubscription() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const scope = "subscriptions/00000000-0000-0000-0000-000000000000";
const parameters = {
properties: { tags: { tagKey1: "tag-value-1", tagKey2: "tag-value-2" } }
};
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.tagsOperations.createOrUpdateAtScope(scope, parameters);
console.log(result);
});
}
updateTagsOnASubscription().catch(console.error);
//# sourceMappingURL=tagsCreateOrUpdateAtScopeSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tagsCreateOrUpdateAtScopeSample.js","sourceRoot":"","sources":["../../samples-dev/tagsCreateOrUpdateAtScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAgB,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,qBAAqB;;QAClC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,KAAK,GACT,qHAAqH,CAAC;QACxH,MAAM,UAAU,GAAiB;YAC/B,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;SACzE,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,qBAAqB,CAC9D,KAAK,EACL,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,qBAAqB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAE7C;;;;;GAKG;AACH,SAAe,yBAAyB;;QACtC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,KAAK,GAAG,oDAAoD,CAAC;QACnE,MAAM,UAAU,GAAiB;YAC/B,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;SACzE,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,qBAAqB,CAC9D,KAAK,EACL,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,yBAAyB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=tagsGetAtScopeSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tagsGetAtScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/tagsGetAtScopeSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,47 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ResourceManagementClient } from "@azure/arm-resources";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets the entire set of tags on a resource or subscription.
*
* @summary Gets the entire set of tags on a resource or subscription.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/GetTagsResource.json
*/
function getTagsOnAResource() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const scope = "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/myPRNameSpace/VM/myVm";
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.tagsOperations.getAtScope(scope);
console.log(result);
});
}
getTagsOnAResource().catch(console.error);
/**
* This sample demonstrates how to Gets the entire set of tags on a resource or subscription.
*
* @summary Gets the entire set of tags on a resource or subscription.
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/examples/GetTagsSubscription.json
*/
function getTagsOnASubscription() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const scope = "subscriptions/00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new ResourceManagementClient(credential, subscriptionId);
const result = yield client.tagsOperations.getAtScope(scope);
console.log(result);
});
}
getTagsOnASubscription().catch(console.error);
//# sourceMappingURL=tagsGetAtScopeSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tagsGetAtScopeSample.js","sourceRoot":"","sources":["../../samples-dev/tagsGetAtScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,kBAAkB;;QAC/B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,KAAK,GACT,qHAAqH,CAAC;QACxH,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,kBAAkB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAE1C;;;;;GAKG;AACH,SAAe,sBAAsB;;QACnC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,KAAK,GAAG,oDAAoD,CAAC;QACnE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,sBAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}