Management Policies - Create Or Update

Sets the managementpolicy to the specified storage account.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/default?api-version=2023-01-01

URI Parameters

Name In Required Type Description
accountName
path True

string

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.

Regex pattern: ^[a-z0-9]+$

managementPolicyName
path True

ManagementPolicyName

The name of the Storage Account Management Policy. It should always be 'default'

resourceGroupName
path True

string

The name of the resource group within the user's subscription. The name is case insensitive.

Regex pattern: ^[-\w\._\(\)]+$

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Required Type Description
properties.policy True

ManagementPolicySchema

The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.

Responses

Name Type Description
200 OK

ManagementPolicy

OK -- Put managementpolicy successfully.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

StorageAccountSetManagementPolicies
StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions
StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions
StorageAccountSetManagementPolicy_LastTierChangeTimeActions
StorageAccountSetManagementPolicyColdTierActions
StorageAccountSetManagementPolicyForBlockAndAppendBlobs
StorageAccountSetManagementPolicyHotTierActions
StorageAccountSetManagementPolicyWithSnapshotAndVersion

StorageAccountSetManagementPolicies

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/managementPolicies/default?api-version=2023-01-01

{
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterModificationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterModificationGreaterThan": 90
                },
                "delete": {
                  "daysAfterModificationGreaterThan": 1000
                }
              },
              "snapshot": {
                "delete": {
                  "daysAfterCreationGreaterThan": 30
                }
              }
            }
          }
        },
        {
          "enabled": true,
          "name": "olcmtest2",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer2"
              ],
              "blobIndexMatch": [
                {
                  "name": "tag1",
                  "op": "==",
                  "value": "val1"
                },
                {
                  "name": "tag2",
                  "op": "==",
                  "value": "val2"
                }
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterModificationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterModificationGreaterThan": 90
                },
                "delete": {
                  "daysAfterModificationGreaterThan": 1000
                }
              }
            }
          }
        }
      ]
    }
  }
}

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default",
  "name": "DefaultManagementPolicy",
  "type": "Microsoft.Storage/storageAccounts/managementPolicies",
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterModificationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterModificationGreaterThan": 90
                },
                "delete": {
                  "daysAfterModificationGreaterThan": 1000
                }
              },
              "snapshot": {
                "delete": {
                  "daysAfterCreationGreaterThan": 30
                }
              }
            }
          }
        },
        {
          "enabled": true,
          "name": "olcmtest2",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer2"
              ],
              "blobIndexMatch": [
                {
                  "name": "tag1",
                  "op": "==",
                  "value": "val1"
                },
                {
                  "name": "tag2",
                  "op": "==",
                  "value": "val2"
                }
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterModificationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterModificationGreaterThan": 90
                },
                "delete": {
                  "daysAfterModificationGreaterThan": 1000
                }
              }
            }
          }
        }
      ]
    },
    "lastModifiedTime": "2018-06-08T02:53:39.0932539Z"
  }
}

StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/managementPolicies/default?api-version=2023-01-01

{
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterCreationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterCreationGreaterThan": 90
                },
                "delete": {
                  "daysAfterCreationGreaterThan": 1000
                }
              }
            }
          }
        }
      ]
    }
  }
}

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default",
  "name": "DefaultManagementPolicy",
  "type": "Microsoft.Storage/storageAccounts/managementPolicies",
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterCreationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterCreationGreaterThan": 90
                },
                "delete": {
                  "daysAfterCreationGreaterThan": 1000
                }
              }
            }
          }
        }
      ]
    },
    "lastModifiedTime": "2021-06-08T02:53:39.0932539Z"
  }
}

StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/managementPolicies/default?api-version=2023-01-01

