Class: Aws::CognitoSync::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::CognitoSync::Client
- Includes:
- Aws::ClientStubs
- Defined in:
- lib/aws-sdk-cognitosync/client.rb
Overview
An API client for CognitoSync. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::CognitoSync::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#bulk_publish(params = {}) ⇒ Types::BulkPublishResponse
Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream.
-
#delete_dataset(params = {}) ⇒ Types::DeleteDatasetResponse
Deletes the specific dataset.
-
#describe_dataset(params = {}) ⇒ Types::DescribeDatasetResponse
Gets meta data about a dataset by identity and dataset name.
-
#describe_identity_pool_usage(params = {}) ⇒ Types::DescribeIdentityPoolUsageResponse
Gets usage details (for example, data storage) about a particular identity pool.
-
#describe_identity_usage(params = {}) ⇒ Types::DescribeIdentityUsageResponse
Gets usage information for an identity, including number of datasets and data usage.
-
#get_bulk_publish_details(params = {}) ⇒ Types::GetBulkPublishDetailsResponse
Get the status of the last BulkPublish operation for an identity pool.
-
#get_cognito_events(params = {}) ⇒ Types::GetCognitoEventsResponse
Gets the events and the corresponding Lambda functions associated with an identity pool.
-
#get_identity_pool_configuration(params = {}) ⇒ Types::GetIdentityPoolConfigurationResponse
Gets the configuration settings of an identity pool.
-
#list_datasets(params = {}) ⇒ Types::ListDatasetsResponse
Lists datasets for an identity.
-
#list_identity_pool_usage(params = {}) ⇒ Types::ListIdentityPoolUsageResponse
Gets a list of identity pools registered with Cognito.
-
#list_records(params = {}) ⇒ Types::ListRecordsResponse
Gets paginated records, optionally changed after a particular sync count for a dataset and identity.
-
#register_device(params = {}) ⇒ Types::RegisterDeviceResponse
Registers a device to receive push sync notifications.
-
#set_cognito_events(params = {}) ⇒ Struct
Sets the AWS Lambda function for a given event type for an identity pool.
-
#set_identity_pool_configuration(params = {}) ⇒ Types::SetIdentityPoolConfigurationResponse
Sets the necessary configuration for push sync.
-
#subscribe_to_dataset(params = {}) ⇒ Struct
Subscribes to receive notifications when a dataset is modified by another device.
-
#unsubscribe_from_dataset(params = {}) ⇒ Struct
Unsubscribes from receiving notifications when a dataset is modified by another device.
-
#update_records(params = {}) ⇒ Types::UpdateRecordsResponse
Posts updates to records and adds and deletes records for a dataset and user.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
444 445 446 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 444 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1329 1330 1331 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1329 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1332 1333 1334 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1332 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1302 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::CognitoSync') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-cognitosync' context[:gem_version] = '1.61.0' Seahorse::Client::Request.new(handlers, context) end |
#bulk_publish(params = {}) ⇒ Types::BulkPublishResponse
Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation.
This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
483 484 485 486 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 483 def bulk_publish(params = {}, = {}) req = build_request(:bulk_publish, params) req.send_request() end |
#delete_dataset(params = {}) ⇒ Types::DeleteDatasetResponse
Deletes the specific dataset. The dataset will be deleted permanently, and the action can’t be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException.
This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.
536 537 538 539 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 536 def delete_dataset(params = {}, = {}) req = build_request(:delete_dataset, params) req.send_request() end |
#describe_dataset(params = {}) ⇒ Types::DescribeDatasetResponse
Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.
This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.
590 591 592 593 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 590 def describe_dataset(params = {}, = {}) req = build_request(:describe_dataset, params) req.send_request() end |
#describe_identity_pool_usage(params = {}) ⇒ Types::DescribeIdentityPoolUsageResponse
Gets usage details (for example, data storage) about a particular identity pool.
This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
628 629 630 631 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 628 def describe_identity_pool_usage(params = {}, = {}) req = build_request(:describe_identity_pool_usage, params) req.send_request() end |
#describe_identity_usage(params = {}) ⇒ Types::DescribeIdentityUsageResponse
Gets usage information for an identity, including number of datasets and data usage.
This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.
672 673 674 675 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 672 def describe_identity_usage(params = {}, = {}) req = build_request(:describe_identity_usage, params) req.send_request() end |
#get_bulk_publish_details(params = {}) ⇒ Types::GetBulkPublishDetailsResponse
Get the status of the last BulkPublish operation for an identity pool.
This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
714 715 716 717 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 714 def get_bulk_publish_details(params = {}, = {}) req = build_request(:get_bulk_publish_details, params) req.send_request() end |
#get_cognito_events(params = {}) ⇒ Types::GetCognitoEventsResponse
Gets the events and the corresponding Lambda functions associated with an identity pool.
This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
748 749 750 751 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 748 def get_cognito_events(params = {}, = {}) req = build_request(:get_cognito_events, params) req.send_request() end |
#get_identity_pool_configuration(params = {}) ⇒ Types::GetIdentityPoolConfigurationResponse
Gets the configuration settings of an identity pool.
This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
791 792 793 794 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 791 def get_identity_pool_configuration(params = {}, = {}) req = build_request(:get_identity_pool_configuration, params) req.send_request() end |
#list_datasets(params = {}) ⇒ Types::ListDatasetsResponse
Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.
ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call.
852 853 854 855 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 852 def list_datasets(params = {}, = {}) req = build_request(:list_datasets, params) req.send_request() end |
#list_identity_pool_usage(params = {}) ⇒ Types::ListIdentityPoolUsageResponse
Gets a list of identity pools registered with Cognito.
ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.
898 899 900 901 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 898 def list_identity_pool_usage(params = {}, = {}) req = build_request(:list_identity_pool_usage, params) req.send_request() end |
#list_records(params = {}) ⇒ Types::ListRecordsResponse
Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.
ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.
985 986 987 988 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 985 def list_records(params = {}, = {}) req = build_request(:list_records, params) req.send_request() end |
#register_device(params = {}) ⇒ Types::RegisterDeviceResponse
Registers a device to receive push sync notifications.
This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
1030 1031 1032 1033 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1030 def register_device(params = {}, = {}) req = build_request(:register_device, params) req.send_request() end |
#set_cognito_events(params = {}) ⇒ Struct
Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key.
This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
1065 1066 1067 1068 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1065 def set_cognito_events(params = {}, = {}) req = build_request(:set_cognito_events, params) req.send_request() end |
#set_identity_pool_configuration(params = {}) ⇒ Types::SetIdentityPoolConfigurationResponse
Sets the necessary configuration for push sync.
This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
1122 1123 1124 1125 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1122 def set_identity_pool_configuration(params = {}, = {}) req = build_request(:set_identity_pool_configuration, params) req.send_request() end |
#subscribe_to_dataset(params = {}) ⇒ Struct
Subscribes to receive notifications when a dataset is modified by another device.
This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
1162 1163 1164 1165 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1162 def subscribe_to_dataset(params = {}, = {}) req = build_request(:subscribe_to_dataset, params) req.send_request() end |
#unsubscribe_from_dataset(params = {}) ⇒ Struct
Unsubscribes from receiving notifications when a dataset is modified by another device.
This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
1202 1203 1204 1205 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1202 def unsubscribe_from_dataset(params = {}, = {}) req = build_request(:unsubscribe_from_dataset, params) req.send_request() end |
#update_records(params = {}) ⇒ Types::UpdateRecordsResponse
Posts updates to records and adds and deletes records for a dataset and user.
The sync count in the record patch is your last known sync count for that record. The server will reject an UpdateRecords request with a ResourceConflictException if you try to patch a record with a new value but a stale sync count.
For example, if the sync count on the server is 5 for a key called highScore and you try and submit a new highScore with sync count of 4, the request will be rejected. To obtain the current sync count for a record, call ListRecords. On a successful update of the record, the response returns the new sync count for that record. You should present that sync count the next time you try to update that same record. When the record does not exist, specify the sync count as 0.
This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.
1293 1294 1295 1296 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1293 def update_records(params = {}, = {}) req = build_request(:update_records, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1322 1323 1324 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1322 def waiter_names [] end |