Skip to content

describe_termination_policy_types async

describe_termination_policy_types(
    *, config_overrides: Optional[AsyncAutoScalingClientConfig] = None
) -> DescribeTerminationPolicyTypesAnswer

Describes the termination policies supported by Amazon EC2 Auto Scaling.

For more information, see Configure termination policies for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

Raises:

  • ResourceContentionFault –

    You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

To describe termination policy types This example describes the available termination policy types.

>>> await client.describe_termination_policy_types()
Source code in docs_src/capo_auto_scaling/_services/async_auto_scaling.py
async def describe_termination_policy_types(
    self, *, config_overrides: Optional[AsyncAutoScalingClientConfig] = None
) -> "capo_auto_scaling.types.describe_termination_policy_types_answer.DescribeTerminationPolicyTypesAnswer":
    """<p>Describes the termination policies supported by Amazon EC2 Auto Scaling.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-termination-policies.html">Configure termination policies for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>

    Raises:
        capo_auto_scaling.errors.resource_contention_fault.ResourceContentionFault: <p>You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).</p>
        capo_auto_scaling.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe termination policy types
        This example describes the available termination policy types.

        >>> await client.describe_termination_policy_types()
    """

    async def _handler(
        req: "AsyncOperationRequest[None]",
    ) -> AsyncOperationResponse[
        "capo_auto_scaling.types.describe_termination_policy_types_answer.DescribeTerminationPolicyTypesAnswer"
    ]:
        import capo_auto_scaling._operations.auto_scaling_2011_01_01.describe_termination_policy_types

        (
            output,
            http_response,
        ) = await capo_auto_scaling._operations.auto_scaling_2011_01_01.describe_termination_policy_types.async_describe_termination_policy_types(
            req.options
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeTerminationPolicyTypes")
    )

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=None, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output