你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzStorageServiceLoggingProperty
修改 Azure 存储服务的日志记录。
语法
Set-AzStorageServiceLoggingProperty
[-ServiceType] <StorageServiceType>
[-Version <Double>]
[-RetentionDays <Int32>]
[-LoggingOperations <LoggingOperations[]>]
[-PassThru]
[-Context <IStorageContext>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Set-AzStorageServiceLoggingProperty cmdlet 修改 Azure 存储服务的日志记录。
示例
示例 1:修改 Blob 服务的日志记录属性
Set-AzStorageServiceLoggingProperty -ServiceType Blob -LoggingOperations Read,Write -PassThru -RetentionDays 10 -Version 1.0
此命令修改 Blob 存储的版本 1.0 日志记录,以包括读取和写入作。 Azure 存储服务日志记录将条目保留 10 天。 由于此命令指定了 PassThru 参数,因此该命令将显示修改后的日志记录属性。
参数
-Context
指定 Azure 存储上下文。 若要获取存储上下文,请使用 New-AzStorageContext cmdlet。
类型: | IStorageContext |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-LoggingOperations
指定 Azure 存储服务作的数组。 Azure 存储服务记录此参数指定的作。 此参数的可接受值为:
- 没有
- 读
- 写
- 删除
- 都
类型: | LoggingOperations[] |
接受的值: | None, Read, Write, Delete, All |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-PassThru
指示此 cmdlet 返回更新的日志记录属性。 如果未指定此参数,则此 cmdlet 不返回值。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-RetentionDays
指定 Azure 存储服务保留已记录信息的天数。
类型: | Nullable<T>[Int32] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ServiceType
指定存储服务类型。 此 cmdlet 修改此参数指定的服务类型的日志记录属性。 此参数的可接受值为:
- Blob
- 桌子
- 队列
- 文件文件当前不支持文件值。
类型: | StorageServiceType |
接受的值: | Blob, Table, Queue, File |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Version
指定 Azure 存储服务日志记录的版本。 默认值为 1.0。
类型: | Nullable<T>[Double] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |