aws-sdk-appsync 1.53.0 → 1.55.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -118,6 +118,16 @@ module Aws::AppSync
118
118
  def message
119
119
  @message || @data[:message]
120
120
  end
121
+
122
+ # @return [String]
123
+ def reason
124
+ @data[:reason]
125
+ end
126
+
127
+ # @return [String]
128
+ def detail
129
+ @data[:detail]
130
+ end
121
131
  end
122
132
 
123
133
  class ConcurrentModificationException < ServiceError
@@ -0,0 +1,170 @@
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::AppSync
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::AppSync::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::AppSync::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::AppSync::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 :associate_api
60
+ Aws::AppSync::Endpoints::AssociateApi.build(context)
61
+ when :create_api_cache
62
+ Aws::AppSync::Endpoints::CreateApiCache.build(context)
63
+ when :create_api_key
64
+ Aws::AppSync::Endpoints::CreateApiKey.build(context)
65
+ when :create_data_source
66
+ Aws::AppSync::Endpoints::CreateDataSource.build(context)
67
+ when :create_domain_name
68
+ Aws::AppSync::Endpoints::CreateDomainName.build(context)
69
+ when :create_function
70
+ Aws::AppSync::Endpoints::CreateFunction.build(context)
71
+ when :create_graphql_api
72
+ Aws::AppSync::Endpoints::CreateGraphqlApi.build(context)
73
+ when :create_resolver
74
+ Aws::AppSync::Endpoints::CreateResolver.build(context)
75
+ when :create_type
76
+ Aws::AppSync::Endpoints::CreateType.build(context)
77
+ when :delete_api_cache
78
+ Aws::AppSync::Endpoints::DeleteApiCache.build(context)
79
+ when :delete_api_key
80
+ Aws::AppSync::Endpoints::DeleteApiKey.build(context)
81
+ when :delete_data_source
82
+ Aws::AppSync::Endpoints::DeleteDataSource.build(context)
83
+ when :delete_domain_name
84
+ Aws::AppSync::Endpoints::DeleteDomainName.build(context)
85
+ when :delete_function
86
+ Aws::AppSync::Endpoints::DeleteFunction.build(context)
87
+ when :delete_graphql_api
88
+ Aws::AppSync::Endpoints::DeleteGraphqlApi.build(context)
89
+ when :delete_resolver
90
+ Aws::AppSync::Endpoints::DeleteResolver.build(context)
91
+ when :delete_type
92
+ Aws::AppSync::Endpoints::DeleteType.build(context)
93
+ when :disassociate_api
94
+ Aws::AppSync::Endpoints::DisassociateApi.build(context)
95
+ when :evaluate_code
96
+ Aws::AppSync::Endpoints::EvaluateCode.build(context)
97
+ when :evaluate_mapping_template
98
+ Aws::AppSync::Endpoints::EvaluateMappingTemplate.build(context)
99
+ when :flush_api_cache
100
+ Aws::AppSync::Endpoints::FlushApiCache.build(context)
101
+ when :get_api_association
102
+ Aws::AppSync::Endpoints::GetApiAssociation.build(context)
103
+ when :get_api_cache
104
+ Aws::AppSync::Endpoints::GetApiCache.build(context)
105
+ when :get_data_source
106
+ Aws::AppSync::Endpoints::GetDataSource.build(context)
107
+ when :get_domain_name
108
+ Aws::AppSync::Endpoints::GetDomainName.build(context)
109
+ when :get_function
110
+ Aws::AppSync::Endpoints::GetFunction.build(context)
111
+ when :get_graphql_api
112
+ Aws::AppSync::Endpoints::GetGraphqlApi.build(context)
113
+ when :get_introspection_schema
114
+ Aws::AppSync::Endpoints::GetIntrospectionSchema.build(context)
115
+ when :get_resolver
116
+ Aws::AppSync::Endpoints::GetResolver.build(context)
117
+ when :get_schema_creation_status
118
+ Aws::AppSync::Endpoints::GetSchemaCreationStatus.build(context)
119
+ when :get_type
120
+ Aws::AppSync::Endpoints::GetType.build(context)
121
+ when :list_api_keys
122
+ Aws::AppSync::Endpoints::ListApiKeys.build(context)
123
+ when :list_data_sources
124
+ Aws::AppSync::Endpoints::ListDataSources.build(context)
125
+ when :list_domain_names
126
+ Aws::AppSync::Endpoints::ListDomainNames.build(context)
127
+ when :list_functions
128
+ Aws::AppSync::Endpoints::ListFunctions.build(context)
129
+ when :list_graphql_apis
130
+ Aws::AppSync::Endpoints::ListGraphqlApis.build(context)
131
+ when :list_resolvers
132
+ Aws::AppSync::Endpoints::ListResolvers.build(context)
133
+ when :list_resolvers_by_function
134
+ Aws::AppSync::Endpoints::ListResolversByFunction.build(context)
135
+ when :list_tags_for_resource
136
+ Aws::AppSync::Endpoints::ListTagsForResource.build(context)
137
+ when :list_types
138
+ Aws::AppSync::Endpoints::ListTypes.build(context)
139
+ when :start_schema_creation
140
+ Aws::AppSync::Endpoints::StartSchemaCreation.build(context)
141
+ when :tag_resource
142
+ Aws::AppSync::Endpoints::TagResource.build(context)
143
+ when :untag_resource
144
+ Aws::AppSync::Endpoints::UntagResource.build(context)
145
+ when :update_api_cache
146
+ Aws::AppSync::Endpoints::UpdateApiCache.build(context)
147
+ when :update_api_key
148
+ Aws::AppSync::Endpoints::UpdateApiKey.build(context)
149
+ when :update_data_source
150
+ Aws::AppSync::Endpoints::UpdateDataSource.build(context)
151
+ when :update_domain_name
152
+ Aws::AppSync::Endpoints::UpdateDomainName.build(context)
153
+ when :update_function
154
+ Aws::AppSync::Endpoints::UpdateFunction.build(context)
155
+ when :update_graphql_api
156
+ Aws::AppSync::Endpoints::UpdateGraphqlApi.build(context)
157
+ when :update_resolver
158
+ Aws::AppSync::Endpoints::UpdateResolver.build(context)
159
+ when :update_type
160
+ Aws::AppSync::Endpoints::UpdateType.build(context)
161
+ end
162
+ end
163
+ end
164
+
165
+ def add_handlers(handlers, _config)
166
+ handlers.add(Handler, step: :build, priority: 75)
167
+ end
168
+ end
169
+ end
170
+ end