Skip to content

delete_auto_scaling_configuration async

delete_auto_scaling_configuration(
    auto_scaling_configuration_arn: AppRunnerResourceArn,
    *,
    config_overrides: Optional[AsyncAppRunnerClientConfig] = None,
    delete_all_revisions: Optional[Boolean] = None,
) -> DeleteAutoScalingConfigurationResponse

Delete an App Runner automatic scaling configuration resource. You can delete a top level auto scaling configuration, a specific revision of one, or all revisions associated with the top level configuration. You can't delete the default auto scaling configuration or a configuration that's used by one or more App Runner services.

Parameters:

  • auto_scaling_configuration_arn (AppRunnerResourceArn) –

    The Amazon Resource Name (ARN) of the App Runner auto scaling configuration that you want to delete.

    The ARN can be a full auto scaling configuration ARN, or a partial ARN ending with either .../name or .../name/revision . If a revision isn't specified, the latest active revision is deleted.

  • delete_all_revisions (Optional[Boolean], default: None ) –

    Set to true to delete all of the revisions associated with the AutoScalingConfigurationArn parameter value.

    When DeleteAllRevisions is set to true, the only valid value for the Amazon Resource Name (ARN) is a partial ARN ending with: .../name.

Raises:

Source code in docs_src/capo_apprunner/_services/async_app_runner.py
async def delete_auto_scaling_configuration(
    self,
    auto_scaling_configuration_arn: "capo_apprunner.types.app_runner_resource_arn.AppRunnerResourceArn",
    *,
    config_overrides: Optional[AsyncAppRunnerClientConfig] = None,
    delete_all_revisions: Optional["capo_apprunner.types.boolean.Boolean"] = None,
) -> "capo_apprunner.types.delete_auto_scaling_configuration_response.DeleteAutoScalingConfigurationResponse":
    """<p>Delete an App Runner automatic scaling configuration resource. You can delete a top level auto scaling configuration, a specific revision of one, or all revisions associated with the top level configuration. You can't delete the default auto scaling configuration or a configuration that's used by one or more App Runner services.</p>

    Args:
        auto_scaling_configuration_arn: <p>The Amazon Resource Name (ARN) of the App Runner auto scaling configuration that you want to delete.</p> <p>The ARN can be a full auto scaling configuration ARN, or a partial ARN ending with either <code>.../<i>name</i> </code> or <code>.../<i>name</i>/<i>revision</i> </code>. If a revision isn't specified, the latest active revision is deleted.</p>
        delete_all_revisions: <p>Set to <code>true</code> to delete all of the revisions associated with the <code>AutoScalingConfigurationArn</code> parameter value.</p> <p>When <code>DeleteAllRevisions</code> is set to <code>true</code>, the only valid value for the Amazon Resource Name (ARN) is a partial ARN ending with: <code>.../name</code>.</p>

    Raises:
        capo_apprunner.errors.internal_service_error_exception.InternalServiceErrorException: <p>An unexpected service exception occurred.</p>
        capo_apprunner.errors.invalid_request_exception.InvalidRequestException: <p>One or more input parameters aren't valid. Refer to the API action's document page, correct the input parameters, and try the action again.</p>
        capo_apprunner.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource doesn't exist for the specified Amazon Resource Name (ARN) in your Amazon Web Services account.</p>
        capo_apprunner.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_apprunner.types.delete_auto_scaling_configuration_request.DeleteAutoScalingConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_apprunner.types.delete_auto_scaling_configuration_response.DeleteAutoScalingConfigurationResponse"
    ]:
        import capo_apprunner._operations.app_runner.delete_auto_scaling_configuration

        (
            output,
            http_response,
        ) = await capo_apprunner._operations.app_runner.delete_auto_scaling_configuration.async_delete_auto_scaling_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAutoScalingConfiguration")
    )
    input_: capo_apprunner.types.delete_auto_scaling_configuration_request.DeleteAutoScalingConfigurationRequest = {
        "auto_scaling_configuration_arn": auto_scaling_configuration_arn
    }
    if delete_all_revisions is not None:
        input_["delete_all_revisions"] = delete_all_revisions

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