32 lines
1.5 KiB
JavaScript
32 lines
1.5 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 { StorageManagementClient } from "@azure/arm-storage";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
/**
|
|
* This sample demonstrates how to Get the object replication policy of the storage account by policy ID.
|
|
*
|
|
* @summary Get the object replication policy of the storage account by policy ID.
|
|
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountGetObjectReplicationPolicy.json
|
|
*/
|
|
function storageAccountGetObjectReplicationPolicies() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
const subscriptionId = "{subscription-id}";
|
|
const resourceGroupName = "res6977";
|
|
const accountName = "sto2527";
|
|
const objectReplicationPolicyId = "{objectReplicationPolicy-Id}";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new StorageManagementClient(credential, subscriptionId);
|
|
const result = yield client.objectReplicationPoliciesOperations.get(resourceGroupName, accountName, objectReplicationPolicyId);
|
|
console.log(result);
|
|
});
|
|
}
|
|
storageAccountGetObjectReplicationPolicies().catch(console.error);
|
|
//# sourceMappingURL=objectReplicationPoliciesGetSample.js.map
|