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.
467 468 469 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 467 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.
506 507 508 509 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 506 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.
559 560 561 562 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 559 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.
613 614 615 616 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 613 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.
651 652 653 654 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 651 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.
695 696 697 698 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 695 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.
737 738 739 740 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 737 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.
771 772 773 774 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 771 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.
814 815 816 817 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 814 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.
875 876 877 878 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 875 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.
921 922 923 924 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 921 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.
1008 1009 1010 1011 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1008 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.
1053 1054 1055 1056 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1053 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.
1088 1089 1090 1091 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1088 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.
1145 1146 1147 1148 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1145 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.
1185 1186 1187 1188 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1185 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.
1225 1226 1227 1228 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1225 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.
1316 1317 1318 1319 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1316 def update_records(params = {}, = {}) req = build_request(:update_records, params) req.send_request() end |