Bagikan melalui


Get-AzStorageAccountManagementPolicy

Mendapatkan kebijakan manajemen akun Azure Storage.

Sintaks

Get-AzStorageAccountManagementPolicy
   [-ResourceGroupName] <String>
   [-StorageAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzStorageAccountManagementPolicy
   [-StorageAccountResourceId] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzStorageAccountManagementPolicy
   -StorageAccount <PSStorageAccount>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Deskripsi

Cmdlet Get-AzStorageAccountManagementPolicy mendapatkan kebijakan manajemen akun Azure Storage.

Contoh

Contoh 1: Dapatkan kebijakan manajemen akun Penyimpanan.

Get-AzStorageAccountManagementPolicy -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount"

ResourceGroupName  : myresourcegroup
StorageAccountName : mystorageaccount
Id                 : /subscriptions/{subscription-id}/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount/managementPolicies/default
Type               : Microsoft.Storage/storageAccounts/managementPolicies
LastModifiedTime   : 3/12/2019 7:04:05 AM
Rules              : [
                         {
                             "Enabled":  true,
                             "Name":  "Test",
                             "Definition":  {
                                                "Actions":  {
                                                                "BaseBlob":  {
                                                                                 "TierToCool":  {
                                                                                                    "DaysAfterModificationGreaterThan":  30
                                                                                                },
                                                                                 "TierToArchive":  {
                                                                                                       "DaysAfterModificationGreaterThan":  50
                                                                                                   },
                                                                                 "Delete":  {
                                                                                                "DaysAfterModificationGreaterThan":  100
                                                                                            }
                                                                             },
                                                                "Snapshot":  {
                                                                                 "Delete":  {
                                                                                                "DaysAfterCreationGreaterThan":  100
                                                                                            }
                                                                             }
                                                            },
                                                "Filters":  {
                                                                "PrefixMatch":  [
                                                                                    "prefix1",
                                                                                    "prefix2"
                                                                                ],
                                                                "BlobTypes":  [
                                                                                  "blockBlob"
                                                                              ]
                                                            }
                                            }
                         },
                         {
                             "Enabled":  true,
                             "Name":  "Test2",
                             "Definition":  {
                                                "Actions":  {
                                                                "BaseBlob":  {
                                                                                 "TierToCool":  null,
                                                                                 "TierToArchive":  null,
                                                                                 "Delete":  {
                                                                                                "DaysAfterModificationGreaterThan":  100
                                                                                            }
                                                                             },
                                                                "Snapshot":  null
                                                            },
                                                "Filters":  {
                                                                "PrefixMatch":  null,
                                                                "BlobTypes":  [
                                                                                  "blockBlob"
                                                                              ]
                                                            }
                                            }
                         }
                     ]

Perintah ini mendapatkan kebijakan manajemen akun Penyimpanan.

Parameter

-DefaultProfile

Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan Azure.

Jenis:IAzureContextContainer
Alias:AzContext, AzureRmContext, AzureCredential
Position:Named
Nilai default:None
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

-ResourceGroupName

Nama Grup Sumber Daya.

Jenis:String
Position:0
Nilai default:None
Diperlukan:True
Terima input alur:False
Terima karakter wildcard:False

-StorageAccount

Objek akun penyimpanan

Jenis:PSStorageAccount
Position:Named
Nilai default:None
Diperlukan:True
Terima input alur:True
Terima karakter wildcard:False

-StorageAccountName

Nama Akun Penyimpanan.

Jenis:String
Alias:AccountName
Position:1
Nilai default:None
Diperlukan:True
Terima input alur:False
Terima karakter wildcard:False

-StorageAccountResourceId

Id Sumber Daya Akun Penyimpanan.

Jenis:String
Position:0
Nilai default:None
Diperlukan:True
Terima input alur:True
Terima karakter wildcard:False

Input

String

Output

StorageAccountKey