Compartilhar via


New-AzDiagnosticSettingLogSettingsObject

Create an in-memory object for LogSettings.

Sintaxe

Default (Padrão)

New-AzDiagnosticSettingLogSettingsObject
    -Enabled <Boolean>
    [-Category <String>]
    [-CategoryGroup <String>]
    [-RetentionPolicyDay <Int32>]
    [-RetentionPolicyEnabled <Boolean>]
    [<CommonParameters>]

Description

Create an in-memory object for LogSettings.

Exemplos

Example 1: Create log setting object

New-AzDiagnosticSettingLogSettingsObject -Enabled $true -Category ContainerEventLogs -RetentionPolicyDay 7 -RetentionPolicyEnabled $true

Create log setting object, to get supported categories for resource, please see Get-AzDiagnosticSettingCategory

Parâmetros

-Category

Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.

Propriedades do parâmetro

Tipo:String
Valor padrão:None
Dá suporte a curingas:False
DontShow:False

Conjuntos de parâmetros

(All)
Cargo:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-CategoryGroup

Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.

Propriedades do parâmetro

Tipo:String
Valor padrão:None
Dá suporte a curingas:False
DontShow:False

Conjuntos de parâmetros

(All)
Cargo:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-Enabled

a value indicating whether this log is enabled.

Propriedades do parâmetro

Tipo:Boolean
Valor padrão:None
Dá suporte a curingas:False
DontShow:False

Conjuntos de parâmetros

(All)
Cargo:Named
Obrigatório:True
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-RetentionPolicyDay

the number of days for the retention in days. A value of 0 will retain the events indefinitely.

Propriedades do parâmetro

Tipo:Int32
Valor padrão:None
Dá suporte a curingas:False
DontShow:False

Conjuntos de parâmetros

(All)
Cargo:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-RetentionPolicyEnabled

a value indicating whether the retention policy is enabled.

Propriedades do parâmetro

Tipo:Boolean
Valor padrão:None
Dá suporte a curingas:False
DontShow:False

Conjuntos de parâmetros

(All)
Cargo:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes: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.

Saídas

LogSettings