Skip to content

describe_scaling_plan_resources async

describe_scaling_plan_resources(
    scaling_plan_name: ScalingPlanName,
    scaling_plan_version: ScalingPlanVersion,
    *,
    config_overrides: Optional[AsyncAutoScalingPlansClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeScalingPlanResourcesResponse

Describes the scalable resources in the specified scaling plan.

Parameters:

  • scaling_plan_name (ScalingPlanName) –

    The name of the scaling plan.

  • scaling_plan_version (ScalingPlanVersion) –

    The version number of the scaling plan. Currently, the only valid value is 1.

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

    The maximum number of scalable resources to return. The value must be between 1 and 50. The default value is 50.

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

    The token for the next set of results.

Raises:

Source code in docs_src/capo_auto_scaling_plans/_services/async_auto_scaling_plans.py
async def describe_scaling_plan_resources(
    self,
    scaling_plan_name: "capo_auto_scaling_plans.types.scaling_plan_name.ScalingPlanName",
    scaling_plan_version: "capo_auto_scaling_plans.types.scaling_plan_version.ScalingPlanVersion",
    *,
    config_overrides: Optional[AsyncAutoScalingPlansClientConfig] = None,
    max_results: Optional[
        "capo_auto_scaling_plans.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_auto_scaling_plans.types.next_token.NextToken"
    ] = None,
) -> "capo_auto_scaling_plans.types.describe_scaling_plan_resources_response.DescribeScalingPlanResourcesResponse":
    """<p>Describes the scalable resources in the specified scaling plan.</p>

    Args:
        scaling_plan_name: <p>The name of the scaling plan.</p>
        scaling_plan_version: <p>The version number of the scaling plan. Currently, the only valid value is <code>1</code>.</p>
        max_results: <p>The maximum number of scalable resources to return. The value must be between 1 and 50. The default value is 50.</p>
        next_token: <p>The token for the next set of results.</p>

    Raises:
        capo_auto_scaling_plans.errors.concurrent_update_exception.ConcurrentUpdateException: <p>Concurrent updates caused an exception, for example, if you request an update to a scaling plan that already has a pending update.</p>
        capo_auto_scaling_plans.errors.internal_service_exception.InternalServiceException: <p>The service encountered an internal error.</p>
        capo_auto_scaling_plans.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The token provided is not valid.</p>
        capo_auto_scaling_plans.errors.validation_exception.ValidationException: <p>An exception was thrown for a validation issue. Review the parameters provided.</p>
        capo_auto_scaling_plans.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_auto_scaling_plans.types.describe_scaling_plan_resources_request.DescribeScalingPlanResourcesRequest]",
    ) -> AsyncOperationResponse[
        "capo_auto_scaling_plans.types.describe_scaling_plan_resources_response.DescribeScalingPlanResourcesResponse"
    ]:
        import capo_auto_scaling_plans._operations.any_scale_scaling_planner_frontend_service.describe_scaling_plan_resources

        (
            output,
            http_response,
        ) = await capo_auto_scaling_plans._operations.any_scale_scaling_planner_frontend_service.describe_scaling_plan_resources.async_describe_scaling_plan_resources(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeScalingPlanResources")
    )
    input_: capo_auto_scaling_plans.types.describe_scaling_plan_resources_request.DescribeScalingPlanResourcesRequest = {
        "scaling_plan_name": scaling_plan_name,
        "scaling_plan_version": scaling_plan_version,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    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