Retrieves multiple discoverable registry records by ID from a single registry. Records that cannot be retrieved are reported individually in the errors list rather than failing the entire request.
Parameters:
-
entries
(RegistryRecordsEntryList)
–
The registry-scoped groups of record IDs to retrieve. Currently, you can specify exactly one entry.
Raises:
Source code in docs_src/capo_agent_registry/_services/agent_registry.py
| def batch_get_discoverable_registry_record(
self,
entries: "capo_agent_registry.types.registry_records_entry_list.RegistryRecordsEntryList",
*,
config_overrides: Optional[AgentRegistryClientConfig] = None,
) -> "capo_agent_registry.types.batch_get_discoverable_registry_record_response.BatchGetDiscoverableRegistryRecordResponse":
"""<p> Retrieves multiple discoverable registry records by ID from a single registry. Records that cannot be retrieved are reported individually in the <code>errors</code> list rather than failing the entire request.</p>
Args:
entries: <p> The registry-scoped groups of record IDs to retrieve. Currently, you can specify exactly one entry.</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.batch_get_discoverable_registry_record_request.BatchGetDiscoverableRegistryRecordRequest]",
) -> OperationResponse[
"capo_agent_registry.types.batch_get_discoverable_registry_record_response.BatchGetDiscoverableRegistryRecordResponse"
]:
import capo_agent_registry._operations.agent_registry.batch_get_discoverable_registry_record
output, http_response = (
capo_agent_registry._operations.agent_registry.batch_get_discoverable_registry_record.batch_get_discoverable_registry_record(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_agent_registry.types.batch_get_discoverable_registry_record_response.BatchGetDiscoverableRegistryRecordResponse",
) -> dict[str, Any]:
import capo_agent_registry.types.batch_get_discoverable_registry_record_response
return capo_agent_registry.types.batch_get_discoverable_registry_record_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"BatchGetDiscoverableRegistryRecord", redact_output=_redact_output
),
)
input_: capo_agent_registry.types.batch_get_discoverable_registry_record_request.BatchGetDiscoverableRegistryRecordRequest = {
"entries": entries
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|