29 lines
1.2 KiB
JavaScript
29 lines
1.2 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 { SubscriptionClient } from "@azure/arm-subscriptions";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
/**
|
|
* This sample demonstrates how to The operation to cancel a subscription
|
|
*
|
|
* @summary The operation to cancel a subscription
|
|
* x-ms-original-file: specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/cancelSubscription.json
|
|
*/
|
|
function cancelSubscription() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
const subscriptionId = "83aa47df-e3e9-49ff-877b-94304bf3d3ad";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new SubscriptionClient(credential);
|
|
const result = yield client.subscriptionOperations.cancel(subscriptionId);
|
|
console.log(result);
|
|
});
|
|
}
|
|
cancelSubscription().catch(console.error);
|
|
//# sourceMappingURL=subscriptionCancelSample.js.map
|