Skip to content

list_containers async

list_containers(
    *,
    config_overrides: Optional[AsyncMediaStoreClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[ContainerListLimit] = None,
) -> ListContainersOutput

Lists the properties of all containers in AWS Elemental MediaStore.

You can query to receive all the containers in one response. Or you can include the MaxResults parameter to receive a limited number of containers in each response. In this case, the response includes a token. To get the next set of containers, send the command again, this time with the NextToken parameter (with the returned token as its value). The next set of responses appears, with a token if there are still more containers to receive.

See also DescribeContainer, which gets the properties of one container.

Parameters:

  • next_token (Optional[PaginationToken], default: None ) –

    Only if you used MaxResults in the first command, enter the token (which was included in the previous response) to obtain the next set of containers. This token is included in a response only if there actually are more containers to list.

  • max_results (Optional[ContainerListLimit], default: None ) –

    Enter the maximum number of containers in the response. Use from 1 to 255 characters.

Raises:

Source code in docs_src/capo_mediastore/_services/async_media_store.py
async def list_containers(
    self,
    *,
    config_overrides: Optional[AsyncMediaStoreClientConfig] = None,
    next_token: Optional[
        "capo_mediastore.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[
        "capo_mediastore.types.container_list_limit.ContainerListLimit"
    ] = None,
) -> "capo_mediastore.types.list_containers_output.ListContainersOutput":
    """<p>Lists the properties of all containers in AWS Elemental MediaStore. </p> <p>You can query to receive all the containers in one response. Or you can include the <code>MaxResults</code> parameter to receive a limited number of containers in each response. In this case, the response includes a token. To get the next set of containers, send the command again, this time with the <code>NextToken</code> parameter (with the returned token as its value). The next set of responses appears, with a token if there are still more containers to receive. </p> <p>See also <a>DescribeContainer</a>, which gets the properties of one container. </p>

    Args:
        next_token: <p>Only if you used <code>MaxResults</code> in the first command, enter the token (which was included in the previous response) to obtain the next set of containers. This token is included in a response only if there actually are more containers to list.</p>
        max_results: <p>Enter the maximum number of containers in the response. Use from 1 to 255 characters. </p>

    Raises:
        capo_mediastore.errors.internal_server_error.InternalServerError: <p>The service is temporarily unavailable.</p>
        capo_mediastore.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediastore.types.list_containers_input.ListContainersInput]",
    ) -> AsyncOperationResponse[
        "capo_mediastore.types.list_containers_output.ListContainersOutput"
    ]:
        import capo_mediastore._operations.media_store_20170901.list_containers

        (
            output,
            http_response,
        ) = await capo_mediastore._operations.media_store_20170901.list_containers.async_list_containers(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListContainers")
    )
    input_: capo_mediastore.types.list_containers_input.ListContainersInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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