Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.
To find a list of links for one monitoring account sink, use ListAttachedLinks from within the monitoring account.
Parameters:
-
max_results
(Optional[ListLinksMaxResults], default:
None
)
–
Limits the number of returned links to the specified number.
-
next_token
(Optional[NextToken], default:
None
)
–
The token for the next set of items to return. You received this token from a previous call.
Raises:
Source code in docs_src/capo_oam/_services/async_oam.py
| async def list_links(
self,
*,
config_overrides: Optional[AsyncOAMClientConfig] = None,
max_results: Optional[
"capo_oam.types.list_links_max_results.ListLinksMaxResults"
] = None,
next_token: Optional["capo_oam.types.next_token.NextToken"] = None,
) -> "capo_oam.types.list_links_output.ListLinksOutput":
"""<p>Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.</p> <p>To find a list of links for one monitoring account sink, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListAttachedLinks.html">ListAttachedLinks</a> from within the monitoring account.</p>
Args:
max_results: <p>Limits the number of returned links to the specified number.</p>
next_token: <p>The token for the next set of items to return. You received this token from a previous call.</p>
Raises:
capo_oam.errors.internal_service_fault.InternalServiceFault: <p>Unexpected error while processing the request. Retry the request.</p>
capo_oam.errors.invalid_parameter_exception.InvalidParameterException: <p>A parameter is specified incorrectly.</p>
capo_oam.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that does not exist.</p>
capo_oam.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_oam.types.list_links_input.ListLinksInput]",
) -> AsyncOperationResponse["capo_oam.types.list_links_output.ListLinksOutput"]:
import capo_oam._operations.oamservice.list_links
(
output,
http_response,
) = await capo_oam._operations.oamservice.list_links.async_list_links(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListLinks")
)
input_: capo_oam.types.list_links_input.ListLinksInput = {}
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
|