You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::RDS::DBParameterGroup

Inherits:
Aws::Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Aws::Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Aws::Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Aws::Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(name, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(name, options = {}) ⇒ Object

    Parameters:

    • name (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :name (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#db_parameter_group_arnString (readonly)

The Amazon Resource Name (ARN) for the DB parameter group.

Returns:

  • (String)

    The Amazon Resource Name (ARN) for the DB parameter group.

#db_parameter_group_familyString (readonly)

The name of the DB parameter group family that this DB parameter group is compatible with.

Returns:

  • (String)

    The name of the DB parameter group family that this DB parameter group is compatible with.

#db_parameter_group_nameString (readonly)

The name of the DB parameter group.

Returns:

  • (String)

    The name of the DB parameter group.

#descriptionString (readonly)

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

Returns:

  • (String)

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

#nameString (readonly)

Returns:

  • (String)

Instance Method Details

#copy(options = {}) ⇒ DBParameterGroup

Examples:

Request syntax example with placeholder values


dbparametergroup.copy({
  target_db_parameter_group_identifier: "String", # required
  target_db_parameter_group_description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Basic usage

dbparametergroup = dbparametergroup.copy(options)
dbparametergroup.name
#=> "dbparametergroup-name"

Options Hash (options):

  • :target_db_parameter_group_identifier (required, String)

    The identifier for the copied DB parameter group.

    Constraints:

    • Can\'t be null, empty, or blank

    • Must contain from 1 to 255 letters, numbers, or hyphens

    • First character must be a letter

    • Can\'t end with a hyphen or contain two consecutive hyphens

    Example: my-db-parameter-group

  • :target_db_parameter_group_description (required, String)

    A description for the copied DB parameter group.

  • :tags (Array<Types::Tag>)

    A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

Returns:

See Also:

#create(options = {}) ⇒ DBParameterGroup

Examples:

Request syntax example with placeholder values


dbparametergroup.create({
  db_parameter_group_family: "String", # required
  description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Basic usage

dbparametergroup = dbparametergroup.create(options)
dbparametergroup.name
#=> "dbparametergroup-name"

Options Hash (options):

  • :db_parameter_group_family (required, String)

    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, use the following command:

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

    The output contains duplicates.

  • :description (required, String)

    The description for the DB parameter group.

  • :tags (Array<Types::Tag>)

    Tags to assign to the DB parameter group.

Returns:

See Also:

#deleteStruct

Deletes a specified DB parameter group. The DB parameter group to be deleted can't be associated with any DB instances.

Examples:

Request syntax example with placeholder values


dbparametergroup.delete()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#events(options = {}) ⇒ Collection<Event>

Returns a Collection of Event resources. No API requests are made until you call an enumerable method on the collection. Client#describe_events will be called multiple times until every Event has been yielded.

Examples:

Request syntax example with placeholder values


dbparametergroup.events({
  start_time: Time.now,
  end_time: Time.now,
  duration: 1,
  event_categories: ["String"],
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Enumerating Event resources.

dbparametergroup.events.each do |event|
  # yields each event
end

Enumerating Event resources with a limit.

dbparametergroup.events.limit(10).each do |event|
  # yields at most 10 events
end

Options Hash (options):

  • :start_time (Time)

    The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.

    Example: 2009-07-08T18:00Z

  • :end_time (Time)

    The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.

    Example: 2009-07-08T18:00Z

  • :duration (Integer)

    The number of minutes to retrieve events for.

    Default: 60

  • :event_categories (Array<String>)

    A list of event categories that trigger notifications for a event notification subscription.

  • :filters (Array<Types::Filter>)

    This parameter isn\'t currently supported.

  • :max_records (Integer)

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.

    Default: 100

    Constraints: Minimum 20, maximum 100.

  • :marker (String)

    An optional pagination token provided by a previous DescribeEvents request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Returns:

See Also:

#modify(options = {}) ⇒ DBParameterGroup

Examples:

Request syntax example with placeholder values


dbparametergroup.modify({
  parameters: [ # required
    {
      parameter_name: "String",
      parameter_value: "String",
      description: "String",
      source: "String",
      apply_type: "String",
      data_type: "String",
      allowed_values: "String",
      is_modifiable: false,
      minimum_engine_version: "String",
      apply_method: "immediate", # accepts immediate, pending-reboot
      supported_engine_modes: ["String"],
    },
  ],
})

Basic usage

dbparametergroup = dbparametergroup.modify(options)
dbparametergroup.name
#=> "dbparametergroup-name"

Options Hash (options):

  • :parameters (required, Array<Types::Parameter>)

    An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; later arguments are optional. A maximum of 20 parameters can be modified in a single request.

    Valid Values (for the application method): immediate | pending-reboot

    You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover.

Returns:

See Also:

#parameters(options = {}) ⇒ Collection<Parameter>

Returns a Collection of Parameter resources. No API requests are made until you call an enumerable method on the collection. Client#describe_db_parameters will be called multiple times until every Parameter has been yielded.

Examples:

Request syntax example with placeholder values


dbparametergroup.parameters({
  source: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Enumerating Parameter resources.

dbparametergroup.parameters.each do |parameter|
  # yields each parameter
end

Enumerating Parameter resources with a limit.

dbparametergroup.parameters.limit(10).each do |parameter|
  # yields at most 10 parameters
end

Options Hash (options):

  • :source (String)

    The parameter types to return.

    Default: All parameter types returned

    Valid Values: user | system | engine-default

  • :filters (Array<Types::Filter>)

    This parameter isn\'t currently supported.

  • :max_records (Integer)

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.

    Default: 100

    Constraints: Minimum 20, maximum 100.

  • :marker (String)

    An optional pagination token provided by a previous DescribeDBParameters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Returns:

See Also:

#reset(options = {}) ⇒ DBParameterGroup

Examples:

Request syntax example with placeholder values


dbparametergroup.reset({
  reset_all_parameters: false,
  parameters: [
    {
      parameter_name: "String",
      parameter_value: "String",
      description: "String",
      source: "String",
      apply_type: "String",
      data_type: "String",
      allowed_values: "String",
      is_modifiable: false,
      minimum_engine_version: "String",
      apply_method: "immediate", # accepts immediate, pending-reboot
      supported_engine_modes: ["String"],
    },
  ],
})

Basic usage

dbparametergroup = dbparametergroup.reset(options)
dbparametergroup.name
#=> "dbparametergroup-name"

Options Hash (options):

  • :reset_all_parameters (Boolean)

    A value that indicates whether to reset all parameters in the DB parameter group to default values. By default, all parameters in the DB parameter group are reset to default values.

  • :parameters (Array<Types::Parameter>)

    To reset the entire DB parameter group, specify the DBParameterGroup name and ResetAllParameters parameters. To reset specific parameters, provide a list of the following: ParameterName and ApplyMethod. A maximum of 20 parameters can be modified in a single request.

    MySQL

    Valid Values (for Apply method): immediate | pending-reboot

    You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when DB instance reboots.

    MariaDB

    Valid Values (for Apply method): immediate | pending-reboot

    You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when DB instance reboots.

    Oracle

    Valid Values (for Apply method): pending-reboot

Returns:

See Also:

#subscribe_to(options = {}) ⇒ EventSubscription

Examples:

Request syntax example with placeholder values


dbparametergroup.subscribe_to({
  subscription_name: "String", # required
})

Basic usage

eventsubscription = dbparametergroup.subscribe_to(options)
eventsubscription.name
#=> "eventsubscription-name"

Options Hash (options):

  • :subscription_name (required, String)

    The name of the RDS event notification subscription you want to add a source identifier to.

Returns:

See Also:

#unsubscribe_from(options = {}) ⇒ EventSubscription

Examples:

Request syntax example with placeholder values


dbparametergroup.unsubscribe_from({
  subscription_name: "String", # required
})

Basic usage

eventsubscription = dbparametergroup.unsubscribe_from(options)
eventsubscription.name
#=> "eventsubscription-name"

Options Hash (options):

  • :subscription_name (required, String)

    The name of the RDS event notification subscription you want to remove a source identifier from.

Returns:

See Also: