Struct aws_sdk_cognitosync::Client
source · [−]pub struct Client { /* 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
sourceimpl Client
impl Client
sourcepub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
Creates a client with the given service configuration.
sourceimpl Client
impl Client
sourcepub fn bulk_publish(&self) -> BulkPublish
pub fn bulk_publish(&self) -> BulkPublish
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>
sourcepub fn delete_dataset(&self) -> DeleteDataset
pub fn delete_dataset(&self) -> DeleteDataset
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>
sourcepub fn describe_dataset(&self) -> DescribeDataset
pub fn describe_dataset(&self) -> DescribeDataset
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>
sourcepub fn describe_identity_pool_usage(&self) -> DescribeIdentityPoolUsage
pub fn describe_identity_pool_usage(&self) -> DescribeIdentityPoolUsage
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>
sourcepub fn describe_identity_usage(&self) -> DescribeIdentityUsage
pub fn describe_identity_usage(&self) -> DescribeIdentityUsage
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>
sourcepub fn get_bulk_publish_details(&self) -> GetBulkPublishDetails
pub fn get_bulk_publish_details(&self) -> GetBulkPublishDetails
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>
sourcepub fn get_cognito_events(&self) -> GetCognitoEvents
pub fn get_cognito_events(&self) -> GetCognitoEvents
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>
sourcepub fn get_identity_pool_configuration(&self) -> GetIdentityPoolConfiguration
pub fn get_identity_pool_configuration(&self) -> GetIdentityPoolConfiguration
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>
sourcepub fn list_datasets(&self) -> ListDatasets
pub fn list_datasets(&self) -> ListDatasets
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>
sourcepub fn list_identity_pool_usage(&self) -> ListIdentityPoolUsage
pub fn list_identity_pool_usage(&self) -> ListIdentityPoolUsage
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>
sourcepub fn list_records(&self) -> ListRecords
pub fn list_records(&self) -> ListRecords
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>
sourcepub fn register_device(&self) -> RegisterDevice
pub fn register_device(&self) -> RegisterDevice
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>
sourcepub fn set_cognito_events(&self) -> SetCognitoEvents
pub fn set_cognito_events(&self) -> SetCognitoEvents
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>
sourcepub fn set_identity_pool_configuration(&self) -> SetIdentityPoolConfiguration
pub fn set_identity_pool_configuration(&self) -> SetIdentityPoolConfiguration
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>
sourcepub fn subscribe_to_dataset(&self) -> SubscribeToDataset
pub fn subscribe_to_dataset(&self) -> SubscribeToDataset
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>
sourcepub fn unsubscribe_from_dataset(&self) -> UnsubscribeFromDataset
pub fn unsubscribe_from_dataset(&self) -> UnsubscribeFromDataset
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>
sourcepub fn update_records(&self) -> UpdateRecords
pub fn update_records(&self) -> UpdateRecords
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>
sourceimpl Client
impl Client
sourcepub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
pub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
Creates a client with the given service config and connector override.
Trait Implementations
sourceimpl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
impl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
sourcefn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
fn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more