mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
/**
|
|
* This sample demonstrates how to Returns the specified product.
|
|
*
|
|
* @summary Returns the specified product.
|
|
* x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CustomerSubscription/Get.json
|
|
*/
|
|
|
|
import { AzureStackManagementClient } from "@azure/arm-azurestack";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
async function returnsTheSpecifiedProduct(): Promise<void> {
|
|
const subscriptionId = "dd8597b4-8739-4467-8b10-f8679f62bfbf";
|
|
const resourceGroup = "azurestack";
|
|
const registrationName = "testregistration";
|
|
const customerSubscriptionName = "E09A4E93-29A7-4EBA-A6D4-76202383F07F";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new AzureStackManagementClient(credential, subscriptionId);
|
|
const result = await client.customerSubscriptions.get(
|
|
resourceGroup,
|
|
registrationName,
|
|
customerSubscriptionName,
|
|
);
|
|
console.log(result);
|
|
}
|
|
|
|
returnsTheSpecifiedProduct().catch(console.error);
|