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.
422 423 424 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 422 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.
1302 1303 1304 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1302 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.
1305 1306 1307 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1305 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.
1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1280 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-cognitosync' context[:gem_version] = '1.55.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.
461 462 463 464 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 461 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.
514 515 516 517 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 514 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.
568 569 570 571 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 568 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.
606 607 608 609 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 606 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.
650 651 652 653 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 650 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.
692 693 694 695 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 692 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.
726 727 728 729 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 726 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.
769 770 771 772 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 769 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.
830 831 832 833 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 830 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.
876 877 878 879 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 876 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.
963 964 965 966 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 963 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.
1008 1009 1010 1011 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1008 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.
1043 1044 1045 1046 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1043 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.
1100 1101 1102 1103 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1100 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.
1140 1141 1142 1143 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1140 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.
1180 1181 1182 1183 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1180 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.
1271 1272 1273 1274 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1271 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.
1295 1296 1297 |
# File 'lib/aws-sdk-cognitosync/client.rb', line 1295 def waiter_names [] end |