aws-sdk-cognitosync 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 73ae5581e7a3608f344b943cbf5138044476eff4
4
+ data.tar.gz: 41f7452be7ebb6a4c5141ac413f9bfd2549eddb8
5
+ SHA512:
6
+ metadata.gz: 093d1e8a4320193620abb07b5619fced9eaaac17a0916b8d758e3b77c595a7a1bc0bdf8296a591a30fcf600714640b10dbad4305a95f3079846e7fc29386e66b
7
+ data.tar.gz: 4a33bb09d5b0b3617ff651d4f752f110074c6ece0a53f183a1e36936b2b4250460bcbdeaedc2ae64f3277ff919706c236fdd15f9f8a3d82554e80d03d9d93f95
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-cognitosync/types'
12
+ require_relative 'aws-sdk-cognitosync/client_api'
13
+ require_relative 'aws-sdk-cognitosync/client'
14
+ require_relative 'aws-sdk-cognitosync/errors'
15
+ require_relative 'aws-sdk-cognitosync/resource'
16
+ require_relative 'aws-sdk-cognitosync/customizations'
17
+
18
+ # This module provides support for Amazon Cognito Sync. This module is available in the
19
+ # `aws-sdk-cognitosync` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from Amazon Cognito Sync all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::CognitoSync::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::CognitoSync
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,868 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:cognitosync)
25
+
26
+ module Aws
27
+ module CognitoSync
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :cognitosync
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::SignatureV4)
50
+ add_plugin(Aws::Plugins::Protocols::RestJson)
51
+
52
+ # @option options [required, Aws::CredentialProvider] :credentials
53
+ # Your AWS credentials. This can be an instance of any one of the
54
+ # following classes:
55
+ #
56
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
+ # credentials.
58
+ #
59
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
+ # from an EC2 IMDS on an EC2 instance.
61
+ #
62
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
63
+ # shared file, such as `~/.aws/config`.
64
+ #
65
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
+ #
67
+ # When `:credentials` are not configured directly, the following
68
+ # locations will be searched for credentials:
69
+ #
70
+ # * `Aws.config[:credentials]`
71
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
+ # * `~/.aws/credentials`
74
+ # * `~/.aws/config`
75
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
76
+ # very aggressive. Construct and pass an instance of
77
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
78
+ # timeouts.
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ # @option options [String] :access_key_id
91
+ # @option options [Boolean] :convert_params (true)
92
+ # When `true`, an attempt is made to coerce request parameters into
93
+ # the required types.
94
+ # @option options [String] :endpoint
95
+ # The client endpoint is normally constructed from the `:region`
96
+ # option. You should only configure an `:endpoint` when connecting
97
+ # to test endpoints. This should be avalid HTTP(S) URI.
98
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
+ # The log formatter.
100
+ # @option options [Symbol] :log_level (:info)
101
+ # The log level to send messages to the `:logger` at.
102
+ # @option options [Logger] :logger
103
+ # The Logger instance to send log messages to. If this option
104
+ # is not set, logging will be disabled.
105
+ # @option options [String] :profile ("default")
106
+ # Used when loading credentials from the shared credentials file
107
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
108
+ # @option options [Integer] :retry_limit (3)
109
+ # The maximum number of times to retry failed requests. Only
110
+ # ~ 500 level server errors and certain ~ 400 level client errors
111
+ # are retried. Generally, these are throttling errors, data
112
+ # checksum errors, networking errors, timeout errors and auth
113
+ # errors from expired credentials.
114
+ # @option options [String] :secret_access_key
115
+ # @option options [String] :session_token
116
+ # @option options [Boolean] :stub_responses (false)
117
+ # Causes the client to return stubbed responses. By default
118
+ # fake responses are generated and returned. You can specify
119
+ # the response data to return or errors to raise by calling
120
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
121
+ #
122
+ # ** Please note ** When response stubbing is enabled, no HTTP
123
+ # requests are made, and retries are disabled.
124
+ # @option options [Boolean] :validate_params (true)
125
+ # When `true`, request parameters are validated before
126
+ # sending the request.
127
+ def initialize(*args)
128
+ super
129
+ end
130
+
131
+ # @!group API Operations
132
+
133
+ # Initiates a bulk publish of all existing datasets for an Identity Pool
134
+ # to the configured stream. Customers are limited to one successful bulk
135
+ # publish per 24 hours. Bulk publish is an asynchronous request,
136
+ # customers can see the status of the request via the
137
+ # GetBulkPublishDetails operation.
138
+ #
139
+ # This API can only be called with developer credentials. You cannot
140
+ # call this API with the temporary user credentials provided by Cognito
141
+ # Identity.
142
+ # @option params [required, String] :identity_pool_id
143
+ # A name-spaced GUID (for example,
144
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
145
+ # Cognito. GUID generation is unique within a region.
146
+ # @return [Types::BulkPublishResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
147
+ #
148
+ # * {Types::BulkPublishResponse#identity_pool_id #IdentityPoolId} => String
149
+ #
150
+ # @example Request syntax with placeholder values
151
+ # resp = client.bulk_publish({
152
+ # identity_pool_id: "IdentityPoolId", # required
153
+ # })
154
+ #
155
+ # @example Response structure
156
+ # resp.identity_pool_id #=> String
157
+ # @overload bulk_publish(params = {})
158
+ # @param [Hash] params ({})
159
+ def bulk_publish(params = {}, options = {})
160
+ req = build_request(:bulk_publish, params)
161
+ req.send_request(options)
162
+ end
163
+
164
+ # Deletes the specific dataset. The dataset will be deleted permanently,
165
+ # and the action can't be undone. Datasets that this dataset was merged
166
+ # with will no longer report the merge. Any subsequent operation on this
167
+ # dataset will result in a ResourceNotFoundException.
168
+ #
169
+ # This API can be called with temporary user credentials provided by
170
+ # Cognito Identity or with developer credentials.
171
+ # @option params [required, String] :identity_pool_id
172
+ # A name-spaced GUID (for example,
173
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
174
+ # Cognito. GUID generation is unique within a region.
175
+ # @option params [required, String] :identity_id
176
+ # A name-spaced GUID (for example,
177
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
178
+ # Cognito. GUID generation is unique within a region.
179
+ # @option params [required, String] :dataset_name
180
+ # A string of up to 128 characters. Allowed characters are a-z, A-Z,
181
+ # 0-9, '\_' (underscore), '-' (dash), and '.' (dot).
182
+ # @return [Types::DeleteDatasetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
183
+ #
184
+ # * {Types::DeleteDatasetResponse#dataset #Dataset} => Types::Dataset
185
+ #
186
+ # @example Request syntax with placeholder values
187
+ # resp = client.delete_dataset({
188
+ # identity_pool_id: "IdentityPoolId", # required
189
+ # identity_id: "IdentityId", # required
190
+ # dataset_name: "DatasetName", # required
191
+ # })
192
+ #
193
+ # @example Response structure
194
+ # resp.dataset.identity_id #=> String
195
+ # resp.dataset.dataset_name #=> String
196
+ # resp.dataset.creation_date #=> Time
197
+ # resp.dataset.last_modified_date #=> Time
198
+ # resp.dataset.last_modified_by #=> String
199
+ # resp.dataset.data_storage #=> Integer
200
+ # resp.dataset.num_records #=> Integer
201
+ # @overload delete_dataset(params = {})
202
+ # @param [Hash] params ({})
203
+ def delete_dataset(params = {}, options = {})
204
+ req = build_request(:delete_dataset, params)
205
+ req.send_request(options)
206
+ end
207
+
208
+ # Gets meta data about a dataset by identity and dataset name. With
209
+ # Amazon Cognito Sync, each identity has access only to its own data.
210
+ # Thus, the credentials used to make this API call need to have access
211
+ # to the identity data.
212
+ #
213
+ # This API can be called with temporary user credentials provided by
214
+ # Cognito Identity or with developer credentials. You should use Cognito
215
+ # Identity credentials to make this API call.
216
+ # @option params [required, String] :identity_pool_id
217
+ # A name-spaced GUID (for example,
218
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
219
+ # Cognito. GUID generation is unique within a region.
220
+ # @option params [required, String] :identity_id
221
+ # A name-spaced GUID (for example,
222
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
223
+ # Cognito. GUID generation is unique within a region.
224
+ # @option params [required, String] :dataset_name
225
+ # A string of up to 128 characters. Allowed characters are a-z, A-Z,
226
+ # 0-9, '\_' (underscore), '-' (dash), and '.' (dot).
227
+ # @return [Types::DescribeDatasetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
228
+ #
229
+ # * {Types::DescribeDatasetResponse#dataset #Dataset} => Types::Dataset
230
+ #
231
+ # @example Request syntax with placeholder values
232
+ # resp = client.describe_dataset({
233
+ # identity_pool_id: "IdentityPoolId", # required
234
+ # identity_id: "IdentityId", # required
235
+ # dataset_name: "DatasetName", # required
236
+ # })
237
+ #
238
+ # @example Response structure
239
+ # resp.dataset.identity_id #=> String
240
+ # resp.dataset.dataset_name #=> String
241
+ # resp.dataset.creation_date #=> Time
242
+ # resp.dataset.last_modified_date #=> Time
243
+ # resp.dataset.last_modified_by #=> String
244
+ # resp.dataset.data_storage #=> Integer
245
+ # resp.dataset.num_records #=> Integer
246
+ # @overload describe_dataset(params = {})
247
+ # @param [Hash] params ({})
248
+ def describe_dataset(params = {}, options = {})
249
+ req = build_request(:describe_dataset, params)
250
+ req.send_request(options)
251
+ end
252
+
253
+ # Gets usage details (for example, data storage) about a particular
254
+ # identity pool.
255
+ #
256
+ # This API can only be called with developer credentials. You cannot
257
+ # call this API with the temporary user credentials provided by Cognito
258
+ # Identity.
259
+ # @option params [required, String] :identity_pool_id
260
+ # A name-spaced GUID (for example,
261
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
262
+ # Cognito. GUID generation is unique within a region.
263
+ # @return [Types::DescribeIdentityPoolUsageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
264
+ #
265
+ # * {Types::DescribeIdentityPoolUsageResponse#identity_pool_usage #IdentityPoolUsage} => Types::IdentityPoolUsage
266
+ #
267
+ # @example Request syntax with placeholder values
268
+ # resp = client.describe_identity_pool_usage({
269
+ # identity_pool_id: "IdentityPoolId", # required
270
+ # })
271
+ #
272
+ # @example Response structure
273
+ # resp.identity_pool_usage.identity_pool_id #=> String
274
+ # resp.identity_pool_usage.sync_sessions_count #=> Integer
275
+ # resp.identity_pool_usage.data_storage #=> Integer
276
+ # resp.identity_pool_usage.last_modified_date #=> Time
277
+ # @overload describe_identity_pool_usage(params = {})
278
+ # @param [Hash] params ({})
279
+ def describe_identity_pool_usage(params = {}, options = {})
280
+ req = build_request(:describe_identity_pool_usage, params)
281
+ req.send_request(options)
282
+ end
283
+
284
+ # Gets usage information for an identity, including number of datasets
285
+ # and data usage.
286
+ #
287
+ # This API can be called with temporary user credentials provided by
288
+ # Cognito Identity or with developer credentials.
289
+ # @option params [required, String] :identity_pool_id
290
+ # A name-spaced GUID (for example,
291
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
292
+ # Cognito. GUID generation is unique within a region.
293
+ # @option params [required, String] :identity_id
294
+ # A name-spaced GUID (for example,
295
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
296
+ # Cognito. GUID generation is unique within a region.
297
+ # @return [Types::DescribeIdentityUsageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
298
+ #
299
+ # * {Types::DescribeIdentityUsageResponse#identity_usage #IdentityUsage} => Types::IdentityUsage
300
+ #
301
+ # @example Request syntax with placeholder values
302
+ # resp = client.describe_identity_usage({
303
+ # identity_pool_id: "IdentityPoolId", # required
304
+ # identity_id: "IdentityId", # required
305
+ # })
306
+ #
307
+ # @example Response structure
308
+ # resp.identity_usage.identity_id #=> String
309
+ # resp.identity_usage.identity_pool_id #=> String
310
+ # resp.identity_usage.last_modified_date #=> Time
311
+ # resp.identity_usage.dataset_count #=> Integer
312
+ # resp.identity_usage.data_storage #=> Integer
313
+ # @overload describe_identity_usage(params = {})
314
+ # @param [Hash] params ({})
315
+ def describe_identity_usage(params = {}, options = {})
316
+ req = build_request(:describe_identity_usage, params)
317
+ req.send_request(options)
318
+ end
319
+
320
+ # Get the status of the last BulkPublish operation for an identity pool.
321
+ #
322
+ # This API can only be called with developer credentials. You cannot
323
+ # call this API with the temporary user credentials provided by Cognito
324
+ # Identity.
325
+ # @option params [required, String] :identity_pool_id
326
+ # A name-spaced GUID (for example,
327
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
328
+ # Cognito. GUID generation is unique within a region.
329
+ # @return [Types::GetBulkPublishDetailsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
330
+ #
331
+ # * {Types::GetBulkPublishDetailsResponse#identity_pool_id #IdentityPoolId} => String
332
+ # * {Types::GetBulkPublishDetailsResponse#bulk_publish_start_time #BulkPublishStartTime} => Time
333
+ # * {Types::GetBulkPublishDetailsResponse#bulk_publish_complete_time #BulkPublishCompleteTime} => Time
334
+ # * {Types::GetBulkPublishDetailsResponse#bulk_publish_status #BulkPublishStatus} => String
335
+ # * {Types::GetBulkPublishDetailsResponse#failure_message #FailureMessage} => String
336
+ #
337
+ # @example Request syntax with placeholder values
338
+ # resp = client.get_bulk_publish_details({
339
+ # identity_pool_id: "IdentityPoolId", # required
340
+ # })
341
+ #
342
+ # @example Response structure
343
+ # resp.identity_pool_id #=> String
344
+ # resp.bulk_publish_start_time #=> Time
345
+ # resp.bulk_publish_complete_time #=> Time
346
+ # resp.bulk_publish_status #=> String, one of "NOT_STARTED", "IN_PROGRESS", "FAILED", "SUCCEEDED"
347
+ # resp.failure_message #=> String
348
+ # @overload get_bulk_publish_details(params = {})
349
+ # @param [Hash] params ({})
350
+ def get_bulk_publish_details(params = {}, options = {})
351
+ req = build_request(:get_bulk_publish_details, params)
352
+ req.send_request(options)
353
+ end
354
+
355
+ # Gets the events and the corresponding Lambda functions associated with
356
+ # an identity pool.
357
+ #
358
+ # This API can only be called with developer credentials. You cannot
359
+ # call this API with the temporary user credentials provided by Cognito
360
+ # Identity.
361
+ # @option params [required, String] :identity_pool_id
362
+ # The Cognito Identity Pool ID for the request
363
+ # @return [Types::GetCognitoEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
364
+ #
365
+ # * {Types::GetCognitoEventsResponse#events #Events} => Hash&lt;String,String&gt;
366
+ #
367
+ # @example Request syntax with placeholder values
368
+ # resp = client.get_cognito_events({
369
+ # identity_pool_id: "IdentityPoolId", # required
370
+ # })
371
+ #
372
+ # @example Response structure
373
+ # resp.events #=> Hash
374
+ # resp.events["CognitoEventType"] #=> String
375
+ # @overload get_cognito_events(params = {})
376
+ # @param [Hash] params ({})
377
+ def get_cognito_events(params = {}, options = {})
378
+ req = build_request(:get_cognito_events, params)
379
+ req.send_request(options)
380
+ end
381
+
382
+ # Gets the configuration settings of an identity pool.
383
+ #
384
+ # This API can only be called with developer credentials. You cannot
385
+ # call this API with the temporary user credentials provided by Cognito
386
+ # Identity.
387
+ # @option params [required, String] :identity_pool_id
388
+ # A name-spaced GUID (for example,
389
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
390
+ # Cognito. This is the ID of the pool for which to return a
391
+ # configuration.
392
+ # @return [Types::GetIdentityPoolConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
393
+ #
394
+ # * {Types::GetIdentityPoolConfigurationResponse#identity_pool_id #IdentityPoolId} => String
395
+ # * {Types::GetIdentityPoolConfigurationResponse#push_sync #PushSync} => Types::PushSync
396
+ # * {Types::GetIdentityPoolConfigurationResponse#cognito_streams #CognitoStreams} => Types::CognitoStreams
397
+ #
398
+ # @example Request syntax with placeholder values
399
+ # resp = client.get_identity_pool_configuration({
400
+ # identity_pool_id: "IdentityPoolId", # required
401
+ # })
402
+ #
403
+ # @example Response structure
404
+ # resp.identity_pool_id #=> String
405
+ # resp.push_sync.application_arns #=> Array
406
+ # resp.push_sync.application_arns[0] #=> String
407
+ # resp.push_sync.role_arn #=> String
408
+ # resp.cognito_streams.stream_name #=> String
409
+ # resp.cognito_streams.role_arn #=> String
410
+ # resp.cognito_streams.streaming_status #=> String, one of "ENABLED", "DISABLED"
411
+ # @overload get_identity_pool_configuration(params = {})
412
+ # @param [Hash] params ({})
413
+ def get_identity_pool_configuration(params = {}, options = {})
414
+ req = build_request(:get_identity_pool_configuration, params)
415
+ req.send_request(options)
416
+ end
417
+
418
+ # Lists datasets for an identity. With Amazon Cognito Sync, each
419
+ # identity has access only to its own data. Thus, the credentials used
420
+ # to make this API call need to have access to the identity data.
421
+ #
422
+ # ListDatasets can be called with temporary user credentials provided by
423
+ # Cognito Identity or with developer credentials. You should use the
424
+ # Cognito Identity credentials to make this API call.
425
+ # @option params [required, String] :identity_pool_id
426
+ # A name-spaced GUID (for example,
427
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
428
+ # Cognito. GUID generation is unique within a region.
429
+ # @option params [required, String] :identity_id
430
+ # A name-spaced GUID (for example,
431
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
432
+ # Cognito. GUID generation is unique within a region.
433
+ # @option params [String] :next_token
434
+ # A pagination token for obtaining the next page of results.
435
+ # @option params [Integer] :max_results
436
+ # The maximum number of results to be returned.
437
+ # @return [Types::ListDatasetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
438
+ #
439
+ # * {Types::ListDatasetsResponse#datasets #Datasets} => Array&lt;Types::Dataset&gt;
440
+ # * {Types::ListDatasetsResponse#count #Count} => Integer
441
+ # * {Types::ListDatasetsResponse#next_token #NextToken} => String
442
+ #
443
+ # @example Request syntax with placeholder values
444
+ # resp = client.list_datasets({
445
+ # identity_pool_id: "IdentityPoolId", # required
446
+ # identity_id: "IdentityId", # required
447
+ # next_token: "String",
448
+ # max_results: 1,
449
+ # })
450
+ #
451
+ # @example Response structure
452
+ # resp.datasets #=> Array
453
+ # resp.datasets[0].identity_id #=> String
454
+ # resp.datasets[0].dataset_name #=> String
455
+ # resp.datasets[0].creation_date #=> Time
456
+ # resp.datasets[0].last_modified_date #=> Time
457
+ # resp.datasets[0].last_modified_by #=> String
458
+ # resp.datasets[0].data_storage #=> Integer
459
+ # resp.datasets[0].num_records #=> Integer
460
+ # resp.count #=> Integer
461
+ # resp.next_token #=> String
462
+ # @overload list_datasets(params = {})
463
+ # @param [Hash] params ({})
464
+ def list_datasets(params = {}, options = {})
465
+ req = build_request(:list_datasets, params)
466
+ req.send_request(options)
467
+ end
468
+
469
+ # Gets a list of identity pools registered with Cognito.
470
+ #
471
+ # ListIdentityPoolUsage can only be called with developer credentials.
472
+ # You cannot make this API call with the temporary user credentials
473
+ # provided by Cognito Identity.
474
+ # @option params [String] :next_token
475
+ # A pagination token for obtaining the next page of results.
476
+ # @option params [Integer] :max_results
477
+ # The maximum number of results to be returned.
478
+ # @return [Types::ListIdentityPoolUsageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
479
+ #
480
+ # * {Types::ListIdentityPoolUsageResponse#identity_pool_usages #IdentityPoolUsages} => Array&lt;Types::IdentityPoolUsage&gt;
481
+ # * {Types::ListIdentityPoolUsageResponse#max_results #MaxResults} => Integer
482
+ # * {Types::ListIdentityPoolUsageResponse#count #Count} => Integer
483
+ # * {Types::ListIdentityPoolUsageResponse#next_token #NextToken} => String
484
+ #
485
+ # @example Request syntax with placeholder values
486
+ # resp = client.list_identity_pool_usage({
487
+ # next_token: "String",
488
+ # max_results: 1,
489
+ # })
490
+ #
491
+ # @example Response structure
492
+ # resp.identity_pool_usages #=> Array
493
+ # resp.identity_pool_usages[0].identity_pool_id #=> String
494
+ # resp.identity_pool_usages[0].sync_sessions_count #=> Integer
495
+ # resp.identity_pool_usages[0].data_storage #=> Integer
496
+ # resp.identity_pool_usages[0].last_modified_date #=> Time
497
+ # resp.max_results #=> Integer
498
+ # resp.count #=> Integer
499
+ # resp.next_token #=> String
500
+ # @overload list_identity_pool_usage(params = {})
501
+ # @param [Hash] params ({})
502
+ def list_identity_pool_usage(params = {}, options = {})
503
+ req = build_request(:list_identity_pool_usage, params)
504
+ req.send_request(options)
505
+ end
506
+
507
+ # Gets paginated records, optionally changed after a particular sync
508
+ # count for a dataset and identity. With Amazon Cognito Sync, each
509
+ # identity has access only to its own data. Thus, the credentials used
510
+ # to make this API call need to have access to the identity data.
511
+ #
512
+ # ListRecords can be called with temporary user credentials provided by
513
+ # Cognito Identity or with developer credentials. You should use Cognito
514
+ # Identity credentials to make this API call.
515
+ # @option params [required, String] :identity_pool_id
516
+ # A name-spaced GUID (for example,
517
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
518
+ # Cognito. GUID generation is unique within a region.
519
+ # @option params [required, String] :identity_id
520
+ # A name-spaced GUID (for example,
521
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
522
+ # Cognito. GUID generation is unique within a region.
523
+ # @option params [required, String] :dataset_name
524
+ # A string of up to 128 characters. Allowed characters are a-z, A-Z,
525
+ # 0-9, '\_' (underscore), '-' (dash), and '.' (dot).
526
+ # @option params [Integer] :last_sync_count
527
+ # The last server sync count for this record.
528
+ # @option params [String] :next_token
529
+ # A pagination token for obtaining the next page of results.
530
+ # @option params [Integer] :max_results
531
+ # The maximum number of results to be returned.
532
+ # @option params [String] :sync_session_token
533
+ # A token containing a session ID, identity ID, and expiration.
534
+ # @return [Types::ListRecordsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
535
+ #
536
+ # * {Types::ListRecordsResponse#records #Records} => Array&lt;Types::Record&gt;
537
+ # * {Types::ListRecordsResponse#next_token #NextToken} => String
538
+ # * {Types::ListRecordsResponse#count #Count} => Integer
539
+ # * {Types::ListRecordsResponse#dataset_sync_count #DatasetSyncCount} => Integer
540
+ # * {Types::ListRecordsResponse#last_modified_by #LastModifiedBy} => String
541
+ # * {Types::ListRecordsResponse#merged_dataset_names #MergedDatasetNames} => Array&lt;String&gt;
542
+ # * {Types::ListRecordsResponse#dataset_exists #DatasetExists} => Boolean
543
+ # * {Types::ListRecordsResponse#dataset_deleted_after_requested_sync_count #DatasetDeletedAfterRequestedSyncCount} => Boolean
544
+ # * {Types::ListRecordsResponse#sync_session_token #SyncSessionToken} => String
545
+ #
546
+ # @example Request syntax with placeholder values
547
+ # resp = client.list_records({
548
+ # identity_pool_id: "IdentityPoolId", # required
549
+ # identity_id: "IdentityId", # required
550
+ # dataset_name: "DatasetName", # required
551
+ # last_sync_count: 1,
552
+ # next_token: "String",
553
+ # max_results: 1,
554
+ # sync_session_token: "SyncSessionToken",
555
+ # })
556
+ #
557
+ # @example Response structure
558
+ # resp.records #=> Array
559
+ # resp.records[0].key #=> String
560
+ # resp.records[0].value #=> String
561
+ # resp.records[0].sync_count #=> Integer
562
+ # resp.records[0].last_modified_date #=> Time
563
+ # resp.records[0].last_modified_by #=> String
564
+ # resp.records[0].device_last_modified_date #=> Time
565
+ # resp.next_token #=> String
566
+ # resp.count #=> Integer
567
+ # resp.dataset_sync_count #=> Integer
568
+ # resp.last_modified_by #=> String
569
+ # resp.merged_dataset_names #=> Array
570
+ # resp.merged_dataset_names[0] #=> String
571
+ # resp.dataset_exists #=> Boolean
572
+ # resp.dataset_deleted_after_requested_sync_count #=> Boolean
573
+ # resp.sync_session_token #=> String
574
+ # @overload list_records(params = {})
575
+ # @param [Hash] params ({})
576
+ def list_records(params = {}, options = {})
577
+ req = build_request(:list_records, params)
578
+ req.send_request(options)
579
+ end
580
+
581
+ # Registers a device to receive push sync notifications.
582
+ #
583
+ # This API can only be called with temporary credentials provided by
584
+ # Cognito Identity. You cannot call this API with developer credentials.
585
+ # @option params [required, String] :identity_pool_id
586
+ # A name-spaced GUID (for example,
587
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
588
+ # Cognito. Here, the ID of the pool that the identity belongs to.
589
+ # @option params [required, String] :identity_id
590
+ # The unique ID for this identity.
591
+ # @option params [required, String] :platform
592
+ # The SNS platform type (e.g. GCM, SDM, APNS, APNS\_SANDBOX).
593
+ # @option params [required, String] :token
594
+ # The push token.
595
+ # @return [Types::RegisterDeviceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
596
+ #
597
+ # * {Types::RegisterDeviceResponse#device_id #DeviceId} => String
598
+ #
599
+ # @example Request syntax with placeholder values
600
+ # resp = client.register_device({
601
+ # identity_pool_id: "IdentityPoolId", # required
602
+ # identity_id: "IdentityId", # required
603
+ # platform: "APNS", # required, accepts APNS, APNS_SANDBOX, GCM, ADM
604
+ # token: "PushToken", # required
605
+ # })
606
+ #
607
+ # @example Response structure
608
+ # resp.device_id #=> String
609
+ # @overload register_device(params = {})
610
+ # @param [Hash] params ({})
611
+ def register_device(params = {}, options = {})
612
+ req = build_request(:register_device, params)
613
+ req.send_request(options)
614
+ end
615
+
616
+ # Sets the AWS Lambda function for a given event type for an identity
617
+ # pool. This request only updates the key/value pair specified. Other
618
+ # key/values pairs are not updated. To remove a key value pair, pass a
619
+ # empty value for the particular key.
620
+ #
621
+ # This API can only be called with developer credentials. You cannot
622
+ # call this API with the temporary user credentials provided by Cognito
623
+ # Identity.
624
+ # @option params [required, String] :identity_pool_id
625
+ # The Cognito Identity Pool to use when configuring Cognito Events
626
+ # @option params [required, Hash<String,String>] :events
627
+ # The events to configure
628
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
629
+ #
630
+ # @example Request syntax with placeholder values
631
+ # resp = client.set_cognito_events({
632
+ # identity_pool_id: "IdentityPoolId", # required
633
+ # events: { # required
634
+ # "CognitoEventType" => "LambdaFunctionArn",
635
+ # },
636
+ # })
637
+ # @overload set_cognito_events(params = {})
638
+ # @param [Hash] params ({})
639
+ def set_cognito_events(params = {}, options = {})
640
+ req = build_request(:set_cognito_events, params)
641
+ req.send_request(options)
642
+ end
643
+
644
+ # Sets the necessary configuration for push sync.
645
+ #
646
+ # This API can only be called with developer credentials. You cannot
647
+ # call this API with the temporary user credentials provided by Cognito
648
+ # Identity.
649
+ # @option params [required, String] :identity_pool_id
650
+ # A name-spaced GUID (for example,
651
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
652
+ # Cognito. This is the ID of the pool to modify.
653
+ # @option params [Types::PushSync] :push_sync
654
+ # Options to apply to this identity pool for push synchronization.
655
+ # @option params [Types::CognitoStreams] :cognito_streams
656
+ # Options to apply to this identity pool for Amazon Cognito streams.
657
+ # @return [Types::SetIdentityPoolConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
658
+ #
659
+ # * {Types::SetIdentityPoolConfigurationResponse#identity_pool_id #IdentityPoolId} => String
660
+ # * {Types::SetIdentityPoolConfigurationResponse#push_sync #PushSync} => Types::PushSync
661
+ # * {Types::SetIdentityPoolConfigurationResponse#cognito_streams #CognitoStreams} => Types::CognitoStreams
662
+ #
663
+ # @example Request syntax with placeholder values
664
+ # resp = client.set_identity_pool_configuration({
665
+ # identity_pool_id: "IdentityPoolId", # required
666
+ # push_sync: {
667
+ # application_arns: ["ApplicationArn"],
668
+ # role_arn: "AssumeRoleArn",
669
+ # },
670
+ # cognito_streams: {
671
+ # stream_name: "StreamName",
672
+ # role_arn: "AssumeRoleArn",
673
+ # streaming_status: "ENABLED", # accepts ENABLED, DISABLED
674
+ # },
675
+ # })
676
+ #
677
+ # @example Response structure
678
+ # resp.identity_pool_id #=> String
679
+ # resp.push_sync.application_arns #=> Array
680
+ # resp.push_sync.application_arns[0] #=> String
681
+ # resp.push_sync.role_arn #=> String
682
+ # resp.cognito_streams.stream_name #=> String
683
+ # resp.cognito_streams.role_arn #=> String
684
+ # resp.cognito_streams.streaming_status #=> String, one of "ENABLED", "DISABLED"
685
+ # @overload set_identity_pool_configuration(params = {})
686
+ # @param [Hash] params ({})
687
+ def set_identity_pool_configuration(params = {}, options = {})
688
+ req = build_request(:set_identity_pool_configuration, params)
689
+ req.send_request(options)
690
+ end
691
+
692
+ # Subscribes to receive notifications when a dataset is modified by
693
+ # another device.
694
+ #
695
+ # This API can only be called with temporary credentials provided by
696
+ # Cognito Identity. You cannot call this API with developer credentials.
697
+ # @option params [required, String] :identity_pool_id
698
+ # A name-spaced GUID (for example,
699
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
700
+ # Cognito. The ID of the pool to which the identity belongs.
701
+ # @option params [required, String] :identity_id
702
+ # Unique ID for this identity.
703
+ # @option params [required, String] :dataset_name
704
+ # The name of the dataset to subcribe to.
705
+ # @option params [required, String] :device_id
706
+ # The unique ID generated for this device by Cognito.
707
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
708
+ #
709
+ # @example Request syntax with placeholder values
710
+ # resp = client.subscribe_to_dataset({
711
+ # identity_pool_id: "IdentityPoolId", # required
712
+ # identity_id: "IdentityId", # required
713
+ # dataset_name: "DatasetName", # required
714
+ # device_id: "DeviceId", # required
715
+ # })
716
+ # @overload subscribe_to_dataset(params = {})
717
+ # @param [Hash] params ({})
718
+ def subscribe_to_dataset(params = {}, options = {})
719
+ req = build_request(:subscribe_to_dataset, params)
720
+ req.send_request(options)
721
+ end
722
+
723
+ # Unsubscribes from receiving notifications when a dataset is modified
724
+ # by another device.
725
+ #
726
+ # This API can only be called with temporary credentials provided by
727
+ # Cognito Identity. You cannot call this API with developer credentials.
728
+ # @option params [required, String] :identity_pool_id
729
+ # A name-spaced GUID (for example,
730
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
731
+ # Cognito. The ID of the pool to which this identity belongs.
732
+ # @option params [required, String] :identity_id
733
+ # Unique ID for this identity.
734
+ # @option params [required, String] :dataset_name
735
+ # The name of the dataset from which to unsubcribe.
736
+ # @option params [required, String] :device_id
737
+ # The unique ID generated for this device by Cognito.
738
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
739
+ #
740
+ # @example Request syntax with placeholder values
741
+ # resp = client.unsubscribe_from_dataset({
742
+ # identity_pool_id: "IdentityPoolId", # required
743
+ # identity_id: "IdentityId", # required
744
+ # dataset_name: "DatasetName", # required
745
+ # device_id: "DeviceId", # required
746
+ # })
747
+ # @overload unsubscribe_from_dataset(params = {})
748
+ # @param [Hash] params ({})
749
+ def unsubscribe_from_dataset(params = {}, options = {})
750
+ req = build_request(:unsubscribe_from_dataset, params)
751
+ req.send_request(options)
752
+ end
753
+
754
+ # Posts updates to records and adds and deletes records for a dataset
755
+ # and user.
756
+ #
757
+ # The sync count in the record patch is your last known sync count for
758
+ # that record. The server will reject an UpdateRecords request with a
759
+ # ResourceConflictException if you try to patch a record with a new
760
+ # value but a stale sync count.
761
+ #
762
+ # For example, if the sync count on the server is 5 for a key called
763
+ # highScore and you try and submit a new highScore with sync count of 4,
764
+ # the request will be rejected. To obtain the current sync count for a
765
+ # record, call ListRecords. On a successful update of the record, the
766
+ # response returns the new sync count for that record. You should
767
+ # present that sync count the next time you try to update that same
768
+ # record. When the record does not exist, specify the sync count as 0.
769
+ #
770
+ # This API can be called with temporary user credentials provided by
771
+ # Cognito Identity or with developer credentials.
772
+ # @option params [required, String] :identity_pool_id
773
+ # A name-spaced GUID (for example,
774
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
775
+ # Cognito. GUID generation is unique within a region.
776
+ # @option params [required, String] :identity_id
777
+ # A name-spaced GUID (for example,
778
+ # us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
779
+ # Cognito. GUID generation is unique within a region.
780
+ # @option params [required, String] :dataset_name
781
+ # A string of up to 128 characters. Allowed characters are a-z, A-Z,
782
+ # 0-9, '\_' (underscore), '-' (dash), and '.' (dot).
783
+ # @option params [String] :device_id
784
+ # The unique ID generated for this device by Cognito.
785
+ # @option params [Array<Types::RecordPatch>] :record_patches
786
+ # A list of patch operations.
787
+ # @option params [required, String] :sync_session_token
788
+ # The SyncSessionToken returned by a previous call to ListRecords for
789
+ # this dataset and identity.
790
+ # @option params [String] :client_context
791
+ # Intended to supply a device ID that will populate the lastModifiedBy
792
+ # field referenced in other methods. The ClientContext field is not yet
793
+ # implemented.
794
+ # @return [Types::UpdateRecordsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
795
+ #
796
+ # * {Types::UpdateRecordsResponse#records #Records} => Array&lt;Types::Record&gt;
797
+ #
798
+ # @example Request syntax with placeholder values
799
+ # resp = client.update_records({
800
+ # identity_pool_id: "IdentityPoolId", # required
801
+ # identity_id: "IdentityId", # required
802
+ # dataset_name: "DatasetName", # required
803
+ # device_id: "DeviceId",
804
+ # record_patches: [
805
+ # {
806
+ # op: "replace", # required, accepts replace, remove
807
+ # key: "RecordKey", # required
808
+ # value: "RecordValue",
809
+ # sync_count: 1, # required
810
+ # device_last_modified_date: Time.now,
811
+ # },
812
+ # ],
813
+ # sync_session_token: "SyncSessionToken", # required
814
+ # client_context: "ClientContext",
815
+ # })
816
+ #
817
+ # @example Response structure
818
+ # resp.records #=> Array
819
+ # resp.records[0].key #=> String
820
+ # resp.records[0].value #=> String
821
+ # resp.records[0].sync_count #=> Integer
822
+ # resp.records[0].last_modified_date #=> Time
823
+ # resp.records[0].last_modified_by #=> String
824
+ # resp.records[0].device_last_modified_date #=> Time
825
+ # @overload update_records(params = {})
826
+ # @param [Hash] params ({})
827
+ def update_records(params = {}, options = {})
828
+ req = build_request(:update_records, params)
829
+ req.send_request(options)
830
+ end
831
+
832
+ # @!endgroup
833
+
834
+ # @param params ({})
835
+ # @api private
836
+ def build_request(operation_name, params = {})
837
+ handlers = @handlers.for(operation_name)
838
+ context = Seahorse::Client::RequestContext.new(
839
+ operation_name: operation_name,
840
+ operation: config.api.operation(operation_name),
841
+ client: self,
842
+ params: params,
843
+ config: config)
844
+ context[:gem_name] = 'aws-sdk-cognitosync'
845
+ context[:gem_version] = '1.0.0.rc1'
846
+ Seahorse::Client::Request.new(handlers, context)
847
+ end
848
+
849
+ # @api private
850
+ # @deprecated
851
+ def waiter_names
852
+ []
853
+ end
854
+
855
+ class << self
856
+
857
+ # @api private
858
+ attr_reader :identifier
859
+
860
+ # @api private
861
+ def errors_module
862
+ Errors
863
+ end
864
+
865
+ end
866
+ end
867
+ end
868
+ end