Skip to content

describe_application_status_check_associations

describe_application_status_check_associations(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    application_status_check_ids: Optional[ApplicationStatusCheckIdList] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[DescribeApplicationStatusCheckAssociationsMaxResults] = None,
    next_token: Optional[String] = None,
    dry_run: Optional[Boolean] = None,
) -> DescribeApplicationStatusCheckAssociationsResult

Describes the associations for one or more application status checks. For more information, see Application status checks. To avoid timeouts and retrieve complete results, use the pagination parameters.

The order of the elements in the response, including those within nested structures, might vary.

Parameters:

  • application_status_check_ids (Optional[ApplicationStatusCheckIdList], default: None ) –

    The IDs of the application status checks for which to describe associations.

  • filters (Optional[FilterList], default: None ) –

    The filters to use to limit the results.

    • association-type – The type of association. Valid values: tag and instance-id.

  • max_results (Optional[DescribeApplicationStatusCheckAssociationsMaxResults], default: None ) –

    The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

  • next_token (Optional[String], default: None ) –

    The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

  • dry_run (Optional[Boolean], default: 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.

Raises:

Examples:

To describe application status check associations This example describes instance ID associations for the specified application status check.

>>> client.describe_application_status_check_associations(application_status_check_ids=['asc-0123456789abcdef0'], filters=[{'Name': 'association-type', 'Values': ['instance-id']}])
Source code in docs_src/capo_ec2/_services/ec2.py
def describe_application_status_check_associations(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    application_status_check_ids: Optional[
        "capo_ec2.types.application_status_check_id_list.ApplicationStatusCheckIdList"
    ] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    max_results: Optional[
        "capo_ec2.types.describe_application_status_check_associations_max_results.DescribeApplicationStatusCheckAssociationsMaxResults"
    ] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "capo_ec2.types.describe_application_status_check_associations_result.DescribeApplicationStatusCheckAssociationsResult":
    """<p>Describes the associations for one or more application status checks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-application-status-checks.html">Application status checks</a>. To avoid timeouts and retrieve complete results, use the pagination parameters.</p> <note> <p>The order of the elements in the response, including those within nested structures, might vary.</p> </note>

    Args:
        application_status_check_ids: <p>The IDs of the application status checks for which to describe associations.</p>
        filters: <p>The filters to use to limit the results.</p> <ul> <li> <p> <code>association-type</code> – The type of association. Valid values: <code>tag</code> and <code>instance-id</code>.</p> </li> </ul>
        max_results: <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
        next_token: <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
        dry_run: <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe application status check associations
        This example describes instance ID associations for the specified application status check.

        >>> client.describe_application_status_check_associations(application_status_check_ids=['asc-0123456789abcdef0'], filters=[{'Name': 'association-type', 'Values': ['instance-id']}])
    """

    def _handler(
        req: "OperationRequest[capo_ec2.types.describe_application_status_check_associations_request.DescribeApplicationStatusCheckAssociationsRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.describe_application_status_check_associations_result.DescribeApplicationStatusCheckAssociationsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_application_status_check_associations

        output, http_response = (
            capo_ec2._operations.amazon_ec2.describe_application_status_check_associations.describe_application_status_check_associations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeApplicationStatusCheckAssociations"),
    )
    input_: capo_ec2.types.describe_application_status_check_associations_request.DescribeApplicationStatusCheckAssociationsRequest = {}
    if application_status_check_ids is not None:
        input_["application_status_check_ids"] = application_status_check_ids
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if dry_run is not None:
        input_["dry_run"] = dry_run

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output