Skip to content

list_distributions_by_connection_function

list_distributions_by_connection_function(
    connection_function_identifier: string,
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
    marker: Optional[string] = None,
    max_items: Optional[integer] = None,
) -> ListDistributionsByConnectionFunctionResult

Lists distributions by connection function.

Parameters:

  • marker (Optional[string], default: None ) –

    Use this field when paginating results to indicate where to begin in your list. The response includes items 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.

  • max_items (Optional[integer], default: None ) –

    The maximum number of distributions that you want returned in the response.

  • connection_function_identifier (string) –

    The distributions by connection function identifier.

Raises:

Source code in docs_src/capo_cloudfront/_services/cloud_front.py
def list_distributions_by_connection_function(
    self,
    connection_function_identifier: "capo_cloudfront.types.string.string",
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
    marker: Optional["capo_cloudfront.types.string.string"] = None,
    max_items: Optional["capo_cloudfront.types.integer.integer"] = None,
) -> "capo_cloudfront.types.list_distributions_by_connection_function_result.ListDistributionsByConnectionFunctionResult":
    """<p>Lists distributions by connection function.</p>

    Args:
        marker: <p>Use this field when paginating results to indicate where to begin in your list. The response includes items 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 <code>NextMarker</code> from the current page's response.</p>
        max_items: <p>The maximum number of distributions that you want returned in the response.</p>
        connection_function_identifier: <p>The distributions by connection function identifier.</p>

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
        capo_cloudfront.errors.entity_not_found.EntityNotFound: <p>The entity was not found.</p>
        capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
        capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudfront.types.list_distributions_by_connection_function_request.ListDistributionsByConnectionFunctionRequest]",
    ) -> OperationResponse[
        "capo_cloudfront.types.list_distributions_by_connection_function_result.ListDistributionsByConnectionFunctionResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.list_distributions_by_connection_function

        output, http_response = (
            capo_cloudfront._operations.cloudfront2020_05_31.list_distributions_by_connection_function.list_distributions_by_connection_function(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_cloudfront.types.list_distributions_by_connection_function_result.ListDistributionsByConnectionFunctionResult",
    ) -> dict[str, Any]:
        import capo_cloudfront.types.list_distributions_by_connection_function_result

        return capo_cloudfront.types.list_distributions_by_connection_function_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListDistributionsByConnectionFunction", redact_output=_redact_output
        ),
    )
    input_: capo_cloudfront.types.list_distributions_by_connection_function_request.ListDistributionsByConnectionFunctionRequest = {
        "connection_function_identifier": connection_function_identifier
    }
    if marker is not None:
        input_["marker"] = marker
    if max_items is not None:
        input_["max_items"] = max_items

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