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.
434 435 436 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 434 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.
473 474 475 476 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 473 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.
526 527 528 529 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 526 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.
580 581 582 583 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 580 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.
618 619 620 621 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 618 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.
662 663 664 665 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 662 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.
704 705 706 707 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 704 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.
738 739 740 741 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 738 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.
781 782 783 784 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 781 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.
842 843 844 845 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 842 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.
888 889 890 891 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 888 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.
975 976 977 978 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 975 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.
1020 1021 1022 1023 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1020 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.
1055 1056 1057 1058 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1055 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.
1112 1113 1114 1115 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1112 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.
1152 1153 1154 1155 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1152 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.
1192 1193 1194 1195 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1192 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.
1283 1284 1285 1286 |
# File 'gems/aws-sdk-cognitosync/lib/aws-sdk-cognitosync/client.rb', line 1283 def update_records(params = {}, = {}) req = build_request(:update_records, params) req.send_request() end |