Azure Storage Accounts ManagementPolicies API
The ManagementPolicies API from Azure Storage Accounts — 1 operation(s) for managementpolicies.
The ManagementPolicies API from Azure Storage Accounts — 1 operation(s) for managementpolicies.
swagger: '2.0'
info:
description: The Azure Storage Management API.
title: StorageManagementClient BlobContainers ManagementPolicies API
version: '2019-06-01'
x-apisguru-categories:
- cloud
x-logo:
url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
x-origin:
- format: swagger
url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/blob.json
version: '2.0'
x-preferred: false
x-providerName: azure.com
x-serviceName: storage-blob
x-tags:
- Azure
- Microsoft
host: management.azure.com
schemes:
- https
consumes:
- application/json
produces:
- application/json
security:
- azure_auth:
- user_impersonation
tags:
- name: ManagementPolicies
paths:
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}
: delete:
description: Deletes the managementpolicy associated with the specified storage account.
operationId: ManagementPolicies_Delete
parameters:
- $ref: '#/parameters/ResourceGroupName'
- $ref: '#/parameters/StorageAccountName'
- description: The API version to use for this operation.
in: query
minLength: 1
name: api-version
required: true
type: string
example: '2019-06-01'
- description: The ID of the target subscription.
in: path
minLength: 1
name: subscriptionId
required: true
type: string
example: 00000000-0000-0000-0000-000000000000
- $ref: '#/parameters/ManagementPolicyName'
responses:
'200':
description: OK -- Delete the managementpolicy successfully.
'204':
description: No Content -- The managementpolicy does not exist.
tags:
- ManagementPolicies
x-ms-examples:
StorageAccountDeleteManagementPolicies:
parameters:
accountName: sto2527
api-version: '2019-06-01'
managementPolicyName: default
monitor: 'true'
resourceGroupName: res6977
subscriptionId: '{subscription-id}'
responses:
'200': {}
'204': {}
summary: Azure Storage Accounts Management Policies_ Delete
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
description: Gets the managementpolicy associated with the specified storage account.
operationId: ManagementPolicies_Get
parameters:
- $ref: '#/parameters/ResourceGroupName'
- $ref: '#/parameters/StorageAccountName'
- description: The API version to use for this operation.
in: query
minLength: 1
name: api-version
required: true
type: string
example: '2019-06-01'
- description: The ID of the target subscription.
in: path
minLength: 1
name: subscriptionId
required: true
type: string
example: 00000000-0000-0000-0000-000000000000
- $ref: '#/parameters/ManagementPolicyName'
responses:
'200':
description: OK -- Get the managementpolicy successfully.
schema:
$ref: '#/definitions/ManagementPolicy'
tags:
- ManagementPolicies
x-ms-examples:
StorageAccountGetManagementPolicies:
parameters:
accountName: sto2527
api-version: '2019-06-01'
managementPolicyName: default
monitor: 'true'
resourceGroupName: res6977
subscriptionId: '{subscription-id}'
responses:
'200':
body:
id: /subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default
name: DefaultManagementPolicy
properties:
lastModifiedTime: '2018-06-08T03:01:55.7168089Z'
policy:
rules:
- definition:
actions:
baseBlob:
delete:
daysAfterModificationGreaterThan: 1000
tierToArchive:
daysAfterModificationGreaterThan: 90
tierToCool:
daysAfterModificationGreaterThan: 30
snapshot:
delete:
daysAfterCreationGreaterThan: 30
filters:
blobTypes:
- blockBlob
prefixMatch:
- olcmtestcontainer
enabled: true
name: olcmtest
type: Lifecycle
type: Microsoft.Storage/storageAccounts/managementPolicies
summary: Azure Storage Accounts Management Policies_ Get
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
description: Sets the managementpolicy to the specified storage account.
operationId: ManagementPolicies_CreateOrUpdate
parameters:
- $ref: '#/parameters/ResourceGroupName'
- $ref: '#/parameters/StorageAccountName'
- description: The API version to use for this operation.
in: query
minLength: 1
name: api-version
required: true
type: string
example: '2019-06-01'
- description: The ID of the target subscription.
in: path
minLength: 1
name: subscriptionId
required: true
type: string
example: 00000000-0000-0000-0000-000000000000
- $ref: '#/parameters/ManagementPolicyName'
- description: The ManagementPolicy set to a storage account.
in: body
name: properties
required: true
schema:
$ref: '#/definitions/ManagementPolicy'
example: example-value
responses:
'200':
description: OK -- Put managementpolicy successfully.
schema:
$ref: '#/definitions/ManagementPolicy'
tags:
- ManagementPolicies
x-ms-examples:
StorageAccountSetManagementPolicies:
parameters:
accountName: sto9699
api-version: '2019-06-01'
managementPolicyName: default
monitor: 'true'
properties:
properties:
policy:
rules:
- definition:
actions:
baseBlob:
delete:
daysAfterModificationGreaterThan: 1000
tierToArchive:
daysAfterModificationGreaterThan: 90
tierToCool:
daysAfterModificationGreaterThan: 30
snapshot:
delete:
daysAfterCreationGreaterThan: 30
filters:
blobTypes:
- blockBlob
prefixMatch:
- olcmtestcontainer
enabled: true
name: olcmtest
type: Lifecycle
resourceGroupName: res7687
subscriptionId: '{subscription-id}'
responses:
'200':
body:
id: /subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default
name: DefaultManagementPolicy
properties:
lastModifiedTime: '2018-06-08T02:53:39.0932539Z'
policy:
rules:
- definition:
actions:
baseBlob:
delete:
daysAfterModificationGreaterThan: 1000
tierToArchive:
daysAfterModificationGreaterThan: 90
tierToCool:
daysAfterModificationGreaterThan: 30
snapshot:
delete:
daysAfterCreationGreaterThan: 30
filters:
blobTypes:
- blockBlob
prefixMatch:
- olcmtestcontainer
enabled: true
name: olcmtest
type: Lifecycle
type: Microsoft.Storage/storageAccounts/managementPolicies
summary: Azure Storage Accounts Management Policies_ Create or Update
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
definitions:
DateAfterCreation:
description: Object to define the number of days after creation.
properties:
daysAfterCreationGreaterThan:
description: Value indicating the age in days after creation
minimum: 0
multipleOf: 1
type: number
required:
- daysAfterCreationGreaterThan
ManagementPolicyProperties:
description: The Storage Account ManagementPolicy properties.
properties:
lastModifiedTime:
description: Returns the date and time the ManagementPolicies was last modified.
format: date-time
readOnly: true
type: string
policy:
$ref: '#/definitions/ManagementPolicySchema'
description: 'The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.'
required:
- policy
ManagementPolicySchema:
description: 'The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.'
properties:
rules:
description: 'The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.'
items:
$ref: '#/definitions/ManagementPolicyRule'
type: array
required:
- rules
ManagementPolicySnapShot:
description: Management policy action for snapshot.
properties:
delete:
$ref: '#/definitions/DateAfterCreation'
description: The function to delete the blob snapshot
ManagementPolicyFilter:
description: 'Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical AND is performed on all filters. '
properties:
blobTypes:
description: An array of predefined enum values. Only blockBlob is supported.
items:
type: string
type: array
prefixMatch:
description: An array of strings for prefixes to be match.
items:
type: string
type: array
required:
- blobTypes
ManagementPolicyRule:
description: An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.
properties:
definition:
$ref: '#/definitions/ManagementPolicyDefinition'
description: An object that defines the Lifecycle rule.
enabled:
description: Rule is enabled if set to true.
type: boolean
name:
description: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
type: string
type:
description: The valid value is Lifecycle
enum:
- Lifecycle
type: string
x-ms-enum:
modelAsString: true
name: type
required:
- name
- type
- definition
ManagementPolicyDefinition:
description: An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set.
properties:
actions:
$ref: '#/definitions/ManagementPolicyAction'
description: An object that defines the action set.
filters:
$ref: '#/definitions/ManagementPolicyFilter'
description: An object that defines the filter set.
required:
- actions
ManagementPolicyBaseBlob:
description: Management policy action for base blob.
properties:
delete:
$ref: '#/definitions/DateAfterModification'
description: The function to delete the blob
tierToArchive:
$ref: '#/definitions/DateAfterModification'
description: The function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier
tierToCool:
$ref: '#/definitions/DateAfterModification'
description: The function to tier blobs to cool storage. Support blobs currently at Hot tier
ManagementPolicyAction:
description: Actions are applied to the filtered blobs when the execution condition is met.
properties:
baseBlob:
$ref: '#/definitions/ManagementPolicyBaseBlob'
description: The management policy action for base blob
snapshot:
$ref: '#/definitions/ManagementPolicySnapShot'
description: The management policy action for snapshot
DateAfterModification:
description: Object to define the number of days after last modification.
properties:
daysAfterModificationGreaterThan:
description: Value indicating the age in days after last modification
minimum: 0
multipleOf: 1
type: number
required:
- daysAfterModificationGreaterThan
ManagementPolicy:
allOf:
- properties:
id:
description: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
readOnly: true
type: string
name:
description: The name of the resource
readOnly: true
type: string
type:
description: The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
readOnly: true
type: string
x-ms-azure-resource: true
description: The Get Storage Account ManagementPolicies operation response.
properties:
properties:
$ref: '#/definitions/ManagementPolicyProperties'
description: Returns the Storage Account Data Policies Rules.
x-ms-client-flatten: true
parameters:
ResourceGroupName:
description: The name of the resource group within the user's subscription. The name is case insensitive.
in: path
maxLength: 90
minLength: 1
name: resourceGroupName
pattern: ^[-\w\._\(\)]+$
required: true
type: string
x-ms-parameter-location: method
ManagementPolicyName:
description: The name of the Storage Account Management Policy. It should always be 'default'
enum:
- default
in: path
name: managementPolicyName
required: true
type: string
x-ms-enum:
modelAsString: true
name: ManagementPolicyName
x-ms-parameter-location: method
StorageAccountName:
description: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
in: path
maxLength: 24
minLength: 3
name: accountName
required: true
type: string
x-ms-parameter-location: method
securityDefinitions:
azure_auth:
authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
description: Azure Active Directory OAuth2 Flow
flow: implicit
scopes:
user_impersonation: impersonate your user account
type: oauth2