36 lines
1.8 KiB
JavaScript
36 lines
1.8 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 Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist.
|
|
*
|
|
* @summary Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist.
|
|
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersPatch.json
|
|
*/
|
|
function updateContainers() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
const subscriptionId = "{subscription-id}";
|
|
const resourceGroupName = "res3376";
|
|
const accountName = "sto328";
|
|
const containerName = "container6185";
|
|
const blobContainer = {
|
|
metadata: { metadata: "true" },
|
|
publicAccess: "Container"
|
|
};
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new StorageManagementClient(credential, subscriptionId);
|
|
const result = yield client.blobContainers.update(resourceGroupName, accountName, containerName, blobContainer);
|
|
console.log(result);
|
|
});
|
|
}
|
|
updateContainers().catch(console.error);
|
|
//# sourceMappingURL=blobContainersUpdateSample.js.map
|