interface ResourceProps
Language | Type name |
---|---|
.NET | Amazon.CDK.ResourceProps |
Java | software.amazon.awscdk.core.ResourceProps |
Python | aws_cdk.core.ResourceProps |
TypeScript (source) | @aws-cdk/core » ResourceProps |
Construction properties for {@link Resource}.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from '@aws-cdk/core';
const resourceProps: cdk.ResourceProps = {
account: 'account',
environmentFromArn: 'environmentFromArn',
physicalName: 'physicalName',
region: 'region',
};
Properties
Name | Type | Description |
---|---|---|
account? | string | The AWS account ID this resource belongs to. |
environment | string | ARN to deduce region and account from. |
physical | string | The value passed in by users to the physical name prop of the resource. |
region? | string | The AWS region this resource belongs to. |
account?
Type:
string
(optional, default: the resource is in the same account as the stack it belongs to)
The AWS account ID this resource belongs to.
environmentFromArn?
Type:
string
(optional, default: take environment from account
, region
parameters, or use Stack environment.)
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
.
physicalName?
Type:
string
(optional, default: The physical name will be allocated by CloudFormation at deployment time)
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.
region?
Type:
string
(optional, default: the resource is in the same region as the stack it belongs to)
The AWS region this resource belongs to.