Skip to content

list_discoverable_registry_records

list_discoverable_registry_records(
    registry_id: RegistryIdentifier,
    *,
    config_overrides: Optional[AgentRegistryClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
    filters: Optional[RegistryRecordFilterList] = None,
) -> ListDiscoverableRegistryRecordsResponse

Lists the discoverable registry records in a registry. You can optionally filter and paginate the results.

Parameters:

  • registry_id (RegistryIdentifier) –

    The identifier of the registry whose discoverable records are listed. You can provide either the full Amazon Resource Name (ARN) or the registry ID.

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

    The maximum number of records to return in a single page. Valid values are 1 through 100.

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

    The pagination token returned by a previous request. Use this value to retrieve the next page of results.

  • filters (Optional[RegistryRecordFilterList], default: None ) –

    The filters to apply to the discoverable registry record list.

Raises:

Source code in docs_src/capo_agent_registry/_services/agent_registry.py
def list_discoverable_registry_records(
    self,
    registry_id: "capo_agent_registry.types.registry_identifier.RegistryIdentifier",
    *,
    config_overrides: Optional[AgentRegistryClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
    filters: Optional[
        "capo_agent_registry.types.registry_record_filter_list.RegistryRecordFilterList"
    ] = None,
) -> "capo_agent_registry.types.list_discoverable_registry_records_response.ListDiscoverableRegistryRecordsResponse":
    """<p> Lists the discoverable registry records in a registry. You can optionally filter and paginate the results.</p>

    Args:
        registry_id: <p> The identifier of the registry whose discoverable records are listed. You can provide either the full Amazon Resource Name (ARN) or the registry ID.</p>
        max_results: <p> The maximum number of records to return in a single page. Valid values are 1 through 100.</p>
        next_token: <p> The pagination token returned by a previous request. Use this value to retrieve the next page of results.</p>
        filters: <p> The filters to apply to the discoverable registry record list.</p>

    Raises:
        capo_agent_registry.errors.access_denied_exception.AccessDeniedException: <p>The caller is not authorized to perform the requested action.</p>
        capo_agent_registry.errors.internal_server_exception.InternalServerException: <p>The request failed due to an unexpected internal error; the caller may retry.</p>
        capo_agent_registry.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_agent_registry.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling; the caller may retry after a delay.</p>
        capo_agent_registry.errors.unauthorized_exception.UnauthorizedException: <p>The request could not be authenticated.</p>
        capo_agent_registry.errors.validation_exception.ValidationException: <p>The request failed validation of one or more input fields.</p>
        capo_agent_registry.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_agent_registry.types.list_discoverable_registry_records_request.ListDiscoverableRegistryRecordsRequest]",
    ) -> OperationResponse[
        "capo_agent_registry.types.list_discoverable_registry_records_response.ListDiscoverableRegistryRecordsResponse"
    ]:
        import capo_agent_registry._operations.agent_registry.list_discoverable_registry_records

        output, http_response = (
            capo_agent_registry._operations.agent_registry.list_discoverable_registry_records.list_discoverable_registry_records(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_agent_registry.types.list_discoverable_registry_records_response.ListDiscoverableRegistryRecordsResponse",
    ) -> dict[str, Any]:
        import capo_agent_registry.types.list_discoverable_registry_records_response

        return capo_agent_registry.types.list_discoverable_registry_records_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListDiscoverableRegistryRecords", redact_output=_redact_output
        ),
    )
    input_: capo_agent_registry.types.list_discoverable_registry_records_request.ListDiscoverableRegistryRecordsRequest = {
        "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 filters is not None:
        input_["filters"] = filters

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