Class: AWSCDK::RDS::ProxyTargetConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
rds/proxy_target_config.rb

Overview

The result of binding a ProxyTarget to a DatabaseProxy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(engine_family:, db_clusters: nil, db_instances: nil) ⇒ ProxyTargetConfig

Returns a new instance of ProxyTargetConfig.

Parameters:

  • engine_family (String)

    The engine family of the database instance or cluster this proxy connects with.

  • db_clusters (Array<AWSCDK::RDS::IDatabaseCluster>, nil) (defaults to: nil)

    The database clusters to which this proxy connects.

  • db_instances (Array<AWSCDK::RDS::IDatabaseInstance>, nil) (defaults to: nil)

    The database instances to which this proxy connects.



10
11
12
13
14
15
16
17
# File 'rds/proxy_target_config.rb', line 10

def initialize(engine_family:, db_clusters: nil, db_instances: nil)
  @engine_family = engine_family
  Jsii::Type.check_type(@engine_family, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "engineFamily")
  @db_clusters = db_clusters
  Jsii::Type.check_type(@db_clusters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19yZHMuSURhdGFiYXNlQ2x1c3RlciJ9LCJraW5kIjoiYXJyYXkifX0=")), "dbClusters") unless @db_clusters.nil?
  @db_instances = db_instances
  Jsii::Type.check_type(@db_instances, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19yZHMuSURhdGFiYXNlSW5zdGFuY2UifSwia2luZCI6ImFycmF5In19")), "dbInstances") unless @db_instances.nil?
end

Instance Attribute Details

#db_clustersArray<AWSCDK::RDS::IDatabaseCluster>? (readonly)

Note:

Default: - undefined if dbInstances is set.

The database clusters to which this proxy connects.

Either this or db_instances will be set and the other undefined.

Returns:



29
30
31
# File 'rds/proxy_target_config.rb', line 29

def db_clusters
  @db_clusters
end

#db_instancesArray<AWSCDK::RDS::IDatabaseInstance>? (readonly)

Note:

Default: - undefined if dbClusters is set.

The database instances to which this proxy connects.

Either this or db_clusters will be set and the other undefined.

Returns:



36
37
38
# File 'rds/proxy_target_config.rb', line 36

def db_instances
  @db_instances
end

#engine_familyString (readonly)

The engine family of the database instance or cluster this proxy connects with.

Returns:

  • (String)


22
23
24
# File 'rds/proxy_target_config.rb', line 22

def engine_family
  @engine_family
end

Class Method Details

.jsii_propertiesObject



38
39
40
41
42
43
44
# File 'rds/proxy_target_config.rb', line 38

def self.jsii_properties
  {
    :engine_family => "engineFamily",
    :db_clusters => "dbClusters",
    :db_instances => "dbInstances",
  }
end

Instance Method Details

#to_jsiiObject



46
47
48
49
50
51
52
53
54
# File 'rds/proxy_target_config.rb', line 46

def to_jsii
  result = {}
  result.merge!({
    "engineFamily" => @engine_family,
    "dbClusters" => @db_clusters,
    "dbInstances" => @db_instances,
  })
  result.compact
end