{
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterLastAccessTimeGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterLastAccessTimeGreaterThan": 90
                },
                "delete": {
                  "daysAfterLastAccessTimeGreaterThan": 1000
                },
                "enableAutoTierToHotFromCool": true
              },
              "snapshot": {
                "delete": {
                  "daysAfterCreationGreaterThan": 30
                }
              }
            }
          }
        }
      ]
    }
  }
}

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default",
  "name": "DefaultManagementPolicy",
  "type": "Microsoft.Storage/storageAccounts/managementPolicies",
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterLastAccessTimeGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterLastAccessTimeGreaterThan": 90
                },
                "delete": {
                  "daysAfterLastAccessTimeGreaterThan": 1000
                },
                "enableAutoTierToHotFromCool": true
              },
              "snapshot": {
                "delete": {
                  "daysAfterCreationGreaterThan": 30
                }
              }
            }
          }
        }
      ]
    },
    "lastModifiedTime": "2018-06-08T02:53:39.0932539Z"
  }
}

StorageAccountSetManagementPolicy_LastTierChangeTimeActions

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/managementPolicies/default?api-version=2023-01-01

{
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterModificationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterModificationGreaterThan": 90,
                  "daysAfterLastTierChangeGreaterThan": 120
                },
                "delete": {
                  "daysAfterModificationGreaterThan": 1000
                }
              },
              "snapshot": {
                "tierToArchive": {
                  "daysAfterCreationGreaterThan": 30,
                  "daysAfterLastTierChangeGreaterThan": 90
                }
              },
              "version": {
                "tierToArchive": {
                  "daysAfterCreationGreaterThan": 30,
                  "daysAfterLastTierChangeGreaterThan": 90
                }
              }
            }
          }
        }
      ]
    }
  }
}

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default",
  "name": "DefaultManagementPolicy",
  "type": "Microsoft.Storage/storageAccounts/managementPolicies",
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterModificationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterModificationGreaterThan": 90,
                  "daysAfterLastTierChangeGreaterThan": 120
                },
                "delete": {
                  "daysAfterModificationGreaterThan": 1000
                }
              },
              "snapshot": {
                "tierToArchive": {
                  "daysAfterCreationGreaterThan": 30,
                  "daysAfterLastTierChangeGreaterThan": 90
                }
              },
              "version": {
                "tierToArchive": {
                  "daysAfterCreationGreaterThan": 30,
                  "daysAfterLastTierChangeGreaterThan": 90
                }
              }
            }
          }
        }
      ]
    },
    "lastModifiedTime": "2018-06-08T02:53:39.0932539Z"
  }
}

StorageAccountSetManagementPolicyColdTierActions

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/managementPolicies/default?api-version=2023-01-01

{
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterModificationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterModificationGreaterThan": 90
                },
                "tierToCold": {
                  "daysAfterModificationGreaterThan": 30
                },
                "delete": {
                  "daysAfterModificationGreaterThan": 1000
                }
              },
              "snapshot": {
                "tierToCold": {
                  "daysAfterCreationGreaterThan": 30
                },
                "delete": {
                  "daysAfterCreationGreaterThan": 30
                }
              },
              "version": {
                "tierToCold": {
                  "daysAfterCreationGreaterThan": 30
                },
                "delete": {
                  "daysAfterCreationGreaterThan": 30
                }
              }
            }
          }
        }
      ]
    }
  }
}

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default",
  "name": "DefaultManagementPolicy",
  "type": "Microsoft.Storage/storageAccounts/managementPolicies",
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterModificationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterModificationGreaterThan": 90
                },
                "tierToCold": {
                  "daysAfterModificationGreaterThan": 30
                },
                "delete": {
                  "daysAfterModificationGreaterThan": 1000
                }
              },
              "snapshot": {
                "tierToCold": {
                  "daysAfterCreationGreaterThan": 30
                },
                "delete": {
                  "daysAfterCreationGreaterThan": 30
                }
              },
              "version": {
                "tierToCold": {
                  "daysAfterCreationGreaterThan": 30
                },
                "delete": {
                  "daysAfterCreationGreaterThan": 30
                }
              }
            }
          }
        }
      ]
    },
    "lastModifiedTime": "2021-06-08T02:53:39.0932539Z"
  }
}

StorageAccountSetManagementPolicyForBlockAndAppendBlobs

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/managementPolicies/default?api-version=2023-01-01

