Edit

Share via


Set-AzStorageServiceLoggingProperty

Modifies logging for Azure Storage services.

Syntax

Default (Default)

Set-AzStorageServiceLoggingProperty
    [-ServiceType] <StorageServiceType>
    [-Version <Double>]
    [-RetentionDays <Int32>]
    [-LoggingOperations <LoggingOperations[]>]
    [-PassThru]
    [-Context <IStorageContext>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Set-AzStorageServiceLoggingProperty cmdlet modifies logging for Azure Storage services.

Examples

Example 1: Modify logging properties for the Blob service

Set-AzStorageServiceLoggingProperty -ServiceType Blob -LoggingOperations Read,Write -PassThru -RetentionDays 10 -Version 1.0

This command modifies version 1.0 logging for blob storage to include read and write operations. Azure Storage service logging retains entries for 10 days. Because this command specifies the PassThru parameter, the command displays the modified logging properties.

Parameters

-Context

Specifies an Azure storage context. To obtain a storage context, use the New-AzStorageContext cmdlet.

Parameter properties

Type:IStorageContext
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LoggingOperations

Specifies an array of Azure Storage service operations. Azure Storage services logs the operations that this parameter specifies. The acceptable values for this parameter are:

  • None
  • Read
  • Write
  • Delete
  • All

Parameter properties

Type:

LoggingOperations[]

Default value:None
Accepted values:None, Read, Write, Delete, All
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Indicates that this cmdlet returns the updated logging properties. If you do not specify this parameter, this cmdlet does not return a value.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RetentionDays

Specifies the number of days that the Azure Storage service retains logged information.

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServiceType

Specifies the storage service type. This cmdlet modifies the logging 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.

Parameter properties

Type:StorageServiceType
Default value:None
Accepted values:Blob, Table, Queue, File
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Version

Specifies the version of the Azure Storage service logging. The default value is 1.0.

Parameter properties

Type:

Nullable<T>[Double]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

IStorageContext

Outputs

LoggingProperties