Skip to content

list_key_value_stores async

list_key_value_stores(
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
    marker: Optional[string] = None,
    max_items: Optional[integer] = None,
    status: Optional[string] = None,
) -> ListKeyValueStoresResult

Specifies the key value stores to list.

Parameters:

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

    The marker associated with the key value stores list.

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

    The maximum number of items in the key value stores list.

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

    The status of the request for the key value stores list.

Raises:

Examples:

To get a list of KeyValueStores The following command retrieves a list of KeyValueStores with READY status.

>>> await client.list_key_value_stores(status='READY')
Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
async def list_key_value_stores(
    self,
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
    marker: Optional["capo_cloudfront.types.string.string"] = None,
    max_items: Optional["capo_cloudfront.types.integer.integer"] = None,
    status: Optional["capo_cloudfront.types.string.string"] = None,
) -> "capo_cloudfront.types.list_key_value_stores_result.ListKeyValueStoresResult":
    """<p>Specifies the key value stores to list.</p>

    Args:
        marker: <p>The marker associated with the key value stores list.</p>
        max_items: <p>The maximum number of items in the key value stores list.</p>
        status: <p>The status of the request for the key value stores list.</p>

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
        capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
        capo_cloudfront.errors.unsupported_operation.UnsupportedOperation: <p>This operation is not supported in this Amazon Web Services Region.</p>
        capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To get a list of KeyValueStores
        The following command retrieves a list of KeyValueStores with READY status.

        >>> await client.list_key_value_stores(status='READY')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudfront.types.list_key_value_stores_request.ListKeyValueStoresRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudfront.types.list_key_value_stores_result.ListKeyValueStoresResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.list_key_value_stores

        (
            output,
            http_response,
        ) = await capo_cloudfront._operations.cloudfront2020_05_31.list_key_value_stores.async_list_key_value_stores(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListKeyValueStores")
    )
    input_: capo_cloudfront.types.list_key_value_stores_request.ListKeyValueStoresRequest = {}
    if marker is not None:
        input_["marker"] = marker
    if max_items is not None:
        input_["max_items"] = max_items
    if status is not None:
        input_["status"] = status

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output