Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: StorageManagementClient Blob Inventory Policies API
version: '2026-09-01'
description: The Azure Storage Management API.
x-typespec-generated:
- emitter: '@azure-tools/typespec-autorest'
servers:
- url: https://management.azure.com
security:
- azure_auth:
- user_impersonation
tags:
- name: BlobInventoryPolicies
paths:
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies
: get:
operationId: BlobInventoryPolicies_List
tags:
- BlobInventoryPolicies
description: Gets the blob inventory policy associated with the specified storage account.
parameters:
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- name: accountName
in: path
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.
required: true
schema:
type: string
maxLength: 24
minLength: 3
pattern: ^[a-z0-9]+$
responses:
'200':
description: Azure operation completed successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/ListBlobInventoryPolicy'
default:
description: An unexpected error response.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-ms-pageable:
nextLinkName: nextLink
summary: Blob inventory policies list
x-summary-source: derived
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}
: get:
operationId: BlobInventoryPolicies_Get
tags:
- BlobInventoryPolicies
description: Gets the blob inventory policy associated with the specified storage account.
parameters:
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- name: accountName
in: path
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.
required: true
schema:
type: string
maxLength: 24
minLength: 3
pattern: ^[a-z0-9]+$
- name: blobInventoryPolicyName
in: path
description: The name of the storage account blob inventory policy. It should always be 'default'
required: true
x-ms-enum:
name: BlobInventoryPolicyName
modelAsString: true
values:
- name: default
value: default
schema:
type: string
enum:
- default
responses:
'200':
description: Azure operation completed successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/BlobInventoryPolicy'
default:
description: An unexpected error response.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
summary: Blob inventory policies get
x-summary-source: derived
put:
operationId: BlobInventoryPolicies_CreateOrUpdate
tags:
- BlobInventoryPolicies
description: Sets the blob inventory policy to the specified storage account.
parameters:
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- name: accountName
in: path
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.
required: true
schema:
type: string
maxLength: 24
minLength: 3
pattern: ^[a-z0-9]+$
- name: blobInventoryPolicyName
in: path
description: The name of the storage account blob inventory policy. It should always be 'default'
required: true
x-ms-enum:
name: BlobInventoryPolicyName
modelAsString: true
values:
- name: default
value: default
schema:
type: string
enum:
- default
responses:
'200':
description: Resource 'BlobInventoryPolicy' update operation succeeded
content:
application/json:
schema:
$ref: '#/components/schemas/BlobInventoryPolicy'
default:
description: An unexpected error response.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BlobInventoryPolicy'
description: The blob inventory policy set to a storage account.
required: true
summary: Blob inventory policies create or update
x-summary-source: derived
delete:
operationId: BlobInventoryPolicies_Delete
tags:
- BlobInventoryPolicies
description: Deletes the blob inventory policy associated with the specified storage account.
parameters:
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- name: accountName
in: path
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.
required: true
schema:
type: string
maxLength: 24
minLength: 3
pattern: ^[a-z0-9]+$
- name: blobInventoryPolicyName
in: path
description: The name of the storage account blob inventory policy. It should always be 'default'
required: true
x-ms-enum:
name: BlobInventoryPolicyName
modelAsString: true
values:
- name: default
value: default
schema:
type: string
enum:
- default
responses:
'200':
description: Resource deleted successfully.
'204':
description: Resource does not exist.
default:
description: An unexpected error response.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
summary: Blob inventory policies delete
x-summary-source: derived
components:
schemas:
ErrorResponseBody:
type: object
description: Error response body contract.
properties:
code:
type: string
description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
message:
type: string
description: A message describing the error, intended to be suitable for display in a user interface.
InventoryRuleType:
type: string
description: The valid value is Inventory
enum:
- Inventory
x-ms-enum:
name: InventoryRuleType
modelAsString: true
values:
- name: Inventory
value: Inventory
CloudError:
type: object
description: An error response from the Storage service.
properties:
error:
$ref: '#/components/schemas/CloudErrorBody'
description: An error response from the Storage service.
x-ms-external: true
Format:
type: string
description: This is a required field, it specifies the format for the inventory files.
enum:
- Csv
- Parquet
x-ms-enum:
name: Format
modelAsString: true
values:
- name: Csv
value: Csv
- name: Parquet
value: Parquet
ProxyResource:
type: object
title: Proxy Resource
description: The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
allOf:
- $ref: '#/components/schemas/Resource'
BlobInventoryPolicyProperties:
type: object
description: The storage account blob inventory policy properties.
properties:
lastModifiedTime:
type: string
format: date-time
description: Returns the last modified date and time of the blob inventory policy.
readOnly: true
policy:
$ref: '#/components/schemas/BlobInventoryPolicySchema'
description: The storage account blob inventory policy object. It is composed of policy rules.
required:
- policy
BlobInventoryPolicyFilter:
type: object
description: An object that defines the blob inventory rule filter conditions. For 'Blob' definition.objectType all filter properties are applicable, 'blobTypes' is required and others are optional. For 'Container' definition.objectType only prefixMatch is applicable and is optional.
properties:
prefixMatch:
type: array
description: An array of strings with maximum 10 blob prefixes to be included in the inventory.
items:
type: string
excludePrefix:
type: array
description: An array of strings with maximum 10 blob prefixes to be excluded from the inventory.
items:
type: string
blobTypes:
type: array
description: An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. This field is required when definition.objectType property is set to 'Blob'.
items:
type: string
includeBlobVersions:
type: boolean
description: Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' are required if this property is set to true, else they must be excluded.
includeSnapshots:
type: boolean
description: Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required if this property is set to true, else it must be excluded.
includeDeleted:
type: boolean
description: For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. For 'Blob' definition.objectType and HNS enabled storage accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be excluded.
creationTime:
$ref: '#/components/schemas/BlobInventoryCreationTime'
description: This property is used to filter objects based on the object creation time
ErrorResponse:
type: object
description: An error response from the storage resource provider.
properties:
error:
$ref: '#/components/schemas/ErrorResponseBody'
description: Azure Storage Resource Provider error response body.
Schedule:
type: string
description: This is a required field. This field is used to schedule an inventory formation.
enum:
- Daily
- Weekly
x-ms-enum:
name: Schedule
modelAsString: true
values:
- name: Daily
value: Daily
- name: Weekly
value: Weekly
BlobInventoryPolicy:
type: object
description: The storage account blob inventory policy.
properties:
properties:
$ref: '#/components/schemas/BlobInventoryPolicyProperties'
description: Returns the storage account blob inventory policy rules.
x-ms-client-flatten: true
allOf:
- $ref: '#/components/schemas/ProxyResource'
CloudErrorBody:
type: object
description: An error response from the Storage service.
properties:
code:
type: string
description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
message:
type: string
description: A message describing the error, intended to be suitable for display in a user interface.
target:
type: string
description: The target of the particular error. For example, the name of the property in error.
details:
type: array
description: A list of additional details about the error.
items:
$ref: '#/components/schemas/CloudErrorBody'
x-ms-identifiers: []
x-ms-external: true
BlobInventoryCreationTime:
type: object
description: This property defines the creation time based filtering condition. Blob Inventory schema parameter 'Creation-Time' is mandatory with this filter.
properties:
lastNDays:
type: integer
format: int32
description: When set the policy filters the objects that are created in the last N days. Where N is an integer value between 1 to 36500.
minimum: 1
maximum: 36500
Resource:
type: object
title: Resource
description: Common fields that are returned in the response for all Azure Resource Manager resources
properties:
id:
type: string
format: arm-id
description: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
readOnly: true
name:
type: string
description: The name of the resource
readOnly: true
type:
type: string
description: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
readOnly: true
systemData:
$ref: '#/components/schemas/systemData'
description: Azure Resource Manager metadata containing createdBy and modifiedBy information.
readOnly: true
x-ms-azure-resource: true
ObjectType:
type: string
description: This is a required field. This field specifies the scope of the inventory created either at the blob or container level.
enum:
- Blob
- Container
x-ms-enum:
name: ObjectType
modelAsString: true
values:
- name: Blob
value: Blob
- name: Container
value: Container
BlobInventoryPolicyRule:
type: object
description: An object that wraps the blob inventory rule. Each rule is uniquely defined by name.
properties:
enabled:
type: boolean
description: Rule is enabled when set to true.
name:
type: string
description: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
destination:
type: string
description: Container name where blob inventory files are stored. Must be pre-created.
definition:
$ref: '#/components/schemas/BlobInventoryPolicyDefinition'
description: An object that defines the blob inventory policy rule.
required:
- enabled
- name
- destination
- definition
ListBlobInventoryPolicy:
type: object
description: List of blob inventory policies returned.
properties:
value:
type: array
description: List of blob inventory policies.
items:
$ref: '#/components/schemas/BlobInventoryPolicy'
readOnly: true
nextLink:
type: string
BlobInventoryPolicySchema:
type: object
description: The storage account blob inventory policy rules.
properties:
enabled:
type: boolean
description: Policy is enabled if set to true.
destination:
type: string
description: Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified at the rule level 'policy.rule.destination'
readOnly: true
type:
$ref: '#/components/schemas/InventoryRuleType'
description: The valid value is Inventory
rules:
type: array
description: The storage account blob inventory policy rules. The rule is applied when it is enabled.
items:
$ref: '#/components/schemas/BlobInventoryPolicyRule'
required:
- enabled
- type
- rules
BlobInventoryPolicyDefinition:
type: object
description: An object that defines the blob inventory rule.
properties:
filters:
$ref: '#/components/schemas/BlobInventoryPolicyFilter'
description: An object that defines the filter set.
format:
$ref: '#/components/schemas/Format'
description: This is a required field, it specifies the format for the inventory files.
schedule:
$ref: '#/components/schemas/Schedule'
description: This is a required field. This field is used to schedule an inventory formation.
objectType:
$ref: '#/components/schemas/ObjectType'
description: This is a required field. This field specifies the scope of the inventory created either at the blob or container level.
schemaFields:
type: array
description: This is a required field. This field specifies the fields and properties of the object to be included in the inventory. The Schema field value 'Name' is always required. The valid values for this field for the 'Blob' definition.objectType include 'Name, Creation-Time, Last-Modified, Content-Length, Content-MD5, BlobType, AccessTier, AccessTierChangeTime, AccessTierInferred, Tags, Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, Snapshot, VersionId, IsCurrentVersion, Metadata, LastAccessTime, Tags, Etag, ContentType, ContentEncoding, ContentLanguage, ContentCRC64, CacheControl, ContentDisposition, LeaseStatus, LeaseState, LeaseDuration, ServerEncrypted, Deleted, DeletionId, DeletedTime, RemainingRetentionDays, ImmutabilityPolicyUntilDate, ImmutabilityPolicyMode, LegalHold, CopyId, CopyStatus, CopySource, CopyProgress, CopyCompletionTime, CopyStatusDescription, CustomerProvidedKeySha256, RehydratePriority, ArchiveStatus, XmsBlobSequenceNumber, EncryptionScope, IncrementalCopy, TagCount'. For Blob object type schema field value 'DeletedTime' is applicable only for Hns enabled accounts. The valid values for 'Container' definition.objectType include 'Name, Last-Modified, Metadata, LeaseStatus, LeaseState, LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold, Etag, DefaultEncryptionScope, DenyEncryptionScopeOverride, ImmutableStorageWithVersioningEnabled, Deleted, Version, DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, DeletionId' are valid only for Hns enabled accounts.Schema field values 'Tags, TagCount' are only valid for Non-Hns accounts.
items:
type: string
required:
- format
- schedule
- objectType
- schemaFields
parameters:
ResourceGroupNameParameter:
name: resourceGroupName
in: path
description: The name of the resource group. The name is case insensitive.
required: true
x-ms-parameter-location: method
schema:
type: string
maxLength: 90
minLength: 1
SubscriptionIdParameter:
name: subscriptionId
in: path
description: The ID of the target subscription. The value must be an UUID.
required: true
schema:
type: string
format: uuid
ApiVersionParameter:
name: api-version
in: query
description: The API version to use for this operation.
required: true
schema:
type: string
minLength: 1
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.