Outlook_Addin_LLM/node_modules/@azure/arm-resources/dist-esm/samples-dev/deploymentsWhatIfAtSubscriptionScopeSample.js

34 lines
1.6 KiB
JavaScript

/*
* 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