Get-AzStorageBlobInventoryPolicy
Gets blob inventory policy from a Storage account.
Syntax
Get-AzStorageBlobInventoryPolicy
[-ResourceGroupName] <String>
[-StorageAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzStorageBlobInventoryPolicy
[-StorageAccountResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzStorageBlobInventoryPolicy
-StorageAccount <PSStorageAccount>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzStorageBlobInventoryPolicy cmdlet gets blob inventory policy from a Storage account.
Examples
Example 1: Get blob inventory policy from a Storage account
$policy = Get-AzStorageBlobInventoryPolicy -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount"
$policy
StorageAccountName : mystorageaccount
ResourceGroupName : myresourcegroup
Name : DefaultInventoryPolicy
Id : /subscriptions/{subscription-Id}/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount/inventoryPolicies/default
Type : Microsoft.Storage/storageAccounts/inventoryPolicies
LastModifiedTime : 11/4/2020 9:18:30 AM
Enabled : True
Rules : {Test1, Test2}
$policy.Rules
Name Enabled Destination ObjectType Format Schedule IncludeSnapshots IncludeBlobVersions BlobTypes PrefixMatch SchemaFields
---- ------- ----------- ---------- ------ -------- ---------------- ------------------- --------- ----------- ------------
Test1 False containername Container Csv Daily {aaa, bbb} {Name, Metadata, PublicAccess, Last-Modified...}
Test2 True containername Blob Parquet Weekly True True {blockBlob, appendBlob} {ccc, ddd} {Name, Creation-Time, Last-Modified, Content-Length...}
This command gets blob inventory policy from a Storage account, and show its proeprties.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Resource Group Name.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageAccount
Storage account object
Type: | PSStorageAccount |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageAccountName
Storage Account Name.
Type: | String |
Aliases: | AccountName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageAccountResourceId
Storage Account Resource Id.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Outputs
Zusammenarbeit auf GitHub
Die Quelle für diesen Inhalt finden Sie auf GitHub, wo Sie auch Issues und Pull Requests erstellen und überprüfen können. Weitere Informationen finden Sie in unserem Leitfaden für Mitwirkende.
Azure PowerShell