Struct aws_sdk_cognitosync::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }
Expand description
Client for Amazon Cognito Sync
Client for invoking operations on Amazon Cognito Sync. Each operation on Amazon Cognito Sync is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_cognitosync::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_cognitosync::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_cognitosync::Client::from_conf(config);
Implementations
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
Constructs a fluent builder for the BulkPublish
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
- On success, responds with
BulkPublishOutput
with field(s):identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
- On failure, responds with
SdkError<BulkPublishError>
Constructs a fluent builder for the DeleteDataset
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.identity_id(impl Into<String>)
/set_identity_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.dataset_name(impl Into<String>)
/set_dataset_name(Option<String>)
: A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, ‘_’ (underscore), ‘-’ (dash), and ‘.’ (dot).
- On success, responds with
DeleteDatasetOutput
with field(s):dataset(Option<Dataset>)
: A collection of data for an identity pool. An identity pool can have multiple datasets. A dataset is per identity and can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don’t exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.
- On failure, responds with
SdkError<DeleteDatasetError>
Constructs a fluent builder for the DescribeDataset
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.identity_id(impl Into<String>)
/set_identity_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.dataset_name(impl Into<String>)
/set_dataset_name(Option<String>)
: A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, ‘_’ (underscore), ‘-’ (dash), and ‘.’ (dot).
- On success, responds with
DescribeDatasetOutput
with field(s):dataset(Option<Dataset>)
: Meta data for a collection of data for an identity. An identity can have multiple datasets. A dataset can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don’t exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.
- On failure, responds with
SdkError<DescribeDatasetError>
Constructs a fluent builder for the DescribeIdentityPoolUsage
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
- On success, responds with
DescribeIdentityPoolUsageOutput
with field(s):identity_pool_usage(Option<IdentityPoolUsage>)
: Information about the usage of the identity pool.
- On failure, responds with
SdkError<DescribeIdentityPoolUsageError>
Constructs a fluent builder for the DescribeIdentityUsage
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.identity_id(impl Into<String>)
/set_identity_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
- On success, responds with
DescribeIdentityUsageOutput
with field(s):identity_usage(Option<IdentityUsage>)
: Usage information for the identity.
- On failure, responds with
SdkError<DescribeIdentityUsageError>
Constructs a fluent builder for the GetBulkPublishDetails
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
- On success, responds with
GetBulkPublishDetailsOutput
with field(s):identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.bulk_publish_start_time(Option<DateTime>)
: The date/time at which the last bulk publish was initiated.bulk_publish_complete_time(Option<DateTime>)
: If BulkPublishStatus is SUCCEEDED, the time the last bulk publish operation completed.bulk_publish_status(Option<BulkPublishStatus>)
: Status of the last bulk publish operation, valid values are:NOT_STARTED - No bulk publish has been requested for this identity pool
IN_PROGRESS - Data is being published to the configured stream
SUCCEEDED - All data for the identity pool has been published to the configured stream
FAILED - Some portion of the data has failed to publish, check FailureMessage for the cause.
failure_message(Option<String>)
: If BulkPublishStatus is FAILED this field will contain the error message that caused the bulk publish to fail.
- On failure, responds with
SdkError<GetBulkPublishDetailsError>
Constructs a fluent builder for the GetCognitoEvents
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:The Cognito Identity Pool ID for the request
- On success, responds with
GetCognitoEventsOutput
with field(s):events(Option<HashMap<String, String>>)
:The Cognito Events returned from the GetCognitoEvents request
- On failure, responds with
SdkError<GetCognitoEventsError>
Constructs a fluent builder for the GetIdentityPoolConfiguration
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. This is the ID of the pool for which to return a configuration.
- On success, responds with
GetIdentityPoolConfigurationOutput
with field(s):identity_pool_id(Option<String>)
:A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.
push_sync(Option<PushSync>)
:Options to apply to this identity pool for push synchronization.
cognito_streams(Option<CognitoStreams>)
: Options to apply to this identity pool for Amazon Cognito streams.
- On failure, responds with
SdkError<GetIdentityPoolConfigurationError>
Constructs a fluent builder for the ListDatasets
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.identity_id(impl Into<String>)
/set_identity_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.next_token(impl Into<String>)
/set_next_token(Option<String>)
: A pagination token for obtaining the next page of results.max_results(i32)
/set_max_results(i32)
: The maximum number of results to be returned.
- On success, responds with
ListDatasetsOutput
with field(s):datasets(Option<Vec<Dataset>>)
: A set of datasets.count(i32)
: Number of datasets returned.next_token(Option<String>)
: A pagination token for obtaining the next page of results.
- On failure, responds with
SdkError<ListDatasetsError>
Constructs a fluent builder for the ListIdentityPoolUsage
operation.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
: A pagination token for obtaining the next page of results.max_results(i32)
/set_max_results(i32)
: The maximum number of results to be returned.
- On success, responds with
ListIdentityPoolUsageOutput
with field(s):identity_pool_usages(Option<Vec<IdentityPoolUsage>>)
: Usage information for the identity pools.max_results(i32)
: The maximum number of results to be returned.count(i32)
: Total number of identities for the identity pool.next_token(Option<String>)
: A pagination token for obtaining the next page of results.
- On failure, responds with
SdkError<ListIdentityPoolUsageError>
Constructs a fluent builder for the ListRecords
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.identity_id(impl Into<String>)
/set_identity_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.dataset_name(impl Into<String>)
/set_dataset_name(Option<String>)
: A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, ‘_’ (underscore), ‘-’ (dash), and ‘.’ (dot).last_sync_count(i64)
/set_last_sync_count(Option<i64>)
: The last server sync count for this record.next_token(impl Into<String>)
/set_next_token(Option<String>)
: A pagination token for obtaining the next page of results.max_results(i32)
/set_max_results(i32)
: The maximum number of results to be returned.sync_session_token(impl Into<String>)
/set_sync_session_token(Option<String>)
: A token containing a session ID, identity ID, and expiration.
- On success, responds with
ListRecordsOutput
with field(s):records(Option<Vec<Record>>)
: A list of all records.next_token(Option<String>)
: A pagination token for obtaining the next page of results.count(i32)
: Total number of records.dataset_sync_count(Option<i64>)
: Server sync count for this dataset.last_modified_by(Option<String>)
: The user/device that made the last change to this record.merged_dataset_names(Option<Vec<String>>)
: Names of merged datasets.dataset_exists(bool)
: Indicates whether the dataset exists.dataset_deleted_after_requested_sync_count(bool)
: A boolean value specifying whether to delete the dataset locally.sync_session_token(Option<String>)
: A token containing a session ID, identity ID, and expiration.
- On failure, responds with
SdkError<ListRecordsError>
Constructs a fluent builder for the RegisterDevice
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. Here, the ID of the pool that the identity belongs to.
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
:The unique ID for this identity.
platform(Platform)
/set_platform(Option<Platform>)
:The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).
token(impl Into<String>)
/set_token(Option<String>)
:The push token.
- On success, responds with
RegisterDeviceOutput
with field(s):device_id(Option<String>)
:The unique ID generated for this device by Cognito.
- On failure, responds with
SdkError<RegisterDeviceError>
Constructs a fluent builder for the SetCognitoEvents
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:The Cognito Identity Pool to use when configuring Cognito Events
events(HashMap<String, String>)
/set_events(Option<HashMap<String, String>>)
:The events to configure
- On success, responds with
SetCognitoEventsOutput
- On failure, responds with
SdkError<SetCognitoEventsError>
Constructs a fluent builder for the SetIdentityPoolConfiguration
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. This is the ID of the pool to modify.
push_sync(PushSync)
/set_push_sync(Option<PushSync>)
:Options to apply to this identity pool for push synchronization.
cognito_streams(CognitoStreams)
/set_cognito_streams(Option<CognitoStreams>)
: Options to apply to this identity pool for Amazon Cognito streams.
- On success, responds with
SetIdentityPoolConfigurationOutput
with field(s):identity_pool_id(Option<String>)
:A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.
push_sync(Option<PushSync>)
:Options to apply to this identity pool for push synchronization.
cognito_streams(Option<CognitoStreams>)
: Options to apply to this identity pool for Amazon Cognito streams.
- On failure, responds with
SdkError<SetIdentityPoolConfigurationError>
Constructs a fluent builder for the SubscribeToDataset
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. The ID of the pool to which the identity belongs.
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
:Unique ID for this identity.
dataset_name(impl Into<String>)
/set_dataset_name(Option<String>)
:The name of the dataset to subcribe to.
device_id(impl Into<String>)
/set_device_id(Option<String>)
:The unique ID generated for this device by Cognito.
- On success, responds with
SubscribeToDatasetOutput
- On failure, responds with
SdkError<SubscribeToDatasetError>
Constructs a fluent builder for the UnsubscribeFromDataset
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. The ID of the pool to which this identity belongs.
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
:Unique ID for this identity.
dataset_name(impl Into<String>)
/set_dataset_name(Option<String>)
:The name of the dataset from which to unsubcribe.
device_id(impl Into<String>)
/set_device_id(Option<String>)
:The unique ID generated for this device by Cognito.
- On success, responds with
UnsubscribeFromDatasetOutput
- On failure, responds with
SdkError<UnsubscribeFromDatasetError>
Constructs a fluent builder for the UpdateRecords
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.identity_id(impl Into<String>)
/set_identity_id(Option<String>)
: A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.dataset_name(impl Into<String>)
/set_dataset_name(Option<String>)
: A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, ‘_’ (underscore), ‘-’ (dash), and ‘.’ (dot).device_id(impl Into<String>)
/set_device_id(Option<String>)
:The unique ID generated for this device by Cognito.
record_patches(Vec<RecordPatch>)
/set_record_patches(Option<Vec<RecordPatch>>)
: A list of patch operations.sync_session_token(impl Into<String>)
/set_sync_session_token(Option<String>)
: The SyncSessionToken returned by a previous call to ListRecords for this dataset and identity.client_context(impl Into<String>)
/set_client_context(Option<String>)
: Intended to supply a device ID that will populate the lastModifiedBy field referenced in other methods. The ClientContext field is not yet implemented.
- On success, responds with
UpdateRecordsOutput
with field(s):records(Option<Vec<Record>>)
: A list of records that have been updated.
- On failure, responds with
SdkError<UpdateRecordsError>
Creates a client with the given service config and connector override.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for Client<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for Client<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more