SDK for PHP 3.x

Client: Aws\OAM\OAMClient
Service ID: oam
Version: 2022-06-10

This page describes the parameters and results for the operations of the CloudWatch Observability Access Manager (2022-06-10), and shows how to use the Aws\OAM\OAMClient object to call the described operations. This documentation is specific to the 2022-06-10 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

CreateLink ( array $params = [] )
Creates a link between a source account and a sink that you have created in a monitoring account.
CreateSink ( array $params = [] )
Use this to create a sink in the current account, so that it can be used as a monitoring account in CloudWatch cross-account observability.
DeleteLink ( array $params = [] )
Deletes a link between a monitoring account sink and a source account.
DeleteSink ( array $params = [] )
Deletes a sink.
GetLink ( array $params = [] )
Returns complete information about one link.
GetSink ( array $params = [] )
Returns complete information about one monitoring account sink.
GetSinkPolicy ( array $params = [] )
Returns the current sink policy attached to this sink.
ListAttachedLinks ( array $params = [] )
Returns a list of source account links that are linked to this monitoring account sink.
ListLinks ( array $params = [] )
Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.
ListSinks ( array $params = [] )
Use this operation in a monitoring account to return the list of sinks created in that account.
ListTagsForResource ( array $params = [] )
Displays the tags associated with a resource.
PutSinkPolicy ( array $params = [] )
Creates or updates the resource policy that grants permissions to source accounts to link to the monitoring account sink.
TagResource ( array $params = [] )
Assigns one or more tags (key-value pairs) to the specified resource.
UntagResource ( array $params = [] )
Removes one or more tags from the specified resource.
UpdateLink ( array $params = [] )
Use this operation to change what types of data are shared from a source account to its linked monitoring account sink.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListAttachedLinks
ListLinks
ListSinks

Operations

$result = $client->createLink([/* ... */]);
$promise = $client->createLinkAsync([/* ... */]);

Creates a link between a source account and a sink that you have created in a monitoring account. After the link is created, data is sent from the source account to the monitoring account. When you create 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.

Before you create a link, you must create a sink in the monitoring account and create a sink policy in that account. The sink policy must permit the source account to link to it. You can grant permission to source accounts by granting permission to an entire organization or to individual accounts.

For more information, see CreateSink and PutSinkPolicy.

Each monitoring account can be linked to as many as 100,000 source accounts.

Each source account can be linked to as many as five monitoring accounts.

Parameter Syntax

$result = $client->createLink([
    'LabelTemplate' => '<string>', // REQUIRED
    'LinkConfiguration' => [
        'LogGroupConfiguration' => [
            'Filter' => '<string>', // REQUIRED
        ],
        'MetricConfiguration' => [
            'Filter' => '<string>', // REQUIRED
        ],
    ],
    'ResourceTypes' => ['<string>', ...], // REQUIRED
    'SinkIdentifier' => '<string>', // REQUIRED
    'Tags' => ['<string>', ...],
]);

Parameter Details

Members
LabelTemplate
Required: Yes
Type: string

Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.

You can use a custom label or use the following variables:

  • $AccountName is the name of the account

  • $AccountEmail is the globally unique email address of the account

  • $AccountEmailNoDomain is the email address of the account without the domain name

LinkConfiguration
Type: LinkConfiguration structure

Use this structure to optionally create filters that specify that only some metric namespaces or log groups are to be shared from the source account to the monitoring account.

ResourceTypes
Required: Yes
Type: Array of strings

An array of strings that define which types of data that the source account shares with the monitoring account.

SinkIdentifier
Required: Yes
Type: string

The ARN of the sink to use to create this link. You can use ListSinks to find the ARNs of sinks.

For more information about sinks, see CreateSink.

Tags
Type: Associative array of custom strings keys (TagKey) to strings

Assigns one or more tags (key-value pairs) to the link.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.

Result Syntax

[
    'Arn' => '<string>',
    'Id' => '<string>',
    'Label' => '<string>',
    'LabelTemplate' => '<string>',
    'LinkConfiguration' => [
        'LogGroupConfiguration' => [
            'Filter' => '<string>',
        ],
        'MetricConfiguration' => [
            'Filter' => '<string>',
        ],
    ],
    'ResourceTypes' => ['<string>', ...],
    'SinkArn' => '<string>',
    'Tags' => ['<string>', ...],
]

