Show / Hide Table of Contents

Class ArnComponents

Inheritance
System.Object
ArnComponents
Implements
IArnComponents
Namespace: Amazon.CDK
Assembly: Amazon.CDK.dll
Syntax (csharp)
public class ArnComponents : Object, IArnComponents
Syntax (vb)
Public Class ArnComponents
    Inherits Object
    Implements IArnComponents
Remarks

ExampleMetadata: infused

Examples
PublicHostedZone subZone = new PublicHostedZone(this, "SubZone", new PublicHostedZoneProps {
    ZoneName = "sub.someexample.com"
});

// import the delegation role by constructing the roleArn
string delegationRoleArn = Stack.Of(this).FormatArn(new ArnComponents {
    Region = "",  // IAM is global in each partition
    Service = "iam",
    Account = "parent-account-id",
    Resource = "role",
    ResourceName = "MyDelegationRole"
});
IRole 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

Constructors

ArnComponents()

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 "*". This is service-dependent.

Sep

(deprecated) Separator between resource type and the resource.

Service

The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipline').

Constructors

ArnComponents()

public ArnComponents()

Properties

Account

The ID of the AWS account that owns the resource, without the hyphens.

public string Account { get; set; }
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.

public Nullable<ArnFormat> ArnFormat { get; set; }
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.

public string Partition { get; set; }
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.

public string Region { get; set; }
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.

public string Resource { get; set; }
Property Value

System.String

ResourceName

Resource name or path within the resource (i.e. S3 bucket object key) or a wildcard such as &quot;*&quot;. This is service-dependent.

public string ResourceName { get; set; }
Property Value

System.String

Sep

(deprecated) Separator between resource type and the resource.

public string Sep { get; set; }
Property Value

System.String

Remarks

Can be either '/', ':' or an empty string. Will only be used if resourceName is defined.

Default: '/'

Stability: Deprecated

Service

The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipline').

public string Service { get; set; }
Property Value

System.String

Implements

IArnComponents
Back to top Generated by DocFX