Package software.amazon.awscdk
Interface ArnComponents
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ArnComponents.Jsii$Proxy
@Generated(value="jsii-pacmak/1.102.0 (build e354887)",
date="2024-08-23T05:56:09.933Z")
@Stability(Stable)
public interface ArnComponents
extends software.amazon.jsii.JsiiSerializable
Example:
PublicHostedZone subZone = PublicHostedZone.Builder.create(this, "SubZone") .zoneName("sub.someexample.com") .build(); // import the delegation role by constructing the roleArn String delegationRoleArn = Stack.of(this).formatArn(ArnComponents.builder() .region("") // IAM is global in each partition .service("iam") .account("parent-account-id") .resource("role") .resourceName("MyDelegationRole") .build()); IRole delegationRole = Role.fromRoleArn(this, "DelegationRole", delegationRoleArn); // create the record // create the record CrossAccountZoneDelegationRecord.Builder.create(this, "delegate") .delegatedZone(subZone) .parentHostedZoneName("someexample.com") // or you can use parentHostedZoneId .delegationRole(delegationRole) .build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forArnComponents
static final class
An implementation forArnComponents
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArnComponents.Builder
builder()
default String
The ID of the AWS account that owns the resource, without the hyphens.default ArnFormat
The specific ARN format to use for this ARN value.default String
The partition that the resource is in.default String
The region the resource resides in.Resource type (e.g.default String
Resource name or path within the resource (i.e.The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipeline').Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getResource
Resource type (e.g. "table", "autoScalingGroup", "certificate"). For some resource types, e.g. S3 buckets, this field defines the bucket name. -
getService
The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipeline'). -
getAccount
The ID of the AWS account that owns the resource, without the hyphens.For example, 123456789012. Note that the ARNs for some resources don't require an account number, so this component might be omitted.
Default: The account the stack is deployed to.
-
getArnFormat
The specific ARN format to use for this ARN value.Default: - uses value of `sep` as the separator for formatting, `ArnFormat.SLASH_RESOURCE_NAME` if that property was also not provided
-
getPartition
The partition that the resource is in.For standard AWS regions, the partition is aws. If you have resources in other partitions, the partition is aws-partitionname. For example, the partition for resources in the China (Beijing) region is aws-cn.
Default: The AWS partition the stack is deployed to.
-
getRegion
The region the resource resides in.Note that the ARNs for some resources do not require a region, so this component might be omitted.
Default: The region the stack is deployed to.
-
getResourceName
Resource name or path within the resource (i.e. S3 bucket object key) or a wildcard such as"*"
. This is service-dependent. -
builder
- Returns:
- a
ArnComponents.Builder
ofArnComponents
-