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
+85
View File
@@ -0,0 +1,85 @@
# Release History
## 17.2.1 (2022-06-15)
**Features**
- Bug fix
## 17.2.0 (2022-03-30)
**Features**
- Added Interface StorageAccountSkuConversionStatus
- Added Interface TableAccessPolicy
- Added Interface TableSignedIdentifier
- Added Type Alias DnsEndpointType
- Added Type Alias SkuConversionStatus
- Interface BlobInventoryPolicyFilter has a new optional parameter excludePrefix
- Interface BlobInventoryPolicyFilter has a new optional parameter includeDeleted
- Interface BlobInventoryPolicySchema has a new optional parameter destination
- Interface DateAfterCreation has a new optional parameter daysAfterLastTierChangeGreaterThan
- Interface DateAfterModification has a new optional parameter daysAfterCreationGreaterThan
- Interface DateAfterModification has a new optional parameter daysAfterLastTierChangeGreaterThan
- Interface DeleteRetentionPolicy has a new optional parameter allowPermanentDelete
- Interface KeyVaultProperties has a new optional parameter currentVersionedKeyExpirationTimestamp
- Interface StorageAccountCreateParameters has a new optional parameter dnsEndpointType
- Interface StorageAccountUpdateParameters has a new optional parameter dnsEndpointType
- Interface TableCreateOptionalParams has a new optional parameter parameters
- Interface TableUpdateOptionalParams has a new optional parameter parameters
- Type Alias StorageAccount has a new parameter storageAccountSkuConversionStatus
- Type Alias StorageAccount has a new parameter dnsEndpointType
- Type Alias Table has a new parameter signedIdentifiers
- Added Enum KnownDnsEndpointType
- Added Enum KnownSkuConversionStatus
- Enum KnownCorsRuleAllowedMethodsItem has a new value Patch
## 17.1.0 (2022-02-14)
**Features**
- Added operation group LocalUsersOperations
- Added Interface LocalUserKeys
- Added Interface LocalUserRegeneratePasswordResult
- Added Interface LocalUsers
- Added Interface LocalUsersCreateOrUpdateOptionalParams
- Added Interface LocalUsersDeleteOptionalParams
- Added Interface LocalUsersGetOptionalParams
- Added Interface LocalUsersListKeysOptionalParams
- Added Interface LocalUsersListOptionalParams
- Added Interface LocalUsersRegeneratePasswordOptionalParams
- Added Interface PermissionScope
- Added Interface SshPublicKey
- Added Type Alias ActiveDirectoryPropertiesAccountType
- Added Type Alias AllowedCopyScope
- Added Type Alias LocalUser
- Added Type Alias LocalUsersCreateOrUpdateResponse
- Added Type Alias LocalUsersGetResponse
- Added Type Alias LocalUsersListKeysResponse
- Added Type Alias LocalUsersListResponse
- Added Type Alias LocalUsersRegeneratePasswordResponse
- Interface ActiveDirectoryProperties has a new optional parameter accountType
- Interface ActiveDirectoryProperties has a new optional parameter samAccountName
- Interface EncryptionIdentity has a new optional parameter encryptionFederatedIdentityClientId
- Interface StorageAccountCreateParameters has a new optional parameter allowedCopyScope
- Interface StorageAccountCreateParameters has a new optional parameter isLocalUserEnabled
- Interface StorageAccountCreateParameters has a new optional parameter isSftpEnabled
- Interface StorageAccountUpdateParameters has a new optional parameter allowedCopyScope
- Interface StorageAccountUpdateParameters has a new optional parameter isLocalUserEnabled
- Interface StorageAccountUpdateParameters has a new optional parameter isSftpEnabled
- Class StorageManagementClient has a new parameter localUsersOperations
- Type Alias StorageAccount has a new parameter isSftpEnabled
- Type Alias StorageAccount has a new parameter isLocalUserEnabled
- Type Alias StorageAccount has a new parameter allowedCopyScope
- Added Enum KnownActiveDirectoryPropertiesAccountType
- Added Enum KnownAllowedCopyScope
## 17.0.0 (2021-12-06)
The package of @azure/arm-storage is using our next generation design principles since version 17.0.0, which contains breaking changes.
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2022 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+109
View File
@@ -0,0 +1,109 @@
# Azure StorageManagement client library for JavaScript
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure StorageManagement client.
The Azure Storage Management API.
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/arm-storage) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-storage) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-storage) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
## Getting started
### Currently supported environments
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge and Firefox.
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
### Prerequisites
- An [Azure subscription][azure_sub].
### Install the `@azure/arm-storage` package
Install the Azure StorageManagement client library for JavaScript with `npm`:
```bash
npm install @azure/arm-storage
```
### Create and authenticate a `StorageManagementClient`
To create a client object to access the Azure StorageManagement API, you will need the `endpoint` of your Azure StorageManagement resource and a `credential`. The Azure StorageManagement client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure StorageManagement resource in the [Azure Portal][azure_portal].
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
```bash
npm install @azure/identity
```
You will also need to **register a new AAD application and grant access to Azure StorageManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
```javascript
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(new DefaultAzureCredential(), subscriptionId);
// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new StorageManagementClient(credential, subscriptionId);
```
### JavaScript Bundle
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
## Key concepts
### StorageManagementClient
`StorageManagementClient` is the primary interface for developers using the Azure StorageManagement client library. Explore the methods on this client object to understand the different features of the Azure StorageManagement service that you can access.
## Troubleshooting
### Logging
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
```javascript
const { setLogLevel } = require("@azure/logger");
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
## Next steps
Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
## Contributing
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
## Related projects
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorage%2Farm-storage%2FREADME.png)
[azure_cli]: https://docs.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersClearLegalHoldSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersClearLegalHoldSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersClearLegalHoldSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,33 @@
/*
* 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 Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.
*
* @summary Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersClearLegalHold.json
*/
function clearLegalHoldContainers() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4303";
const accountName = "sto7280";
const containerName = "container8723";
const legalHold = { tags: ["tag1", "tag2", "tag3"] };
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.clearLegalHold(resourceGroupName, accountName, containerName, legalHold);
console.log(result);
});
}
clearLegalHoldContainers().catch(console.error);
//# sourceMappingURL=blobContainersClearLegalHoldSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersClearLegalHoldSample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersClearLegalHoldSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAa,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,SAAS,GAAc,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;QAChE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,cAAc,CACvD,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersCreateOrUpdateImmutabilityPolicySample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersCreateOrUpdateImmutabilityPolicySample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersCreateOrUpdateImmutabilityPolicySample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,65 @@
/*
* 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 or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
*
* @summary Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersPutImmutabilityPolicy.json
*/
function createOrUpdateImmutabilityPolicy() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res1782";
const accountName = "sto7069";
const containerName = "container6397";
const parameters = {
allowProtectedAppendWrites: true,
immutabilityPeriodSinceCreationInDays: 3
};
const options = {
parameters
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.createOrUpdateImmutabilityPolicy(resourceGroupName, accountName, containerName, options);
console.log(result);
});
}
createOrUpdateImmutabilityPolicy().catch(console.error);
/**
* This sample demonstrates how to Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
*
* @summary Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json
*/
function createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res1782";
const accountName = "sto7069";
const containerName = "container6397";
const parameters = {
allowProtectedAppendWritesAll: true,
immutabilityPeriodSinceCreationInDays: 3
};
const options = {
parameters
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.createOrUpdateImmutabilityPolicy(resourceGroupName, accountName, containerName, options);
console.log(result);
});
}
createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll().catch(console.error);
//# sourceMappingURL=blobContainersCreateOrUpdateImmutabilityPolicySample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersCreateOrUpdateImmutabilityPolicySample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersCreateOrUpdateImmutabilityPolicySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAGL,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,gCAAgC;;QAC7C,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,UAAU,GAAuB;YACrC,0BAA0B,EAAE,IAAI;YAChC,qCAAqC,EAAE,CAAC;SACzC,CAAC;QACF,MAAM,OAAO,GAAiE;YAC5E,UAAU;SACX,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,gCAAgC,CACzE,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,gCAAgC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAExD;;;;;GAKG;AACH,SAAe,iEAAiE;;QAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,UAAU,GAAuB;YACrC,6BAA6B,EAAE,IAAI;YACnC,qCAAqC,EAAE,CAAC;SACzC,CAAC;QACF,MAAM,OAAO,GAAiE;YAC5E,UAAU;SACX,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,gCAAgC,CACzE,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iEAAiE,EAAE,CAAC,KAAK,CACvE,OAAO,CAAC,KAAK,CACd,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersCreateSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersCreateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersCreateSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,78 @@
/*
* 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 container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container.
*
* @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersPutDefaultEncryptionScope.json
*/
function putContainerWithDefaultEncryptionScope() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res3376";
const accountName = "sto328";
const containerName = "container6185";
const blobContainer = {
defaultEncryptionScope: "encryptionscope185",
denyEncryptionScopeOverride: true
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.create(resourceGroupName, accountName, containerName, blobContainer);
console.log(result);
});
}
putContainerWithDefaultEncryptionScope().catch(console.error);
/**
* This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container.
*
* @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersPutObjectLevelWorm.json
*/
function putContainerWithObjectLevelWorm() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res3376";
const accountName = "sto328";
const containerName = "container6185";
const blobContainer = {
immutableStorageWithVersioning: { enabled: true }
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.create(resourceGroupName, accountName, containerName, blobContainer);
console.log(result);
});
}
putContainerWithObjectLevelWorm().catch(console.error);
/**
* This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container.
*
* @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersPut.json
*/
function putContainers() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res3376";
const accountName = "sto328";
const containerName = "container6185";
const blobContainer = {};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.create(resourceGroupName, accountName, containerName, blobContainer);
console.log(result);
});
}
putContainers().catch(console.error);
//# sourceMappingURL=blobContainersCreateSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersCreateSample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersCreateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAiB,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,sCAAsC;;QACnD,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC7B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,aAAa,GAAkB;YACnC,sBAAsB,EAAE,oBAAoB;YAC5C,2BAA2B,EAAE,IAAI;SAClC,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,MAAM,CAC/C,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,sCAAsC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAE9D;;;;;GAKG;AACH,SAAe,+BAA+B;;QAC5C,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC7B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,aAAa,GAAkB;YACnC,8BAA8B,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;SAClD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,MAAM,CAC/C,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,+BAA+B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEvD;;;;;GAKG;AACH,SAAe,aAAa;;QAC1B,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC7B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,aAAa,GAAkB,EAAE,CAAC;QACxC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,MAAM,CAC/C,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,aAAa,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersDeleteImmutabilityPolicySample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersDeleteImmutabilityPolicySample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersDeleteImmutabilityPolicySample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,33 @@
/*
* 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 Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container.
*
* @summary Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersDeleteImmutabilityPolicy.json
*/
function deleteImmutabilityPolicy() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res1581";
const accountName = "sto9621";
const containerName = "container4910";
const ifMatch = '"8d59f81a7fa7be0"';
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.deleteImmutabilityPolicy(resourceGroupName, accountName, containerName, ifMatch);
console.log(result);
});
}
deleteImmutabilityPolicy().catch(console.error);
//# sourceMappingURL=blobContainersDeleteImmutabilityPolicySample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersDeleteImmutabilityPolicySample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersDeleteImmutabilityPolicySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,OAAO,GAAG,mBAAmB,CAAC;QACpC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,wBAAwB,CACjE,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersDeleteSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersDeleteSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersDeleteSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
/*
* 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 Deletes specified container under its account.
*
* @summary Deletes specified container under its account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersDelete.json
*/
function deleteContainers() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4079";
const accountName = "sto4506";
const containerName = "container9689";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.delete(resourceGroupName, accountName, containerName);
console.log(result);
});
}
deleteContainers().catch(console.error);
//# sourceMappingURL=blobContainersDeleteSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,gBAAgB;;QAC7B,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,MAAM,CAC/C,iBAAiB,EACjB,WAAW,EACX,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,gBAAgB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersExtendImmutabilityPolicySample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersExtendImmutabilityPolicySample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersExtendImmutabilityPolicySample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,39 @@
/*
* 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 Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.
*
* @summary Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersExtendImmutabilityPolicy.json
*/
function extendImmutabilityPolicy() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res6238";
const accountName = "sto232";
const containerName = "container5023";
const ifMatch = '"8d59f830d0c3bf9"';
const parameters = {
immutabilityPeriodSinceCreationInDays: 100
};
const options = {
parameters
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.extendImmutabilityPolicy(resourceGroupName, accountName, containerName, ifMatch, options);
console.log(result);
});
}
extendImmutabilityPolicy().catch(console.error);
//# sourceMappingURL=blobContainersExtendImmutabilityPolicySample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersExtendImmutabilityPolicySample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersExtendImmutabilityPolicySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAGL,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC7B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,OAAO,GAAG,mBAAmB,CAAC;QACpC,MAAM,UAAU,GAAuB;YACrC,qCAAqC,EAAE,GAAG;SAC3C,CAAC;QACF,MAAM,OAAO,GAAyD;YACpE,UAAU;SACX,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,wBAAwB,CACjE,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,OAAO,EACP,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersGetImmutabilityPolicySample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersGetImmutabilityPolicySample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersGetImmutabilityPolicySample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
/*
* 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 Gets the existing immutability policy along with the corresponding ETag in response headers and body.
*
* @summary Gets the existing immutability policy along with the corresponding ETag in response headers and body.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersGetImmutabilityPolicy.json
*/
function getImmutabilityPolicy() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res5221";
const accountName = "sto9177";
const containerName = "container3489";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.getImmutabilityPolicy(resourceGroupName, accountName, containerName);
console.log(result);
});
}
getImmutabilityPolicy().catch(console.error);
//# sourceMappingURL=blobContainersGetImmutabilityPolicySample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersGetImmutabilityPolicySample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersGetImmutabilityPolicySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,qBAAqB;;QAClC,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,qBAAqB,CAC9D,iBAAiB,EACjB,WAAW,EACX,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,qBAAqB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersGetSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersGetSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
/*
* 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 Gets properties of a specified container.
*
* @summary Gets properties of a specified container.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json
*/
function getBlobContainersGetWithAllowProtectedAppendWritesAll() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res9871";
const accountName = "sto6217";
const containerName = "container1634";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.get(resourceGroupName, accountName, containerName);
console.log(result);
});
}
getBlobContainersGetWithAllowProtectedAppendWritesAll().catch(console.error);
/**
* This sample demonstrates how to Gets properties of a specified container.
*
* @summary Gets properties of a specified container.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersGet.json
*/
function getContainers() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res9871";
const accountName = "sto6217";
const containerName = "container1634";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.get(resourceGroupName, accountName, containerName);
console.log(result);
});
}
getContainers().catch(console.error);
//# sourceMappingURL=blobContainersGetSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersGetSample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,qDAAqD;;QAClE,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,CAC5C,iBAAiB,EACjB,WAAW,EACX,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,qDAAqD,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAE7E;;;;;GAKG;AACH,SAAe,aAAa;;QAC1B,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,CAC5C,iBAAiB,EACjB,WAAW,EACX,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,aAAa,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersLeaseSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersLeaseSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersLeaseSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,67 @@
/*
* 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 The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
*
* @summary The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersLease_Acquire.json
*/
function acquireALeaseOnAContainer() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res3376";
const accountName = "sto328";
const containerName = "container6185";
const parameters = {
action: "Acquire",
breakPeriod: undefined,
leaseDuration: -1,
leaseId: undefined,
proposedLeaseId: undefined
};
const options = { parameters };
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.lease(resourceGroupName, accountName, containerName, options);
console.log(result);
});
}
acquireALeaseOnAContainer().catch(console.error);
/**
* This sample demonstrates how to The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
*
* @summary The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersLease_Break.json
*/
function breakALeaseOnAContainer() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res3376";
const accountName = "sto328";
const containerName = "container6185";
const parameters = {
action: "Break",
breakPeriod: undefined,
leaseDuration: undefined,
leaseId: "8698f513-fa75-44a1-b8eb-30ba336af27d",
proposedLeaseId: undefined
};
const options = { parameters };
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.lease(resourceGroupName, accountName, containerName, options);
console.log(result);
});
}
breakALeaseOnAContainer().catch(console.error);
//# sourceMappingURL=blobContainersLeaseSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersLeaseSample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersLeaseSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAGL,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,yBAAyB;;QACtC,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC7B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,UAAU,GAA0B;YACxC,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,SAAS;YACtB,aAAa,EAAE,CAAC,CAAC;YACjB,OAAO,EAAE,SAAS;YAClB,eAAe,EAAE,SAAS;SAC3B,CAAC;QACF,MAAM,OAAO,GAAsC,EAAE,UAAU,EAAE,CAAC;QAClE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,KAAK,CAC9C,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,yBAAyB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEjD;;;;;GAKG;AACH,SAAe,uBAAuB;;QACpC,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC7B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,UAAU,GAA0B;YACxC,MAAM,EAAE,OAAO;YACf,WAAW,EAAE,SAAS;YACtB,aAAa,EAAE,SAAS;YACxB,OAAO,EAAE,sCAAsC;YAC/C,eAAe,EAAE,SAAS;SAC3B,CAAC;QACF,MAAM,OAAO,GAAsC,EAAE,UAAU,EAAE,CAAC;QAClE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,KAAK,CAC9C,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,uBAAuB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersListSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersListSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,79 @@
/*
* 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 { __asyncValues, __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 Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
*
* @summary Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersList.json
*/
function listContainers() {
var e_1, _a;
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res9290";
const accountName = "sto1590";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const resArray = new Array();
try {
for (var _b = __asyncValues(client.blobContainers.list(resourceGroupName, accountName)), _c; _c = yield _b.next(), !_c.done;) {
let item = _c.value;
resArray.push(item);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
console.log(resArray);
});
}
listContainers().catch(console.error);
/**
* This sample demonstrates how to Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
*
* @summary Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/DeletedBlobContainersList.json
*/
function listDeletedContainers() {
var e_2, _a;
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res9290";
const accountName = "sto1590";
const include = "deleted";
const options = { include };
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const resArray = new Array();
try {
for (var _b = __asyncValues(client.blobContainers.list(resourceGroupName, accountName, options)), _c; _c = yield _b.next(), !_c.done;) {
let item = _c.value;
resArray.push(item);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
console.log(resArray);
});
}
listDeletedContainers().catch(console.error);
//# sourceMappingURL=blobContainersListSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersListSample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,cAAc;;;QAC3B,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAC/C,iBAAiB,EACjB,WAAW,CACZ,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,cAAc,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEtC;;;;;GAKG;AACH,SAAe,qBAAqB;;;QAClC,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,OAAO,GAAqC,EAAE,OAAO,EAAE,CAAC;QAC9D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAC/C,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAA,IAAA;gBAJU,IAAI,IAAI,WAAA,CAAA;gBAKjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,qBAAqB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersLockImmutabilityPolicySample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersLockImmutabilityPolicySample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersLockImmutabilityPolicySample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,33 @@
/*
* 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 ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.
*
* @summary Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersLockImmutabilityPolicy.json
*/
function lockImmutabilityPolicy() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res2702";
const accountName = "sto5009";
const containerName = "container1631";
const ifMatch = '"8d59f825b721dd3"';
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.lockImmutabilityPolicy(resourceGroupName, accountName, containerName, ifMatch);
console.log(result);
});
}
lockImmutabilityPolicy().catch(console.error);
//# sourceMappingURL=blobContainersLockImmutabilityPolicySample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersLockImmutabilityPolicySample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersLockImmutabilityPolicySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,sBAAsB;;QACnC,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,OAAO,GAAG,mBAAmB,CAAC;QACpC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,sBAAsB,CAC/D,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,sBAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersObjectLevelWormSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersObjectLevelWormSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersObjectLevelWormSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
/*
* 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 This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container.
*
* @summary This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/ObjectLevelWormContainerMigration.json
*/
function versionLevelWormContainerMigration() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res1782";
const accountName = "sto7069";
const containerName = "container6397";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.beginObjectLevelWormAndWait(resourceGroupName, accountName, containerName);
console.log(result);
});
}
versionLevelWormContainerMigration().catch(console.error);
//# sourceMappingURL=blobContainersObjectLevelWormSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersObjectLevelWormSample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersObjectLevelWormSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,kCAAkC;;QAC/C,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,2BAA2B,CACpE,iBAAiB,EACjB,WAAW,EACX,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,kCAAkC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersSetLegalHoldSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersSetLegalHoldSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersSetLegalHoldSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,56 @@
/*
* 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 legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.
*
* @summary Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersSetLegalHold.json
*/
function setLegalHoldContainers() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4303";
const accountName = "sto7280";
const containerName = "container8723";
const legalHold = { tags: ["tag1", "tag2", "tag3"] };
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.setLegalHold(resourceGroupName, accountName, containerName, legalHold);
console.log(result);
});
}
setLegalHoldContainers().catch(console.error);
/**
* This sample demonstrates how to Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.
*
* @summary Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json
*/
function setLegalHoldContainersWithAllowProtectedAppendWritesAll() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4303";
const accountName = "sto7280";
const containerName = "container8723";
const legalHold = {
allowProtectedAppendWritesAll: true,
tags: ["tag1", "tag2", "tag3"]
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobContainers.setLegalHold(resourceGroupName, accountName, containerName, legalHold);
console.log(result);
});
}
setLegalHoldContainersWithAllowProtectedAppendWritesAll().catch(console.error);
//# sourceMappingURL=blobContainersSetLegalHoldSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersSetLegalHoldSample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersSetLegalHoldSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAa,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,sBAAsB;;QACnC,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,SAAS,GAAc,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;QAChE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,YAAY,CACrD,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,sBAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAE9C;;;;;GAKG;AACH,SAAe,uDAAuD;;QACpE,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,SAAS,GAAc;YAC3B,6BAA6B,EAAE,IAAI;YACnC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAC/B,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,YAAY,CACrD,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,uDAAuD,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobContainersUpdateSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobContainersUpdateSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
/*
* 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
@@ -0,0 +1 @@
{"version":3,"file":"blobContainersUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/blobContainersUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAiB,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,gBAAgB;;QAC7B,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC7B,MAAM,aAAa,GAAG,eAAe,CAAC;QACtC,MAAM,aAAa,GAAkB;YACnC,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;YAC9B,YAAY,EAAE,WAAW;SAC1B,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,MAAM,CAC/C,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,gBAAgB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobInventoryPoliciesCreateOrUpdateSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobInventoryPoliciesCreateOrUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobInventoryPoliciesCreateOrUpdateSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,285 @@
/*
* 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 blob inventory policy to the specified storage account.
*
* @summary Sets the blob inventory policy to the specified storage account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountSetBlobInventoryPolicy.json
*/
function storageAccountSetBlobInventoryPolicy() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res7687";
const accountName = "sto9699";
const blobInventoryPolicyName = "default";
const properties = {
policy: {
type: "Inventory",
enabled: true,
rules: [
{
name: "inventoryPolicyRule1",
definition: {
format: "Csv",
filters: {
blobTypes: ["blockBlob", "appendBlob", "pageBlob"],
excludePrefix: ["excludeprefix1", "excludeprefix2"],
includeBlobVersions: true,
includeSnapshots: true,
prefixMatch: ["inventoryprefix1", "inventoryprefix2"]
},
objectType: "Blob",
schedule: "Daily",
schemaFields: [
"Name",
"Creation-Time",
"Last-Modified",
"Content-Length",
"Content-MD5",
"BlobType",
"AccessTier",
"AccessTierChangeTime",
"Snapshot",
"VersionId",
"IsCurrentVersion",
"Metadata"
]
},
destination: "container1",
enabled: true
},
{
name: "inventoryPolicyRule2",
definition: {
format: "Parquet",
objectType: "Container",
schedule: "Weekly",
schemaFields: [
"Name",
"Last-Modified",
"Metadata",
"LeaseStatus",
"LeaseState",
"LeaseDuration",
"PublicAccess",
"HasImmutabilityPolicy",
"HasLegalHold"
]
},
destination: "container2",
enabled: true
}
]
}
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobInventoryPolicies.createOrUpdate(resourceGroupName, accountName, blobInventoryPolicyName, properties);
console.log(result);
});
}
storageAccountSetBlobInventoryPolicy().catch(console.error);
/**
* This sample demonstrates how to Sets the blob inventory policy to the specified storage account.
*
* @summary Sets the blob inventory policy to the specified storage account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json
*/
function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res7687";
const accountName = "sto9699";
const blobInventoryPolicyName = "default";
const properties = {
policy: {
type: "Inventory",
enabled: true,
rules: [
{
name: "inventoryPolicyRule1",
definition: {
format: "Csv",
filters: {
blobTypes: ["blockBlob", "appendBlob", "pageBlob"],
excludePrefix: ["excludeprefix1", "excludeprefix2"],
includeBlobVersions: true,
includeDeleted: true,
includeSnapshots: true,
prefixMatch: ["inventoryprefix1", "inventoryprefix2"]
},
objectType: "Blob",
schedule: "Daily",
schemaFields: [
"Name",
"Creation-Time",
"Last-Modified",
"Content-Length",
"Content-MD5",
"BlobType",
"AccessTier",
"AccessTierChangeTime",
"Snapshot",
"VersionId",
"IsCurrentVersion",
"ContentType",
"ContentEncoding",
"ContentLanguage",
"ContentCRC64",
"CacheControl",
"Metadata",
"DeletionId",
"Deleted",
"DeletedTime",
"RemainingRetentionDays"
]
},
destination: "container1",
enabled: true
},
{
name: "inventoryPolicyRule2",
definition: {
format: "Parquet",
objectType: "Container",
schedule: "Weekly",
schemaFields: [
"Name",
"Last-Modified",
"Metadata",
"LeaseStatus",
"LeaseState",
"LeaseDuration",
"PublicAccess",
"HasImmutabilityPolicy",
"HasLegalHold",
"Etag",
"DefaultEncryptionScope",
"DenyEncryptionScopeOverride",
"ImmutableStorageWithVersioningEnabled",
"Deleted",
"Version",
"DeletedTime",
"RemainingRetentionDays"
]
},
destination: "container2",
enabled: true
}
]
}
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobInventoryPolicies.createOrUpdate(resourceGroupName, accountName, blobInventoryPolicyName, properties);
console.log(result);
});
}
storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount().catch(console.error);
/**
* This sample demonstrates how to Sets the blob inventory policy to the specified storage account.
*
* @summary Sets the blob inventory policy to the specified storage account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json
*/
function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res7687";
const accountName = "sto9699";
const blobInventoryPolicyName = "default";
const properties = {
policy: {
type: "Inventory",
enabled: true,
rules: [
{
name: "inventoryPolicyRule1",
definition: {
format: "Csv",
filters: {
blobTypes: ["blockBlob", "appendBlob", "pageBlob"],
excludePrefix: ["excludeprefix1", "excludeprefix2"],
includeBlobVersions: true,
includeDeleted: true,
includeSnapshots: true,
prefixMatch: ["inventoryprefix1", "inventoryprefix2"]
},
objectType: "Blob",
schedule: "Daily",
schemaFields: [
"Name",
"Creation-Time",
"Last-Modified",
"Content-Length",
"Content-MD5",
"BlobType",
"AccessTier",
"AccessTierChangeTime",
"Snapshot",
"VersionId",
"IsCurrentVersion",
"Tags",
"ContentType",
"ContentEncoding",
"ContentLanguage",
"ContentCRC64",
"CacheControl",
"Metadata",
"Deleted",
"RemainingRetentionDays"
]
},
destination: "container1",
enabled: true
},
{
name: "inventoryPolicyRule2",
definition: {
format: "Parquet",
objectType: "Container",
schedule: "Weekly",
schemaFields: [
"Name",
"Last-Modified",
"Metadata",
"LeaseStatus",
"LeaseState",
"LeaseDuration",
"PublicAccess",
"HasImmutabilityPolicy",
"HasLegalHold",
"Etag",
"DefaultEncryptionScope",
"DenyEncryptionScopeOverride",
"ImmutableStorageWithVersioningEnabled",
"Deleted",
"Version",
"DeletedTime",
"RemainingRetentionDays"
]
},
destination: "container2",
enabled: true
}
]
}
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobInventoryPolicies.createOrUpdate(resourceGroupName, accountName, blobInventoryPolicyName, properties);
console.log(result);
});
}
storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount().catch(console.error);
//# sourceMappingURL=blobInventoryPoliciesCreateOrUpdateSample.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobInventoryPoliciesDeleteSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobInventoryPoliciesDeleteSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobInventoryPoliciesDeleteSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
/*
* 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 Deletes the blob inventory policy associated with the specified storage account.
*
* @summary Deletes the blob inventory policy associated with the specified storage account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountDeleteBlobInventoryPolicy.json
*/
function storageAccountDeleteBlobInventoryPolicy() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res6977";
const accountName = "sto2527";
const blobInventoryPolicyName = "default";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobInventoryPolicies.delete(resourceGroupName, accountName, blobInventoryPolicyName);
console.log(result);
});
}
storageAccountDeleteBlobInventoryPolicy().catch(console.error);
//# sourceMappingURL=blobInventoryPoliciesDeleteSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobInventoryPoliciesDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/blobInventoryPoliciesDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,uCAAuC;;QACpD,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,uBAAuB,GAAG,SAAS,CAAC;QAC1C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,MAAM,CACtD,iBAAiB,EACjB,WAAW,EACX,uBAAuB,CACxB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,uCAAuC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobInventoryPoliciesGetSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobInventoryPoliciesGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobInventoryPoliciesGetSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
/*
* 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 Gets the blob inventory policy associated with the specified storage account.
*
* @summary Gets the blob inventory policy associated with the specified storage account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountGetBlobInventoryPolicy.json
*/
function storageAccountGetBlobInventoryPolicy() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res7687";
const accountName = "sto9699";
const blobInventoryPolicyName = "default";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobInventoryPolicies.get(resourceGroupName, accountName, blobInventoryPolicyName);
console.log(result);
});
}
storageAccountGetBlobInventoryPolicy().catch(console.error);
//# sourceMappingURL=blobInventoryPoliciesGetSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobInventoryPoliciesGetSample.js","sourceRoot":"","sources":["../../samples-dev/blobInventoryPoliciesGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,oCAAoC;;QACjD,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,uBAAuB,GAAG,SAAS,CAAC;QAC1C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,GAAG,CACnD,iBAAiB,EACjB,WAAW,EACX,uBAAuB,CACxB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,oCAAoC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobInventoryPoliciesListSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobInventoryPoliciesListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobInventoryPoliciesListSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
/*
* 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 { __asyncValues, __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 Gets the blob inventory policy associated with the specified storage account.
*
* @summary Gets the blob inventory policy associated with the specified storage account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountListBlobInventoryPolicy.json
*/
function storageAccountGetBlobInventoryPolicy() {
var e_1, _a;
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res7687";
const accountName = "sto9699";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const resArray = new Array();
try {
for (var _b = __asyncValues(client.blobInventoryPolicies.list(resourceGroupName, accountName)), _c; _c = yield _b.next(), !_c.done;) {
let item = _c.value;
resArray.push(item);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
console.log(resArray);
});
}
storageAccountGetBlobInventoryPolicy().catch(console.error);
//# sourceMappingURL=blobInventoryPoliciesListSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobInventoryPoliciesListSample.js","sourceRoot":"","sources":["../../samples-dev/blobInventoryPoliciesListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,oCAAoC;;;QACjD,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,qBAAqB,CAAC,IAAI,CACtD,iBAAiB,EACjB,WAAW,CACZ,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,oCAAoC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobServicesGetServicePropertiesSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobServicesGetServicePropertiesSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobServicesGetServicePropertiesSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
/*
* 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 Gets the properties of a storage accounts Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
*
* @summary Gets the properties of a storage accounts Blob 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/BlobServicesGet.json
*/
function getBlobServices() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4410";
const accountName = "sto8607";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobServices.getServiceProperties(resourceGroupName, accountName);
console.log(result);
});
}
getBlobServices().catch(console.error);
//# sourceMappingURL=blobServicesGetServicePropertiesSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobServicesGetServicePropertiesSample.js","sourceRoot":"","sources":["../../samples-dev/blobServicesGetServicePropertiesSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,eAAe;;QAC5B,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAC3D,iBAAiB,EACjB,WAAW,CACZ,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,eAAe,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobServicesListSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobServicesListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobServicesListSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
/*
* 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 { __asyncValues, __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 List blob services of storage account. It returns a collection of one object named default.
*
* @summary List blob services of storage account. It returns a collection of one object named default.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/BlobServicesList.json
*/
function listBlobServices() {
var e_1, _a;
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4410";
const accountName = "sto8607";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const resArray = new Array();
try {
for (var _b = __asyncValues(client.blobServices.list(resourceGroupName, accountName)), _c; _c = yield _b.next(), !_c.done;) {
let item = _c.value;
resArray.push(item);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
console.log(resArray);
});
}
listBlobServices().catch(console.error);
//# sourceMappingURL=blobServicesListSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobServicesListSample.js","sourceRoot":"","sources":["../../samples-dev/blobServicesListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,gBAAgB;;;QAC7B,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAC7C,iBAAiB,EACjB,WAAW,CACZ,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,gBAAgB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=blobServicesSetServicePropertiesSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"blobServicesSetServicePropertiesSample.d.ts","sourceRoot":"","sources":["../../samples-dev/blobServicesSetServicePropertiesSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,125 @@
/*
* 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 Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
*
* @summary Sets the properties of a storage accounts Blob 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/BlobServicesPutAllowPermanentDelete.json
*/
function blobServicesPutAllowPermanentDelete() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4410";
const accountName = "sto8607";
const parameters = {
deleteRetentionPolicy: {
allowPermanentDelete: true,
days: 300,
enabled: true
},
isVersioningEnabled: true
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobServices.setServiceProperties(resourceGroupName, accountName, parameters);
console.log(result);
});
}
blobServicesPutAllowPermanentDelete().catch(console.error);
/**
* This sample demonstrates how to Sets the properties of a storage accounts Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
*
* @summary Sets the properties of a storage accounts Blob 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/BlobServicesPutLastAccessTimeBasedTracking.json
*/
function blobServicesPutLastAccessTimeBasedTracking() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4410";
const accountName = "sto8607";
const parameters = {
lastAccessTimeTrackingPolicy: {
name: "AccessTimeTracking",
blobType: ["blockBlob"],
enable: true,
trackingGranularityInDays: 1
}
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobServices.setServiceProperties(resourceGroupName, accountName, parameters);
console.log(result);
});
}
blobServicesPutLastAccessTimeBasedTracking().catch(console.error);
/**
* This sample demonstrates how to Sets the properties of a storage accounts Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
*
* @summary Sets the properties of a storage accounts Blob 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/BlobServicesPut.json
*/
function putBlobServices() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res4410";
const accountName = "sto8607";
const parameters = {
changeFeed: { enabled: true, retentionInDays: 7 },
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
}
]
},
defaultServiceVersion: "2017-07-29",
deleteRetentionPolicy: { days: 300, enabled: true },
isVersioningEnabled: true
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.blobServices.setServiceProperties(resourceGroupName, accountName, parameters);
console.log(result);
});
}
putBlobServices().catch(console.error);
//# sourceMappingURL=blobServicesSetServicePropertiesSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blobServicesSetServicePropertiesSample.js","sourceRoot":"","sources":["../../samples-dev/blobServicesSetServicePropertiesSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,mCAAmC;;QAChD,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,UAAU,GAA0B;YACxC,qBAAqB,EAAE;gBACrB,oBAAoB,EAAE,IAAI;gBAC1B,IAAI,EAAE,GAAG;gBACT,OAAO,EAAE,IAAI;aACd;YACD,mBAAmB,EAAE,IAAI;SAC1B,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAC3D,iBAAiB,EACjB,WAAW,EACX,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,mCAAmC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAE3D;;;;;GAKG;AACH,SAAe,0CAA0C;;QACvD,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,UAAU,GAA0B;YACxC,4BAA4B,EAAE;gBAC5B,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,CAAC,WAAW,CAAC;gBACvB,MAAM,EAAE,IAAI;gBACZ,yBAAyB,EAAE,CAAC;aAC7B;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAC3D,iBAAiB,EACjB,WAAW,EACX,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,0CAA0C,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAElE;;;;;GAKG;AACH,SAAe,eAAe;;QAC5B,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,SAAS,CAAC;QAC9B,MAAM,UAAU,GAA0B;YACxC,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,EAAE;YACjD,IAAI,EAAE;gBACJ,SAAS,EAAE;oBACT;wBACE,cAAc,EAAE;4BACd,eAAe;4BACf,iBAAiB;4BACjB,mBAAmB;yBACpB;wBACD,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC;wBAClE,cAAc,EAAE,CAAC,wBAAwB,EAAE,yBAAyB,CAAC;wBACrE,cAAc,EAAE,CAAC,aAAa,CAAC;wBAC/B,eAAe,EAAE,GAAG;qBACrB;oBACD;wBACE,cAAc,EAAE,CAAC,GAAG,CAAC;wBACrB,cAAc,EAAE,CAAC,KAAK,CAAC;wBACvB,cAAc,EAAE,CAAC,GAAG,CAAC;wBACrB,cAAc,EAAE,CAAC,GAAG,CAAC;wBACrB,eAAe,EAAE,CAAC;qBACnB;oBACD;wBACE,cAAc,EAAE,CAAC,2BAA2B,CAAC;wBAC7C,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;wBAC9B,cAAc,EAAE;4BACd,sBAAsB;4BACtB,4BAA4B;yBAC7B;wBACD,cAAc,EAAE;4BACd,eAAe;4BACf,iBAAiB;4BACjB,oBAAoB;yBACrB;wBACD,eAAe,EAAE,IAAI;qBACtB;iBACF;aACF;YACD,qBAAqB,EAAE,YAAY;YACnC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;YACnD,mBAAmB,EAAE,IAAI;SAC1B,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAC3D,iBAAiB,EACjB,WAAW,EACX,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,eAAe,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deletedAccountsGetSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deletedAccountsGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deletedAccountsGetSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
/*
* 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 properties of specified deleted account resource.
*
* @summary Get properties of specified deleted account resource.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/DeletedAccountGet.json
*/
function deletedAccountGet() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const deletedAccountName = "sto1125";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.deletedAccounts.get(deletedAccountName, location);
console.log(result);
});
}
deletedAccountGet().catch(console.error);
//# sourceMappingURL=deletedAccountsGetSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deletedAccountsGetSample.js","sourceRoot":"","sources":["../../samples-dev/deletedAccountsGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,kBAAkB,GAAG,SAAS,CAAC;QACrC,MAAM,QAAQ,GAAG,QAAQ,CAAC;QAC1B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=deletedAccountsListSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"deletedAccountsListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/deletedAccountsListSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
/*
* 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 { __asyncValues, __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 Lists deleted accounts under the subscription.
*
* @summary Lists deleted accounts under the subscription.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/DeletedAccountList.json
*/
function deletedAccountList() {
var e_1, _a;
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const resArray = new Array();
try {
for (var _b = __asyncValues(client.deletedAccounts.list()), _c; _c = yield _b.next(), !_c.done;) {
let item = _c.value;
resArray.push(item);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
console.log(resArray);
});
}
deletedAccountList().catch(console.error);
//# sourceMappingURL=deletedAccountsListSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"deletedAccountsListSample.js","sourceRoot":"","sources":["../../samples-dev/deletedAccountsListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,kBAAkB;;;QAC/B,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAA,IAAA;gBAAzC,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,kBAAkB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=encryptionScopesGetSample.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"encryptionScopesGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/encryptionScopesGetSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
/*
* 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 Returns the properties for the specified encryption scope.
*
* @summary Returns the properties for the specified encryption scope.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/StorageAccountGetEncryptionScope.json
*/
function storageAccountGetEncryptionScope() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "resource-group-name";
const accountName = "{storage-account-name}";
const encryptionScopeName = "{encryption-scope-name}";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.encryptionScopes.get(resourceGroupName, accountName, encryptionScopeName);
console.log(result);
});
}
storageAccountGetEncryptionScope().catch(console.error);
//# sourceMappingURL=encryptionScopesGetSample.js.map
@@ -0,0 +1 @@
{"version":3,"file":"encryptionScopesGetSample.js","sourceRoot":"","sources":["../../samples-dev/encryptionScopesGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,gCAAgC;;QAC7C,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;QAChD,MAAM,WAAW,GAAG,wBAAwB,CAAC;QAC7C,MAAM,mBAAmB,GAAG,yBAAyB,CAAC;QACtD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAC9C,iBAAiB,EACjB,WAAW,EACX,mBAAmB,CACpB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,gCAAgC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=encryptionScopesListSample.d.ts.map

Some files were not shown because too many files have changed in this diff Show More