Interface IArnComponents
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IArnComponents
Syntax (vb)
Public Interface IArnComponents
Remarks
ExampleMetadata: infused
Examples
var subZone = new PublicHostedZone(this, "SubZone", new PublicHostedZoneProps {
ZoneName = "sub.someexample.com"
});
// import the delegation role by constructing the roleArn
var delegationRoleArn = Stack.Of(this).FormatArn(new ArnComponents {
Region = "", // IAM is global in each partition
Service = "iam",
Account = "parent-account-id",
Resource = "role",
ResourceName = "MyDelegationRole"
});
var delegationRole = Role.FromRoleArn(this, "DelegationRole", delegationRoleArn);
// create the record
// create the record
new CrossAccountZoneDelegationRecord(this, "delegate", new CrossAccountZoneDelegationRecordProps {
DelegatedZone = subZone,
ParentHostedZoneName = "someexample.com", // or you can use parentHostedZoneId
DelegationRole = delegationRole
});
Synopsis
Properties
Account | The ID of the AWS account that owns the resource, without the hyphens. |
ArnFormat | The specific ARN format to use for this ARN value. |
Partition | The partition that the resource is in. |
Region | The region the resource resides in. |
Resource | Resource type (e.g. "table", "autoScalingGroup", "certificate"). For some resource types, e.g. S3 buckets, this field defines the bucket name. |
ResourceName | Resource name or path within the resource (i.e. S3 bucket object key) or a wildcard such as |
Service | The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipline'). |
Properties
Account
The ID of the AWS account that owns the resource, without the hyphens.
virtual string Account { get; }
Property Value
System.String
Remarks
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.
ArnFormat
The specific ARN format to use for this ARN value.
virtual Nullable<ArnFormat> ArnFormat { get; }
Property Value
System.Nullable<ArnFormat>
Remarks
Default: - uses value of sep
as the separator for formatting,
ArnFormat.SLASH_RESOURCE_NAME
if that property was also not provided
Partition
The partition that the resource is in.
virtual string Partition { get; }
Property Value
System.String
Remarks
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.
Region
The region the resource resides in.
virtual string Region { get; }
Property Value
System.String
Remarks
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.
Resource
Resource type (e.g. "table", "autoScalingGroup", "certificate"). For some resource types, e.g. S3 buckets, this field defines the bucket name.
string Resource { get; }
Property Value
System.String
ResourceName
Resource name or path within the resource (i.e. S3 bucket object key) or a wildcard such as "*"
. This is service-dependent.
virtual string ResourceName { get; }
Property Value
System.String
Service
The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipline').
string Service { get; }
Property Value
System.String