Azure Storage Account ManagementPolicies API

The ManagementPolicies API from Azure Storage Account — 1 operation(s) for managementpolicies.

Operations 3

DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName} Azure Storage Account Management Policies_ Delete #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName} Azure Storage Account Management Policies_ Get #
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName} Azure Storage Account Management Policies_ Create or Update #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/azure-storage-account-managementpolicies-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

azure-storage-account-managementpolicies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: The Azure Storage Management API.
  title: StorageManagementClient BlobContainers Management Policies API
  version: '2.0'
  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
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: storage-blob
  x-tags:
  - Azure
  - Microsoft
servers:
- url: https://management.azure.com
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: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/StorageAccountName'
      - description: The API version to use for this operation.
        in: query
        name: api-version
        required: true
        example: '2019-06-01'
        schema:
          type: string
          minLength: 1
      - description: The ID of the target subscription.
        in: path
        name: subscriptionId
        required: true
        example: 00000000-0000-0000-0000-000000000000
        schema:
          type: string
          minLength: 1
      - $ref: '#/components/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 Account 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: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/StorageAccountName'
      - description: The API version to use for this operation.
        in: query
        name: api-version
        required: true
        example: '2019-06-01'
        schema:
          type: string
          minLength: 1
      - description: The ID of the target subscription.
        in: path
        name: subscriptionId
        required: true
        example: 00000000-0000-0000-0000-000000000000
        schema:
          type: string
          minLength: 1
      - $ref: '#/components/parameters/ManagementPolicyName'
      responses:
        '200':
          description: OK -- Get the managementpolicy successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/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 Account 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: '#/components/parameters/ResourceGroupName'
      - $ref: '#/components/parameters/StorageAccountName'
      - description: The API version to use for this operation.
        in: query
        name: api-version
        required: true
        example: '2019-06-01'
        schema:
          type: string
          minLength: 1
      - description: The ID of the target subscription.
        in: path
        name: subscriptionId
        required: true
        example: 00000000-0000-0000-0000-000000000000
        schema:
          type: string
          minLength: 1
      - $ref: '#/components/parameters/ManagementPolicyName'
      responses:
        '200':
          description: OK -- Put managementpolicy successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/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 Account Management Policies_ Create or Update
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagementPolicy'
        description: The ManagementPolicy set to a storage account.
        required: true
components:
  schemas:
    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
    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
    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
    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: '#/components/schemas/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
    ManagementPolicyRule:
      description: An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.
      properties:
        definition:
          $ref: '#/components/schemas/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
    ManagementPolicySnapShot:
      description: Management policy action for snapshot.
      properties:
        delete:
          $ref: '#/components/schemas/DateAfterCreation'
          description: The function to delete the blob snapshot
    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: '#/components/schemas/ManagementPolicyProperties'
          description: Returns the Storage Account Data Policies Rules.
          x-ms-client-flatten: true
    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: '#/components/schemas/ManagementPolicyRule'
          type: array
      required:
      - rules
    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: '#/components/schemas/ManagementPolicyAction'
          description: An object that defines the action set.
        filters:
          $ref: '#/components/schemas/ManagementPolicyFilter'
          description: An object that defines the filter set.
      required:
      - actions
    ManagementPolicyBaseBlob:
      description: Management policy action for base blob.
      properties:
        delete:
          $ref: '#/components/schemas/DateAfterModification'
          description: The function to delete the blob
        tierToArchive:
          $ref: '#/components/schemas/DateAfterModification'
          description: The function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier
        tierToCool:
          $ref: '#/components/schemas/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: '#/components/schemas/ManagementPolicyBaseBlob'
          description: The management policy action for base blob
        snapshot:
          $ref: '#/components/schemas/ManagementPolicySnapShot'
          description: The management policy action for snapshot
  parameters:
    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
      name: accountName
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 24
        minLength: 3
    ManagementPolicyName:
      description: The name of the Storage Account Management Policy. It should always be 'default'
      in: path
      name: managementPolicyName
      required: true
      x-ms-enum:
        modelAsString: true
        name: ManagementPolicyName
      x-ms-parameter-location: method
      schema:
        type: string
        enum:
        - default
    ResourceGroupName:
      description: The name of the resource group within the user's subscription. The name is case insensitive.
      in: path
      name: resourceGroupName
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 90
        minLength: 1
        pattern: ^[-\w\._\(\)]+$
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow