Sha256: be5ec62050d18d2f8d3dab797ca18efd3c2363087b3d32230f03c547dd5e8116

Contents?: true

Size: 967 Bytes

Versions: 46

Compression:

Stored size: 967 Bytes

Contents

module Awspec::Type
  class RdsDbClusterParameterGroup < ResourceBase
    def resource_via_client
      return @resource_via_client if @resource_via_client

      parameters = {}
      res = rds_client.describe_db_cluster_parameters({
                                                        db_cluster_parameter_group_name: @display_name
                                                      })

      loop do
        res.parameters.each do |param|
          parameters[param.parameter_name] = param.parameter_value
        end
        (res.respond_to?(:next_page?) && res.next_page? && res = res.next_page) || break
      end

      @resource_via_client ||= parameters
    end

    def id
      @id ||= @display_name unless resource_via_client.empty?
    end

    def method_missing(name)
      param_name = name.to_s
      if resource_via_client.include?(param_name)
        resource_via_client[param_name].to_s
      else
        super
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
awspec-1.2.0 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-1.1.0 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-1.0.0 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-1.0.0.rc lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.88.2 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.88.1 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.88.0 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.87.1 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.87.0 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.86.0 lib/awspec/type/rds_db_cluster_parameter_group.rb
cmonson_2ndwatch_awspec-0.85.4 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.85.3 lib/awspec/type/rds_db_cluster_parameter_group.rb
cmonson_2ndwatch_awspec-0.85.3 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.85.2 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.85.1 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.85.0 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.84.1 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.84.0 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.83.0 lib/awspec/type/rds_db_cluster_parameter_group.rb
awspec-0.82.3 lib/awspec/type/rds_db_cluster_parameter_group.rb