Skip to content

list_distribution_tenants

list_distribution_tenants(
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
    association_filter: Optional[DistributionTenantAssociationFilter] = None,
    marker: Optional[string] = None,
    max_items: Optional[integer] = None,
) -> ListDistributionTenantsResult

Lists the distribution tenants in your Amazon Web Services account.

Parameters:

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

    The marker for the next set of results.

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

    The maximum number of distribution tenants to return.

Raises:

Source code in docs_src/capo_cloudfront/_services/cloud_front.py
def list_distribution_tenants(
    self,
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
    association_filter: Optional[
        "capo_cloudfront.types.distribution_tenant_association_filter.DistributionTenantAssociationFilter"
    ] = None,
    marker: Optional["capo_cloudfront.types.string.string"] = None,
    max_items: Optional["capo_cloudfront.types.integer.integer"] = None,
) -> "capo_cloudfront.types.list_distribution_tenants_result.ListDistributionTenantsResult":
    """<p>Lists the distribution tenants in your Amazon Web Services account.</p>

    Args:
        marker: <p>The marker for the next set of results.</p>
        max_items: <p>The maximum number of distribution tenants to return.</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_distribution_tenants_request.ListDistributionTenantsRequest]",
    ) -> OperationResponse[
        "capo_cloudfront.types.list_distribution_tenants_result.ListDistributionTenantsResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.list_distribution_tenants

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDistributionTenants")
    )
    input_: capo_cloudfront.types.list_distribution_tenants_request.ListDistributionTenantsRequest = {}
    if association_filter is not None:
        input_["association_filter"] = association_filter
    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