Returns complete information about one link.
To use this operation, provide the link ARN. To retrieve a list of link ARNs, use ListLinks.
Parameters:
-
identifier
(ResourceIdentifier)
–
The ARN of the link to retrieve information for.
-
include_tags
(Optional[IncludeTags], default:
None
)
–
Specifies whether to include the tags associated with the link in the response. When IncludeTags is set to true and the caller has the required permission, oam:ListTagsForResource, the API will return the tags for the specified resource. If the caller doesn't have the required permission, oam:ListTagsForResource, the API will raise an exception.
The default value is false.
Raises:
Source code in docs_src/capo_oam/_services/oam.py
| def get_link(
self,
identifier: "capo_oam.types.resource_identifier.ResourceIdentifier",
*,
config_overrides: Optional[OAMClientConfig] = None,
include_tags: Optional["capo_oam.types.include_tags.IncludeTags"] = None,
) -> "capo_oam.types.get_link_output.GetLinkOutput":
"""<p>Returns complete information about one link.</p> <p>To use this operation, provide the link ARN. To retrieve a list of link ARNs, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListLinks.html">ListLinks</a>.</p>
Args:
identifier: <p>The ARN of the link to retrieve information for.</p>
include_tags: <p>Specifies whether to include the tags associated with the link in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p> <p>The default value is <code>false</code>.</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.
"""
def _handler(
req: "OperationRequest[capo_oam.types.get_link_input.GetLinkInput]",
) -> OperationResponse["capo_oam.types.get_link_output.GetLinkOutput"]:
import capo_oam._operations.oamservice.get_link
output, http_response = capo_oam._operations.oamservice.get_link.get_link(
req.options, req.input
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetLink")
)
input_: capo_oam.types.get_link_input.GetLinkInput = {"identifier": identifier}
if include_tags is not None:
input_["include_tags"] = include_tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|