Get-AzDataCollectionRuleAssociation
Returns the specified association.
Syntax
List (Default)
Get-AzDataCollectionRuleAssociation
-ResourceUri <String>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get
Get-AzDataCollectionRuleAssociation
-AssociationName <String>
-ResourceUri <String>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
GetViaIdentity
Get-AzDataCollectionRuleAssociation
-InputObject <IDataCollectionRuleIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
List1
Get-AzDataCollectionRuleAssociation
-DataCollectionRuleName <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
List2
Get-AzDataCollectionRuleAssociation
-ResourceGroupName <String>
-DataCollectionEndpointName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
Returns the specified association.
Examples
Example 1: List data collection rule associations with specified resource URI
Get-AzDataCollectionRuleAssociation -ResourceUri /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/amcs-test/providers/microsoft.compute/virtualmachines/monitortestvm01
Etag Name ResourceGroupName
---- ---- -----------------
"d500d29e-0000-0100-0000-650d68490000" myCollectionRule1-association amcs-test
"20017ecf-0000-0100-0000-651147350000" myCollectionRule2-association1 amcs-test
This command gets list of specific data collection rule associations with specified resource URI.
Example 2: Get specific data collection rule association with specified resource URI and association name
Get-AzDataCollectionRuleAssociation -ResourceUri /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/amcs-test/providers/microsoft.compute/virtualmachines/monitortestvm01 -AssociationName myCollectionRule2-association1
DataCollectionEndpointId :
DataCollectionRuleId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule2
Description :
Etag : "20017ecf-0000-0100-0000-651147350000"
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/amcs-test/providers/microsoft.compute/virtualmachines/monitortestvm01/providers/Microsof
t.Insights/dataCollectionRuleAssociations/myCollectionRule2-association1
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
Name : myCollectionRule2-association1
ProvisioningState :
ResourceGroupName : amcs-test
SystemDataCreatedAt : 9/25/2023 8:39:15 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/25/2023 8:39:15 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Type : Microsoft.Insights/dataCollectionRuleAssociations
This command gets specific data collection rule association with specified resource URI.
Example 3: Get specific data collection rule association with specified resource group
Get-AzDataCollectionRuleAssociation -DataCollectionRuleName myCollectionRule1 -ResourceGroupName AMCS-Test
DataCollectionEndpointId :
DataCollectionRuleId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/amcs-test/providers/microsoft.insights/datacollectionrules/mycollectionrule1
Description :
Etag :
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/amcs-test/providers/microsoft.compute/virtualmachines/monitortestvm01/providers/microsof
t.insights/datacollectionruleassociations/mycollectionrule1-association
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
Name : mycollectionrule1-association
ProvisioningState :
ResourceGroupName : amcs-test
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Insights/dataCollectionRuleAssociations
This command gets list of data collection rule association with specified data collection rule.
Example 4: List data collection endpoint associations with specified data collection endpoint
Get-AzDataCollectionRuleAssociation -DataCollectionEndpointName myCollectionEndpoint -ResourceGroupName AMCS-Test
Etag Name ResourceGroupName
---- ---- -----------------
"21017484-0000-0100-0000-6511505c0000" configurationAccessEndpoint amcs-test
"210182a5-0000-0100-0000-6511520c0000" configurationAccessEndpoint azsecpack-rg
This command gets list of specific data collection rule associations with specified data collection endpoint.
Parameters
-AssociationName
The name of the association.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Name
Parameter sets
Get
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DataCollectionEndpointName
The name of the data collection endpoint.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: EndpointName
Parameter sets
List2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DataCollectionRuleName
The name of the data collection rule.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: RuleName
Parameter sets
List1
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
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
Identity Parameter
GetViaIdentity
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
List1
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
List2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceUri
The identifier of the resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: TargetResourceId
Parameter sets
List
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Get
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The ID of the target subscription.
Parameter properties
Type: String [ ]
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
List1
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
List2
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 .
Outputs