Skip to content

EC2  >  Operations  >  associate_application_status_check

associate_application_status_check

Operation

associate_application_status_check async

associate_application_status_check(input: AssociateApplicationStatusCheckInput, plugins: list[Plugin] | None = None) -> AssociateApplicationStatusCheckOutput

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 TargetTagAssociations or InstanceIds, but not both. Specifying both results in an InvalidParameterCombination error.

  • 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 DisassociateApplicationStatusCheck to remove associations.

  • You can associate tags so that the application status check automatically monitors all current and future instances that have the specified tags.

Parameters:

Name Type Description Default
input AssociateApplicationStatusCheckInput

An instance of AssociateApplicationStatusCheckInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
AssociateApplicationStatusCheckOutput

An instance of AssociateApplicationStatusCheckOutput.

Input

AssociateApplicationStatusCheckInput dataclass

Bases: _SerdeShape

Dataclass for AssociateApplicationStatusCheckInput structure.

Attributes

application_status_check_id class-attribute instance-attribute
application_status_check_id: str | None = ...

The ID of the application status check to associate.

client_token class-attribute instance-attribute
client_token: str | None = ...

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.

dry_run class-attribute instance-attribute
dry_run: bool | None = ...

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.

instance_ids class-attribute instance-attribute
instance_ids: list[str] | None = ...

The IDs of the instances to associate with the application status check.

target_tag_associations class-attribute instance-attribute
target_tag_associations: list[CustomTagKeyValueRequestPair] | None = ...

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.

Output

AssociateApplicationStatusCheckOutput dataclass

Bases: _SerdeShape

Dataclass for AssociateApplicationStatusCheckOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

successful_results class-attribute instance-attribute
successful_results: list[SuccessfulAssociationResponseObject] | None = ...

The associations that were successfully created.

unsuccessful_results class-attribute instance-attribute
unsuccessful_results: list[UnsuccessfulAssociationResponseObject] | None = ...

The associations that failed to be created.