{
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob",
                "appendBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "delete": {
                  "daysAfterModificationGreaterThan": 90
                }
              },
              "snapshot": {
                "delete": {
                  "daysAfterCreationGreaterThan": 90
                }
              },
              "version": {
                "delete": {
                  "daysAfterCreationGreaterThan": 90
                }
              }
            }
          }
        }
      ]
    }
  }
}

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default",
  "name": "DefaultManagementPolicy",
  "type": "Microsoft.Storage/storageAccounts/managementPolicies",
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob",
                "appendBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "delete": {
                  "daysAfterModificationGreaterThan": 90
                }
              },
              "snapshot": {
                "delete": {
                  "daysAfterCreationGreaterThan": 90
                }
              },
              "version": {
                "delete": {
                  "daysAfterCreationGreaterThan": 90
                }
              }
            }
          }
        }
      ]
    },
    "lastModifiedTime": "2018-06-08T02:53:39.0932539Z"
  }
}

StorageAccountSetManagementPolicyHotTierActions

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/managementPolicies/default?api-version=2023-01-01

{
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToHot": {
                  "daysAfterModificationGreaterThan": 30
                }
              },
              "snapshot": {
                "tierToHot": {
                  "daysAfterCreationGreaterThan": 30
                }
              },
              "version": {
                "tierToHot": {
                  "daysAfterCreationGreaterThan": 30
                }
              }
            }
          }
        }
      ]
    }
  }
}

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default",
  "name": "DefaultManagementPolicy",
  "type": "Microsoft.Storage/storageAccounts/managementPolicies",
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToHot": {
                  "daysAfterModificationGreaterThan": 30
                }
              },
              "snapshot": {
                "tierToHot": {
                  "daysAfterCreationGreaterThan": 30
                }
              },
              "version": {
                "tierToHot": {
                  "daysAfterCreationGreaterThan": 30
                }
              }
            }
          }
        }
      ]
    },
    "lastModifiedTime": "2021-06-08T02:53:39.0932539Z"
  }
}

StorageAccountSetManagementPolicyWithSnapshotAndVersion

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/managementPolicies/default?api-version=2023-01-01

{
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterModificationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterModificationGreaterThan": 90
                },
                "delete": {
                  "daysAfterModificationGreaterThan": 1000
                }
              },
              "snapshot": {
                "tierToCool": {
                  "daysAfterCreationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterCreationGreaterThan": 90
                },
                "delete": {
                  "daysAfterCreationGreaterThan": 1000
                }
              },
              "version": {
                "tierToCool": {
                  "daysAfterCreationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterCreationGreaterThan": 90
                },
                "delete": {
                  "daysAfterCreationGreaterThan": 1000
                }
              }
            }
          }
        }
      ]
    }
  }
}

Sample Response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default",
  "name": "DefaultManagementPolicy",
  "type": "Microsoft.Storage/storageAccounts/managementPolicies",
  "properties": {
    "policy": {
      "rules": [
        {
          "enabled": true,
          "name": "olcmtest1",
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [
                "blockBlob"
              ],
              "prefixMatch": [
                "olcmtestcontainer1"
              ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": {
                  "daysAfterModificationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterModificationGreaterThan": 90
                },
                "delete": {
                  "daysAfterModificationGreaterThan": 1000
                }
              },
              "snapshot": {
                "tierToCool": {
                  "daysAfterCreationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterCreationGreaterThan": 90
                },
                "delete": {
                  "daysAfterCreationGreaterThan": 1000
                }
              },
              "version": {
                "tierToCool": {
                  "daysAfterCreationGreaterThan": 30
                },
                "tierToArchive": {
                  "daysAfterCreationGreaterThan": 90
                },
                "delete": {
                  "daysAfterCreationGreaterThan": 1000
                }
              }
            }
          }
        }
      ]
    },
    "lastModifiedTime": "2018-06-08T02:53:39.0932539Z"
  }
}

Definitions

Name Description
DateAfterCreation

Object to define snapshot and version action conditions.

DateAfterModification

Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan.

ManagementPolicy

The Get Storage Account ManagementPolicies operation response.

ManagementPolicyAction

Actions are applied to the filtered blobs when the execution condition is met.

ManagementPolicyBaseBlob

Management policy action for base blob.

ManagementPolicyDefinition

An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set.

ManagementPolicyFilter

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.

ManagementPolicyName

The name of the Storage Account Management Policy. It should always be 'default'

