Module: AWSCDK::RDS::IServerlessCluster

Includes:
EC2::IConnectable, IResource, Interfaces::AWSRDS::IDBClusterRef, SecretsManager::ISecretAttachmentTarget
Included in:
ServerlessCluster, ServerlessClusterFromSnapshot
Defined in:
rds/i_serverless_cluster.rb

Overview

Interface representing a serverless database cluster.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'rds/i_serverless_cluster.rb', line 131

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_arn => { kind: :property, name: "clusterArn", 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 },
    :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 },
    :grant_data_api_access => { kind: :method, name: "grantDataApiAccess", 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).

Parameters:



108
109
110
111
# File 'rds/i_serverless_cluster.rb', line 108

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_targetAWSCDK::SecretsManager::SecretAttachmentTargetProps

Renders the target specifications.



116
117
118
# File 'rds/i_serverless_cluster.rb', line 116

def as_secret_attachment_target()
  jsii_call_method("asSecretAttachmentTarget", [])
end

#cluster_arnString

The ARN of the cluster.

Returns:

  • (String)


57
58
59
# File 'rds/i_serverless_cluster.rb', line 57

def cluster_arn()
  jsii_get_property("clusterArn")
end

#cluster_endpointAWSCDK::RDS::Endpoint

The endpoint to use for read/write operations.



64
65
66
# File 'rds/i_serverless_cluster.rb', line 64

def cluster_endpoint()
  jsii_get_property("clusterEndpoint")
end

#cluster_identifierString

Identifier of the cluster.

Returns:

  • (String)


71
72
73
# File 'rds/i_serverless_cluster.rb', line 71

def cluster_identifier()
  jsii_get_property("clusterIdentifier")
end

#cluster_read_endpointAWSCDK::RDS::Endpoint

Endpoint to use for load-balanced read-only operations.



78
79
80
# File 'rds/i_serverless_cluster.rb', line 78

def cluster_read_endpoint()
  jsii_get_property("clusterReadEndpoint")
end

#connectionsAWSCDK::EC2::Connections

The network connections associated with this resource.



43
44
45
# File 'rds/i_serverless_cluster.rb', line 43

def connections()
  jsii_get_property("connections")
end

#db_cluster_refAWSCDK::Interfaces::AWSRDS::DBClusterReference

A reference to a DBCluster resource.



50
51
52
# File 'rds/i_serverless_cluster.rb', line 50

def db_cluster_ref()
  jsii_get_property("dbClusterRef")
end

#envAWSCDK::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 'rds/i_serverless_cluster.rb', line 29

def env()
  jsii_get_property("env")
end

#grant_data_api_access(grantee) ⇒ AWSCDK::IAM::Grant

Grant the given identity to access to the Data API.

[disable-awslint:no-grants]

Parameters:

Returns:



126
127
128
129
# File 'rds/i_serverless_cluster.rb', line 126

def grant_data_api_access(grantee)
  Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee")
  jsii_call_method("grantDataApiAccess", [grantee])
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


14
15
16
# File 'rds/i_serverless_cluster.rb', line 14

def node()
  jsii_get_property("node")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



36
37
38
# File 'rds/i_serverless_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.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



89
90
91
92
93
94
# File 'rds/i_serverless_cluster.rb', line 89

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