Class CfnLink
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::Oam::Link
.
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") .tags(Map.of( "tagsKey", "tags")) .build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
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.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()
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
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.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
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 Construct scope, @NotNull String id, @NotNull CfnLinkProps props) Create a newAWS::Oam::Link
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
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
An array of key-value pairs to apply to the link.For more information, see Tag .
-
getResourceTypes
An array of strings that define which types of data that the source account shares with the monitoring account.Valid values are
AWS::CloudWatch::Metric | AWS::Logs::LogGroup | AWS::XRay::Trace
. -
setResourceTypes
An array of strings that define which types of data that the source account shares with the monitoring account.Valid values are
AWS::CloudWatch::Metric | AWS::Logs::LogGroup | AWS::XRay::Trace
. -
getSinkIdentifier
The ARN of the sink in the monitoring account that you want to link to.You can use ListSinks to find the ARNs of sinks.
-
setSinkIdentifier
The ARN of the sink in the monitoring account that you want to link to.You can use ListSinks to find the ARNs of sinks.
-
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.You can include the following variables in your template:
$AccountName
is the name of the account$AccountEmail
is a globally-unique email address, which includes the email domain, such asmariagarcia@example.com
$AccountEmailNoDomain
is an email address without the domain name, such asmariagarcia
-
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.You can include the following variables in your template:
$AccountName
is the name of the account$AccountEmail
is a globally-unique email address, which includes the email domain, such asmariagarcia@example.com
$AccountEmailNoDomain
is an email address without the domain name, such asmariagarcia
-