ManagementPolicyRule

An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.

ManagementPolicySchema

The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.

ManagementPolicySnapShot

Management policy action for snapshot.

ManagementPolicyVersion

Management policy action for blob version.

RuleType

The valid value is Lifecycle

TagFilter

Blob index tag based filtering for blob objects

DateAfterCreation

Object to define snapshot and version action conditions.

Name Type Description
daysAfterCreationGreaterThan

number

Value indicating the age in days after creation

daysAfterLastTierChangeGreaterThan

number

Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob version based actions. The blob will be archived if both the conditions are satisfied.

DateAfterModification

Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan.

Name Type Description
daysAfterCreationGreaterThan

number

Value indicating the age in days after blob creation.

daysAfterLastAccessTimeGreaterThan

number

Value indicating the age in days after last blob access. This property can only be used in conjunction with last access time tracking policy

daysAfterLastTierChangeGreaterThan

number

Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based actions. The blob will be archived if both the conditions are satisfied.

daysAfterModificationGreaterThan

number

Value indicating the age in days after last modification

ManagementPolicy

The Get Storage Account ManagementPolicies operation response.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.lastModifiedTime

string

Returns the date and time the ManagementPolicies was last modified.

properties.policy

ManagementPolicySchema

The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

ManagementPolicyAction

Actions are applied to the filtered blobs when the execution condition is met.

Name Type Description
baseBlob

ManagementPolicyBaseBlob

The management policy action for base blob

snapshot

ManagementPolicySnapShot

The management policy action for snapshot

version

ManagementPolicyVersion

The management policy action for version

ManagementPolicyBaseBlob

Management policy action for base blob.

Name Type Description
delete

DateAfterModification

The function to delete the blob

enableAutoTierToHotFromCool

boolean

This property enables auto tiering of a blob from cool to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan.

tierToArchive

DateAfterModification

The function to tier blobs to archive storage.

tierToCold

DateAfterModification

The function to tier blobs to cold storage.

tierToCool

DateAfterModification

The function to tier blobs to cool storage.

tierToHot

DateAfterModification

The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts

ManagementPolicyDefinition

An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set.

Name Type Description
actions

ManagementPolicyAction

An object that defines the action set.

filters

ManagementPolicyFilter

An object that defines the filter set.

ManagementPolicyFilter

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.

Name Type Description
blobIndexMatch

TagFilter[]

An array of blob index tag based filters, there can be at most 10 tag filters

blobTypes

string[]

An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete actions are supported for appendBlob.

prefixMatch

string[]

An array of strings for prefixes to be match.

ManagementPolicyName

The name of the Storage Account Management Policy. It should always be 'default'

Name Type Description
default

string

ManagementPolicyRule

An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.

Name Type Description
definition

ManagementPolicyDefinition

An object that defines the Lifecycle rule.

enabled

boolean

Rule is enabled if set to true.

name

string

A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.

type

RuleType

The valid value is Lifecycle

ManagementPolicySchema

The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.

Name Type Description
rules

ManagementPolicyRule[]

The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.

ManagementPolicySnapShot

Management policy action for snapshot.

Name Type Description
delete

DateAfterCreation

The function to delete the blob snapshot

tierToArchive

DateAfterCreation

The function to tier blob snapshot to archive storage.

tierToCold

DateAfterCreation

The function to tier blobs to cold storage.

tierToCool

DateAfterCreation

The function to tier blob snapshot to cool storage.

tierToHot

DateAfterCreation

The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts

ManagementPolicyVersion

Management policy action for blob version.

Name Type Description
delete

DateAfterCreation

The function to delete the blob version

tierToArchive

DateAfterCreation

The function to tier blob version to archive storage.

tierToCold

DateAfterCreation

The function to tier blobs to cold storage.

tierToCool

DateAfterCreation

The function to tier blob version to cool storage.

tierToHot

DateAfterCreation

The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts

RuleType

The valid value is Lifecycle

Name Type Description
Lifecycle

string

TagFilter

Blob index tag based filtering for blob objects

Name Type Description
name

string

This is the filter tag name, it can have 1 - 128 characters

op

string

This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is currently supported

value

string

This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters