ResourceProps

class aws_cdk.core.ResourceProps(*, account=None, environment_from_arn=None, physical_name=None, region=None)

Bases: object

Construction properties for {@link Resource}.

Parameters:
  • account (Optional[str]) – The AWS account ID this resource belongs to. Default: - the resource is in the same account as the stack it belongs to

  • environment_from_arn (Optional[str]) – ARN to deduce region and account from. The ARN is parsed and the account and region are taken from the ARN. This should be used for imported resources. Cannot be supplied together with either account or region. Default: - take environment from account, region parameters, or use Stack environment.

  • physical_name (Optional[str]) – The value passed in by users to the physical name prop of the resource. - undefined implies that a physical name will be allocated by CloudFormation during deployment. - a concrete value implies a specific physical name - PhysicalName.GENERATE_IF_NEEDED is a marker that indicates that a physical will only be generated by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation. Default: - The physical name will be allocated by CloudFormation at deployment time

  • region (Optional[str]) – The AWS region this resource belongs to. Default: - the resource is in the same region as the stack it belongs to

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.core as cdk

resource_props = cdk.ResourceProps(
    account="account",
    environment_from_arn="environmentFromArn",
    physical_name="physicalName",
    region="region"
)

Attributes

account

The AWS account ID this resource belongs to.

Default:
  • the resource is in the same account as the stack it belongs to

environment_from_arn

ARN to deduce region and account from.

The ARN is parsed and the account and region are taken from the ARN. This should be used for imported resources.

Cannot be supplied together with either account or region.

Default:
  • take environment from account, region parameters, or use Stack environment.

physical_name

The value passed in by users to the physical name prop of the resource.

  • undefined implies that a physical name will be allocated by CloudFormation during deployment.

  • a concrete value implies a specific physical name

  • PhysicalName.GENERATE_IF_NEEDED is a marker that indicates that a physical will only be generated by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation.

Default:
  • The physical name will be allocated by CloudFormation at deployment time

region

The AWS region this resource belongs to.

Default:
  • the resource is in the same region as the stack it belongs to