aws-sdk-partnercentralselling 1.0.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -100,7 +100,6 @@ module Aws::PartnerCentralSelling
100
100
  EngagementScore = Shapes::StringShape.new(name: 'EngagementScore')
101
101
  EngagementTitle = Shapes::StringShape.new(name: 'EngagementTitle')
102
102
  ExpectedCustomerSpend = Shapes::StructureShape.new(name: 'ExpectedCustomerSpend')
103
- ExpectedCustomerSpendAmountString = Shapes::StringShape.new(name: 'ExpectedCustomerSpendAmountString')
104
103
  ExpectedCustomerSpendCurrencyCodeEnum = Shapes::StringShape.new(name: 'ExpectedCustomerSpendCurrencyCodeEnum')
105
104
  ExpectedCustomerSpendList = Shapes::ListShape.new(name: 'ExpectedCustomerSpendList')
106
105
  ExpectedCustomerSpendTargetCompanyString = Shapes::StringShape.new(name: 'ExpectedCustomerSpendTargetCompanyString')
@@ -388,7 +387,7 @@ module Aws::PartnerCentralSelling
388
387
 
389
388
  EngagementInvitationsPayloadType.member = Shapes::ShapeRef.new(shape: EngagementInvitationPayloadType)
390
389
 
391
- ExpectedCustomerSpend.add_member(:amount, Shapes::ShapeRef.new(shape: ExpectedCustomerSpendAmountString, required: true, location_name: "Amount"))
390
+ ExpectedCustomerSpend.add_member(:amount, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Amount"))
392
391
  ExpectedCustomerSpend.add_member(:currency_code, Shapes::ShapeRef.new(shape: ExpectedCustomerSpendCurrencyCodeEnum, required: true, location_name: "CurrencyCode"))
393
392
  ExpectedCustomerSpend.add_member(:frequency, Shapes::ShapeRef.new(shape: PaymentFrequency, required: true, location_name: "Frequency"))
394
393
  ExpectedCustomerSpend.add_member(:target_company, Shapes::ShapeRef.new(shape: ExpectedCustomerSpendTargetCompanyString, required: true, location_name: "TargetCompany"))
@@ -10,16 +10,6 @@
10
10
  module Aws::PartnerCentralSelling
11
11
  # Endpoint parameters used to influence endpoints per request.
12
12
  #
13
- # @!attribute region
14
- # The AWS region used to dispatch the request.
15
- #
16
- # @return [String]
17
- #
18
- # @!attribute use_dual_stack
19
- # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
20
- #
21
- # @return [Boolean]
22
- #
23
13
  # @!attribute use_fips
24
14
  # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
25
15
  #
@@ -30,39 +20,39 @@ module Aws::PartnerCentralSelling
30
20
  #
31
21
  # @return [String]
32
22
  #
23
+ # @!attribute region
24
+ # The AWS region used to dispatch the request.
25
+ #
26
+ # @return [String]
27
+ #
33
28
  EndpointParameters = Struct.new(
34
- :region,
35
- :use_dual_stack,
36
29
  :use_fips,
37
30
  :endpoint,
31
+ :region,
38
32
  ) do
39
33
  include Aws::Structure
40
34
 
41
35
  # @api private
42
36
  class << self
43
37
  PARAM_MAP = {
44
- 'Region' => :region,
45
- 'UseDualStack' => :use_dual_stack,
46
38
  'UseFIPS' => :use_fips,
47
39
  'Endpoint' => :endpoint,
40
+ 'Region' => :region,
48
41
  }.freeze
49
42
  end
50
43
 
51
44
  def initialize(options = {})
52
- self[:region] = options[:region]
53
- self[:use_dual_stack] = options[:use_dual_stack]
54
- self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
45
  self[:use_fips] = options[:use_fips]
56
46
  self[:use_fips] = false if self[:use_fips].nil?
57
47
  self[:endpoint] = options[:endpoint]
48
+ self[:region] = options[:region]
58
49
  end
59
50
 
60
51
  def self.create(config, options={})
61
52
  new({
62
- region: config.region,
63
- use_dual_stack: config.use_dualstack_endpoint,
64
53
  use_fips: config.use_fips_endpoint,
65
54
  endpoint: (config.endpoint.to_s unless config.regional_endpoint),
55
+ region: config.region,
66
56
  }.merge(options))
67
57
  end
68
58
  end
@@ -10,40 +10,21 @@
10
10
  module Aws::PartnerCentralSelling
11
11
  class EndpointProvider
12
12
  def resolve_endpoint(parameters)
13
- region = parameters.region
14
- use_dual_stack = parameters.use_dual_stack
15
13
  use_fips = parameters.use_fips
16
14
  endpoint = parameters.endpoint
15
+ region = parameters.region
17
16
  if Aws::Endpoints::Matchers.set?(endpoint)
18
17
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
19
18
  raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
20
19
  end
21
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
22
- raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
- end
24
20
  return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
25
21
  end
26
22
  if Aws::Endpoints::Matchers.set?(region)
27
23
  if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
28
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
29
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
30
- return Aws::Endpoints::Endpoint.new(url: "https://partnercentral-selling-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
- end
32
- raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
- end
34
24
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
35
- if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
36
- return Aws::Endpoints::Endpoint.new(url: "https://partnercentral-selling-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
37
- end
38
- raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
39
- end
40
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
41
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
42
- return Aws::Endpoints::Endpoint.new(url: "https://partnercentral-selling.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
43
- end
44
- raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
25
+ return Aws::Endpoints::Endpoint.new(url: "https://partnercentral-selling-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
45
26
  end
46
- return Aws::Endpoints::Endpoint.new(url: "https://partnercentral-selling.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
27
+ return Aws::Endpoints::Endpoint.new(url: "https://partnercentral-selling.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
47
28
  end
48
29
  end
49
30
  raise ArgumentError, "Invalid Configuration: Missing Region"