Class: AWSCDK::Neptune::CfnDBInstanceProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
neptune/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_instance_class:, allow_major_version_upgrade: nil, auto_minor_version_upgrade: nil, availability_zone: nil, db_cluster_identifier: nil, db_instance_identifier: nil, db_parameter_group_name: nil, db_snapshot_identifier: nil, db_subnet_group_name: nil, preferred_maintenance_window: nil, publicly_accessible: nil, tags: nil) ⇒ CfnDBInstanceProps

Returns a new instance of CfnDBInstanceProps.

Parameters:

  • db_instance_class (String)

    Contains the name of the compute and memory capacity class of the DB instance.

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

    Indicates that major version upgrades are allowed.

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

    Indicates that minor version patches are applied automatically.

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

    Specifies the name of the Availability Zone the DB instance is located in.

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

    If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.

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

    Contains a user-supplied database identifier.

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

    The name of an existing DB parameter group or a reference to an AWS::Neptune::DBParameterGroup resource created in the template.

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

    This parameter is not supported.

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

    A DB subnet group to associate with the DB instance.

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

    Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

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

    Indicates whether the DB instance is publicly accessible.

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

    An arbitrary set of tags (key-value pairs) for this DB instance.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'neptune/cfn_db_instance_props.rb', line 21

def initialize(db_instance_class:, allow_major_version_upgrade: nil, auto_minor_version_upgrade: nil, availability_zone: nil, db_cluster_identifier: nil, db_instance_identifier: nil, db_parameter_group_name: nil, db_snapshot_identifier: nil, db_subnet_group_name: nil, preferred_maintenance_window: nil, publicly_accessible: nil, tags: nil)
  @db_instance_class = db_instance_class
  Jsii::Type.check_type(@db_instance_class, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dbInstanceClass")
  @allow_major_version_upgrade = allow_major_version_upgrade
  Jsii::Type.check_type(@allow_major_version_upgrade, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "allowMajorVersionUpgrade") unless @allow_major_version_upgrade.nil?
  @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?
  @db_cluster_identifier = db_cluster_identifier
  Jsii::Type.check_type(@db_cluster_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dbClusterIdentifier") unless @db_cluster_identifier.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?
  @db_parameter_group_name = db_parameter_group_name
  Jsii::Type.check_type(@db_parameter_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dbParameterGroupName") unless @db_parameter_group_name.nil?
  @db_snapshot_identifier = db_snapshot_identifier
  Jsii::Type.check_type(@db_snapshot_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dbSnapshotIdentifier") unless @db_snapshot_identifier.nil?
  @db_subnet_group_name = db_subnet_group_name
  Jsii::Type.check_type(@db_subnet_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dbSubnetGroupName") unless @db_subnet_group_name.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?
  @publicly_accessible = publicly_accessible
  Jsii::Type.check_type(@publicly_accessible, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "publiclyAccessible") unless @publicly_accessible.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

#allow_major_version_upgradeBoolean, ... (readonly)

Indicates that major version upgrades are allowed.

Changing this parameter doesn't result in an outage and the change is asynchronously applied as soon as possible. This parameter must be set to true when specifying a value for the EngineVersion parameter that is a different major version than the DB instance's current version.

When you change this parameter for an existing DB cluster, CloudFormation will replace your existing DB cluster with a new, empty one that uses the engine version you specified.



63
64
65
# File 'neptune/cfn_db_instance_props.rb', line 63

def allow_major_version_upgrade
  @allow_major_version_upgrade
end

#auto_minor_version_upgradeBoolean, ... (readonly)

Indicates that minor version patches are applied automatically.

When updating this property, some interruptions may occur.



70
71
72
# File 'neptune/cfn_db_instance_props.rb', line 70

def auto_minor_version_upgrade
  @auto_minor_version_upgrade
end

#availability_zoneString? (readonly)

Specifies the name of the Availability Zone the DB instance is located in.



75
76
77
# File 'neptune/cfn_db_instance_props.rb', line 75

def availability_zone
  @availability_zone
end

#db_cluster_identifierString? (readonly)

If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.



80
81
82
# File 'neptune/cfn_db_instance_props.rb', line 80

def db_cluster_identifier
  @db_cluster_identifier
end

#db_instance_classString (readonly)

Contains the name of the compute and memory capacity class of the DB instance.

If you update this property, some interruptions may occur.



54
55
56
# File 'neptune/cfn_db_instance_props.rb', line 54

def db_instance_class
  @db_instance_class
end

#db_instance_identifierString? (readonly)

Contains a user-supplied database identifier.

This identifier is the unique key that identifies a DB instance.



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

def db_instance_identifier
  @db_instance_identifier
end

#db_parameter_group_nameString? (readonly)

The name of an existing DB parameter group or a reference to an AWS::Neptune::DBParameterGroup resource created in the template.

If any of the data members of the referenced parameter group are changed during an update, the DB instance might need to be restarted, which causes some interruption. If the parameter group contains static parameters, whether they were changed or not, an update triggers a reboot.



94
95
96
# File 'neptune/cfn_db_instance_props.rb', line 94

def db_parameter_group_name
  @db_parameter_group_name
end

#db_snapshot_identifierString? (readonly)

Deprecated.

this property has been deprecated

This parameter is not supported.

AWS::Neptune::DBInstance does not support restoring from snapshots.

AWS::Neptune::DBCluster does support restoring from snapshots.



104
105
106
# File 'neptune/cfn_db_instance_props.rb', line 104

def db_snapshot_identifier
  @db_snapshot_identifier
end

#db_subnet_group_nameString? (readonly)

A DB subnet group to associate with the DB instance.

If you update this value, the new subnet group must be a subnet group in a new virtual private cloud (VPC).



111
112
113
# File 'neptune/cfn_db_instance_props.rb', line 111

def db_subnet_group_name
  @db_subnet_group_name
end

#preferred_maintenance_windowString? (readonly)

Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).



116
117
118
# File 'neptune/cfn_db_instance_props.rb', line 116

def preferred_maintenance_window
  @preferred_maintenance_window
end

#publicly_accessibleBoolean, ... (readonly)

Indicates whether the DB instance is publicly accessible.

When the DB instance is publicly accessible and you connect from outside of the DB instance's virtual private cloud (VPC), its Domain Name System (DNS) endpoint resolves to the public IP address. When you connect from within the same VPC as the DB instance, the endpoint resolves to the private IP address. Access to the DB instance is ultimately controlled by the security group it uses. That public access isn't permitted if the security group assigned to the DB cluster doesn't permit it.

When the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.



125
126
127
# File 'neptune/cfn_db_instance_props.rb', line 125

def publicly_accessible
  @publicly_accessible
end

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

An arbitrary set of tags (key-value pairs) for this DB instance.



130
131
132
# File 'neptune/cfn_db_instance_props.rb', line 130

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :db_instance_class => "dbInstanceClass",
    :allow_major_version_upgrade => "allowMajorVersionUpgrade",
    :auto_minor_version_upgrade => "autoMinorVersionUpgrade",
    :availability_zone => "availabilityZone",
    :db_cluster_identifier => "dbClusterIdentifier",
    :db_instance_identifier => "dbInstanceIdentifier",
    :db_parameter_group_name => "dbParameterGroupName",
    :db_snapshot_identifier => "dbSnapshotIdentifier",
    :db_subnet_group_name => "dbSubnetGroupName",
    :preferred_maintenance_window => "preferredMaintenanceWindow",
    :publicly_accessible => "publiclyAccessible",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'neptune/cfn_db_instance_props.rb', line 149

def to_jsii
  result = {}
  result.merge!({
    "dbInstanceClass" => @db_instance_class,
    "allowMajorVersionUpgrade" => @allow_major_version_upgrade,
    "autoMinorVersionUpgrade" => @auto_minor_version_upgrade,
    "availabilityZone" => @availability_zone,
    "dbClusterIdentifier" => @db_cluster_identifier,
    "dbInstanceIdentifier" => @db_instance_identifier,
    "dbParameterGroupName" => @db_parameter_group_name,
    "dbSnapshotIdentifier" => @db_snapshot_identifier,
    "dbSubnetGroupName" => @db_subnet_group_name,
    "preferredMaintenanceWindow" => @preferred_maintenance_window,
    "publiclyAccessible" => @publicly_accessible,
    "tags" => @tags,
  })
  result.compact
end