/* * 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"; import * as dotenv from "dotenv"; dotenv.config(); /** * 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 = process.env["RESOURCES_SUBSCRIPTION_ID"] || "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); }); } function main() { return __awaiter(this, void 0, void 0, function* () { createDeploymentAtTenantScope(); }); } main().catch(console.error); //# sourceMappingURL=deploymentsCreateOrUpdateAtTenantScopeSample.js.map