Class: Aws::OAM::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::OAM::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-oam/client.rb
Overview
An API client for OAM. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::OAM::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_link(params = {}) ⇒ Types::CreateLinkOutput
Creates a link between a source account and a sink that you have created in a monitoring account.
-
#create_sink(params = {}) ⇒ Types::CreateSinkOutput
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.
-
#delete_link(params = {}) ⇒ Struct
Deletes a link between a monitoring account sink and a source account.
-
#delete_sink(params = {}) ⇒ Struct
Deletes a sink.
-
#get_link(params = {}) ⇒ Types::GetLinkOutput
Returns complete information about one link.
-
#get_sink(params = {}) ⇒ Types::GetSinkOutput
Returns complete information about one monitoring account sink.
-
#get_sink_policy(params = {}) ⇒ Types::GetSinkPolicyOutput
Returns the current sink policy attached to this sink.
-
#list_attached_links(params = {}) ⇒ Types::ListAttachedLinksOutput
Returns a list of source account links that are linked to this monitoring account sink.
-
#list_links(params = {}) ⇒ Types::ListLinksOutput
Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.
-
#list_sinks(params = {}) ⇒ Types::ListSinksOutput
Use this operation in a monitoring account to return the list of sinks created in that account.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Displays the tags associated with a resource.
-
#put_sink_policy(params = {}) ⇒ Types::PutSinkPolicyOutput
Creates or updates the resource policy that grants permissions to source accounts to link to the monitoring account sink.
-
#tag_resource(params = {}) ⇒ Struct
Assigns one or more tags (key-value pairs) to the specified resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from the specified resource.
-
#update_link(params = {}) ⇒ Types::UpdateLinkOutput
Use this operation to change what types of data are shared from a source account to its linked monitoring account sink.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
446 447 448 |
# File 'lib/aws-sdk-oam/client.rb', line 446 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1292 1293 1294 |
# File 'lib/aws-sdk-oam/client.rb', line 1292 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1295 1296 1297 |
# File 'lib/aws-sdk-oam/client.rb', line 1295 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 |
# File 'lib/aws-sdk-oam/client.rb', line 1265 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::OAM') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-oam' context[:gem_version] = '1.24.0' Seahorse::Client::Request.new(handlers, context) end |
#create_link(params = {}) ⇒ Types::CreateLinkOutput
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.
[1]: docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html [2]: docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html
573 574 575 576 |
# File 'lib/aws-sdk-oam/client.rb', line 573 def create_link(params = {}, = {}) req = build_request(:create_link, params) req.send_request() end |
#create_sink(params = {}) ⇒ Types::CreateSinkOutput
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.
[1]: docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html
640 641 642 643 |
# File 'lib/aws-sdk-oam/client.rb', line 640 def create_sink(params = {}, = {}) req = build_request(:create_sink, params) req.send_request() end |
#delete_link(params = {}) ⇒ Struct
Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.
663 664 665 666 |
# File 'lib/aws-sdk-oam/client.rb', line 663 def delete_link(params = {}, = {}) req = build_request(:delete_link, params) req.send_request() end |
#delete_sink(params = {}) ⇒ Struct
Deletes a sink. You must delete all links to a sink before you can delete that sink.
686 687 688 689 |
# File 'lib/aws-sdk-oam/client.rb', line 686 def delete_sink(params = {}, = {}) req = build_request(:delete_sink, params) req.send_request() end |
#get_link(params = {}) ⇒ Types::GetLinkOutput
Returns complete information about one link.
To use this operation, provide the link ARN. To retrieve a list of link ARNs, use [ListLinks].
[1]: docs.aws.amazon.com/OAM/latest/APIReference/API_ListLinks.html
738 739 740 741 |
# File 'lib/aws-sdk-oam/client.rb', line 738 def get_link(params = {}, = {}) req = build_request(:get_link, params) req.send_request() end |
#get_sink(params = {}) ⇒ Types::GetSinkOutput
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].
[1]: docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html
780 781 782 783 |
# File 'lib/aws-sdk-oam/client.rb', line 780 def get_sink(params = {}, = {}) req = build_request(:get_sink, params) req.send_request() end |
#get_sink_policy(params = {}) ⇒ Types::GetSinkPolicyOutput
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.
814 815 816 817 |
# File 'lib/aws-sdk-oam/client.rb', line 814 def get_sink_policy(params = {}, = {}) req = build_request(:get_sink_policy, params) req.send_request() end |
#list_attached_links(params = {}) ⇒ Types::ListAttachedLinksOutput
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].
[1]: docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html [2]: docs.aws.amazon.com/OAM/latest/APIReference/API_ListLinks.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
870 871 872 873 |
# File 'lib/aws-sdk-oam/client.rb', line 870 def list_attached_links(params = {}, = {}) req = build_request(:list_attached_links, params) req.send_request() end |
#list_links(params = {}) ⇒ Types::ListLinksOutput
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][1
-
from within the monitoring account.
[1]: docs.aws.amazon.com/OAM/latest/APIReference/API_ListAttachedLinks.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
921 922 923 924 |
# File 'lib/aws-sdk-oam/client.rb', line 921 def list_links(params = {}, = {}) req = build_request(:list_links, params) req.send_request() end |
#list_sinks(params = {}) ⇒ Types::ListSinksOutput
Use this operation in a monitoring account to return the list of sinks created in that account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
962 963 964 965 |
# File 'lib/aws-sdk-oam/client.rb', line 962 def list_sinks(params = {}, = {}) req = build_request(:list_sinks, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Displays the tags associated with a resource. Both sinks and links support tagging.
1010 1011 1012 1013 |
# File 'lib/aws-sdk-oam/client.rb', line 1010 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#put_sink_policy(params = {}) ⇒ Types::PutSinkPolicyOutput
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.
1071 1072 1073 1074 |
# File 'lib/aws-sdk-oam/client.rb', line 1071 def put_sink_policy(params = {}, = {}) req = build_request(:put_sink_policy, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
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.
1133 1134 1135 1136 |
# File 'lib/aws-sdk-oam/client.rb', line 1133 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
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.
1177 1178 1179 1180 |
# File 'lib/aws-sdk-oam/client.rb', line 1177 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_link(params = {}) ⇒ Types::UpdateLinkOutput
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].
[1]: docs.aws.amazon.com/OAM/latest/APIReference/API_TagResource.html
1256 1257 1258 1259 |
# File 'lib/aws-sdk-oam/client.rb', line 1256 def update_link(params = {}, = {}) req = build_request(:update_link, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1285 1286 1287 |
# File 'lib/aws-sdk-oam/client.rb', line 1285 def waiter_names [] end |