Data Collection Rule Associations - Create

Creates or updates an association.

PUT https://management.azure.com/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}?api-version=2024-03-11

URI Parameters

Name In Required Type Description
associationName
path True

string

The name of the association. The name is case insensitive.

resourceUri
path True

string

minLength: 1

The identifier of the resource.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Type Description
properties.dataCollectionEndpointId

string

The resource ID of the data collection endpoint that is to be associated.

properties.dataCollectionRuleId

string

The resource ID of the data collection rule that is to be associated.

properties.description

string

Description of the association.

Responses

Name Type Description
200 OK

DataCollectionRuleAssociationProxyOnlyResource

The request has succeeded.

201 Created

DataCollectionRuleAssociationProxyOnlyResource

Resource 'DataCollectionRuleAssociationProxyOnlyResource' create operation succeeded

Other Status Codes

ErrorResponseCommonV2

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Create or update association
Create or update association with a data collection endpoint

Create or update association

Sample request

PUT https://management.azure.com/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2024-03-11

{
  "properties": {
    "dataCollectionRuleId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"
  }
}

Sample response

{
  "name": "myAssociation",
  "type": "Microsoft.Insights/dataCollectionRuleAssociations",
  "etag": "00000836-0000-0100-0000-65fdd8bc0000",
  "id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation",
  "properties": {
    "dataCollectionRuleId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"
  },
  "systemData": {
    "createdAt": "2024-03-22T19:15:08.2155156Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2024-03-22T19:15:08.2155156Z",
    "lastModifiedBy": "user1",
    "lastModifiedByType": "User"
  }
}
{
  "name": "myAssociation",
  "type": "Microsoft.Insights/dataCollectionRuleAssociations",
  "etag": "00000836-0000-0100-0000-65fdd8bc0000",
  "id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation",
  "properties": {
    "dataCollectionRuleId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"
  },
  "systemData": {
    "createdAt": "2024-03-22T19:15:08.2155156Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2024-03-22T19:15:08.2155156Z",
    "lastModifiedBy": "user1",
    "lastModifiedByType": "User"
  }
}

Create or update association with a data collection endpoint

Sample request

PUT https://management.azure.com/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm/providers/Microsoft.Insights/dataCollectionRuleAssociations/configurationAccessEndpoint?api-version=2024-03-11

{
  "properties": {
    "dataCollectionEndpointId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionEndpoints/myCollectionEndpoint"
  }
}

Sample response

{
  "name": "configurationAccessEndpoint",
  "type": "Microsoft.Insights/dataCollectionRuleAssociations",
  "etag": "00000836-0000-0100-0000-65fdd8bc0000",
  "id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm/providers/Microsoft.Insights/dataCollectionRuleAssociations/configurationAccessEndpoint",
  "properties": {
    "dataCollectionEndpointId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionEndpoints/myCollectionEndpoint"
  },
  "systemData": {
    "createdAt": "2024-03-22T19:15:08.2155156Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2024-03-22T19:15:08.2155156Z",
    "lastModifiedBy": "user1",
    "lastModifiedByType": "User"
  }
}
{
  "name": "configurationAccessEndpoint",
  "type": "Microsoft.Insights/dataCollectionRuleAssociations",
  "etag": "00000836-0000-0100-0000-65fdd8bc0000",
  "id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm/providers/Microsoft.Insights/dataCollectionRuleAssociations/configurationAccessEndpoint",
  "properties": {
    "dataCollectionEndpointId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionEndpoints/myCollectionEndpoint"
  },
  "systemData": {
    "createdAt": "2024-03-22T19:15:08.2155156Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2024-03-22T19:15:08.2155156Z",
    "lastModifiedBy": "user1",
    "lastModifiedByType": "User"
  }
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

DataCollectionRuleAssociationMetadata

Metadata about the resource

DataCollectionRuleAssociationProxyOnlyResource

Definition of generic ARM proxy resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponseCommonV2

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

KnownDataCollectionRuleAssociationProvisioningState

The resource provisioning state.

systemData

Metadata pertaining to creation and last modification of the resource.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

DataCollectionRuleAssociationMetadata

Metadata about the resource

Name Type Description
provisionedBy

string

Azure offering managing this resource on-behalf-of customer.

provisionedByImmutableId

string

Immutable Id of azure offering managing this resource on-behalf-of customer.

provisionedByResourceId

string

Resource Id of azure offering managing this resource on-behalf-of customer.

DataCollectionRuleAssociationProxyOnlyResource

Definition of generic ARM proxy resource.

Name Type Description
etag

string

Resource entity tag (ETag).

id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.dataCollectionEndpointId

string

The resource ID of the data collection endpoint that is to be associated.

properties.dataCollectionRuleId

string

The resource ID of the data collection rule that is to be associated.

properties.description

string

Description of the association.

properties.metadata

DataCollectionRuleAssociationMetadata

Metadata about the resource

properties.provisioningState

KnownDataCollectionRuleAssociationProvisioningState

The resource provisioning state.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponseCommonV2

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

Name Type Description
error

ErrorDetail

The error object.

KnownDataCollectionRuleAssociationProvisioningState

The resource provisioning state.

Value Description
Creating

Creating

Updating

Updating

Deleting

Deleting

Succeeded

Succeeded

Canceled

Canceled

Failed

Failed

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.