Result Details

Members
Arn
Type: string

The ARN of the link that is newly created.

Id
Type: string

The random ID string that Amazon Web Services generated as part of the link ARN.

Label
Type: string

The label that you assigned to this link. If the labelTemplate includes variables, this field displays the variables resolved to their actual values.

LabelTemplate
Type: string

The exact label template that you specified, with the variables not resolved.

LinkConfiguration
Type: LinkConfiguration structure

This structure includes filters that specify which metric namespaces and which log groups are shared from the source account to the monitoring account.

ResourceTypes
Type: Array of strings

The resource types supported by this link.

SinkArn
Type: string

The ARN of the sink that is used for this link.

Tags
Type: Associative array of custom strings keys (String) to strings

The tags assigned to the link.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

ConflictException:

A resource was in an inconsistent state during an update or a deletion.

MissingRequiredParameterException:

A required parameter is missing from the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

InvalidParameterException:

A parameter is specified incorrectly.

CreateSink

$result = $client->createSink([/* ... */]);
$promise = $client->createSinkAsync([/* ... */]);

Use this to create a sink in the current account, so that it can be used as a monitoring account in CloudWatch cross-account observability. A sink is a resource that represents an attachment point in a monitoring account. Source accounts can link to the sink to send observability data.

After you create a sink, you must create a sink policy that allows source accounts to attach to it. For more information, see PutSinkPolicy.

Each account can contain one sink per Region. If you delete a sink, you can then create a new one in that Region.

Parameter Syntax

$result = $client->createSink([
    'Name' => '<string>', // REQUIRED
    'Tags' => ['<string>', ...],
]);

Parameter Details

Members
Name
Required: Yes
Type: string

A name for the sink.

Tags
Type: Associative array of custom strings keys (TagKey) to strings

Assigns one or more tags (key-value pairs) to the link.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.

Result Syntax

[
    'Arn' => '<string>',
    'Id' => '<string>',
    'Name' => '<string>',
    'Tags' => ['<string>', ...],
]

Result Details

Members
Arn
Type: string

The ARN of the sink that is newly created.

Id
Type: string

The random ID string that Amazon Web Services generated as part of the sink ARN.

Name
Type: string

The name of the sink.

Tags
Type: Associative array of custom strings keys (String) to strings

The tags assigned to the sink.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

ConflictException:

A resource was in an inconsistent state during an update or a deletion.

MissingRequiredParameterException:

A required parameter is missing from the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

InvalidParameterException:

A parameter is specified incorrectly.

$result = $client->deleteLink([/* ... */]);
$promise = $client->deleteLinkAsync([/* ... */]);

Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.

Parameter Syntax

