CfnDBCluster

class aws_cdk.aws_docdb.CfnDBCluster(scope, id, *, availability_zones=None, backup_retention_period=None, db_cluster_identifier=None, db_cluster_parameter_group_name=None, db_subnet_group_name=None, enable_cloudwatch_logs_exports=None, engine_version=None, kms_key_id=None, master_username=None, master_user_password=None, port=None, preferred_backup_window=None, preferred_maintenance_window=None, snapshot_identifier=None, storage_encrypted=None, tags=None, vpc_security_group_ids=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::DocDB::DBCluster.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html cloudformationResource: :cloudformationResource:: AWS::DocDB::DBCluster

__init__(scope, id, *, availability_zones=None, backup_retention_period=None, db_cluster_identifier=None, db_cluster_parameter_group_name=None, db_subnet_group_name=None, enable_cloudwatch_logs_exports=None, engine_version=None, kms_key_id=None, master_username=None, master_user_password=None, port=None, preferred_backup_window=None, preferred_maintenance_window=None, snapshot_identifier=None, storage_encrypted=None, tags=None, vpc_security_group_ids=None)

Create a new AWS::DocDB::DBCluster.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • props

    • resource properties.

  • availability_zones (Optional[List[str]]) – AWS::DocDB::DBCluster.AvailabilityZones.

  • backup_retention_period (Union[int, float, None]) – AWS::DocDB::DBCluster.BackupRetentionPeriod.

  • db_cluster_identifier (Optional[str]) – AWS::DocDB::DBCluster.DBClusterIdentifier.

  • db_cluster_parameter_group_name (Optional[str]) – AWS::DocDB::DBCluster.DBClusterParameterGroupName.

  • db_subnet_group_name (Optional[str]) – AWS::DocDB::DBCluster.DBSubnetGroupName.

  • enable_cloudwatch_logs_exports (Optional[List[str]]) – AWS::DocDB::DBCluster.EnableCloudwatchLogsExports.

  • engine_version (Optional[str]) – AWS::DocDB::DBCluster.EngineVersion.

  • kms_key_id (Optional[str]) – AWS::DocDB::DBCluster.KmsKeyId.

  • master_username (Optional[str]) – AWS::DocDB::DBCluster.MasterUsername.

  • master_user_password (Optional[str]) – AWS::DocDB::DBCluster.MasterUserPassword.

  • port (Union[int, float, None]) – AWS::DocDB::DBCluster.Port.

  • preferred_backup_window (Optional[str]) – AWS::DocDB::DBCluster.PreferredBackupWindow.

  • preferred_maintenance_window (Optional[str]) – AWS::DocDB::DBCluster.PreferredMaintenanceWindow.

  • snapshot_identifier (Optional[str]) – AWS::DocDB::DBCluster.SnapshotIdentifier.

  • storage_encrypted (Union[bool, None, IResolvable]) – AWS::DocDB::DBCluster.StorageEncrypted.

  • tags (Optional[List[CfnTag]]) – AWS::DocDB::DBCluster.Tags.

  • vpc_security_group_ids (Optional[List[str]]) – AWS::DocDB::DBCluster.VpcSecurityGroupIds.

Return type

None

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_depends_on(resource)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters

resource (CfnResource) –

Return type

None

add_override(path, 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).

Parameters
  • path (str) – The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) – The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

Parameters
  • policy (Optional[RemovalPolicy]) –

  • options

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: RemovalPolicy.Retain

Return type

None

get_att(attribute_name)

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.

Parameters

attribute_name (str) – The name of the attribute.

Return type

Reference

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

to_string()

Returns a string representation of this construct.

return :rtype: str :return: a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::DocDB::DBCluster'
attr_cluster_resource_id

cloudformationAttribute: :cloudformationAttribute:: ClusterResourceId

Return type

str

attr_endpoint

cloudformationAttribute: :cloudformationAttribute:: Endpoint

Return type

str

attr_port

cloudformationAttribute: :cloudformationAttribute:: Port

Return type

str

attr_read_endpoint

cloudformationAttribute: :cloudformationAttribute:: ReadEndpoint

Return type

str

availability_zones

AWS::DocDB::DBCluster.AvailabilityZones.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-availabilityzones

Return type

Optional[List[str]]

backup_retention_period

AWS::DocDB::DBCluster.BackupRetentionPeriod.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-backupretentionperiod

Return type

Union[int, float, None]

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

creation_stack

return :rtype: List[str] :return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

db_cluster_identifier

AWS::DocDB::DBCluster.DBClusterIdentifier.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-dbclusteridentifier

Return type

Optional[str]

db_cluster_parameter_group_name

AWS::DocDB::DBCluster.DBClusterParameterGroupName.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-dbclusterparametergroupname

Return type

Optional[str]

db_subnet_group_name

AWS::DocDB::DBCluster.DBSubnetGroupName.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-dbsubnetgroupname

Return type

Optional[str]

enable_cloudwatch_logs_exports

AWS::DocDB::DBCluster.EnableCloudwatchLogsExports.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-enablecloudwatchlogsexports

Return type

Optional[List[str]]

engine_version

AWS::DocDB::DBCluster.EngineVersion.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-engineversion

Return type

Optional[str]

kms_key_id

AWS::DocDB::DBCluster.KmsKeyId.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-kmskeyid

Return type

Optional[str]

logical_id

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).

return :rtype: str :return:

the logical ID as a stringified token. This value will only get resolved during synthesis.

master_user_password

AWS::DocDB::DBCluster.MasterUserPassword.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-masteruserpassword

Return type

Optional[str]

master_username

AWS::DocDB::DBCluster.MasterUsername.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-masterusername

Return type

Optional[str]

node

Construct tree node which offers APIs for interacting with the construct tree.

Return type

ConstructNode

port

AWS::DocDB::DBCluster.Port.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-port

Return type

Union[int, float, None]

preferred_backup_window

AWS::DocDB::DBCluster.PreferredBackupWindow.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-preferredbackupwindow

Return type

Optional[str]

preferred_maintenance_window

AWS::DocDB::DBCluster.PreferredMaintenanceWindow.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-preferredmaintenancewindow

Return type

Optional[str]

ref

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 }).

Return type

str

snapshot_identifier

AWS::DocDB::DBCluster.SnapshotIdentifier.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-snapshotidentifier

Return type

Optional[str]

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

storage_encrypted

AWS::DocDB::DBCluster.StorageEncrypted.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-storageencrypted

Return type

Union[bool, None, IResolvable]

tags

AWS::DocDB::DBCluster.Tags.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-tags

Return type

TagManager

vpc_security_group_ids

AWS::DocDB::DBCluster.VpcSecurityGroupIds.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-vpcsecuritygroupids

Return type

Optional[List[str]]

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

return :rtype: bool :return: The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool