Data Collection Rule Associations - Create

Creates or updates an association.

PUT https://management.azure.com/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}?api-version=2022-06-01

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

The identifier of the resource.

api-version
query True

string

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

Association was successfully updated

201 Created

DataCollectionRuleAssociationProxyOnlyResource

Association was successfully created

Other Status Codes

ErrorResponseCommonV2

Error

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

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=2022-06-01

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

Sample Response

{
  "id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation",
  "name": "myAssociation",
  "type": "Microsoft.Insights/dataCollectionRuleAssociations",
  "properties": {
    "dataCollectionRuleId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule",
    "provisioningState": "Succeeded"
  },
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2021-04-01T12:34:56.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-04-02T12:34:56.1234567Z"
  },
  "etag": "070057da-0000-0000-0000-5ba70d6c0000"
}
{
  "id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation",
  "name": "myAssociation",
  "type": "Microsoft.Insights/dataCollectionRuleAssociations",
  "properties": {
    "dataCollectionRuleId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule",
    "provisioningState": "Succeeded"
  },
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2021-04-01T12:34:56.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-04-02T12:34:56.1234567Z"
  },
  "etag": "070057da-0000-0000-0000-5ba70d6c0000"
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

DataCollectionRuleAssociationProxyOnlyResource

Definition of generic ARM proxy resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponseCommonV2

Error response

KnownDataCollectionRuleAssociationProvisioningState

The resource provisioning state.

Metadata

Metadata about the resource

SystemData

Metadata pertaining to creation and last modification of the resource.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DataCollectionRuleAssociationProxyOnlyResource

Definition of generic ARM proxy resource.

Name Type Description
etag

string

Resource entity tag (ETag).

id

string

Fully qualified ID of the resource.

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

Metadata

Metadata about the resource

properties.provisioningState

KnownDataCollectionRuleAssociationProvisioningState

The resource provisioning state.

systemData

SystemData

Metadata pertaining to creation and last modification of the resource.

type

string

The type of the resource.

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

Error response

Name Type Description
error

ErrorDetail

The error object.

KnownDataCollectionRuleAssociationProvisioningState

The resource provisioning state.

Name Type Description
Canceled

string

Creating

string

Deleting

string

Failed

string

Succeeded

string

Updating

string

Metadata

Metadata about the resource

Name Type Description
provisionedBy

string

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

provisionedByResourceId

string

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

SystemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

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

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.