EC2 / Client / associate_application_status_check
associate_application_status_check¶
- EC2.Client.associate_application_status_check(**kwargs)¶
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
DisassociateApplicationStatusCheckto remove associations.You can associate tags so that the application status check automatically monitors all current and future instances that have the specified tags.
See also: AWS API Documentation
Request Syntax
response = client.associate_application_status_check( ApplicationStatusCheckId='string', TargetTagAssociations=[ { 'Key': 'string', 'Value': 'string' }, ], InstanceIds=[ 'string', ], ClientToken='string', DryRun=True|False )
- Parameters:
ApplicationStatusCheckId (string) –
[REQUIRED]
The ID of the application status check to associate.
TargetTagAssociations (list) –
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.
(dict) –
Describes a tag key-value pair for an application status check association request.
Key (string) –
The key of the tag.
Value (string) –
The value of the tag.
InstanceIds (list) –
The IDs of the instances to associate with the application status check.
(string) –
ClientToken (string) –
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.
This field is autopopulated if not provided.
DryRun (boolean) – 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 isUnauthorizedOperation.
- Return type:
dict
- Returns:
Response Syntax
{ 'SuccessfulResults': [ { 'ApplicationStatusCheckId': 'string', 'AssociationType': 'string', 'AssociationValue': 'string' }, ], 'UnsuccessfulResults': [ { 'ApplicationStatusCheckId': 'string', 'AssociationType': 'string', 'AssociationValue': 'string', 'Reason': 'string' }, ] }
Response Structure
(dict) –
SuccessfulResults (list) –
The associations that were successfully created.
(dict) –
Describes a successful application status check association.
ApplicationStatusCheckId (string) –
The ID of the application status check.
AssociationType (string) –
The type of association. Valid values:
EC2TAGandINSTANCE_ID.AssociationValue (string) –
The association value. For
EC2TAG, the value is formatted askey=value. ForINSTANCE_ID, the value is the instance ID.
UnsuccessfulResults (list) –
The associations that failed to be created.
(dict) –
Describes an unsuccessful application status check association.
ApplicationStatusCheckId (string) –
The ID of the application status check.
AssociationType (string) –
The type of association. Valid values:
EC2TAGandINSTANCE_ID.AssociationValue (string) –
The association value. For
EC2TAG, the value is formatted askey=value. ForINSTANCE_ID, the value is the instance ID.Reason (string) –
The reason the association failed.