Associates an application status check with instances or tags¶
Description¶
Associates an application status check with instances or tags. Once you create an association, health monitoring automatically begins for the specified instances or for instances that match the specified tags. The following rules apply:
- You must specify either
TargetTagAssociationsorInstanceIds, but not both. Specifying both results in anInvalidParameterCombinationerror. - You must own the application status check. The check must already exist in your account.
- You must not leave tag keys blank.
- You can create a maximum of 50 tag associations for each application status check.
- You can use
disassociate_application_status_checkto remove associations. - You can associate tags so that the application status check automatically monitors all current and future instances that have the specified tags.
Usage¶
ec2_associate_application_status_check(ApplicationStatusCheckId,
TargetTagAssociations, InstanceIds, ClientToken, DryRun)
Arguments¶
ApplicationStatusCheckId
[required] The ID of the application status check to associate.
TargetTagAssociations
The tags to associate the application status check with. Each tag is a key-value pair. When you associate tags, the application status check automatically monitors all instances that have the specified tags.
InstanceIds
The IDs of the instances to associate with the application status check.
ClientToken
A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry a request with the same token, the service ignores the request but does not return an error. For more information, see Ensuring idempotency.
DryRun
Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
Value¶
A list with the following syntax:
list(
SuccessfulResults = list(
list(
ApplicationStatusCheckId = "string",
AssociationType = "string",
AssociationValue = "string"
)
),
UnsuccessfulResults = list(
list(
ApplicationStatusCheckId = "string",
AssociationType = "string",
AssociationValue = "string",
Reason = "string"
)
)
)