Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
@@ -0,0 +1,69 @@
/*
* 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 Sets the properties of a storage accounts Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
*
* @summary Sets the properties of a storage accounts Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/QueueServicesPut.json
*/
function queueServicesPut() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4410";
const accountName = "sto8607";
const parameters = {
cors: {
corsRules: [
{
allowedHeaders: [
"x-ms-meta-abc",
"x-ms-meta-data*",
"x-ms-meta-target*"
],
allowedMethods: ["GET", "HEAD", "POST", "OPTIONS", "MERGE", "PUT"],
allowedOrigins: ["http://www.contoso.com", "http://www.fabrikam.com"],
exposedHeaders: ["x-ms-meta-*"],
maxAgeInSeconds: 100
},
{
allowedHeaders: ["*"],
allowedMethods: ["GET"],
allowedOrigins: ["*"],
exposedHeaders: ["*"],
maxAgeInSeconds: 2
},
{
allowedHeaders: ["x-ms-meta-12345675754564*"],
allowedMethods: ["GET", "PUT"],
allowedOrigins: [
"http://www.abc23.com",
"https://www.fabrikam.com/*"
],
exposedHeaders: [
"x-ms-meta-abc",
"x-ms-meta-data*",
"x-ms-meta-target*"
],
maxAgeInSeconds: 2000
}
]
}
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.queueServices.setServiceProperties(resourceGroupName, accountName, parameters);
console.log(result);
});
}
queueServicesPut().catch(console.error);
//# sourceMappingURL=queueServicesSetServicePropertiesSample.js.map