Skip to content

list_registries async

list_registries(
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    status: Optional[RegistryStatus] = None,
    authorizer_type: Optional[RegistryAuthorizerType] = None,
) -> ListRegistriesResponse

Lists all registries in the account. You can optionally filter results by status using the status parameter, or by authorizer type using the authorizerType parameter.

Parameters:

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

    The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

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

    If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

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

    Filter registries by their current status. Possible values include CREATING, READY, UPDATING, CREATE_FAILED, UPDATE_FAILED, DELETING, and DELETE_FAILED.

  • authorizer_type (Optional[RegistryAuthorizerType], default: None ) –

    Filter registries by their authorizer type. Possible values are CUSTOM_JWT and AWS_IAM. For more information about authorizer types, see the RegistryAuthorizerType enum.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
async def list_registries(
    self,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    max_results: Optional[
        "capo_bedrock_agentcore_control.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_bedrock_agentcore_control.types.next_token.NextToken"
    ] = None,
    status: Optional[
        "capo_bedrock_agentcore_control.types.registry_status.RegistryStatus"
    ] = None,
    authorizer_type: Optional[
        "capo_bedrock_agentcore_control.types.registry_authorizer_type.RegistryAuthorizerType"
    ] = None,
) -> "capo_bedrock_agentcore_control.types.list_registries_response.ListRegistriesResponse":
    """<p>Lists all registries in the account. You can optionally filter results by status using the <code>status</code> parameter, or by authorizer type using the <code>authorizerType</code> parameter.</p>

    Args:
        max_results: <p>The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the <code>nextToken</code> field when making another request to return the next batch of results.</p>
        next_token: <p>If the total number of results is greater than the <code>maxResults</code> value provided in the request, enter the token returned in the <code>nextToken</code> field in the response in this field to return the next batch of results.</p>
        status: <p>Filter registries by their current status. Possible values include <code>CREATING</code>, <code>READY</code>, <code>UPDATING</code>, <code>CREATE_FAILED</code>, <code>UPDATE_FAILED</code>, <code>DELETING</code>, and <code>DELETE_FAILED</code>.</p>
        authorizer_type: <p>Filter registries by their authorizer type. Possible values are <code>CUSTOM_JWT</code> and <code>AWS_IAM</code>. For more information about authorizer types, see the <code>RegistryAuthorizerType</code> enum.</p>

    Raises:
        capo_bedrock_agentcore_control.errors.access_denied_exception.AccessDeniedException: <p>This exception is thrown when a request is denied per access permissions</p>
        capo_bedrock_agentcore_control.errors.internal_server_exception.InternalServerException: <p>This exception is thrown if there was an unexpected error during processing of request</p>
        capo_bedrock_agentcore_control.errors.throttling_exception.ThrottlingException: <p>This exception is thrown when the number of requests exceeds the limit</p>
        capo_bedrock_agentcore_control.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_bedrock_agentcore_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bedrock_agentcore_control.types.list_registries_request.ListRegistriesRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore_control.types.list_registries_response.ListRegistriesResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.list_registries

        (
            output,
            http_response,
        ) = await capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.list_registries.async_list_registries(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_bedrock_agentcore_control.types.list_registries_response.ListRegistriesResponse",
    ) -> dict[str, Any]:
        import capo_bedrock_agentcore_control.types.list_registries_response

        return capo_bedrock_agentcore_control.types.list_registries_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListRegistries", redact_output=_redact_output),
    )
    input_: capo_bedrock_agentcore_control.types.list_registries_request.ListRegistriesRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if status is not None:
        input_["status"] = status
    if authorizer_type is not None:
        input_["authorizer_type"] = authorizer_type

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