/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the cognito-sync-2014-06-30.normal.json service model. */ using System; using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using System.Net; using Amazon.CognitoSync.Model; using Amazon.CognitoSync.Model.Internal.MarshallTransformations; using Amazon.CognitoSync.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.CognitoSync { /// /// Implementation for accessing CognitoSync /// /// Amazon Cognito Sync /// /// Amazon Cognito Sync provides an AWS service and client library that enable cross-device /// syncing of application-related user data. High-level client libraries are available /// for both iOS and Android. You can use these libraries to persist data locally so that /// it's available even if the device is offline. Developer credentials don't need to /// be stored on the mobile device to access the service. You can use Amazon Cognito to /// obtain a normalized user ID and credentials. User data is persisted in a dataset that /// can store up to 1 MB of key-value pairs, and you can have up to 20 datasets per user /// identity. /// /// /// /// With Amazon Cognito Sync, the data stored for each identity is accessible only to /// credentials assigned to that identity. In order to use the Cognito Sync service, you /// need to make API calls using credentials retrieved with Amazon /// Cognito Identity service. /// /// /// /// If you want to use Cognito Sync in an Android or iOS application, you will probably /// want to make API calls via the AWS Mobile SDK. To learn more, see the Developer /// Guide for Android and the Developer /// Guide for iOS. /// /// public partial class AmazonCognitoSyncClient : AmazonServiceClient, IAmazonCognitoSync { private static IServiceMetadata serviceMetadata = new AmazonCognitoSyncMetadata(); #region Constructors /// /// Constructs AmazonCognitoSyncClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// public AmazonCognitoSyncClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonCognitoSyncConfig()) { } /// /// Constructs AmazonCognitoSyncClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The region to connect. public AmazonCognitoSyncClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonCognitoSyncConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonCognitoSyncClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The AmazonCognitoSyncClient Configuration Object public AmazonCognitoSyncClient(AmazonCognitoSyncConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonCognitoSyncClient with AWS Credentials /// /// AWS Credentials public AmazonCognitoSyncClient(AWSCredentials credentials) : this(credentials, new AmazonCognitoSyncConfig()) { } /// /// Constructs AmazonCognitoSyncClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonCognitoSyncClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonCognitoSyncConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonCognitoSyncClient with AWS Credentials and an /// AmazonCognitoSyncClient Configuration object. /// /// AWS Credentials /// The AmazonCognitoSyncClient Configuration Object public AmazonCognitoSyncClient(AWSCredentials credentials, AmazonCognitoSyncConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonCognitoSyncClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonCognitoSyncClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonCognitoSyncConfig()) { } /// /// Constructs AmazonCognitoSyncClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonCognitoSyncClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonCognitoSyncConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonCognitoSyncClient with AWS Access Key ID, AWS Secret Key and an /// AmazonCognitoSyncClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonCognitoSyncClient Configuration Object public AmazonCognitoSyncClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonCognitoSyncConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonCognitoSyncClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonCognitoSyncClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCognitoSyncConfig()) { } /// /// Constructs AmazonCognitoSyncClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The region to connect. public AmazonCognitoSyncClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCognitoSyncConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonCognitoSyncClient with AWS Access Key ID, AWS Secret Key and an /// AmazonCognitoSyncClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonCognitoSyncClient Configuration Object public AmazonCognitoSyncClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonCognitoSyncConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig) { } #endregion #region Overrides /// /// Creates the signer for the service. /// protected override AbstractAWSSigner CreateSigner() { return new AWS4Signer(); } /// /// Customizes the runtime pipeline. /// /// Runtime pipeline for the current client. protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline) { pipeline.RemoveHandler(); pipeline.AddHandlerBefore(new Amazon.CognitoSync.Internal.CognitoCredentialsRetriever(this.Credentials)); pipeline.RemoveHandler(); pipeline.AddHandlerAfter(new AmazonCognitoSyncEndpointResolver()); } /// /// Capture metadata for the service. /// protected override IServiceMetadata ServiceMetadata { get { return serviceMetadata; } } #endregion #region Dispose /// /// Disposes the service client. /// protected override void Dispose(bool disposing) { base.Dispose(disposing); } #endregion #region BulkPublish internal virtual BulkPublishResponse BulkPublish(BulkPublishRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = BulkPublishRequestMarshaller.Instance; options.ResponseUnmarshaller = BulkPublishResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the BulkPublish service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the BulkPublish service method, as returned by CognitoSync. /// /// An exception thrown when a bulk publish operation is requested less than 24 hours /// after a previous bulk publish operation completed successfully. /// /// /// An exception thrown when there is an IN_PROGRESS bulk publish operation for the given /// identity pool. /// /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// REST API Reference for BulkPublish Operation public virtual Task BulkPublishAsync(BulkPublishRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = BulkPublishRequestMarshaller.Instance; options.ResponseUnmarshaller = BulkPublishResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DeleteDataset internal virtual DeleteDatasetResponse DeleteDataset(DeleteDatasetRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteDatasetRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteDatasetResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the DeleteDataset service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DeleteDataset service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if an update can't be applied because the resource was changed by another call /// and this would result in a conflict. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for DeleteDataset Operation public virtual Task DeleteDatasetAsync(DeleteDatasetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteDatasetRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteDatasetResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeDataset internal virtual DescribeDatasetResponse DescribeDataset(DescribeDatasetRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeDatasetRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeDatasetResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the DescribeDataset service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeDataset service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for DescribeDataset Operation public virtual Task DescribeDatasetAsync(DescribeDatasetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeDatasetRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeDatasetResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeIdentityPoolUsage internal virtual DescribeIdentityPoolUsageResponse DescribeIdentityPoolUsage(DescribeIdentityPoolUsageRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeIdentityPoolUsageRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeIdentityPoolUsageResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// 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. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeIdentityPoolUsage service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for DescribeIdentityPoolUsage Operation public virtual Task DescribeIdentityPoolUsageAsync(string identityPoolId, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var request = new DescribeIdentityPoolUsageRequest(); request.IdentityPoolId = identityPoolId; return DescribeIdentityPoolUsageAsync(request, cancellationToken); } /// /// 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. /// /// /// Container for the necessary parameters to execute the DescribeIdentityPoolUsage service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeIdentityPoolUsage service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for DescribeIdentityPoolUsage Operation public virtual Task DescribeIdentityPoolUsageAsync(DescribeIdentityPoolUsageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeIdentityPoolUsageRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeIdentityPoolUsageResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeIdentityUsage internal virtual DescribeIdentityUsageResponse DescribeIdentityUsage(DescribeIdentityUsageRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeIdentityUsageRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeIdentityUsageResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the DescribeIdentityUsage service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeIdentityUsage service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for DescribeIdentityUsage Operation public virtual Task DescribeIdentityUsageAsync(DescribeIdentityUsageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeIdentityUsageRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeIdentityUsageResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetBulkPublishDetails internal virtual GetBulkPublishDetailsResponse GetBulkPublishDetails(GetBulkPublishDetailsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetBulkPublishDetailsRequestMarshaller.Instance; options.ResponseUnmarshaller = GetBulkPublishDetailsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the GetBulkPublishDetails service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetBulkPublishDetails service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// REST API Reference for GetBulkPublishDetails Operation public virtual Task GetBulkPublishDetailsAsync(GetBulkPublishDetailsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetBulkPublishDetailsRequestMarshaller.Instance; options.ResponseUnmarshaller = GetBulkPublishDetailsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetCognitoEvents internal virtual GetCognitoEventsResponse GetCognitoEvents(GetCognitoEventsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetCognitoEventsRequestMarshaller.Instance; options.ResponseUnmarshaller = GetCognitoEventsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the GetCognitoEvents service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetCognitoEvents service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for GetCognitoEvents Operation public virtual Task GetCognitoEventsAsync(GetCognitoEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetCognitoEventsRequestMarshaller.Instance; options.ResponseUnmarshaller = GetCognitoEventsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetIdentityPoolConfiguration internal virtual GetIdentityPoolConfigurationResponse GetIdentityPoolConfiguration(GetIdentityPoolConfigurationRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetIdentityPoolConfigurationRequestMarshaller.Instance; options.ResponseUnmarshaller = GetIdentityPoolConfigurationResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// 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. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetIdentityPoolConfiguration service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for GetIdentityPoolConfiguration Operation public virtual Task GetIdentityPoolConfigurationAsync(string identityPoolId, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var request = new GetIdentityPoolConfigurationRequest(); request.IdentityPoolId = identityPoolId; return GetIdentityPoolConfigurationAsync(request, cancellationToken); } /// /// 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. /// /// /// Container for the necessary parameters to execute the GetIdentityPoolConfiguration service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetIdentityPoolConfiguration service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for GetIdentityPoolConfiguration Operation public virtual Task GetIdentityPoolConfigurationAsync(GetIdentityPoolConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetIdentityPoolConfigurationRequestMarshaller.Instance; options.ResponseUnmarshaller = GetIdentityPoolConfigurationResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListDatasets internal virtual ListDatasetsResponse ListDatasets(ListDatasetsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListDatasetsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListDatasetsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the ListDatasets service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListDatasets service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for ListDatasets Operation public virtual Task ListDatasetsAsync(ListDatasetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListDatasetsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListDatasetsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListIdentityPoolUsage internal virtual ListIdentityPoolUsageResponse ListIdentityPoolUsage(ListIdentityPoolUsageRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListIdentityPoolUsageRequestMarshaller.Instance; options.ResponseUnmarshaller = ListIdentityPoolUsageResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the ListIdentityPoolUsage service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListIdentityPoolUsage service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for ListIdentityPoolUsage Operation public virtual Task ListIdentityPoolUsageAsync(ListIdentityPoolUsageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListIdentityPoolUsageRequestMarshaller.Instance; options.ResponseUnmarshaller = ListIdentityPoolUsageResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListRecords internal virtual ListRecordsResponse ListRecords(ListRecordsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListRecordsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListRecordsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the ListRecords service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListRecords service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for ListRecords Operation public virtual Task ListRecordsAsync(ListRecordsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListRecordsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListRecordsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region RegisterDevice internal virtual RegisterDeviceResponse RegisterDevice(RegisterDeviceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = RegisterDeviceRequestMarshaller.Instance; options.ResponseUnmarshaller = RegisterDeviceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the RegisterDevice service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the RegisterDevice service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for RegisterDevice Operation public virtual Task RegisterDeviceAsync(RegisterDeviceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = RegisterDeviceRequestMarshaller.Instance; options.ResponseUnmarshaller = RegisterDeviceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region SetCognitoEvents internal virtual SetCognitoEventsResponse SetCognitoEvents(SetCognitoEventsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = SetCognitoEventsRequestMarshaller.Instance; options.ResponseUnmarshaller = SetCognitoEventsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the SetCognitoEvents service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the SetCognitoEvents service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for SetCognitoEvents Operation public virtual Task SetCognitoEventsAsync(SetCognitoEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = SetCognitoEventsRequestMarshaller.Instance; options.ResponseUnmarshaller = SetCognitoEventsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region SetIdentityPoolConfiguration internal virtual SetIdentityPoolConfigurationResponse SetIdentityPoolConfiguration(SetIdentityPoolConfigurationRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = SetIdentityPoolConfigurationRequestMarshaller.Instance; options.ResponseUnmarshaller = SetIdentityPoolConfigurationResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the SetIdentityPoolConfiguration service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the SetIdentityPoolConfiguration service method, as returned by CognitoSync. /// /// Thrown if there are parallel requests to modify a resource. /// /// /// Indicates an internal service error. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for SetIdentityPoolConfiguration Operation public virtual Task SetIdentityPoolConfigurationAsync(SetIdentityPoolConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = SetIdentityPoolConfigurationRequestMarshaller.Instance; options.ResponseUnmarshaller = SetIdentityPoolConfigurationResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region SubscribeToDataset internal virtual SubscribeToDatasetResponse SubscribeToDataset(SubscribeToDatasetRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = SubscribeToDatasetRequestMarshaller.Instance; options.ResponseUnmarshaller = SubscribeToDatasetResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the SubscribeToDataset service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the SubscribeToDataset service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for SubscribeToDataset Operation public virtual Task SubscribeToDatasetAsync(SubscribeToDatasetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = SubscribeToDatasetRequestMarshaller.Instance; options.ResponseUnmarshaller = SubscribeToDatasetResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UnsubscribeFromDataset internal virtual UnsubscribeFromDatasetResponse UnsubscribeFromDataset(UnsubscribeFromDatasetRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UnsubscribeFromDatasetRequestMarshaller.Instance; options.ResponseUnmarshaller = UnsubscribeFromDatasetResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the UnsubscribeFromDataset service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UnsubscribeFromDataset service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for UnsubscribeFromDataset Operation public virtual Task UnsubscribeFromDatasetAsync(UnsubscribeFromDatasetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UnsubscribeFromDatasetRequestMarshaller.Instance; options.ResponseUnmarshaller = UnsubscribeFromDatasetResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UpdateRecords internal virtual UpdateRecordsResponse UpdateRecords(UpdateRecordsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateRecordsRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateRecordsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the UpdateRecords service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UpdateRecords service method, as returned by CognitoSync. /// /// Indicates an internal service error. /// /// /// The AWS Lambda function returned invalid output or an exception. /// /// /// Thrown when a request parameter does not comply with the associated constraints. /// /// /// AWS Lambda throttled your account, please contact AWS Support /// /// /// Thrown when the limit on the number of objects or operations has been exceeded. /// /// /// Thrown when a user is not authorized to access the requested resource. /// /// /// Thrown if an update can't be applied because the resource was changed by another call /// and this would result in a conflict. /// /// /// Thrown if the resource doesn't exist. /// /// /// Thrown if the request is throttled. /// /// REST API Reference for UpdateRecords Operation public virtual Task UpdateRecordsAsync(UpdateRecordsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateRecordsRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateRecordsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion } }