Files
powerpoint-toolbox/node_modules/@azure/arm-storage/dist-esm/samples-dev/queueCreateSample.js
T
2025-03-07 19:22:02 +01:00

55 lines
2.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 Creates a new queue with the specified queue name, under the specified account.
*
* @summary Creates a new queue with the specified queue name, under the specified account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/QueueOperationPut.json
*/
function queueOperationPut() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res3376";
const accountName = "sto328";
const queueName = "queue6185";
const queue = {};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.queue.create(resourceGroupName, accountName, queueName, queue);
console.log(result);
});
}
queueOperationPut().catch(console.error);
/**
* This sample demonstrates how to Creates a new queue with the specified queue name, under the specified account.
*
* @summary Creates a new queue with the specified queue name, under the specified account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/QueueOperationPutWithMetadata.json
*/
function queueOperationPutWithMetadata() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res3376";
const accountName = "sto328";
const queueName = "queue6185";
const queue = {
metadata: { sample1: "meta1", sample2: "meta2" }
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.queue.create(resourceGroupName, accountName, queueName, queue);
console.log(result);
});
}
queueOperationPutWithMetadata().catch(console.error);
//# sourceMappingURL=queueCreateSample.js.map