aws-sdk-pinpointemail 1.35.0 → 1.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-pinpointemail/client.rb +20 -3
- data/lib/aws-sdk-pinpointemail/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-pinpointemail/endpoint_provider.rb +51 -0
- data/lib/aws-sdk-pinpointemail/endpoints.rb +603 -0
- data/lib/aws-sdk-pinpointemail/plugins/endpoints.rb +152 -0
- data/lib/aws-sdk-pinpointemail/types.rb +0 -704
- data/lib/aws-sdk-pinpointemail.rb +5 -1
- metadata +8 -4
@@ -0,0 +1,152 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::PinpointEmail
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::PinpointEmail::EndpointProvider',
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
|
+
'where `parameters` is a Struct similar to '\
|
20
|
+
'`Aws::PinpointEmail::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::PinpointEmail::EndpointProvider.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
class Handler < Seahorse::Client::Handler
|
27
|
+
def call(context)
|
28
|
+
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
|
+
unless context[:discovered_endpoint]
|
30
|
+
params = parameters_for_operation(context)
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
|
+
|
33
|
+
context.http_request.endpoint = endpoint.url
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
end
|
36
|
+
|
37
|
+
context[:endpoint_params] = params
|
38
|
+
context[:auth_scheme] =
|
39
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
|
+
|
41
|
+
@handler.call(context)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def apply_endpoint_headers(context, headers)
|
47
|
+
headers.each do |key, values|
|
48
|
+
value = values
|
49
|
+
.compact
|
50
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
51
|
+
.join(',')
|
52
|
+
|
53
|
+
context.http_request.headers[key] = value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def parameters_for_operation(context)
|
58
|
+
case context.operation_name
|
59
|
+
when :create_configuration_set
|
60
|
+
Aws::PinpointEmail::Endpoints::CreateConfigurationSet.build(context)
|
61
|
+
when :create_configuration_set_event_destination
|
62
|
+
Aws::PinpointEmail::Endpoints::CreateConfigurationSetEventDestination.build(context)
|
63
|
+
when :create_dedicated_ip_pool
|
64
|
+
Aws::PinpointEmail::Endpoints::CreateDedicatedIpPool.build(context)
|
65
|
+
when :create_deliverability_test_report
|
66
|
+
Aws::PinpointEmail::Endpoints::CreateDeliverabilityTestReport.build(context)
|
67
|
+
when :create_email_identity
|
68
|
+
Aws::PinpointEmail::Endpoints::CreateEmailIdentity.build(context)
|
69
|
+
when :delete_configuration_set
|
70
|
+
Aws::PinpointEmail::Endpoints::DeleteConfigurationSet.build(context)
|
71
|
+
when :delete_configuration_set_event_destination
|
72
|
+
Aws::PinpointEmail::Endpoints::DeleteConfigurationSetEventDestination.build(context)
|
73
|
+
when :delete_dedicated_ip_pool
|
74
|
+
Aws::PinpointEmail::Endpoints::DeleteDedicatedIpPool.build(context)
|
75
|
+
when :delete_email_identity
|
76
|
+
Aws::PinpointEmail::Endpoints::DeleteEmailIdentity.build(context)
|
77
|
+
when :get_account
|
78
|
+
Aws::PinpointEmail::Endpoints::GetAccount.build(context)
|
79
|
+
when :get_blacklist_reports
|
80
|
+
Aws::PinpointEmail::Endpoints::GetBlacklistReports.build(context)
|
81
|
+
when :get_configuration_set
|
82
|
+
Aws::PinpointEmail::Endpoints::GetConfigurationSet.build(context)
|
83
|
+
when :get_configuration_set_event_destinations
|
84
|
+
Aws::PinpointEmail::Endpoints::GetConfigurationSetEventDestinations.build(context)
|
85
|
+
when :get_dedicated_ip
|
86
|
+
Aws::PinpointEmail::Endpoints::GetDedicatedIp.build(context)
|
87
|
+
when :get_dedicated_ips
|
88
|
+
Aws::PinpointEmail::Endpoints::GetDedicatedIps.build(context)
|
89
|
+
when :get_deliverability_dashboard_options
|
90
|
+
Aws::PinpointEmail::Endpoints::GetDeliverabilityDashboardOptions.build(context)
|
91
|
+
when :get_deliverability_test_report
|
92
|
+
Aws::PinpointEmail::Endpoints::GetDeliverabilityTestReport.build(context)
|
93
|
+
when :get_domain_deliverability_campaign
|
94
|
+
Aws::PinpointEmail::Endpoints::GetDomainDeliverabilityCampaign.build(context)
|
95
|
+
when :get_domain_statistics_report
|
96
|
+
Aws::PinpointEmail::Endpoints::GetDomainStatisticsReport.build(context)
|
97
|
+
when :get_email_identity
|
98
|
+
Aws::PinpointEmail::Endpoints::GetEmailIdentity.build(context)
|
99
|
+
when :list_configuration_sets
|
100
|
+
Aws::PinpointEmail::Endpoints::ListConfigurationSets.build(context)
|
101
|
+
when :list_dedicated_ip_pools
|
102
|
+
Aws::PinpointEmail::Endpoints::ListDedicatedIpPools.build(context)
|
103
|
+
when :list_deliverability_test_reports
|
104
|
+
Aws::PinpointEmail::Endpoints::ListDeliverabilityTestReports.build(context)
|
105
|
+
when :list_domain_deliverability_campaigns
|
106
|
+
Aws::PinpointEmail::Endpoints::ListDomainDeliverabilityCampaigns.build(context)
|
107
|
+
when :list_email_identities
|
108
|
+
Aws::PinpointEmail::Endpoints::ListEmailIdentities.build(context)
|
109
|
+
when :list_tags_for_resource
|
110
|
+
Aws::PinpointEmail::Endpoints::ListTagsForResource.build(context)
|
111
|
+
when :put_account_dedicated_ip_warmup_attributes
|
112
|
+
Aws::PinpointEmail::Endpoints::PutAccountDedicatedIpWarmupAttributes.build(context)
|
113
|
+
when :put_account_sending_attributes
|
114
|
+
Aws::PinpointEmail::Endpoints::PutAccountSendingAttributes.build(context)
|
115
|
+
when :put_configuration_set_delivery_options
|
116
|
+
Aws::PinpointEmail::Endpoints::PutConfigurationSetDeliveryOptions.build(context)
|
117
|
+
when :put_configuration_set_reputation_options
|
118
|
+
Aws::PinpointEmail::Endpoints::PutConfigurationSetReputationOptions.build(context)
|
119
|
+
when :put_configuration_set_sending_options
|
120
|
+
Aws::PinpointEmail::Endpoints::PutConfigurationSetSendingOptions.build(context)
|
121
|
+
when :put_configuration_set_tracking_options
|
122
|
+
Aws::PinpointEmail::Endpoints::PutConfigurationSetTrackingOptions.build(context)
|
123
|
+
when :put_dedicated_ip_in_pool
|
124
|
+
Aws::PinpointEmail::Endpoints::PutDedicatedIpInPool.build(context)
|
125
|
+
when :put_dedicated_ip_warmup_attributes
|
126
|
+
Aws::PinpointEmail::Endpoints::PutDedicatedIpWarmupAttributes.build(context)
|
127
|
+
when :put_deliverability_dashboard_option
|
128
|
+
Aws::PinpointEmail::Endpoints::PutDeliverabilityDashboardOption.build(context)
|
129
|
+
when :put_email_identity_dkim_attributes
|
130
|
+
Aws::PinpointEmail::Endpoints::PutEmailIdentityDkimAttributes.build(context)
|
131
|
+
when :put_email_identity_feedback_attributes
|
132
|
+
Aws::PinpointEmail::Endpoints::PutEmailIdentityFeedbackAttributes.build(context)
|
133
|
+
when :put_email_identity_mail_from_attributes
|
134
|
+
Aws::PinpointEmail::Endpoints::PutEmailIdentityMailFromAttributes.build(context)
|
135
|
+
when :send_email
|
136
|
+
Aws::PinpointEmail::Endpoints::SendEmail.build(context)
|
137
|
+
when :tag_resource
|
138
|
+
Aws::PinpointEmail::Endpoints::TagResource.build(context)
|
139
|
+
when :untag_resource
|
140
|
+
Aws::PinpointEmail::Endpoints::UntagResource.build(context)
|
141
|
+
when :update_configuration_set_event_destination
|
142
|
+
Aws::PinpointEmail::Endpoints::UpdateConfigurationSetEventDestination.build(context)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
def add_handlers(handlers, _config)
|
148
|
+
handlers.add(Handler, step: :build, priority: 75)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|