Interface ArnComponents
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ArnComponents.Jsii$Proxy
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
Modifier 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.default String
getSep()
Deprecated.use arnFormat insteadThe service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipline').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', 'codepipline'). -
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. -
getSep
Deprecated.use arnFormat instead(deprecated) Separator between resource type and the resource.Can be either '/', ':' or an empty string. Will only be used if resourceName is defined.
Default: '/'
-
builder
- Returns:
- a
ArnComponents.Builder
ofArnComponents
-