Skip to content

get_function_scaling_config

get_function_scaling_config(
    function_name: UnqualifiedFunctionName,
    qualifier: PublishedFunctionQualifier,
    *,
    config_overrides: Optional[LambdaClientConfig] = None,
) -> GetFunctionScalingConfigResponse

Retrieves the scaling configuration for a Lambda Managed Instances function.

Parameters:

Raises:

Source code in docs_src/capo_lambda/_services/_lambda.py
def get_function_scaling_config(
    self,
    function_name: "capo_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
    qualifier: "capo_lambda.types.published_function_qualifier.PublishedFunctionQualifier",
    *,
    config_overrides: Optional[LambdaClientConfig] = None,
) -> "capo_lambda.types.get_function_scaling_config_response.GetFunctionScalingConfigResponse":
    """<p>Retrieves the scaling configuration for a Lambda Managed Instances function.</p>

    Args:
        function_name: <p>The name or ARN of the Lambda function.</p>
        qualifier: <p>Specify a version or alias to get the scaling configuration for a published version of the function.</p>

    Raises:
        capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
        capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
        capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
        capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p>
        capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lambda.types.get_function_scaling_config_request.GetFunctionScalingConfigRequest]",
    ) -> OperationResponse[
        "capo_lambda.types.get_function_scaling_config_response.GetFunctionScalingConfigResponse"
    ]:
        import capo_lambda._operations.aws_gir_api_service.get_function_scaling_config

        output, http_response = (
            capo_lambda._operations.aws_gir_api_service.get_function_scaling_config.get_function_scaling_config(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetFunctionScalingConfig")
    )
    input_: capo_lambda.types.get_function_scaling_config_request.GetFunctionScalingConfigRequest = {
        "function_name": function_name,
        "qualifier": qualifier,
    }

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