Set-AzStorageServiceMetricsProperty
Modifies metrics properties for the Azure Storage service.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Set-AzStorageServiceMetricsProperty
[-ServiceType] <StorageServiceType>
[-MetricsType] <ServiceMetricsType>
[-Version <Double>]
[-RetentionDays <Int32>]
[-MetricsLevel <MetricsLevel>]
[-PassThru]
[-Context <IStorageContext>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzStorageServiceMetricsProperty cmdlet modifies metrics properties for the Azure Storage service.
Examples
Example 1: Modify metrics properties for the Blob service
C:\PS>Set-AzStorageServiceMetricsProperty -ServiceType Blob -MetricsType Hour -MetricsLevel Service -PassThru -RetentionDays 10 -Version 1.0
This command modifies version 1.0 metrics for blob storage to a level of Service. Azure Storage service metrics retains entries for 10 days. Because this command specifies the PassThru parameter, the command displays the modified metrics properties.
Parameters
Specifies an Azure storage context. To obtain a storage context, use the New-AzStorageContext cmdlet.
| Type: | IStorageContext |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the metrics level that Azure Storage uses for the service. The acceptable values for this parameter are:
- None
- Service
- ServiceAndApi
| Type: | Nullable<T>[MetricsLevel] |
| Accepted values: | None, Service, ServiceAndApi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies a metrics type. This cmdlet sets the Azure Storage service metrics type to the value that this parameter specifies. The acceptable values for this parameter are: Hour and Minute.
| Type: | ServiceMetricsType |
| Accepted values: | Hour, Minute |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Indicates that this cmdlets returns the updated metrics properties. If you do not specify this parameter, this cmdlet does not return a value.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the number of days that the Azure Storage service retains metrics information.
| Type: | Nullable<T>[Int32] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the storage service type. This cmdlet modifies the metrics properties for the service type that this parameter specifies. The acceptable values for this parameter are:
- Blob
- Table
- Queue
- File The value of File is not currently supported.
| Type: | StorageServiceType |
| Accepted values: | Blob, Table, Queue, File |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the version of the Azure Storage metrics. The default value is 1.0.
| Type: | Nullable<T>[Double] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |