Class: AWSCDK::RDS::CfnDBParameterGroupProps

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

Overview

Properties for defining a CfnDBParameterGroup.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description:, family:, db_parameter_group_name: nil, parameters: nil, tags: nil) ⇒ CfnDBParameterGroupProps

Returns a new instance of CfnDBParameterGroupProps.

Parameters:

  • description (String)

    Provides the customer-specified description for this DB parameter group.

  • family (String)

    The DB parameter group family name.

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

    The name of the DB parameter group.

  • parameters (Object, nil) (defaults to: nil)

    A mapping of parameter names and values for the parameter update.

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

    Tags to assign to the DB parameter group.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'rds/cfn_db_parameter_group_props.rb', line 14

def initialize(description:, family:, db_parameter_group_name: nil, parameters: nil, tags: nil)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description")
  @family = family
  Jsii::Type.check_type(@family, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "family")
  @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?
  @parameters = parameters
  Jsii::Type.check_type(@parameters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "parameters") unless @parameters.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

#db_parameter_group_nameString? (readonly)

The name of the DB parameter group.

Constraints:

  • Must be 1 to 255 letters, numbers, or hyphens.
  • First character must be a letter
  • Can't end with a hyphen or contain two consecutive hyphens

If you don't specify a value for DBParameterGroupName property, a name is automatically created for the DB parameter group.

This value is stored as a lowercase string.



80
81
82
# File 'rds/cfn_db_parameter_group_props.rb', line 80

def db_parameter_group_name
  @db_parameter_group_name
end

#descriptionString (readonly)

Provides the customer-specified description for this DB parameter group.



31
32
33
# File 'rds/cfn_db_parameter_group_props.rb', line 31

def description
  @description
end

#familyString (readonly)

The DB parameter group family name.

A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.

To list all of the available parameter group families for a DB engine, use the following command:

aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" --engine <engine>

For example, to list all of the available parameter group families for the MySQL DB engine, use the following command:

aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" --engine mysql

The output contains duplicates.

The following are the valid DB engine values:

  • aurora-mysql
  • aurora-postgresql
  • db2-ae
  • db2-se
  • mysql
  • oracle-ee
  • oracle-ee-cdb
  • oracle-se2
  • oracle-se2-cdb
  • postgres
  • sqlserver-ee
  • sqlserver-se
  • sqlserver-ex
  • sqlserver-web


65
66
67
# File 'rds/cfn_db_parameter_group_props.rb', line 65

def family
  @family
end

#parametersObject? (readonly)

A mapping of parameter names and values for the parameter update.

You must specify at least one parameter name and value.

For more information about parameter groups, see Working with parameter groups in the Amazon RDS User Guide , or Working with parameter groups in the Amazon Aurora User Guide .

AWS CloudFormation doesn't support specifying an apply method for each individual parameter. The default apply method for each parameter is used.



91
92
93
# File 'rds/cfn_db_parameter_group_props.rb', line 91

def parameters
  @parameters
end

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

Tags to assign to the DB parameter group.



96
97
98
# File 'rds/cfn_db_parameter_group_props.rb', line 96

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



98
99
100
101
102
103
104
105
106
# File 'rds/cfn_db_parameter_group_props.rb', line 98

def self.jsii_properties
  {
    :description => "description",
    :family => "family",
    :db_parameter_group_name => "dbParameterGroupName",
    :parameters => "parameters",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



108
109
110
111
112
113
114
115
116
117
118
# File 'rds/cfn_db_parameter_group_props.rb', line 108

def to_jsii
  result = {}
  result.merge!({
    "description" => @description,
    "family" => @family,
    "dbParameterGroupName" => @db_parameter_group_name,
    "parameters" => @parameters,
    "tags" => @tags,
  })
  result.compact
end