Class CfnLink
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.oam.CfnLink
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-11T15:56:02.174Z")
@Stability(Stable)
public class CfnLink
extends CfnResource
implements IInspectable, ITaggable
Creates a link between a source account and a sink that you have created in a monitoring account.
Before you create a link, you must create a sink in the monitoring account. The sink must have a sink policy that permits the source account to link to it. You can grant permission to source accounts by granting permission to an entire organization, an organizational unit, 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.oam.*; CfnLink cfnLink = CfnLink.Builder.create(this, "MyCfnLink") .resourceTypes(List.of("resourceTypes")) .sinkIdentifier("sinkIdentifier") // the properties below are optional .labelTemplate("labelTemplate") .linkConfiguration(LinkConfigurationProperty.builder() .logGroupConfiguration(LinkFilterProperty.builder() .filter("filter") .build()) .metricConfiguration(LinkFilterProperty.builder() .filter("filter") .build()) .build()) .tags(Map.of( "tagsKey", "tags")) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnLink
.static interface
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.static interface
When used inMetricConfiguration
this field specifies which metric namespaces are to be shared with the monitoring account.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnLink
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnLink
(software.amazon.jsii.JsiiObjectRef objRef) CfnLink
(software.constructs.Construct scope, String id, CfnLinkProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe ARN of the link.The friendly human-readable name used to identify this source account when it is viewed from the monitoring account.Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.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.An array of strings that define which types of data that the source account shares with the monitoring account.The ARN of the sink in the monitoring account that you want to link to.getTags()
Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to the link.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setLabelTemplate
(String value) Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.void
setLinkConfiguration
(IResolvable value) 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.void
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.void
setResourceTypes
(List<String> value) An array of strings that define which types of data that the source account shares with the monitoring account.void
setSinkIdentifier
(String value) The ARN of the sink in the monitoring account that you want to link to.void
setTagsRaw
(Map<String, String> value) An array of key-value pairs to apply to the link.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnLink
protected CfnLink(software.amazon.jsii.JsiiObjectRef objRef) -
CfnLink
protected CfnLink(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnLink
@Stability(Stable) public CfnLink(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnLinkProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
The ARN of the link.For example,
arn:aws:oam:us-west-1:111111111111:link:abcd1234-a123-456a-a12b-a123b456c789
-
getAttrLabel
The friendly human-readable name used to identify this source account when it is viewed from the monitoring account.For example,
my-account1
. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getResourceTypes
An array of strings that define which types of data that the source account shares with the monitoring account. -
setResourceTypes
An array of strings that define which types of data that the source account shares with the monitoring account. -
getSinkIdentifier
The ARN of the sink in the monitoring account that you want to link to. -
setSinkIdentifier
The ARN of the sink in the monitoring account that you want to link to. -
getLabelTemplate
Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account. -
setLabelTemplate
Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account. -
getLinkConfiguration
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. -
setLinkConfiguration
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. -
setLinkConfiguration
@Stability(Stable) public void setLinkConfiguration(@Nullable CfnLink.LinkConfigurationProperty value) 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. -
getTagsRaw
An array of key-value pairs to apply to the link. -
setTagsRaw
An array of key-value pairs to apply to the link.
-