updateLink method
Use this operation to change what types of data are shared from a source account to its linked monitoring account sink. You can't change the sink or change the monitoring account with this operation.
When you update a link, you can optionally specify filters that specify which metric namespaces and which log groups are shared from the source account to the monitoring account.
To update the list of tags associated with the sink, use TagResource.
May throw InternalServiceFault.
May throw InvalidParameterException.
May throw MissingRequiredParameterException.
May throw ResourceNotFoundException.
Parameter identifier :
The ARN of the link that you want to update.
Parameter resourceTypes :
An array of strings that define which types of data that the source
account will send to the monitoring account.
Your input here replaces the current set of data types that are shared.
Parameter includeTags :
Specifies whether to include the tags associated with the link in the
response after the update operation. 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.
Parameter linkConfiguration :
Use this structure to filter which metric namespaces and which log groups
are to be shared from the source account to the monitoring account.
Implementation
Future<UpdateLinkOutput> updateLink({
required String identifier,
required List<ResourceType> resourceTypes,
bool? includeTags,
LinkConfiguration? linkConfiguration,
}) async {
final $payload = <String, dynamic>{
'Identifier': identifier,
'ResourceTypes': resourceTypes.map((e) => e.value).toList(),
if (includeTags != null) 'IncludeTags': includeTags,
if (linkConfiguration != null) 'LinkConfiguration': linkConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/UpdateLink',
exceptionFnMap: _exceptionFns,
);
return UpdateLinkOutput.fromJson(response);
}