Skip to content

describe_warm_pool async

describe_warm_pool(
    *,
    config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
    auto_scaling_group_name: Optional[XmlStringMaxLen255] = None,
    max_records: Optional[MaxRecords] = None,
    next_token: Optional[XmlString] = None,
) -> DescribeWarmPoolAnswer

Gets information about a warm pool and its instances.

For more information, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

Parameters:

  • auto_scaling_group_name (Optional[XmlStringMaxLen255], default: None ) –

    The name of the Auto Scaling group.

  • max_records (Optional[MaxRecords], default: None ) –

    The maximum number of instances to return with this call. The maximum value is 50.

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

    The token for the next set of instances to return. (You received this token from a previous call.)

Raises:

  • InvalidNextToken –

    The NextToken value is not valid.

  • LimitExceededFault –

    You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example, Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see DescribeAccountLimits in the Amazon EC2 Auto Scaling API Reference.

  • 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.

Source code in docs_src/capo_auto_scaling/_services/async_auto_scaling.py
async def describe_warm_pool(
    self,
    *,
    config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
    auto_scaling_group_name: Optional[
        "capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
    ] = None,
    max_records: Optional["capo_auto_scaling.types.max_records.MaxRecords"] = None,
    next_token: Optional["capo_auto_scaling.types.xml_string.XmlString"] = None,
) -> "capo_auto_scaling.types.describe_warm_pool_answer.DescribeWarmPoolAnswer":
    """<p>Gets information about a warm pool and its instances.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html">Warm pools for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>

    Args:
        auto_scaling_group_name: <p>The name of the Auto Scaling group.</p>
        max_records: <p>The maximum number of instances to return with this call. The maximum value is <code>50</code>.</p>
        next_token: <p>The token for the next set of instances to return. (You received this token from a previous call.)</p>

    Raises:
        capo_auto_scaling.errors.invalid_next_token.InvalidNextToken: <p>The <code>NextToken</code> value is not valid.</p>
        capo_auto_scaling.errors.limit_exceeded_fault.LimitExceededFault: <p>You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example, Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DescribeAccountLimits.html">DescribeAccountLimits</a> in the <i>Amazon EC2 Auto Scaling API Reference</i>.</p>
        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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_auto_scaling.types.describe_warm_pool_type.DescribeWarmPoolType]",
    ) -> AsyncOperationResponse[
        "capo_auto_scaling.types.describe_warm_pool_answer.DescribeWarmPoolAnswer"
    ]:
        import capo_auto_scaling._operations.auto_scaling_2011_01_01.describe_warm_pool

        (
            output,
            http_response,
        ) = await capo_auto_scaling._operations.auto_scaling_2011_01_01.describe_warm_pool.async_describe_warm_pool(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeWarmPool")
    )
    input_: capo_auto_scaling.types.describe_warm_pool_type.DescribeWarmPoolType = {}
    if auto_scaling_group_name is not None:
        input_["auto_scaling_group_name"] = auto_scaling_group_name
    if max_records is not None:
        input_["max_records"] = max_records
    if next_token is not None:
        input_["next_token"] = next_token

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