CloudFront / Client / list_functions

list_functions#

CloudFront.Client.list_functions(**kwargs)#

Gets a list of all CloudFront functions in your Amazon Web Services account.

You can optionally apply a filter to return only the functions that are in the specified stage, either DEVELOPMENT or LIVE.

You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the NextMarker value from the current response as the Marker value in the subsequent request.

See also: AWS API Documentation

Request Syntax

response = client.list_functions(
    Marker='string',
    MaxItems='string',
    Stage='DEVELOPMENT'|'LIVE'
)
Parameters:
  • Marker (string) – Use this field when paginating results to indicate where to begin in your list of functions. The response includes functions in the list that occur after the marker. To get the next page of the list, set this field’s value to the value of NextMarker from the current page’s response.

  • MaxItems (string) – The maximum number of functions that you want in the response.

  • Stage (string) – An optional filter to return only the functions that are in the specified stage, either DEVELOPMENT or LIVE.

Return type:

dict

Returns:

Response Syntax

{
    'FunctionList': {
        'NextMarker': 'string',
        'MaxItems': 123,
        'Quantity': 123,
        'Items': [
            {
                'Name': 'string',
                'Status': 'string',
                'FunctionConfig': {
                    'Comment': 'string',
                    'Runtime': 'cloudfront-js-1.0'
                },
                'FunctionMetadata': {
                    'FunctionARN': 'string',
                    'Stage': 'DEVELOPMENT'|'LIVE',
                    'CreatedTime': datetime(2015, 1, 1),
                    'LastModifiedTime': datetime(2015, 1, 1)
                }
            },
        ]
    }
}

Response Structure

  • (dict) –

    • FunctionList (dict) –

      A list of CloudFront functions.

      • NextMarker (string) –

        If there are more items in the list than are in this response, this element is present. It contains the value that you should use in the Marker field of a subsequent request to continue listing functions where you left off.

      • MaxItems (integer) –

        The maximum number of functions requested.

      • Quantity (integer) –

        The number of functions returned in the response.

      • Items (list) –

        Contains the functions in the list.

        • (dict) –

          Contains configuration information and metadata about a CloudFront function.

          • Name (string) –

            The name of the CloudFront function.

          • Status (string) –

            The status of the CloudFront function.

          • FunctionConfig (dict) –

            Contains configuration information about a CloudFront function.

            • Comment (string) –

              A comment to describe the function.

            • Runtime (string) –

              The function’s runtime environment. The only valid value is cloudfront-js-1.0.

          • FunctionMetadata (dict) –

            Contains metadata about a CloudFront function.

            • FunctionARN (string) –

              The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies the function.

            • Stage (string) –

              The stage that the function is in, either DEVELOPMENT or LIVE.

              When a function is in the DEVELOPMENT stage, you can test the function with TestFunction, and update it with UpdateFunction.

              When a function is in the LIVE stage, you can attach the function to a distribution’s cache behavior, using the function’s ARN.

            • CreatedTime (datetime) –

              The date and time when the function was created.

            • LastModifiedTime (datetime) –

              The date and time when the function was most recently updated.

Exceptions

  • CloudFront.Client.exceptions.InvalidArgument

  • CloudFront.Client.exceptions.UnsupportedOperation