interface ArnComponents
Language | Type name |
---|---|
![]() | Amazon.CDK.ArnComponents |
![]() | software.amazon.awscdk.core.ArnComponents |
![]() | aws_cdk.core.ArnComponents |
![]() | @aws-cdk/core » ArnComponents |
Obtainable from
Arn
.parse()
, Arn
.split()
, Stack
.parseArn()
, Stack
.splitArn()
Example
const subZone = new route53.PublicHostedZone(this, 'SubZone', {
zoneName: 'sub.someexample.com',
});
// import the delegation role by constructing the roleArn
const delegationRoleArn = Stack.of(this).formatArn({
region: '', // IAM is global in each partition
service: 'iam',
account: 'parent-account-id',
resource: 'role',
resourceName: 'MyDelegationRole',
});
const delegationRole = iam.Role.fromRoleArn(this, 'DelegationRole', delegationRoleArn);
// create the record
new route53.CrossAccountZoneDelegationRecord(this, 'delegate', {
delegatedZone: subZone,
parentHostedZoneName: 'someexample.com', // or you can use parentHostedZoneId
delegationRole,
});
Properties
Name | Type | Description |
---|---|---|
resource | string | Resource type (e.g. "table", "autoScalingGroup", "certificate"). For some resource types, e.g. S3 buckets, this field defines the bucket name. |
service | string | The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipline'). |
account? | string | The ID of the AWS account that owns the resource, without the hyphens. |
arn | Arn | The specific ARN format to use for this ARN value. |
partition? | string | The partition that the resource is in. |
region? | string | The region the resource resides in. |
resource | string | Resource name or path within the resource (i.e. S3 bucket object key) or a wildcard such as "*" . This is service-dependent. |
sep? | string | Separator between resource type and the resource. |
resource
Type:
string
Resource type (e.g. "table", "autoScalingGroup", "certificate"). For some resource types, e.g. S3 buckets, this field defines the bucket name.
service
Type:
string
The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipline').
account?
Type:
string
(optional, default: The account the stack is deployed to.)
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.
arnFormat?
Type:
Arn
(optional, default: uses value of sep
as the separator for formatting,
ArnFormat.SLASH_RESOURCE_NAME
if that property was also not provided)
The specific ARN format to use for this ARN value.
partition?
Type:
string
(optional, default: The AWS partition the stack is deployed to.)
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.
region?
Type:
string
(optional, default: The region the stack is deployed to.)
The region the resource resides in.
Note that the ARNs for some resources do not require a region, so this component might be omitted.
resourceName?
Type:
string
(optional)
Resource name or path within the resource (i.e. S3 bucket object key) or a wildcard such as "*"
. This is service-dependent.
sep?
⚠️ Deprecated: use arnFormat instead
Type:
string
(optional, default: '/')
Separator between resource type and the resource.
Can be either '/', ':' or an empty string. Will only be used if resourceName is defined.