ArnComponents

class aws_cdk.core.ArnComponents(*, resource, service, account=None, partition=None, region=None, resource_name=None, sep=None)

Bases: object

__init__(*, resource, service, account=None, partition=None, region=None, resource_name=None, sep=None)
Parameters
  • resource (str) – Resource type (e.g. “table”, “autoScalingGroup”, “certificate”). For some resource types, e.g. S3 buckets, this field defines the bucket name.

  • service (str) – The service namespace that identifies the AWS product (for example, ‘s3’, ‘iam’, ‘codepipline’).

  • account (Optional[str]) – 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.

  • partition (Optional[str]) – 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.

  • region (Optional[str]) – 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.

  • resource_name (Optional[str]) – Resource name or path within the resource (i.e. S3 bucket object key) or a wildcard such as "*". This is service-dependent.

  • sep (Optional[str]) – Separator between resource type and the resource. Can be either ‘/’, ‘:’ or an empty string. Will only be used if resourceName is defined. Default: ‘/’

Attributes

account

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 :default: The account the stack is deployed to.

Return type

Optional[str]

partition

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 :default: The AWS partition the stack is deployed to.

Return type

Optional[str]

region

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 :default: The region the stack is deployed to.

Return type

Optional[str]

resource

Resource type (e.g. “table”, “autoScalingGroup”, “certificate”). For some resource types, e.g. S3 buckets, this field defines the bucket name.

Return type

str

resource_name

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

Return type

Optional[str]

sep

Separator between resource type and the resource.

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

default :default: ‘/’

Return type

Optional[str]

service

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

Return type

str