Class: AWSCDK::DocDB::CfnDBInstanceProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
doc_db/cfn_db_instance_props.rb

Overview

Properties for defining a CfnDBInstance.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(db_cluster_identifier:, db_instance_class:, auto_minor_version_upgrade: nil, availability_zone: nil, ca_certificate_identifier: nil, certificate_rotation_restart: nil, db_instance_identifier: nil, enable_performance_insights: nil, preferred_maintenance_window: nil, tags: nil) ⇒ CfnDBInstanceProps

Returns a new instance of CfnDBInstanceProps.

Parameters:

  • db_cluster_identifier (String)

    The identifier of the cluster that the instance will belong to.

  • db_instance_class (String)

    The compute and memory capacity of the instance;

  • auto_minor_version_upgrade (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    This parameter does not apply to Amazon DocumentDB.

  • availability_zone (String, nil) (defaults to: nil)

    The Amazon EC2 Availability Zone that the instance is created in.

  • ca_certificate_identifier (String, nil) (defaults to: nil)

    The identifier of the CA certificate for this DB instance.

  • certificate_rotation_restart (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.

  • db_instance_identifier (String, nil) (defaults to: nil)

    The instance identifier. This parameter is stored as a lowercase string.

  • enable_performance_insights (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    A value that indicates whether to enable Performance Insights for the DB Instance.

  • preferred_maintenance_window (String, nil) (defaults to: nil)

    The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The tags to be assigned to the instance.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'doc_db/cfn_db_instance_props.rb', line 19

def initialize(db_cluster_identifier:, db_instance_class:, auto_minor_version_upgrade: nil, availability_zone: nil, ca_certificate_identifier: nil, certificate_rotation_restart: nil, db_instance_identifier: nil, enable_performance_insights: nil, preferred_maintenance_window: nil, tags: nil)
  @db_cluster_identifier = db_cluster_identifier
  Jsii::Type.check_type(@db_cluster_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dbClusterIdentifier")
  @db_instance_class = db_instance_class
  Jsii::Type.check_type(@db_instance_class, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dbInstanceClass")
  @auto_minor_version_upgrade = auto_minor_version_upgrade
  Jsii::Type.check_type(@auto_minor_version_upgrade, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoMinorVersionUpgrade") unless @auto_minor_version_upgrade.nil?
  @availability_zone = availability_zone
  Jsii::Type.check_type(@availability_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZone") unless @availability_zone.nil?
  @ca_certificate_identifier = ca_certificate_identifier
  Jsii::Type.check_type(@ca_certificate_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "caCertificateIdentifier") unless @ca_certificate_identifier.nil?
  @certificate_rotation_restart = certificate_rotation_restart
  Jsii::Type.check_type(@certificate_rotation_restart, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "certificateRotationRestart") unless @certificate_rotation_restart.nil?
  @db_instance_identifier = db_instance_identifier
  Jsii::Type.check_type(@db_instance_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dbInstanceIdentifier") unless @db_instance_identifier.nil?
  @enable_performance_insights = enable_performance_insights
  Jsii::Type.check_type(@enable_performance_insights, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enablePerformanceInsights") unless @enable_performance_insights.nil?
  @preferred_maintenance_window = preferred_maintenance_window
  Jsii::Type.check_type(@preferred_maintenance_window, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "preferredMaintenanceWindow") unless @preferred_maintenance_window.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#auto_minor_version_upgradeBoolean, ... (readonly)

This parameter does not apply to Amazon DocumentDB.

Amazon DocumentDB does not perform minor version upgrades regardless of the value set.

Default: false



62
63
64
# File 'doc_db/cfn_db_instance_props.rb', line 62

def auto_minor_version_upgrade
  @auto_minor_version_upgrade
end

#availability_zoneString? (readonly)

The Amazon EC2 Availability Zone that the instance is created in.

Default: A random, system-chosen Availability Zone in the endpoint's AWS Region .

Example: us-east-1d



71
72
73
# File 'doc_db/cfn_db_instance_props.rb', line 71

def availability_zone
  @availability_zone
end

#ca_certificate_identifierString? (readonly)

The identifier of the CA certificate for this DB instance.



76
77
78
# File 'doc_db/cfn_db_instance_props.rb', line 76

def ca_certificate_identifier
  @ca_certificate_identifier
end

#certificate_rotation_restartBoolean, ... (readonly)

Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.

By default, the DB instance is restarted when you rotate your SSL/TLS certificate. The certificate is not updated until the DB instance is restarted.

Set this parameter only if you are not using SSL/TLS to connect to the DB instance.

If you are using SSL/TLS to connect to the DB instance, see Updating Your Amazon DocumentDB TLS Certificates and Encrypting Data in Transit in the Amazon DocumentDB Developer Guide .



87
88
89
# File 'doc_db/cfn_db_instance_props.rb', line 87

def certificate_rotation_restart
  @certificate_rotation_restart
end

#db_cluster_identifierString (readonly)

The identifier of the cluster that the instance will belong to.



46
47
48
# File 'doc_db/cfn_db_instance_props.rb', line 46

def db_cluster_identifier
  @db_cluster_identifier
end

#db_instance_classString (readonly)

The compute and memory capacity of the instance;

for example, db.m4.large . If you change the class of an instance there can be some interruption in the cluster's service.



53
54
55
# File 'doc_db/cfn_db_instance_props.rb', line 53

def db_instance_class
  @db_instance_class
end

#db_instance_identifierString? (readonly)

The instance identifier. This parameter is stored as a lowercase string.

Constraints:

  • Must contain from 1 to 63 letters, numbers, or hyphens.
  • The first character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.

Example: mydbinstance



100
101
102
# File 'doc_db/cfn_db_instance_props.rb', line 100

def db_instance_identifier
  @db_instance_identifier
end

#enable_performance_insightsBoolean, ... (readonly)

A value that indicates whether to enable Performance Insights for the DB Instance.

For more information, see Using Amazon Performance Insights .



107
108
109
# File 'doc_db/cfn_db_instance_props.rb', line 107

def enable_performance_insights
  @enable_performance_insights
end

#preferred_maintenance_windowString? (readonly)

The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).

Format: ddd:hh24:mi-ddd:hh24:mi

The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region , occurring on a random day of the week.

Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun

Constraints: Minimum 30-minute window.



120
121
122
# File 'doc_db/cfn_db_instance_props.rb', line 120

def preferred_maintenance_window
  @preferred_maintenance_window
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tags to be assigned to the instance.

You can assign up to 10 tags to an instance.



127
128
129
# File 'doc_db/cfn_db_instance_props.rb', line 127

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'doc_db/cfn_db_instance_props.rb', line 129

def self.jsii_properties
  {
    :db_cluster_identifier => "dbClusterIdentifier",
    :db_instance_class => "dbInstanceClass",
    :auto_minor_version_upgrade => "autoMinorVersionUpgrade",
    :availability_zone => "availabilityZone",
    :ca_certificate_identifier => "caCertificateIdentifier",
    :certificate_rotation_restart => "certificateRotationRestart",
    :db_instance_identifier => "dbInstanceIdentifier",
    :enable_performance_insights => "enablePerformanceInsights",
    :preferred_maintenance_window => "preferredMaintenanceWindow",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'doc_db/cfn_db_instance_props.rb', line 144

def to_jsii
  result = {}
  result.merge!({
    "dbClusterIdentifier" => @db_cluster_identifier,
    "dbInstanceClass" => @db_instance_class,
    "autoMinorVersionUpgrade" => @auto_minor_version_upgrade,
    "availabilityZone" => @availability_zone,
    "caCertificateIdentifier" => @ca_certificate_identifier,
    "certificateRotationRestart" => @certificate_rotation_restart,
    "dbInstanceIdentifier" => @db_instance_identifier,
    "enablePerformanceInsights" => @enable_performance_insights,
    "preferredMaintenanceWindow" => @preferred_maintenance_window,
    "tags" => @tags,
  })
  result.compact
end