次の方法で共有


Get-AzDataCollectionRule

指定したデータ収集規則を返します。

構文

List1 (既定)

Get-AzDataCollectionRule
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

Get-AzDataCollectionRule
    -Name <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

List

Get-AzDataCollectionRule
    -ResourceGroupName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentity

Get-AzDataCollectionRule
    -InputObject <IDataCollectionRuleIdentity>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

説明

指定したデータ収集規則を返します。

例 1: サブスクリプション ID でデータ収集規則を取得する

Get-AzDataCollectionRule
Etag                                   Kind Location Name              ResourceGroupName
----                                   ---- -------- ----              -----------------
"d500e99c-0000-0100-0000-650d68320000"      eastus   myCollectionRule1 AMCS-TEST
"d50031d9-0000-0100-0000-650d6b1f0000"      eastus   myCollectionRule2 AMCS-TEST

このコマンドは、指定されたサブスクリプションごとにデータ収集規則の一覧を取得します。

例 2: リソース グループ別に一覧表示する

Get-AzDataCollectionRule -ResourceGroupName AMCS-TEST
Etag                                   Kind Location Name              ResourceGroupName
----                                   ---- -------- ----              -----------------
"d500e99c-0000-0100-0000-650d68320000"      eastus   myCollectionRule1 AMCS-TEST
"d50031d9-0000-0100-0000-650d6b1f0000"      eastus   myCollectionRule2 AMCS-TEST

このコマンドは、指定されたリソース グループによってデータ収集規則の一覧を取得します。

例 3: 指定したリソース グループを使用して特定のルールを取得する

Get-AzDataCollectionRule -ResourceGroupName AMCS-TEST -Name myCollectionRule1
DataCollectionEndpointId                  :
DataFlow                                  : {{
                                              "streams": [ "Microsoft-InsightsMetrics" ],
                                              "destinations": [ "azureMonitorMetrics-default" ]
                                            }}
DataSourceDataImportEventHubConsumerGroup :
DataSourceDataImportEventHubName          :
DataSourceDataImportEventHubStream        :
DataSourceExtension                       :
DataSourceIisLog                          :
DataSourceLogFile                         :
DataSourcePerformanceCounter              : {{
                                              "streams": [ "Microsoft-Perf" ],
                                              "samplingFrequencyInSeconds": 15,
                                              "counterSpecifiers": [ "\\\\Processor(_Total)\\\\% Processor Time", "\\\\Memory\\\\Committed Bytes", "\\\\LogicalDisk(_Total)\\\\Free
                                            Megabytes", "\\\\PhysicalDisk(_Total)\\\\Avg. Disk Queue Length" ],
                                              "name": "cloudTeamCoreCounters"
                                            }, {
                                              "streams": [ "Microsoft-Perf" ],
                                              "samplingFrequencyInSeconds": 30,
                                              "counterSpecifiers": [ "\\\\Process(_Total)\\\\Thread Count" ],
                                              "name": "appTeamExtraCounters"
                                            }}
DataSourcePlatformTelemetry               :
DataSourcePrometheusForwarder             :
DataSourceSyslog                          :
DataSourceWindowsEventLog                 : {{
                                              "streams": [ "Microsoft-WindowsEvent" ],
                                              "xPathQueries": [ "System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]" ],
                                              "name": "appTeam1AppEvents"
                                            }}
DataSourceWindowsFirewallLog              :
Description                               :
DestinationAzureMonitorMetricName         : azureMonitorMetrics-default
DestinationEventHub                       :
DestinationEventHubsDirect                :
DestinationLogAnalytic                    :
DestinationMonitoringAccount              :
DestinationStorageAccount                 :
DestinationStorageBlobsDirect             :
DestinationStorageTablesDirect            :
Etag                                      : "d500e99c-0000-0100-0000-650d68320000"
Id                                        : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule1
IdentityPrincipalId                       :
IdentityTenantId                          :
IdentityType                              :
IdentityUserAssignedIdentity              : {
                                            }
ImmutableId                               : dcr-9a6169afee634c13baa880dee8c5eb97
Kind                                      :
Location                                  : eastus
MetadataProvisionedBy                     :
MetadataProvisionedByResourceId           :
Name                                      : myCollectionRule1
ProvisioningState                         : Succeeded
ResourceGroupName                         : AMCS-TEST
StreamDeclaration                         : {
                                            }
SystemDataCreatedAt                       : 9/22/2023 9:18:41 AM
SystemDataCreatedBy                       : [email protected]
SystemDataCreatedByType                   : User
SystemDataLastModifiedAt                  : 9/22/2023 10:10:57 AM
SystemDataLastModifiedBy                  : [email protected]
SystemDataLastModifiedByType              : User
Tag                                       : {
                                            }
Type                                      : Microsoft.Insights/dataCollectionRules

このコマンドは、指定されたリソース グループを持つ特定のデータ収集規則を取得します。

パラメーター

-DefaultProfile

DefaultProfile パラメーターは機能しません。 別のサブスクリプションに対してコマンドレットを実行する場合は、使用可能な場合は SubscriptionId パラメーターを使用します。

パラメーターのプロパティ

型:PSObject
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-InputObject

IDENTITY パラメーター

パラメーターのプロパティ

型:IDataCollectionRuleIdentity
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

GetViaIdentity
配置:Named
必須:True
パイプラインからの値:True
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-Name

データ収集規則の名前。 名前は大文字と小文字が区別されます。

パラメーターのプロパティ

型:String
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:DataCollectionRuleName, ルール名

パラメーター セット

Get
配置:Named
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-ResourceGroupName

リソース グループの名前。 名前は大文字と小文字が区別されます。

パラメーターのプロパティ

型:String
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

Get
配置:Named
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False
List
配置:Named
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-SubscriptionId

ターゲット サブスクリプションの ID。

パラメーターのプロパティ

型:

String[]

規定値:(Get-AzContext).Subscription.Id
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

List1
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False
Get
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False
List
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

CommonParameters

このコマンドレットでは、一般的なパラメーター -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction、-WarningVariable の各パラメーターがサポートされています。 詳細については、about_CommonParametersを参照してください。

入力

IDataCollectionRuleIdentity

出力

IDataCollectionRuleResource