Skip to content

update_default_auto_scaling_configuration

update_default_auto_scaling_configuration(
    auto_scaling_configuration_arn: AppRunnerResourceArn,
    *,
    config_overrides: Optional[AppRunnerClientConfig] = None,
) -> UpdateDefaultAutoScalingConfigurationResponse

Update an auto scaling configuration to be the default. The existing default auto scaling configuration will be set to non-default automatically.

Parameters:

  • auto_scaling_configuration_arn (AppRunnerResourceArn) –

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

    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 set as the default.

Raises:

Source code in docs_src/capo_apprunner/_services/app_runner.py
def update_default_auto_scaling_configuration(
    self,
    auto_scaling_configuration_arn: "capo_apprunner.types.app_runner_resource_arn.AppRunnerResourceArn",
    *,
    config_overrides: Optional[AppRunnerClientConfig] = None,
) -> "capo_apprunner.types.update_default_auto_scaling_configuration_response.UpdateDefaultAutoScalingConfigurationResponse":
    """<p>Update an auto scaling configuration to be the default. The existing default auto scaling configuration will be set to non-default automatically.</p>

    Args:
        auto_scaling_configuration_arn: <p>The Amazon Resource Name (ARN) of the App Runner auto scaling configuration that you want to set as the default.</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 set as the default.</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.
    """

    def _handler(
        req: "OperationRequest[capo_apprunner.types.update_default_auto_scaling_configuration_request.UpdateDefaultAutoScalingConfigurationRequest]",
    ) -> OperationResponse[
        "capo_apprunner.types.update_default_auto_scaling_configuration_response.UpdateDefaultAutoScalingConfigurationResponse"
    ]:
        import capo_apprunner._operations.app_runner.update_default_auto_scaling_configuration

        output, http_response = (
            capo_apprunner._operations.app_runner.update_default_auto_scaling_configuration.update_default_auto_scaling_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDefaultAutoScalingConfiguration")
    )
    input_: capo_apprunner.types.update_default_auto_scaling_configuration_request.UpdateDefaultAutoScalingConfigurationRequest = {
        "auto_scaling_configuration_arn": auto_scaling_configuration_arn
    }

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