72 lines
3.2 KiB
JavaScript
72 lines
3.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 { StorageManagementClient } from "@azure/arm-storage";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
/**
|
|
* This sample demonstrates how to Creates a new table with the specified table name, under the specified account.
|
|
*
|
|
* @summary Creates a new table with the specified table name, under the specified account.
|
|
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/TableOperationPatch.json
|
|
*/
|
|
function tableOperationPatch() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
const subscriptionId = "{subscription-id}";
|
|
const resourceGroupName = "res3376";
|
|
const accountName = "sto328";
|
|
const tableName = "table6185";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new StorageManagementClient(credential, subscriptionId);
|
|
const result = yield client.tableOperations.update(resourceGroupName, accountName, tableName);
|
|
console.log(result);
|
|
});
|
|
}
|
|
tableOperationPatch().catch(console.error);
|
|
/**
|
|
* This sample demonstrates how to Creates a new table with the specified table name, under the specified account.
|
|
*
|
|
* @summary Creates a new table with the specified table name, under the specified account.
|
|
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/TableOperationPutOrPatchAcls.json
|
|
*/
|
|
function tableOperationPutOrPatchAcls() {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
const subscriptionId = "{subscription-id}";
|
|
const resourceGroupName = "res3376";
|
|
const accountName = "sto328";
|
|
const tableName = "table6185";
|
|
const parameters = {
|
|
signedIdentifiers: [
|
|
{
|
|
accessPolicy: {
|
|
expiryTime: new Date("2022-03-20T08:49:37.0000000Z"),
|
|
permission: "raud",
|
|
startTime: new Date("2022-03-17T08:49:37.0000000Z")
|
|
},
|
|
id: "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"
|
|
},
|
|
{
|
|
accessPolicy: {
|
|
expiryTime: new Date("2022-03-20T08:49:37.0000000Z"),
|
|
permission: "rad",
|
|
startTime: new Date("2022-03-17T08:49:37.0000000Z")
|
|
},
|
|
id: "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI"
|
|
}
|
|
]
|
|
};
|
|
const options = { parameters };
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new StorageManagementClient(credential, subscriptionId);
|
|
const result = yield client.tableOperations.update(resourceGroupName, accountName, tableName, options);
|
|
console.log(result);
|
|
});
|
|
}
|
|
tableOperationPutOrPatchAcls().catch(console.error);
|
|
//# sourceMappingURL=tableUpdateSample.js.map
|