Skip to content

list_registry_records

list_registry_records(
    registry_id: RegistryIdentifier,
    *,
    config_overrides: Optional[BedrockAgentCoreControlClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    name: Optional[RegistryRecordName] = None,
    status: Optional[RegistryRecordStatus] = None,
    descriptor_type: Optional[DescriptorType] = None,
) -> ListRegistryRecordsResponse

Lists registry records within a registry. You can optionally filter results using the name, status, and descriptorType parameters. When multiple filters are specified, they are combined using AND logic.

Parameters:

  • registry_id (RegistryIdentifier) –

    The identifier of the registry to list records from. You can specify either the Amazon Resource Name (ARN) or the ID of the registry.

  • 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.

  • name (Optional[RegistryRecordName], default: None ) –

    Filter registry records by name.

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

    Filter registry records by their current status. Possible values include CREATING, DRAFT, APPROVED, PENDING_APPROVAL, REJECTED, DEPRECATED, UPDATING, CREATE_FAILED, and UPDATE_FAILED.

  • descriptor_type (Optional[DescriptorType], default: None ) –

    Filter registry records by their descriptor type. Possible values are MCP, A2A, CUSTOM, and AGENT_SKILLS.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/bedrock_agent_core_control.py
def list_registry_records(
    self,
    registry_id: "capo_bedrock_agentcore_control.types.registry_identifier.RegistryIdentifier",
    *,
    config_overrides: Optional[BedrockAgentCoreControlClientConfig] = 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,
    name: Optional[
        "capo_bedrock_agentcore_control.types.registry_record_name.RegistryRecordName"
    ] = None,
    status: Optional[
        "capo_bedrock_agentcore_control.types.registry_record_status.RegistryRecordStatus"
    ] = None,
    descriptor_type: Optional[
        "capo_bedrock_agentcore_control.types.descriptor_type.DescriptorType"
    ] = None,
) -> "capo_bedrock_agentcore_control.types.list_registry_records_response.ListRegistryRecordsResponse":
    """<p>Lists registry records within a registry. You can optionally filter results using the <code>name</code>, <code>status</code>, and <code>descriptorType</code> parameters. When multiple filters are specified, they are combined using AND logic.</p>

    Args:
        registry_id: <p>The identifier of the registry to list records from. You can specify either the Amazon Resource Name (ARN) or the ID of the registry.</p>
        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>
        name: <p>Filter registry records by name.</p>
        status: <p>Filter registry records by their current status. Possible values include <code>CREATING</code>, <code>DRAFT</code>, <code>APPROVED</code>, <code>PENDING_APPROVAL</code>, <code>REJECTED</code>, <code>DEPRECATED</code>, <code>UPDATING</code>, <code>CREATE_FAILED</code>, and <code>UPDATE_FAILED</code>.</p>
        descriptor_type: <p>Filter registry records by their descriptor type. Possible values are <code>MCP</code>, <code>A2A</code>, <code>CUSTOM</code>, and <code>AGENT_SKILLS</code>.</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.conflict_exception.ConflictException: <p>This exception is thrown when there is a conflict performing an operation</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.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource referenced by the operation does not exist</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.
    """

    def _handler(
        req: "OperationRequest[capo_bedrock_agentcore_control.types.list_registry_records_request.ListRegistryRecordsRequest]",
    ) -> OperationResponse[
        "capo_bedrock_agentcore_control.types.list_registry_records_response.ListRegistryRecordsResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.list_registry_records

        output, http_response = (
            capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.list_registry_records.list_registry_records(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

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

        return capo_bedrock_agentcore_control.types.list_registry_records_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListRegistryRecords", redact_output=_redact_output),
    )
    input_: capo_bedrock_agentcore_control.types.list_registry_records_request.ListRegistryRecordsRequest = {
        "registry_id": registry_id
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if name is not None:
        input_["name"] = name
    if status is not None:
        input_["status"] = status
    if descriptor_type is not None:
        input_["descriptor_type"] = descriptor_type

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