Module: AWSCDK::DocDB::IDatabaseCluster
- Includes:
- EC2::IConnectable, IResource, Interfaces::AWSDocdb::IDBClusterRef, SecretsManager::ISecretAttachmentTarget
- Included in:
- DatabaseCluster
- Defined in:
- doc_db/i_database_cluster.rb
Overview
Create a clustered database with a given number of instances.
Class Method Summary collapse
Instance Method Summary collapse
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#as_secret_attachment_target ⇒ AWSCDK::SecretsManager::SecretAttachmentTargetProps
Renders the target specifications.
-
#cluster_endpoint ⇒ AWSCDK::DocDB::Endpoint
The endpoint to use for read/write operations.
-
#cluster_identifier ⇒ String
Identifier of the cluster.
-
#cluster_read_endpoint ⇒ AWSCDK::DocDB::Endpoint
Endpoint to use for load-balanced read-only operations.
-
#connections ⇒ AWSCDK::EC2::Connections
The network connections associated with this resource.
-
#db_cluster_ref ⇒ AWSCDK::Interfaces::AWSDocdb::DBClusterReference
A reference to a DBCluster resource.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#instance_endpoints ⇒ Array<AWSCDK::DocDB::Endpoint>
Endpoints which address each individual replica.
-
#instance_identifiers ⇒ Array<String>
Identifiers of the replicas.
-
#node ⇒ Constructs::Node
The tree node.
-
#security_group_id ⇒ String
The security group for this database cluster.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'doc_db/i_database_cluster.rb', line 134 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :connections => { kind: :property, name: "connections", is_optional: false }, :db_cluster_ref => { kind: :property, name: "dbClusterRef", is_optional: false }, :cluster_endpoint => { kind: :property, name: "clusterEndpoint", is_optional: false }, :cluster_identifier => { kind: :property, name: "clusterIdentifier", is_optional: false }, :cluster_read_endpoint => { kind: :property, name: "clusterReadEndpoint", is_optional: false }, :instance_endpoints => { kind: :property, name: "instanceEndpoints", is_optional: false }, :instance_identifiers => { kind: :property, name: "instanceIdentifiers", is_optional: false }, :security_group_id => { kind: :property, name: "securityGroupId", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :as_secret_attachment_target => { kind: :method, name: "asSecretAttachmentTarget", is_optional: false }, } end |
Instance Method Details
#apply_removal_policy(policy) ⇒ void
This method returns an undefined value.
Apply the given removal policy to this resource.
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).
122 123 124 125 |
# File 'doc_db/i_database_cluster.rb', line 122 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#as_secret_attachment_target ⇒ AWSCDK::SecretsManager::SecretAttachmentTargetProps
Renders the target specifications.
130 131 132 |
# File 'doc_db/i_database_cluster.rb', line 130 def () jsii_call_method("asSecretAttachmentTarget", []) end |
#cluster_endpoint ⇒ AWSCDK::DocDB::Endpoint
The endpoint to use for read/write operations.
57 58 59 |
# File 'doc_db/i_database_cluster.rb', line 57 def cluster_endpoint() jsii_get_property("clusterEndpoint") end |
#cluster_identifier ⇒ String
Identifier of the cluster.
64 65 66 |
# File 'doc_db/i_database_cluster.rb', line 64 def cluster_identifier() jsii_get_property("clusterIdentifier") end |
#cluster_read_endpoint ⇒ AWSCDK::DocDB::Endpoint
Endpoint to use for load-balanced read-only operations.
71 72 73 |
# File 'doc_db/i_database_cluster.rb', line 71 def cluster_read_endpoint() jsii_get_property("clusterReadEndpoint") end |
#connections ⇒ AWSCDK::EC2::Connections
The network connections associated with this resource.
43 44 45 |
# File 'doc_db/i_database_cluster.rb', line 43 def connections() jsii_get_property("connections") end |
#db_cluster_ref ⇒ AWSCDK::Interfaces::AWSDocdb::DBClusterReference
A reference to a DBCluster resource.
50 51 52 |
# File 'doc_db/i_database_cluster.rb', line 50 def db_cluster_ref() jsii_get_property("dbClusterRef") end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
29 30 31 |
# File 'doc_db/i_database_cluster.rb', line 29 def env() jsii_get_property("env") end |
#instance_endpoints ⇒ Array<AWSCDK::DocDB::Endpoint>
Endpoints which address each individual replica.
78 79 80 |
# File 'doc_db/i_database_cluster.rb', line 78 def instance_endpoints() jsii_get_property("instanceEndpoints") end |
#instance_identifiers ⇒ Array<String>
Identifiers of the replicas.
85 86 87 |
# File 'doc_db/i_database_cluster.rb', line 85 def instance_identifiers() jsii_get_property("instanceIdentifiers") end |
#node ⇒ Constructs::Node
The tree node.
14 15 16 |
# File 'doc_db/i_database_cluster.rb', line 14 def node() jsii_get_property("node") end |
#security_group_id ⇒ String
The security group for this database cluster.
92 93 94 |
# File 'doc_db/i_database_cluster.rb', line 92 def security_group_id() jsii_get_property("securityGroupId") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
36 37 38 |
# File 'doc_db/i_database_cluster.rb', line 36 def stack() jsii_get_property("stack") end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.
103 104 105 106 107 108 |
# File 'doc_db/i_database_cluster.rb', line 103 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |