Returns a list of source account links that are linked to this monitoring account sink.
To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.
To find a list of links for one source account, use ListLinks.
Parameters:
-
max_results
(Optional[ListAttachedLinksMaxResults], 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.
-
sink_identifier
(ResourceIdentifier)
–
The ARN of the sink that you want to retrieve links for.
Raises:
Source code in docs_src/capo_oam/_services/async_oam.py
| async def list_attached_links(
self,
sink_identifier: "capo_oam.types.resource_identifier.ResourceIdentifier",
*,
config_overrides: Optional[AsyncOAMClientConfig] = None,
max_results: Optional[
"capo_oam.types.list_attached_links_max_results.ListAttachedLinksMaxResults"
] = None,
next_token: Optional["capo_oam.types.next_token.NextToken"] = None,
) -> "capo_oam.types.list_attached_links_output.ListAttachedLinksOutput":
"""<p>Returns a list of source account links that are linked to this monitoring account sink.</p> <p>To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html">ListSinks</a>.</p> <p>To find a list of links for one source account, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListLinks.html">ListLinks</a>.</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>
sink_identifier: <p>The ARN of the sink that you want to retrieve links for.</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.missing_required_parameter_exception.MissingRequiredParameterException: <p>A required parameter is missing from the request.</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_attached_links_input.ListAttachedLinksInput]",
) -> AsyncOperationResponse[
"capo_oam.types.list_attached_links_output.ListAttachedLinksOutput"
]:
import capo_oam._operations.oamservice.list_attached_links
(
output,
http_response,
) = await capo_oam._operations.oamservice.list_attached_links.async_list_attached_links(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAttachedLinks")
)
input_: capo_oam.types.list_attached_links_input.ListAttachedLinksInput = {
"sink_identifier": sink_identifier
}
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
|