Class: Aws::CognitoSync::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::CognitoSync::Client
- Includes:
- Aws::ClientStubs
- Defined in:
- gems/aws-sdk-cognitosync/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.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
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.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from Aws::ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
444 445 446 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 444 def initialize(*args) super end |
Instance Method Details
#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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/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 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1293 def update_records(params = {}, = {}) req = build_request(:update_records, params) req.send_request() end |