Class: Aws::PricingPlanManager::EndpointParameters

Inherits:
Struct
  • Object
show all
Includes:
Structure
Defined in:
lib/aws-sdk-pricingplanmanager/endpoint_parameters.rb

Overview

Endpoint parameters used to influence endpoints per request.

Constant Summary collapse

PARAM_MAP =
{
  'Endpoint' => :endpoint,
  'Region' => :region,
}.freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ EndpointParameters

Returns a new instance of EndpointParameters.



37
38
39
40
41
42
43
# File 'lib/aws-sdk-pricingplanmanager/endpoint_parameters.rb', line 37

def initialize(options = {})
  self[:endpoint] = options[:endpoint]
  self[:region] = options[:region]
  if self[:region].nil?
    raise ArgumentError, "Missing required EndpointParameter: :region"
  end
end

Instance Attribute Details

#endpointString

Override the endpoint URL

Returns:

  • (String)


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/aws-sdk-pricingplanmanager/endpoint_parameters.rb', line 23

EndpointParameters = Struct.new(
  :endpoint,
  :region,
) do
  include Aws::Structure

  # @api private
  class << self
    PARAM_MAP = {
      'Endpoint' => :endpoint,
      'Region' => :region,
    }.freeze
  end

  def initialize(options = {})
    self[:endpoint] = options[:endpoint]
    self[:region] = options[:region]
    if self[:region].nil?
      raise ArgumentError, "Missing required EndpointParameter: :region"
    end
  end

  def self.create(config, options={})
    new({
      endpoint: (config.endpoint.to_s unless config.regional_endpoint),
      region: config.region,
    }.merge(options))
  end
end

#regionString

The AWS region

Returns:

  • (String)


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/aws-sdk-pricingplanmanager/endpoint_parameters.rb', line 23

EndpointParameters = Struct.new(
  :endpoint,
  :region,
) do
  include Aws::Structure

  # @api private
  class << self
    PARAM_MAP = {
      'Endpoint' => :endpoint,
      'Region' => :region,
    }.freeze
  end

  def initialize(options = {})
    self[:endpoint] = options[:endpoint]
    self[:region] = options[:region]
    if self[:region].nil?
      raise ArgumentError, "Missing required EndpointParameter: :region"
    end
  end

  def self.create(config, options={})
    new({
      endpoint: (config.endpoint.to_s unless config.regional_endpoint),
      region: config.region,
    }.merge(options))
  end
end

Class Method Details

.create(config, options = {}) ⇒ Object



45
46
47
48
49
50
# File 'lib/aws-sdk-pricingplanmanager/endpoint_parameters.rb', line 45

def self.create(config, options={})
  new({
    endpoint: (config.endpoint.to_s unless config.regional_endpoint),
    region: config.region,
  }.merge(options))
end