Editar

Partilhar via


New-AzOperationalInsightsTable

Creates a custom log table

Syntax

New-AzOperationalInsightsTable
   [-ResourceGroupName] <String>
   [-WorkspaceName] <String>
   [-TableName] <String>
   [[-RetentionInDays] <Int32>]
   [-TotalRetentionInDays <Int32>]
   [-Column <Hashtable>]
   [-Plan <String>]
   [-Description <String>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Creates a custom log table

Examples

Example 1

New-AzOperationalInsightsTable -ResourceGroupName RG-NAME -WorkspaceName WORKSPACE-NAME -TableName TABLE-NAME -RetentionInDays 25 -TotalRetentionInDays 30 -Column @{'ColName1' = 'string'; 'TimeGenerated' = 'DateTime'; 'ColName3' = 'int'}

TableName            : TABLE-NAME
ResourceId           : /subscriptions/{subscriptionID}/resourcegroups/RG-NAME/providers/Microsoft.OperationalInsights/workspaces/WORKSPACE-NAME/tables/TABLE-NAME
RetentionInDays      : 25
TotalRetentionInDays : 30
Plan                 : Analytics
Description          :
Schema               : Microsoft.Azure.Management.OperationalInsights.Models.Schema
ProvisioningState    : Succeeded
ResourceGroupName    : RG-NAME
WorkspaceName        : WORKSPACE-NAME

Creates a custom log table with provided retention details and columns

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Column

The table column passed as @{ ColName1 = Type; ColName2 = Type; ColName3 = Type}.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Search job Description.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Plan

Table plan can be 'Analytics' or 'Basic'.

Type:String
Accepted values:Analytics, Basic
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The resource group name.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-RetentionInDays

The table retention in days, between 4 and 730. Setting this property to -1 will default to the workspace retention

Type:Nullable<T>[Int32]
Position:3
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-TableName

The table name.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-TotalRetentionInDays

The table total retention in days, between 4 and 2555. Setting this property to -1 will default to table retention.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WorkspaceName

The name of the workspace that will contain the storage insight.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Nullable<T>[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

Hashtable

Outputs

PSTable