class CfnDBCluster (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Neptune.CfnDBCluster |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsneptune#CfnDBCluster |
![]() | software.amazon.awscdk.services.neptune.CfnDBCluster |
![]() | aws_cdk.aws_neptune.CfnDBCluster |
![]() | aws-cdk-lib » aws_neptune » CfnDBCluster |
Implements
IConstruct
, IDependable
, IInspectable
, ITaggable
The AWS::Neptune::DBCluster
resource creates an Amazon Neptune DB cluster. Neptune is a fully managed graph database.
Currently, you can create this resource only in AWS Regions in which Amazon Neptune is supported.
If no DeletionPolicy
is set for AWS::Neptune::DBCluster
resources, the default deletion behavior is that the entire volume will be deleted without a snapshot. To retain a backup of the volume, the DeletionPolicy
should be set to Snapshot
. For more information about how AWS CloudFormation deletes resources, see DeletionPolicy Attribute .
You can use AWS::Neptune::DBCluster.DeletionProtection
to help guard against unintended deletion of your DB cluster.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbcluster.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_neptune as neptune } from 'aws-cdk-lib';
const cfnDBCluster = new neptune.CfnDBCluster(this, 'MyCfnDBCluster', /* all optional props */ {
associatedRoles: [{
roleArn: 'roleArn',
// the properties below are optional
featureName: 'featureName',
}],
availabilityZones: ['availabilityZones'],
backupRetentionPeriod: 123,
copyTagsToSnapshot: false,
dbClusterIdentifier: 'dbClusterIdentifier',
dbClusterParameterGroupName: 'dbClusterParameterGroupName',
dbInstanceParameterGroupName: 'dbInstanceParameterGroupName',
dbPort: 123,
dbSubnetGroupName: 'dbSubnetGroupName',
deletionProtection: false,
enableCloudwatchLogsExports: ['enableCloudwatchLogsExports'],
engineVersion: 'engineVersion',
iamAuthEnabled: false,
kmsKeyId: 'kmsKeyId',
preferredBackupWindow: 'preferredBackupWindow',
preferredMaintenanceWindow: 'preferredMaintenanceWindow',
restoreToTime: 'restoreToTime',
restoreType: 'restoreType',
serverlessScalingConfiguration: {
maxCapacity: 123,
minCapacity: 123,
},
snapshotIdentifier: 'snapshotIdentifier',
sourceDbClusterIdentifier: 'sourceDbClusterIdentifier',
storageEncrypted: false,
tags: [{
key: 'key',
value: 'value',
}],
useLatestRestorableTime: false,
vpcSecurityGroupIds: ['vpcSecurityGroupIds'],
});
Initializer
new CfnDBCluster(scope: Construct, id: string, props?: CfnDBClusterProps)
Parameters
- scope
Construct
— Scope in which this resource is defined. - id
string
— Construct identifier for this resource (unique in its scope). - props
Cfn
— Resource properties.DBCluster Props
Construct Props
Name | Type | Description |
---|---|---|
associated | IResolvable | IResolvable | DBCluster [] | Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster. |
availability | string[] | Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in. |
backup | number | Specifies the number of days for which automatic DB snapshots are retained. |
copy | boolean | IResolvable | If set to true , tags are copied to any snapshot of the DB cluster that is created.. |
db | string | Contains a user-supplied DB cluster identifier. |
db | string | Provides the name of the DB cluster parameter group. |
db | string | The name of the DB parameter group to apply to all instances of the DB cluster. |
db | number | The port number on which the DB instances in the DB cluster accept connections. |
db | string | Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group. |
deletion | boolean | IResolvable | Indicates whether or not the DB cluster has deletion protection enabled. |
enable | string[] | Specifies a list of log types that are enabled for export to CloudWatch Logs. |
engine | string | Indicates the database engine version. |
iam | boolean | IResolvable | True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. |
kms | string | The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the database instances in the DB cluster, such as arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef . |
preferred | string | Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod . |
preferred | string | Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). |
restore | string | Creates a new DB cluster from a DB snapshot or DB cluster snapshot. |
restore | string | Creates a new DB cluster from a DB snapshot or DB cluster snapshot. |
serverless | IResolvable | Serverless | Contains the scaling configuration of an Neptune Serverless DB cluster. |
snapshot | string | Specifies the identifier for a DB cluster snapshot. Must match the identifier of an existing snapshot. |
source | string | Creates a new DB cluster from a DB snapshot or DB cluster snapshot. |
storage | boolean | IResolvable | Indicates whether the DB cluster is encrypted. |
tags? | Cfn [] | The tags assigned to this cluster. |
use | boolean | IResolvable | Creates a new DB cluster from a DB snapshot or DB cluster snapshot. |
vpc | string[] | Provides a list of VPC security groups that the DB cluster belongs to. |
associatedRoles?
Type:
IResolvable
|
IResolvable
|
DBCluster
[]
(optional)
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.
IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon services on your behalf.
availabilityZones?
Type:
string[]
(optional)
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
backupRetentionPeriod?
Type:
number
(optional, default: 1)
Specifies the number of days for which automatic DB snapshots are retained.
An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
copyTagsToSnapshot?
Type:
boolean |
IResolvable
(optional)
If set to true
, tags are copied to any snapshot of the DB cluster that is created..
dbClusterIdentifier?
Type:
string
(optional)
Contains a user-supplied DB cluster identifier.
This identifier is the unique key that identifies a DB cluster.
dbClusterParameterGroupName?
Type:
string
(optional)
Provides the name of the DB cluster parameter group.
An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.
dbInstanceParameterGroupName?
Type:
string
(optional)
The name of the DB parameter group to apply to all instances of the DB cluster.
Used only in case of a major engine version upgrade request
Note that when you apply a parameter group using DBInstanceParameterGroupName
, parameter changes are applied immediately, not during the next maintenance window.
Constraints - The DB parameter group must be in the same DB parameter group family as the target DB cluster version.
- The
DBInstanceParameterGroupName
parameter is only valid for major engine version upgrades.
dbPort?
Type:
number
(optional)
The port number on which the DB instances in the DB cluster accept connections.
If not specified, the default port used is 8182
.
The
Port
property will soon be deprecated. Please update existing templates to use the newDBPort
property that has the same functionality.
dbSubnetGroupName?
Type:
string
(optional)
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
deletionProtection?
Type:
boolean |
IResolvable
(optional)
Indicates whether or not the DB cluster has deletion protection enabled.
The database can't be deleted when deletion protection is enabled.
enableCloudwatchLogsExports?
Type:
string[]
(optional)
Specifies a list of log types that are enabled for export to CloudWatch Logs.
engineVersion?
Type:
string
(optional)
Indicates the database engine version.
iamAuthEnabled?
Type:
boolean |
IResolvable
(optional)
True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
kmsKeyId?
Type:
string
(optional)
The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the database instances in the DB cluster, such as arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
.
If you enable the StorageEncrypted
property but don't specify this property, the default KMS key is used. If you specify this property, you must set the StorageEncrypted
property to true
.
preferredBackupWindow?
Type:
string
(optional)
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod
.
An update may require some interruption.
preferredMaintenanceWindow?
Type:
string
(optional)
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
restoreToTime?
Type:
string
(optional)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
restoreType?
Type:
string
(optional, default: "full-copy")
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
serverlessScalingConfiguration?
Type:
IResolvable
|
Serverless
(optional)
Contains the scaling configuration of an Neptune Serverless DB cluster.
snapshotIdentifier?
Type:
string
(optional)
Specifies the identifier for a DB cluster snapshot. Must match the identifier of an existing snapshot.
After you restore a DB cluster using a SnapshotIdentifier
, you must specify the same SnapshotIdentifier
for any future updates to the DB cluster. When you specify this property for an update, the DB cluster is not restored from the snapshot again, and the data in the database is not changed.
However, if you don't specify the SnapshotIdentifier
, an empty DB cluster is created, and the original DB cluster is deleted. If you specify a property that is different from the previous snapshot restore property, the DB cluster is restored from the snapshot specified by the SnapshotIdentifier
, and the original DB cluster is deleted.
sourceDbClusterIdentifier?
Type:
string
(optional)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
storageEncrypted?
Type:
boolean |
IResolvable
(optional)
Indicates whether the DB cluster is encrypted.
If you specify the KmsKeyId
property, then you must enable encryption and set this property to true
.
If you enable the StorageEncrypted
property but don't specify the KmsKeyId
property, then the default KMS key is used. If you specify the KmsKeyId
property, then that KMS key is used to encrypt the database instances in the DB cluster.
If you specify the SourceDBClusterIdentifier
property, and don't specify this property or disable it, the value is inherited from the source DB cluster. If the source DB cluster is encrypted, the KmsKeyId
property from the source cluster is used.
If you specify the DBSnapshotIdentifier
and don't specify this property or disable it, the value is inherited from the snapshot and the specified KmsKeyId
property from the snapshot is used.
tags?
Type:
Cfn
[]
(optional)
The tags assigned to this cluster.
useLatestRestorableTime?
Type:
boolean |
IResolvable
(optional)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.
If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
vpcSecurityGroupIds?
Type:
string[]
(optional)
Provides a list of VPC security groups that the DB cluster belongs to.
Properties
Name | Type | Description |
---|---|---|
attr | string | The resource id for the DB cluster. |
attr | string | The connection endpoint for the DB cluster. |
attr | string | The port number on which the DB instances in the DB cluster accept connections. |
attr | string | The reader endpoint for the DB cluster. |
cfn | ICfn | Options for this resource, such as condition, update policy etc. |
cfn | { [string]: any } | |
cfn | string | AWS resource type. |
creation | string[] | |
logical | string | The logical ID for this CloudFormation stack element. |
node | Node | The tree node. |
ref | string | Return a string that will be resolved to a CloudFormation { Ref } for this element. |
stack | Stack | The stack in which this element is defined. |
tags | Tag | Tag Manager which manages the tags for this resource. |
associated | IResolvable | IResolvable | DBCluster [] | Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster. |
availability | string[] | Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in. |
backup | number | Specifies the number of days for which automatic DB snapshots are retained. |
copy | boolean | IResolvable | If set to true , tags are copied to any snapshot of the DB cluster that is created.. |
db | string | Contains a user-supplied DB cluster identifier. |
db | string | Provides the name of the DB cluster parameter group. |
db | string | The name of the DB parameter group to apply to all instances of the DB cluster. |
db | number | The port number on which the DB instances in the DB cluster accept connections. |
db | string | Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group. |
deletion | boolean | IResolvable | Indicates whether or not the DB cluster has deletion protection enabled. |
enable | string[] | Specifies a list of log types that are enabled for export to CloudWatch Logs. |
engine | string | Indicates the database engine version. |
iam | boolean | IResolvable | True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. |
kms | string | The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the database instances in the DB cluster, such as arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef . |
preferred | string | Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod . |
preferred | string | Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). |
restore | string | Creates a new DB cluster from a DB snapshot or DB cluster snapshot. |
restore | string | Creates a new DB cluster from a DB snapshot or DB cluster snapshot. |
serverless | IResolvable | Serverless | Contains the scaling configuration of an Neptune Serverless DB cluster. |
snapshot | string | Specifies the identifier for a DB cluster snapshot. |
source | string | Creates a new DB cluster from a DB snapshot or DB cluster snapshot. |
storage | boolean | IResolvable | Indicates whether the DB cluster is encrypted. |
tags | Cfn [] | The tags assigned to this cluster. |
use | boolean | IResolvable | Creates a new DB cluster from a DB snapshot or DB cluster snapshot. |
vpc | string[] | Provides a list of VPC security groups that the DB cluster belongs to. |
static CFN_RESOURCE_TYPE_NAME | string | The CloudFormation resource type name for this resource class. |
attrClusterResourceId
Type:
string
The resource id for the DB cluster.
For example: cluster-ABCD1234EFGH5678IJKL90MNOP
. The cluster ID uniquely identifies the cluster and is used in things like IAM authentication policies.
attrEndpoint
Type:
string
The connection endpoint for the DB cluster.
For example: mystack-mydbcluster-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
attrPort
Type:
string
The port number on which the DB instances in the DB cluster accept connections.
attrReadEndpoint
Type:
string
The reader endpoint for the DB cluster.
For example: mystack-mydbcluster-ro-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
cfnOptions
Type:
ICfn
Options for this resource, such as condition, update policy etc.
cfnProperties
Type:
{ [string]: any }
cfnResourceType
Type:
string
AWS resource type.
creationStack
Type:
string[]
logicalId
Type:
string
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId)
.
node
Type:
Node
The tree node.
ref
Type:
string
Return a string that will be resolved to a CloudFormation { Ref }
for this element.
If, by any chance, the intrinsic reference of a resource is not a string, you could
coerce it to an IResolvable through Lazy.any({ produce: resource.ref })
.
stack
Type:
Stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
tags
Type:
Tag
Tag Manager which manages the tags for this resource.
associatedRoles?
Type:
IResolvable
|
IResolvable
|
DBCluster
[]
(optional)
Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster.
availabilityZones?
Type:
string[]
(optional)
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
backupRetentionPeriod?
Type:
number
(optional)
Specifies the number of days for which automatic DB snapshots are retained.
copyTagsToSnapshot?
Type:
boolean |
IResolvable
(optional)
If set to true
, tags are copied to any snapshot of the DB cluster that is created..
dbClusterIdentifier?
Type:
string
(optional)
Contains a user-supplied DB cluster identifier.
dbClusterParameterGroupName?
Type:
string
(optional)
Provides the name of the DB cluster parameter group.
dbInstanceParameterGroupName?
Type:
string
(optional)
The name of the DB parameter group to apply to all instances of the DB cluster.
dbPort?
Type:
number
(optional)
The port number on which the DB instances in the DB cluster accept connections.
dbSubnetGroupName?
Type:
string
(optional)
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
deletionProtection?
Type:
boolean |
IResolvable
(optional)
Indicates whether or not the DB cluster has deletion protection enabled.
enableCloudwatchLogsExports?
Type:
string[]
(optional)
Specifies a list of log types that are enabled for export to CloudWatch Logs.
engineVersion?
Type:
string
(optional)
Indicates the database engine version.
iamAuthEnabled?
Type:
boolean |
IResolvable
(optional)
True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
kmsKeyId?
Type:
string
(optional)
The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the database instances in the DB cluster, such as arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
.
preferredBackupWindow?
Type:
string
(optional)
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod
.
preferredMaintenanceWindow?
Type:
string
(optional)
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
restoreToTime?
Type:
string
(optional)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
restoreType?
Type:
string
(optional)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
serverlessScalingConfiguration?
Type:
IResolvable
|
Serverless
(optional)
Contains the scaling configuration of an Neptune Serverless DB cluster.
snapshotIdentifier?
Type:
string
(optional)
Specifies the identifier for a DB cluster snapshot.
Must match the identifier of an existing snapshot.
sourceDbClusterIdentifier?
Type:
string
(optional)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
storageEncrypted?
Type:
boolean |
IResolvable
(optional)
Indicates whether the DB cluster is encrypted.
tagsRaw?
Type:
Cfn
[]
(optional)
The tags assigned to this cluster.
useLatestRestorableTime?
Type:
boolean |
IResolvable
(optional)
Creates a new DB cluster from a DB snapshot or DB cluster snapshot.
vpcSecurityGroupIds?
Type:
string[]
(optional)
Provides a list of VPC security groups that the DB cluster belongs to.
static CFN_RESOURCE_TYPE_NAME
Type:
string
The CloudFormation resource type name for this resource class.
Methods
Name | Description |
---|---|
add | Syntactic sugar for addOverride(path, undefined) . |
add | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. |
add | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. |
add | Add a value to the CloudFormation Resource Metadata. |
add | Adds an override to the synthesized CloudFormation resource. |
add | Adds an override that deletes the value of a property from the resource definition. |
add | Adds an override to a resource property. |
apply | Sets the deletion policy of the resource based on the removal policy specified. |
get | Returns a token for an runtime attribute of this resource. |
get | Retrieve a value value from the CloudFormation Resource Metadata. |
inspect(inspector) | Examines the CloudFormation resource and discloses attributes. |
obtain | Retrieves an array of resources this resource depends on. |
obtain | Get a shallow copy of dependencies between this resource and other resources in the same stack. |
override | Overrides the auto-generated logical ID with a specific ID. |
remove | Indicates that this resource no longer depends on another resource. |
replace | Replaces one dependency with another. |
to | Returns a string representation of this construct. |
protected render |
addDeletionOverride(path)
public addDeletionOverride(path: string): void
Parameters
- path
string
— The path of the value to delete.
Syntactic sugar for addOverride(path, undefined)
.
addDependency(target)
public addDependency(target: CfnResource): void
Parameters
- target
Cfn
Resource
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
addDependsOn(target)
public addDependsOn(target: CfnResource): void
⚠️ Deprecated: use addDependency
Parameters
- target
Cfn
Resource
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
addMetadata(key, value)
public addMetadata(key: string, value: any): void
Parameters
- key
string
- value
any
Add a value to the CloudFormation Resource Metadata.
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.)
addOverride(path, value)
public addOverride(path: string, value: any): void
Parameters
- path
string
— - The path of the property, you can use dot notation to override values in complex types. - value
any
— - The value.
Adds an override to the synthesized CloudFormation resource.
To add a
property override, either use addPropertyOverride
or prefix path
with
"Properties." (i.e. Properties.TopicName
).
If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal .
in the property name, prefix with a \
. In most
programming languages you will need to write this as "\\."
because the
\
itself will need to be escaped.
For example,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"Properties": {
"GlobalSecondaryIndexes": [
{
"Projection": {
"NonKeyAttributes": [ "myattribute" ]
...
}
...
},
{
"ProjectionType": "INCLUDE"
...
},
]
...
}
The value
argument to addOverride
will not be processed or translated
in any way. Pass raw JSON values in here with the correct capitalization
for CloudFormation. If you pass CDK classes or structs, they will be
rendered with lowercased key names, and CloudFormation will reject the
template.
addPropertyDeletionOverride(propertyPath)
public addPropertyDeletionOverride(propertyPath: string): void
Parameters
- propertyPath
string
— The path to the property.
Adds an override that deletes the value of a property from the resource definition.
addPropertyOverride(propertyPath, value)
public addPropertyOverride(propertyPath: string, value: any): void
Parameters
- propertyPath
string
— The path of the property. - value
any
— The value.
Adds an override to a resource property.
Syntactic sugar for addOverride("Properties.<...>", value)
.
applyRemovalPolicy(policy?, options?)
public applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void
Parameters
- policy
Removal
Policy - options
Removal
Policy Options
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
). In some
cases, a snapshot can be taken of the resource prior to deletion
(RemovalPolicy.SNAPSHOT
). A list of resources that support this policy
can be found in the following link:
getAtt(attributeName, typeHint?)
public getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference
Parameters
- attributeName
string
— The name of the attribute. - typeHint
Resolution
Type Hint
Returns
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g. resource.arn
), but this can be used for future compatibility
in case there is no generated attribute.
getMetadata(key)
public getMetadata(key: string): any
Parameters
- key
string
Returns
any
Retrieve a value value from the CloudFormation Resource Metadata.
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.)
inspect(inspector)
public inspect(inspector: TreeInspector): void
Parameters
- inspector
Tree
— tree inspector to collect and process attributes.Inspector
Examines the CloudFormation resource and discloses attributes.
obtainDependencies()
public obtainDependencies(): Stack | CfnResource[]
Returns
Stack
|
Cfn
Resource []
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
obtainResourceDependencies()
public obtainResourceDependencies(): CfnResource[]
Returns
Get a shallow copy of dependencies between this resource and other resources in the same stack.
overrideLogicalId(newLogicalId)
public overrideLogicalId(newLogicalId: string): void
Parameters
- newLogicalId
string
— The new logical ID to use for this stack element.
Overrides the auto-generated logical ID with a specific ID.
removeDependency(target)
public removeDependency(target: CfnResource): void
Parameters
- target
Cfn
Resource
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
replaceDependency(target, newTarget)
public replaceDependency(target: CfnResource, newTarget: CfnResource): void
Parameters
- target
Cfn
— The dependency to replace.Resource - newTarget
Cfn
— The new dependency to add.Resource
Replaces one dependency with another.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
protected renderProperties(props)
protected renderProperties(props: { [string]: any }): { [string]: any }
Parameters
- props
{ [string]: any }
Returns
{ [string]: any }