$result = $client->deleteLink([
    'Identifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
Identifier
Required: Yes
Type: string

The ARN of the link to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

MissingRequiredParameterException:

A required parameter is missing from the request.

InvalidParameterException:

A parameter is specified incorrectly.

ResourceNotFoundException:

The request references a resource that does not exist.

DeleteSink

$result = $client->deleteSink([/* ... */]);
$promise = $client->deleteSinkAsync([/* ... */]);

Deletes a sink. You must delete all links to a sink before you can delete that sink.

Parameter Syntax

$result = $client->deleteSink([
    'Identifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
Identifier
Required: Yes
Type: string

The ARN of the sink to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

ConflictException:

A resource was in an inconsistent state during an update or a deletion.

MissingRequiredParameterException:

A required parameter is missing from the request.

InvalidParameterException:

A parameter is specified incorrectly.

ResourceNotFoundException:

The request references a resource that does not exist.

$result = $client->getLink([/* ... */]);
$promise = $client->getLinkAsync([/* ... */]);

Returns complete information about one link.

To use this operation, provide the link ARN. To retrieve a list of link ARNs, use ListLinks.

Parameter Syntax

$result = $client->getLink([
    'Identifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
Identifier
Required: Yes
Type: string

The ARN of the link to retrieve information for.

Result Syntax

[
    'Arn' => '<string>',
    'Id' => '<string>',
    'Label' => '<string>',
    'LabelTemplate' => '<string>',
    'LinkConfiguration' => [
        'LogGroupConfiguration' => [
            'Filter' => '<string>',
        ],
        'MetricConfiguration' => [
            'Filter' => '<string>',
        ],
    ],
    'ResourceTypes' => ['<string>', ...],
    'SinkArn' => '<string>',
    'Tags' => ['<string>', ...],
]

Result Details

Members
Arn
Type: string

The ARN of the link.

Id
Type: string

The random ID string that Amazon Web Services generated as part of the link ARN.

Label
Type: string

The label that you assigned to this link, with the variables resolved to their actual values.

LabelTemplate
Type: string

The exact label template that was specified when the link was created, with the template variables not resolved.

LinkConfiguration
Type: LinkConfiguration structure

This structure includes filters that specify which metric namespaces and which log groups are shared from the source account to the monitoring account.

ResourceTypes
Type: Array of strings

The resource types supported by this link.

SinkArn
Type: string

The ARN of the sink that is used for this link.

Tags
Type: Associative array of custom strings keys (String) to strings

The tags assigned to the link.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

MissingRequiredParameterException:

A required parameter is missing from the request.

InvalidParameterException:

A parameter is specified incorrectly.

ResourceNotFoundException:

The request references a resource that does not exist.

GetSink

$result = $client->getSink([/* ... */]);
$promise = $client->getSinkAsync([/* ... */]);

Returns complete information about one monitoring account sink.

To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.

Parameter Syntax

$result = $client->getSink([
    'Identifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
Identifier
Required: Yes
Type: string

The ARN of the sink to retrieve information for.

Result Syntax

[
    'Arn' => '<string>',
    'Id' => '<string>',
    'Name' => '<string>',
    'Tags' => ['<string>', ...],
]

Result Details

Members
Arn
Type: string

The ARN of the sink.

Id
Type: string

The random ID string that Amazon Web Services generated as part of the sink ARN.

Name
Type: string

The name of the sink.

Tags
Type: Associative array of custom strings keys (String) to strings

The tags assigned to the sink.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

MissingRequiredParameterException:

A required parameter is missing from the request.

InvalidParameterException:

A parameter is specified incorrectly.

ResourceNotFoundException:

The request references a resource that does not exist.

GetSinkPolicy

$result = $client->getSinkPolicy([/* ... */]);
$promise = $client->getSinkPolicyAsync([/* ... */]);

Returns the current sink policy attached to this sink. The sink policy specifies what accounts can attach to this sink as source accounts, and what types of data they can share.

Parameter Syntax

$result = $client->getSinkPolicy([
    'SinkIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
SinkIdentifier
Required: Yes
Type: string

The ARN of the sink to retrieve the policy of.

Result Syntax

[
    'Policy' => '<string>',
    'SinkArn' => '<string>',
    'SinkId' => '<string>',
]

Result Details

Members
Policy
Type: string

The policy that you specified, in JSON format.

SinkArn
Type: string

The ARN of the sink.

SinkId
Type: string

The random ID string that Amazon Web Services generated as part of the sink ARN.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

MissingRequiredParameterException:

A required parameter is missing from the request.

InvalidParameterException:

A parameter is specified incorrectly.

ResourceNotFoundException:

The request references a resource that does not exist.

$result = $client->listAttachedLinks([/* ... */]);
$promise = $client->listAttachedLinksAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listAttachedLinks([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'SinkIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
Type: int

Limits the number of returned links to the specified number.

NextToken
Type: string

The token for the next set of items to return. You received this token from a previous call.

SinkIdentifier
Required: Yes
Type: string

The ARN of the sink that you want to retrieve links for.

Result Syntax

[
    'Items' => [
        [
            'Label' => '<string>',
            'LinkArn' => '<string>',
            'ResourceTypes' => ['<string>', ...],
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
Items
Required: Yes
Type: Array of ListAttachedLinksItem structures

An array of structures that contain the information about the attached links.

NextToken
Type: string

The token to use when requesting the next set of links.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

MissingRequiredParameterException:

A required parameter is missing from the request.

InvalidParameterException:

A parameter is specified incorrectly.

ResourceNotFoundException:

The request references a resource that does not exist.

$result = $client->listLinks([/* ... */]);
$promise = $client->listLinksAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listLinks([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

Limits the number of returned links to the specified number.

NextToken
Type: string

The token for the next set of items to return. You received this token from a previous call.

Result Syntax

[
    'Items' => [
        [
            'Arn' => '<string>',
            'Id' => '<string>',
            'Label' => '<string>',
            'ResourceTypes' => ['<string>', ...],
            'SinkArn' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
Items
Required: Yes
Type: Array of ListLinksItem structures

An array of structures that contain the information about the returned links.

NextToken
Type: string

The token to use when requesting the next set of links.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

InvalidParameterException:

A parameter is specified incorrectly.

ResourceNotFoundException:

The request references a resource that does not exist.

ListSinks

$result = $client->listSinks([/* ... */]);
$promise = $client->listSinksAsync([/* ... */]);

Use this operation in a monitoring account to return the list of sinks created in that account.

Parameter Syntax

$result = $client->listSinks([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

Limits the number of returned links to the specified number.

NextToken
Type: string

The token for the next set of items to return. You received this token from a previous call.

Result Syntax

[
    'Items' => [
        [
            'Arn' => '<string>',
            'Id' => '<string>',
            'Name' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
Items
Required: Yes
Type: Array of ListSinksItem structures

An array of structures that contain the information about the returned sinks.

NextToken
Type: string

The token to use when requesting the next set of sinks.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

InvalidParameterException:

A parameter is specified incorrectly.

ResourceNotFoundException:

The request references a resource that does not exist.

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

Displays the tags associated with a resource. Both sinks and links support tagging.

Parameter Syntax

$result = $client->listTagsForResource([
    'ResourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The ARN of the resource that you want to view tags for.

The ARN format of a sink is arn:aws:oam:Region:account-id:sink/sink-id

The ARN format of a link is arn:aws:oam:Region:account-id:link/link-id

For more information about ARN format, see CloudWatch Logs resources and operations.

Unlike tagging permissions in other Amazon Web Services services, to retrieve the list of tags for links or sinks you must have the oam:RequestTag permission. The aws:ReguestTag permission does not allow you to tag and untag links and sinks.

Result Syntax

[
    'Tags' => ['<string>', ...],
]

Result Details

Members
Tags
Type: Associative array of custom strings keys (String) to strings

The list of tags associated with the requested resource.>

Errors

ValidationException:

The value of a parameter in the request caused an error.

ResourceNotFoundException:

The request references a resource that does not exist.

PutSinkPolicy

$result = $client->putSinkPolicy([/* ... */]);
$promise = $client->putSinkPolicyAsync([/* ... */]);

Creates or updates the resource policy that grants permissions to source accounts to link to the monitoring account sink. When you create a sink policy, you can grant permissions to all accounts in an organization or to individual accounts.

You can also use a sink policy to limit the types of data that is shared. The three types that you can allow or deny are:

  • Metrics - Specify with AWS::CloudWatch::Metric

  • Log groups - Specify with AWS::Logs::LogGroup

  • Traces - Specify with AWS::XRay::Trace

  • Application Insights - Applications - Specify with AWS::ApplicationInsights::Application

See the examples in this section to see how to specify permitted source accounts and data types.

Parameter Syntax

$result = $client->putSinkPolicy([
    'Policy' => '<string>', // REQUIRED
    'SinkIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
Policy
Required: Yes
Type: string

The JSON policy to use. If you are updating an existing policy, the entire existing policy is replaced by what you specify here.

The policy must be in JSON string format with quotation marks escaped and no newlines.

For examples of different types of policies, see the Examples section on this page.

SinkIdentifier
Required: Yes
Type: string

The ARN of the sink to attach this policy to.

Result Syntax

[
    'Policy' => '<string>',
    'SinkArn' => '<string>',
    'SinkId' => '<string>',
]

Result Details

Members
Policy
Type: string

The policy that you specified.

SinkArn
Type: string

The ARN of the sink.

SinkId
Type: string

The random ID string that Amazon Web Services generated as part of the sink ARN.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

MissingRequiredParameterException:

A required parameter is missing from the request.

InvalidParameterException:

A parameter is specified incorrectly.

ResourceNotFoundException:

The request references a resource that does not exist.

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

Assigns one or more tags (key-value pairs) to the specified resource. Both sinks and links can be tagged.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.

You can use the TagResource action with a resource that already has tags. If you specify a new tag key for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces the previous value for that tag.

You can associate as many as 50 tags with a resource.

Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the oam:ResourceTag permission. The iam:ResourceTag permission does not allow you to tag and untag links and sinks.

Parameter Syntax

$result = $client->tagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'Tags' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The ARN of the resource that you're adding tags to.

The ARN format of a sink is arn:aws:oam:Region:account-id:sink/sink-id

The ARN format of a link is arn:aws:oam:Region:account-id:link/link-id

For more information about ARN format, see CloudWatch Logs resources and operations.

Tags
Required: Yes
Type: Associative array of custom strings keys (TagKey) to strings

The list of key-value pairs to associate with the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

The value of a parameter in the request caused an error.

TooManyTagsException:

A resource can have no more than 50 tags.

ResourceNotFoundException:

The request references a resource that does not exist.

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Removes one or more tags from the specified resource.

Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the oam:ResourceTag permission. The iam:TagResource permission does not allow you to tag and untag links and sinks.

Parameter Syntax

$result = $client->untagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'TagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The ARN of the resource that you're removing tags from.

The ARN format of a sink is arn:aws:oam:Region:account-id:sink/sink-id

The ARN format of a link is arn:aws:oam:Region:account-id:link/link-id

For more information about ARN format, see CloudWatch Logs resources and operations.

TagKeys
Required: Yes
Type: Array of strings

The list of tag keys to remove from the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

The value of a parameter in the request caused an error.

ResourceNotFoundException:

The request references a resource that does not exist.

$result = $client->updateLink([/* ... */]);
$promise = $client->updateLinkAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateLink([
    'Identifier' => '<string>', // REQUIRED
    'LinkConfiguration' => [
        'LogGroupConfiguration' => [
            'Filter' => '<string>', // REQUIRED
        ],
        'MetricConfiguration' => [
            'Filter' => '<string>', // REQUIRED
        ],
    ],
    'ResourceTypes' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
Identifier
Required: Yes
Type: string

The ARN of the link that you want to update.

LinkConfiguration
Type: LinkConfiguration structure

Use this structure to filter which metric namespaces and which log groups are to be shared from the source account to the monitoring account.

ResourceTypes
Required: Yes
Type: Array of strings

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.

Result Syntax

[
    'Arn' => '<string>',
    'Id' => '<string>',
    'Label' => '<string>',
    'LabelTemplate' => '<string>',
    'LinkConfiguration' => [
        'LogGroupConfiguration' => [
            'Filter' => '<string>',
        ],
        'MetricConfiguration' => [
            'Filter' => '<string>',
        ],
    ],
    'ResourceTypes' => ['<string>', ...],
    'SinkArn' => '<string>',
    'Tags' => ['<string>', ...],
]

Result Details

Members
Arn
Type: string

The ARN of the link that you have updated.

Id
Type: string

The random ID string that Amazon Web Services generated as part of the sink ARN.

Label
Type: string

The label assigned to this link, with the variables resolved to their actual values.

LabelTemplate
Type: string

The exact label template that was specified when the link was created, with the template variables not resolved.

LinkConfiguration
Type: LinkConfiguration structure

This structure includes filters that specify which metric namespaces and which log groups are shared from the source account to the monitoring account.

ResourceTypes
Type: Array of strings

The resource types now supported by this link.

SinkArn
Type: string

The ARN of the sink that is used for this link.

Tags
Type: Associative array of custom strings keys (String) to strings

The tags assigned to the link.

Errors

InternalServiceFault:

Unexpected error while processing the request. Retry the request.

MissingRequiredParameterException:

A required parameter is missing from the request.

InvalidParameterException:

A parameter is specified incorrectly.

ResourceNotFoundException:

The request references a resource that does not exist.

Shapes

ConflictException

Description

A resource was in an inconsistent state during an update or a deletion.

Members
Message
Type: string
amznErrorType
Type: string

The name of the exception.

InternalServiceFault

Description

Unexpected error while processing the request. Retry the request.

Members
Message
Type: string
amznErrorType
Type: string

The name of the exception.

InvalidParameterException

Description

A parameter is specified incorrectly.

Members
amznErrorType
Type: string

The name of the exception.

message
Type: string

LinkConfiguration

Description

Use this structure to optionally create filters that specify that only some metric namespaces or log groups are to be shared from the source account to the monitoring account.

Members
LogGroupConfiguration
Type: LogGroupConfiguration structure

Use this structure to filter which log groups are to send log events from the source account to the monitoring account.

MetricConfiguration
Type: MetricConfiguration structure

Use this structure to filter which metric namespaces are to be shared from the source account to the monitoring account.

ListAttachedLinksItem

Description

A structure that contains information about one link attached to this monitoring account sink.

Members
Label
Type: string

The label that was assigned to this link at creation, with the variables resolved to their actual values.

LinkArn
Type: string

The ARN of the link.

ResourceTypes
Type: Array of strings

The resource types supported by this link.

ListLinksItem

Description

A structure that contains information about one of this source account's links to a monitoring account.

Members
Arn
Type: string

The ARN of the link.

Id
Type: string

The random ID string that Amazon Web Services generated as part of the link ARN.

Label
Type: string

The label that was assigned to this link at creation, with the variables resolved to their actual values.

ResourceTypes
Type: Array of strings

The resource types supported by this link.

SinkArn
Type: string

The ARN of the sink that this link is attached to.

ListSinksItem

Description

A structure that contains information about one of this monitoring account's sinks.

Members
Arn
Type: string

The ARN of the sink.

Id
Type: string

The random ID string that Amazon Web Services generated as part of the sink ARN.

Name
Type: string

The name of the sink.

LogGroupConfiguration

Description

This structure contains the Filter parameter which you can use to specify which log groups are to share log events from this source account to the monitoring account.

Members
Filter
Required: Yes
Type: string

Use this field to specify which log groups are to share their log events with the monitoring account. Use the term LogGroupName and one or more of the following operands. Use single quotation marks (') around log group names. The matching of log group names is case sensitive. Each filter has a limit of five conditional operands. Conditional operands are AND and OR.

  • = and !=

  • AND

  • OR

  • LIKE and NOT LIKE. These can be used only as prefix searches. Include a % at the end of the string that you want to search for and include.

  • IN and NOT IN, using parentheses ( )

Examples:

  • LogGroupName IN ('This-Log-Group', 'Other-Log-Group') includes only the log groups with names This-Log-Group and Other-Log-Group.

  • LogGroupName NOT IN ('Private-Log-Group', 'Private-Log-Group-2') includes all log groups except the log groups with names Private-Log-Group and Private-Log-Group-2.

  • LogGroupName LIKE 'aws/lambda/%' OR LogGroupName LIKE 'AWSLogs%' includes all log groups that have names that start with aws/lambda/ or AWSLogs.

If you are updating a link that uses filters, you can specify * as the only value for the filter parameter to delete the filter and share all log groups with the monitoring account.

MetricConfiguration

Description

This structure contains the Filter parameter which you can use to specify which metric namespaces are to be shared from this source account to the monitoring account.

Members
Filter
Required: Yes
Type: string

Use this field to specify which metrics are to be shared with the monitoring account. Use the term Namespace and one or more of the following operands. Use single quotation marks (') around namespace names. The matching of namespace names is case sensitive. Each filter has a limit of five conditional operands. Conditional operands are AND and OR.

  • = and !=

  • AND

  • OR

  • LIKE and NOT LIKE. These can be used only as prefix searches. Include a % at the end of the string that you want to search for and include.

  • IN and NOT IN, using parentheses ( )

Examples:

  • Namespace NOT LIKE 'AWS/%' includes only namespaces that don't start with AWS/, such as custom namespaces.

  • Namespace IN ('AWS/EC2', 'AWS/ELB', 'AWS/S3') includes only the metrics in the EC2, Elastic Load Balancing, and Amazon S3 namespaces.

  • Namespace = 'AWS/EC2' OR Namespace NOT LIKE 'AWS/%' includes only the EC2 namespace and your custom namespaces.

If you are updating a link that uses filters, you can specify * as the only value for the filter parameter to delete the filter and share all metric namespaces with the monitoring account.

MissingRequiredParameterException

Description

A required parameter is missing from the request.

Members
amznErrorType
Type: string

The name of the exception.

message
Type: string

ResourceNotFoundException

Description

The request references a resource that does not exist.

Members
Message
Type: string
amznErrorType
Type: string

The name of the exception.

ServiceQuotaExceededException

Description

The request would cause a service quota to be exceeded.

Members
Message
Type: string
amznErrorType
Type: string

The name of the exception.

TooManyTagsException

Description

A resource can have no more than 50 tags.

Members
Message
Type: string

ValidationException

Description

The value of a parameter in the request caused an error.

Members
Message
Type: string