Lists the publishers that your account owns, followed by the ACTIVE publishers that are shared with your account.
Parameters:
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of results to return in a single call.
-
next_token
(Optional[NextToken], default:
None
)
–
The token for the next page of results. Use the value returned in the previous response.
Raises:
Source code in docs_src/capo_agent_registry_control/_services/async_agent_registry_control.py
| async def list_publishers(
self,
*,
config_overrides: Optional[AsyncAgentRegistryControlClientConfig] = None,
max_results: Optional[
"capo_agent_registry_control.types.max_results.MaxResults"
] = None,
next_token: Optional[
"capo_agent_registry_control.types.next_token.NextToken"
] = None,
) -> "capo_agent_registry_control.types.list_publishers_response.ListPublishersResponse":
"""<p>Lists the publishers that your account owns, followed by the <code>ACTIVE</code> publishers that are shared with your account.</p>
Args:
max_results: <p>The maximum number of results to return in a single call.</p>
next_token: <p>The token for the next page of results. Use the value returned in the previous response.</p>
Raises:
capo_agent_registry_control.errors.access_denied_exception.AccessDeniedException: <p>The caller is not authorized to perform the requested action.</p>
capo_agent_registry_control.errors.internal_server_exception.InternalServerException: <p>The request failed due to an unexpected internal error; the caller may retry.</p>
capo_agent_registry_control.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling; the caller may retry after a delay.</p>
capo_agent_registry_control.errors.validation_exception.ValidationException: <p>The request failed validation of one or more input fields.</p>
capo_agent_registry_control.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_agent_registry_control.types.list_publishers_request.ListPublishersRequest]",
) -> AsyncOperationResponse[
"capo_agent_registry_control.types.list_publishers_response.ListPublishersResponse"
]:
import capo_agent_registry_control._operations.agent_registry_control.list_publishers
(
output,
http_response,
) = await capo_agent_registry_control._operations.agent_registry_control.list_publishers.async_list_publishers(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListPublishers")
)
input_: capo_agent_registry_control.types.list_publishers_request.ListPublishersRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|