Пример #1
0
 public void DeleteBucketPolicyAsync(string bucketName, AmazonServiceCallback <DeleteBucketPolicyRequest, DeleteBucketPolicyResponse> callback, AsyncOptions options = null)
 {
     throw new System.NotImplementedException();
 }
Пример #2
0
 /// <summary>
 /// Creates a Table object with the specified name, using the
 /// passed-in client to load the table definition.
 ///
 /// This method return an exception if the table does not exist within the callback.
 /// </summary>
 /// <param name="ddbClient">Client to use to access DynamoDB.</param>
 /// <param name="tableName">Name of the table.</param>
 /// <param name="conversion">Conversion to use for converting .NET values to DynamoDB values.</param>
 /// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</para>
 /// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</para>
 public static void LoadTableAsync(IAmazonDynamoDB ddbClient, string tableName, DynamoDBEntryConversion conversion, AmazonDynamoDBCallback <Table> callback, AsyncOptions asyncOptions = null)
 {
     LoadTableAsync(ddbClient, tableName, DynamoDBConsumer.DocumentModel, conversion, callback, asyncOptions);
 }
Пример #3
0
 /// <summary>
 /// Initiates the asynchronous execution of the PutItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.PutItem"/>
 /// </summary>
 /// <param name="doc">Document to save.</param>
 /// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</param>
 /// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</param>
 public void PutItemAsync(Document doc, AmazonDynamoDBCallback <Document> callback, AsyncOptions asyncOptions = null)
 {
     asyncOptions = asyncOptions ?? new AsyncOptions();
     DynamoDBAsyncExecutor.ExecuteAsync <Document>(
         () => { return(PutItemHelper(doc, null, true)); },
         asyncOptions,
         callback);
 }
Пример #4
0
        /// <summary>
        /// Creates a Table object with the specified name, using the
        /// passed-in client to load the table definition.
        ///
        /// This method return an exception if the table does not exist within the callback.
        /// </summary>
        /// <param name="ddbClient">Client to use to access DynamoDB.</param>
        /// <param name="tableName">Name of the table.</param>
        /// <param name="conversion">Conversion to use for converting .NET values to DynamoDB values.</param>
        /// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</param>
        /// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</param>
        public static void LoadTableAsync(IAmazonDynamoDB ddbClient, string tableName, DynamoDBEntryConversion conversion, AmazonDynamoDBCallback <Table> callback, AsyncOptions asyncOptions = null)
        {
            var config = new TableConfig(tableName, conversion, DynamoDBConsumer.DocumentModel, storeAsEpoch: null);

            LoadTableAsync(ddbClient, config, callback, asyncOptions);
        }
Пример #5
0
 /// <summary>
 /// Initiates the asynchronous execution of the GetItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.GetItem"/>
 /// </summary>
 /// <param name="hashKey">Hash key element of the document.</param>
 /// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</param>
 /// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</param>
 public void GetItemAsync(Primitive hashKey, AmazonDynamoDBCallback <Document> callback, AsyncOptions asyncOptions = null)
 {
     asyncOptions = asyncOptions ?? new AsyncOptions();
     DynamoDBAsyncExecutor.ExecuteAsync <Document>(
         () => { return(GetItemHelper(MakeKey(hashKey, null), null, true)); },
         asyncOptions,
         callback);
 }
Пример #6
0
        /// <summary>
        /// Lists your Amazon Kinesis streams.
        ///
        ///
        /// <para>
        /// The number of streams may be too large to return from a single call to <code>ListStreams</code>.
        /// You can limit the number of returned streams using the <code>Limit</code> parameter.
        /// If you do not specify a value for the <code>Limit</code> parameter, Amazon Kinesis
        /// uses the default limit, which is currently 10.
        /// </para>
        ///
        /// <para>
        /// You can detect if there are more streams available to list by using the <code>HasMoreStreams</code>
        /// flag from the returned output. If there are more streams available, you can request
        /// more streams by using the name of the last stream returned by the <code>ListStreams</code>
        /// request in the <code>ExclusiveStartStreamName</code> parameter in a subsequent request
        /// to <code>ListStreams</code>. The group of stream names returned by the subsequent
        /// request is then added to the list. You can continue this process until all the stream
        /// names have been collected in the list.
        /// </para>
        ///
        /// <para>
        ///  <a>ListStreams</a> has a limit of 5 transactions per second per account.
        /// </para>
        /// </summary>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>

        /// <param name="options">
        ///     A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///     procedure using the AsyncState property.
        /// </param>
        ///
        /// <returns>The response from the ListStreams service method, as returned by Kinesis.</returns>
        /// <exception cref="Amazon.Kinesis.Model.LimitExceededException">
        /// The requested resource exceeds the maximum number allowed, or the number of concurrent
        /// stream requests exceeds the maximum number allowed (5).
        /// </exception>
        public void ListStreamsAsync(AmazonServiceCallback <ListStreamsRequest, ListStreamsResponse> callback, AsyncOptions options = null)
        {
            ListStreamsAsync(new ListStreamsRequest(), callback, options);
        }
Пример #7
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateShardCount operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the UpdateShardCount operation on AmazonKinesisClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        public void UpdateShardCountAsync(UpdateShardCountRequest request, AmazonServiceCallback <UpdateShardCountRequest, UpdateShardCountResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = new UpdateShardCountRequestMarshaller();
            var unmarshaller = UpdateShardCountResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <UpdateShardCountRequest, UpdateShardCountResponse> responseObject
                        = new AmazonServiceResult <UpdateShardCountRequest, UpdateShardCountResponse>((UpdateShardCountRequest)req, (UpdateShardCountResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <UpdateShardCountRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }

        #endregion
    }
Пример #8
0
        /// <summary>
        /// Initiates the asynchronous execution of the AssumeRoleWithWebIdentity operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the AssumeRoleWithWebIdentity operation on AmazonSecurityTokenServiceClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity">REST API Reference for AssumeRoleWithWebIdentity Operation</seealso>
        public void AssumeRoleWithWebIdentityAsync(AssumeRoleWithWebIdentityRequest request, AmazonServiceCallback <AssumeRoleWithWebIdentityRequest, AssumeRoleWithWebIdentityResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = new AssumeRoleWithWebIdentityRequestMarshaller();
            var unmarshaller = AssumeRoleWithWebIdentityResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <AssumeRoleWithWebIdentityRequest, AssumeRoleWithWebIdentityResponse> responseObject
                        = new AmazonServiceResult <AssumeRoleWithWebIdentityRequest, AssumeRoleWithWebIdentityResponse>((AssumeRoleWithWebIdentityRequest)req, (AssumeRoleWithWebIdentityResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <AssumeRoleWithWebIdentityRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }
Пример #9
0
        /// <summary>
        /// Initiates the asynchronous execution of the DecodeAuthorizationMessage operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DecodeAuthorizationMessage operation on AmazonSecurityTokenServiceClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage">REST API Reference for DecodeAuthorizationMessage Operation</seealso>
        public void DecodeAuthorizationMessageAsync(DecodeAuthorizationMessageRequest request, AmazonServiceCallback <DecodeAuthorizationMessageRequest, DecodeAuthorizationMessageResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = new DecodeAuthorizationMessageRequestMarshaller();
            var unmarshaller = DecodeAuthorizationMessageResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <DecodeAuthorizationMessageRequest, DecodeAuthorizationMessageResponse> responseObject
                        = new AmazonServiceResult <DecodeAuthorizationMessageRequest, DecodeAuthorizationMessageResponse>((DecodeAuthorizationMessageRequest)req, (DecodeAuthorizationMessageResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <DecodeAuthorizationMessageRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }
        /// <summary>
        /// Refreshes dataset metadata. Dataset metadata is pulled from remote
        /// storage and stored in local storage. Their record data isn't pulled down
        /// until you sync each dataset.
        /// </summary>
        /// <param name="callback">Callback once the refresh is complete</param>
        /// <param name="options">Options for asynchronous execution</param>
        /// <exception cref="Amazon.CognitoSync.SyncManager.DataStorageException">Thrown when fail to fresh dataset metadata</exception>
        public void RefreshDatasetMetadataAsync(AmazonCognitoSyncCallback <List <DatasetMetadata> > callback, AsyncOptions options = null)
        {
            options = options ?? new AsyncOptions();

            remote.GetDatasetMetadataAsync((cognitoResult) =>
            {
                Exception ex = cognitoResult.Exception;
                List <DatasetMetadata> res = cognitoResult.Response;
                if (ex != null)
                {
                    InternalSDKUtils.AsyncExecutor(() => callback(cognitoResult), options);
                }
                else
                {
                    Local.UpdateDatasetMetadata(GetIdentityId(), res);
                    InternalSDKUtils.AsyncExecutor(() => callback(cognitoResult), options);
                }
            }, options);
        }
Пример #11
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListTagsForDeliveryStream operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListTagsForDeliveryStream operation on AmazonKinesisFirehoseClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/ListTagsForDeliveryStream">REST API Reference for ListTagsForDeliveryStream Operation</seealso>
        public virtual void ListTagsForDeliveryStreamAsync(ListTagsForDeliveryStreamRequest request, AmazonServiceCallback <ListTagsForDeliveryStreamRequest, ListTagsForDeliveryStreamResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = ListTagsForDeliveryStreamRequestMarshaller.Instance;
            var unmarshaller = ListTagsForDeliveryStreamResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <ListTagsForDeliveryStreamRequest, ListTagsForDeliveryStreamResponse> responseObject
                        = new AmazonServiceResult <ListTagsForDeliveryStreamRequest, ListTagsForDeliveryStreamResponse>((ListTagsForDeliveryStreamRequest)req, (ListTagsForDeliveryStreamResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <ListTagsForDeliveryStreamRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }
        /// <summary>
        /// Upload data to Amazon S3 using HTTP POST.
        /// </summary>
        /// <remarks>
        /// For more information, <see href="http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingHTTPPOST.html"/>
        /// </remarks>
        /// <param name="request">Request object which describes the data to POST</param>
        public void PostObjectAsync(PostObjectRequest request, AmazonServiceCallback <PostObjectRequest, PostObjectResponse> callback, AsyncOptions options = null)
        {
            options = options == null ? new AsyncOptions() : options;


            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper
                = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) =>
                {
                AmazonServiceResult <PostObjectRequest, PostObjectResponse> responseObject
                    = new AmazonServiceResult <PostObjectRequest, PostObjectResponse>((PostObjectRequest)req, (PostObjectResponse)res, ex, ao.State);
                if (callback != null)
                {
                    callback(responseObject);
                }
                };

            ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
            {
                // Provide a default policy if user doesn't set it.
                if (request.SignedPolicy == null)
                {
                    CreateSignedPolicy(request);
                }
                PostObject(request, options, callbackHelper);
            }));
        }
        private void PostObject(PostObjectRequest request, AsyncOptions options, Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper)
        {
            string url;
            string subdomain = request.Region.Equals(RegionEndpoint.USEast1) ? "s3" : "s3-" + request.Region.SystemName;
            IDictionary <string, string> headers = new Dictionary <string, string>();

            if (request.Bucket.IndexOf('.') > -1)
            {
                url = string.Format(CultureInfo.InvariantCulture, "https://{0}.amazonaws.com/{1}/", subdomain, request.Bucket);
            }
            else
            {
                url = string.Format(CultureInfo.InvariantCulture, "https://{0}.{1}.amazonaws.com", request.Bucket, subdomain);
            }
            Uri uri = new Uri(url);

            UnityWebRequest webRequest = new UnityWebRequest(uri);

            request.webRequest = webRequest;

            var boundary = Convert.ToBase64String(Guid.NewGuid().ToByteArray()).Replace('=', 'z');

            headers[HeaderKeys.ContentTypeHeader] = string.Format(CultureInfo.InvariantCulture, "multipart/form-data; boundary={0}", boundary);
            headers[HeaderKeys.UserAgentHeader]   = AWSSDKUtils.UserAgentHeader;

            webRequest.Method = "POST";

            using (var reqStream = new MemoryStream())
            {
                request.WriteFormData(boundary, reqStream);

                byte[] boundaryBytes = Encoding.UTF8.GetBytes(string.Format(CultureInfo.InvariantCulture, "--{0}\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n", boundary));

                reqStream.Write(boundaryBytes, 0, boundaryBytes.Length);

                using (var inputStream = null == request.Path ? request.InputStream : File.OpenRead(request.Path))
                {
                    byte[] buf = new byte[1024];
                    int    bytesRead;
                    while ((bytesRead = inputStream.Read(buf, 0, 1024)) > 0)
                    {
                        reqStream.Write(buf, 0, bytesRead);
                    }
                }

                byte[] endBoundaryBytes = Encoding.UTF8.GetBytes(string.Format(CultureInfo.InvariantCulture, "\r\n--{0}--", boundary));

                reqStream.Write(endBoundaryBytes, 0, endBoundaryBytes.Length);

                webRequest.WriteToRequestBody(null, reqStream.ToArray(), headers);
            }

            var executionContext = new AsyncExecutionContext(
                new AsyncRequestContext(this.Config.LogMetrics)
            {
                ClientConfig    = this.Config,
                OriginalRequest = request,
                Action          = callbackHelper,
                AsyncOptions    = options,
                IsAsync         = true
            },
                new AsyncResponseContext()
                );

            webRequest.SetRequestHeaders(headers);
            executionContext.RuntimeState = webRequest;


            executionContext.ResponseContext.AsyncResult =
                new RuntimeAsyncResult(executionContext.RequestContext.Callback,
                                       executionContext.RequestContext.State);
            executionContext.ResponseContext.AsyncResult.AsyncOptions = executionContext.RequestContext.AsyncOptions;
            executionContext.ResponseContext.AsyncResult.Action       = executionContext.RequestContext.Action;
            executionContext.ResponseContext.AsyncResult.Request      = executionContext.RequestContext.OriginalRequest;

            webRequest.BeginGetResponse(new AsyncCallback(ProcessPostResponse), executionContext);
        }
Пример #14
0
 public void DeleteBucketReplicationAsync(DeleteBucketReplicationRequest request, AmazonServiceCallback <DeleteBucketReplicationRequest, DeleteBucketReplicationResponse> callback, AsyncOptions options = null)
 {
     throw new System.NotImplementedException();
 }
Пример #15
0
        /// <summary>
        /// Increases the Amazon Kinesis stream's retention period, which is the length of time
        /// data records are accessible after they are added to the stream. The maximum value
        /// of a stream's retention period is 168 hours (7 days).
        ///
        ///
        /// <para>
        /// Upon choosing a longer stream retention period, this operation will increase the time
        /// period records are accessible that have not yet expired. However, it will not make
        /// previous data that has expired (older than the stream's previous retention period)
        /// accessible after the operation has been called. For example, if a stream's retention
        /// period is set to 24 hours and is increased to 168 hours, any data that is older than
        /// 24 hours will remain inaccessible to consumer applications.
        /// </para>
        /// </summary>
        /// <param name="streamName">The name of the stream to modify.</param>
        /// <param name="retentionPeriodHours">The new retention period of the stream, in hours. Must be more than the current retention period.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">
        ///     A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///     procedure using the AsyncState property.
        /// </param>
        ///
        /// <returns>The response from the IncreaseStreamRetentionPeriod service method, as returned by Kinesis.</returns>
        /// <exception cref="Amazon.Kinesis.Model.InvalidArgumentException">
        /// A specified parameter exceeds its restrictions, is not supported, or can't be used.
        /// For more information, see the returned message.
        /// </exception>
        /// <exception cref="Amazon.Kinesis.Model.ResourceInUseException">
        /// The resource is not available for this operation. For successful operation, the resource
        /// needs to be in the <code>ACTIVE</code> state.
        /// </exception>
        /// <exception cref="Amazon.Kinesis.Model.ResourceNotFoundException">
        /// The requested resource could not be found. The stream might not be specified correctly.
        /// </exception>
        public void IncreaseStreamRetentionPeriodAsync(string streamName, int retentionPeriodHours, AmazonServiceCallback <IncreaseStreamRetentionPeriodRequest, IncreaseStreamRetentionPeriodResponse> callback, AsyncOptions options = null)
        {
            var request = new IncreaseStreamRetentionPeriodRequest();

            request.StreamName           = streamName;
            request.RetentionPeriodHours = retentionPeriodHours;
            IncreaseStreamRetentionPeriodAsync(request, callback, options);
        }
Пример #16
0
        /// <summary>
        /// Returns a set of temporary credentials for an AWS account or IAM user. The credentials
        /// consist of an access key ID, a secret access key, and a security token. Typically,
        /// you use <code>GetSessionToken</code> if you want to use MFA to protect programmatic
        /// calls to specific AWS APIs like Amazon EC2 <code>StopInstances</code>. MFA-enabled
        /// IAM users would need to call <code>GetSessionToken</code> and submit an MFA code that
        /// is associated with their MFA device. Using the temporary security credentials that
        /// are returned from the call, IAM users can then make programmatic calls to APIs that
        /// require MFA authentication. If you do not supply a correct MFA code, then the API
        /// returns an access denied error. For a comparison of <code>GetSessionToken</code> with
        /// the other APIs that produce temporary credentials, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting
        /// Temporary Security Credentials</a> and <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing
        /// the AWS STS APIs</a> in the <i>IAM User Guide</i>.
        ///
        ///
        /// <para>
        /// The <code>GetSessionToken</code> action must be called by using the long-term AWS
        /// security credentials of the AWS account or an IAM user. Credentials that are created
        /// by IAM users are valid for the duration that you specify, from 900 seconds (15 minutes)
        /// up to a maximum of 129600 seconds (36 hours), with a default of 43200 seconds (12
        /// hours); credentials that are created by using account credentials can range from 900
        /// seconds (15 minutes) up to a maximum of 3600 seconds (1 hour), with a default of 1
        /// hour.
        /// </para>
        ///
        /// <para>
        /// The temporary security credentials created by <code>GetSessionToken</code> can be
        /// used to make API calls to any AWS service with the following exceptions:
        /// </para>
        ///  <ul> <li>
        /// <para>
        /// You cannot call any IAM APIs unless MFA authentication information is included in
        /// the request.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// You cannot call any STS API <i>except</i> <code>AssumeRole</code> or <code>GetCallerIdentity</code>.
        /// </para>
        ///  </li> </ul> <note>
        /// <para>
        /// We recommend that you do not call <code>GetSessionToken</code> with root account credentials.
        /// Instead, follow our <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users">best
        /// practices</a> by creating one or more IAM users, giving them the necessary permissions,
        /// and using IAM users for everyday interaction with AWS.
        /// </para>
        ///  </note>
        /// <para>
        /// The permissions associated with the temporary security credentials returned by <code>GetSessionToken</code>
        /// are based on the permissions associated with account or IAM user whose credentials
        /// are used to call the action. If <code>GetSessionToken</code> is called using root
        /// account credentials, the temporary credentials have root account permissions. Similarly,
        /// if <code>GetSessionToken</code> is called using the credentials of an IAM user, the
        /// temporary credentials have the same permissions as the IAM user.
        /// </para>
        ///
        /// <para>
        /// For more information about using <code>GetSessionToken</code> to create temporary
        /// credentials, go to <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken">Temporary
        /// Credentials for Users in Untrusted Environments</a> in the <i>IAM User Guide</i>.
        ///
        /// </para>
        /// </summary>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>

        /// <param name="options">
        ///     A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///     procedure using the AsyncState property.
        /// </param>
        ///
        /// <returns>The response from the GetSessionToken service method, as returned by SecurityTokenService.</returns>
        /// <exception cref="Amazon.SecurityToken.Model.RegionDisabledException">
        /// STS is not activated in the requested region for the account that is being asked to
        /// generate credentials. The account administrator must use the IAM console to activate
        /// STS in that region. For more information, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating
        /// and Deactivating AWS STS in an AWS Region</a> in the <i>IAM User Guide</i>.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken">REST API Reference for GetSessionToken Operation</seealso>
        public void GetSessionTokenAsync(AmazonServiceCallback <GetSessionTokenRequest, GetSessionTokenResponse> callback, AsyncOptions options = null)
        {
            GetSessionTokenAsync(new GetSessionTokenRequest(), callback, options);
        }
Пример #17
0
        /// <summary>
        /// Initiates the asynchronous execution of the IncreaseStreamRetentionPeriod operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the IncreaseStreamRetentionPeriod operation on AmazonKinesisClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        public void IncreaseStreamRetentionPeriodAsync(IncreaseStreamRetentionPeriodRequest request, AmazonServiceCallback <IncreaseStreamRetentionPeriodRequest, IncreaseStreamRetentionPeriodResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = new IncreaseStreamRetentionPeriodRequestMarshaller();
            var unmarshaller = IncreaseStreamRetentionPeriodResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <IncreaseStreamRetentionPeriodRequest, IncreaseStreamRetentionPeriodResponse> responseObject
                        = new AmazonServiceResult <IncreaseStreamRetentionPeriodRequest, IncreaseStreamRetentionPeriodResponse>((IncreaseStreamRetentionPeriodRequest)req, (IncreaseStreamRetentionPeriodResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <IncreaseStreamRetentionPeriodRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }
Пример #18
0
        /// <summary>
        /// Deletes a delivery stream and its data.
        ///
        ///
        /// <para>
        /// You can delete a delivery stream only if it is in <code>ACTIVE</code> or <code>DELETING</code>
        /// state, and not in the <code>CREATING</code> state. While the deletion request is in
        /// process, the delivery stream is in the <code>DELETING</code> state.
        /// </para>
        ///
        /// <para>
        /// To check the state of a delivery stream, use <a>DescribeDeliveryStream</a>.
        /// </para>
        ///
        /// <para>
        /// While the delivery stream is <code>DELETING</code> state, the service may continue
        /// to accept the records, but the service doesn't make any guarantees with respect to
        /// delivering the data. Therefore, as a best practice, you should first stop any applications
        /// that are sending records before deleting a delivery stream.
        /// </para>
        /// </summary>
        /// <param name="deliveryStreamName">The name of the delivery stream.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">
        ///     A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///     procedure using the AsyncState property.
        /// </param>
        ///
        /// <returns>The response from the DeleteDeliveryStream service method, as returned by KinesisFirehose.</returns>
        /// <exception cref="Amazon.KinesisFirehose.Model.ResourceInUseException">
        /// The resource is already in use and not available for this operation.
        /// </exception>
        /// <exception cref="Amazon.KinesisFirehose.Model.ResourceNotFoundException">
        /// The specified resource could not be found.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/DeleteDeliveryStream">REST API Reference for DeleteDeliveryStream Operation</seealso>
        public virtual void DeleteDeliveryStreamAsync(string deliveryStreamName, AmazonServiceCallback <DeleteDeliveryStreamRequest, DeleteDeliveryStreamResponse> callback, AsyncOptions options = null)
        {
            var request = new DeleteDeliveryStreamRequest();

            request.DeliveryStreamName = deliveryStreamName;
            DeleteDeliveryStreamAsync(request, callback, options);
        }
Пример #19
0
        /// <summary>
        /// Initiates the asynchronous execution of the RemoveTagsFromStream operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the RemoveTagsFromStream operation on AmazonKinesisClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        public void RemoveTagsFromStreamAsync(RemoveTagsFromStreamRequest request, AmazonServiceCallback <RemoveTagsFromStreamRequest, RemoveTagsFromStreamResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = new RemoveTagsFromStreamRequestMarshaller();
            var unmarshaller = RemoveTagsFromStreamResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <RemoveTagsFromStreamRequest, RemoveTagsFromStreamResponse> responseObject
                        = new AmazonServiceResult <RemoveTagsFromStreamRequest, RemoveTagsFromStreamResponse>((RemoveTagsFromStreamRequest)req, (RemoveTagsFromStreamResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <RemoveTagsFromStreamRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }
Пример #20
0
        /// <summary>
        /// Writes a single data record into an Amazon Kinesis Firehose delivery stream. To write
        /// multiple data records into a delivery stream, use <a>PutRecordBatch</a>. Applications
        /// using these operations are referred to as producers.
        ///
        ///
        /// <para>
        /// By default, each delivery stream can take in up to 2,000 transactions per second,
        /// 5,000 records per second, or 5 MB per second. Note that if you use <a>PutRecord</a>
        /// and <a>PutRecordBatch</a>, the limits are an aggregate across these two operations
        /// for each delivery stream. For more information about limits and how to request an
        /// increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
        /// Kinesis Firehose Limits</a>.
        /// </para>
        ///
        /// <para>
        /// You must specify the name of the delivery stream and the data record when using <a>PutRecord</a>.
        /// The data record consists of a data blob that can be up to 1,000 KB in size, and any
        /// kind of data, for example, a segment from a log file, geographic location data, website
        /// clickstream data, and so on.
        /// </para>
        ///
        /// <para>
        /// Kinesis Firehose buffers records before delivering them to the destination. To disambiguate
        /// the data blobs at the destination, a common solution is to use delimiters in the data,
        /// such as a newline (<code>\n</code>) or some other character unique within the data.
        /// This allows the consumer application to parse individual data items when reading the
        /// data from the destination.
        /// </para>
        ///
        /// <para>
        /// The <a>PutRecord</a> operation returns a <b>RecordId</b>, which is a unique string
        /// assigned to each record. Producer applications can use this ID for purposes such as
        /// auditability and investigation.
        /// </para>
        ///
        /// <para>
        /// If the <a>PutRecord</a> operation throws a <b>ServiceUnavailableException</b>, back
        /// off and retry. If the exception persists, it is possible that the throughput limits
        /// have been exceeded for the delivery stream.
        /// </para>
        ///
        /// <para>
        /// Data records sent to Kinesis Firehose are stored for 24 hours from the time they are
        /// added to a delivery stream as it attempts to send the records to the destination.
        /// If the destination is unreachable for more than 24 hours, the data is no longer available.
        /// </para>
        /// </summary>
        /// <param name="deliveryStreamName">The name of the delivery stream.</param>
        /// <param name="record">The record.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">
        ///     A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///     procedure using the AsyncState property.
        /// </param>
        ///
        /// <returns>The response from the PutRecord service method, as returned by KinesisFirehose.</returns>
        /// <exception cref="Amazon.KinesisFirehose.Model.InvalidArgumentException">
        /// The specified input parameter has a value that is not valid.
        /// </exception>
        /// <exception cref="Amazon.KinesisFirehose.Model.ResourceNotFoundException">
        /// The specified resource could not be found.
        /// </exception>
        /// <exception cref="Amazon.KinesisFirehose.Model.ServiceUnavailableException">
        /// The service is unavailable, back off and retry the operation. If you continue to see
        /// the exception, throughput limits for the delivery stream may have been exceeded. For
        /// more information about limits and how to request an increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
        /// Kinesis Firehose Limits</a>.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecord">REST API Reference for PutRecord Operation</seealso>
        public virtual void PutRecordAsync(string deliveryStreamName, Record record, AmazonServiceCallback <PutRecordRequest, PutRecordResponse> callback, AsyncOptions options = null)
        {
            var request = new PutRecordRequest();

            request.DeliveryStreamName = deliveryStreamName;
            request.Record             = record;
            PutRecordAsync(request, callback, options);
        }
Пример #21
0
 /// <summary>
 /// Initiates the asynchronous execution of the GetRemaining operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Search.GetRemaining"/>
 /// </summary>
 /// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</param>
 /// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</param>
 public void GetRemainingAsync(AmazonDynamoDBCallback <List <Document> > callback, AsyncOptions asyncOptions = null)
 {
     asyncOptions = asyncOptions ?? new AsyncOptions();
     DynamoDBAsyncExecutor.ExecuteAsync <List <Document> >(
         () => { return(GetRemainingHelper(true)); },
         asyncOptions,
         callback);
 }
Пример #22
0
        /// <summary>
        /// Writes multiple data records into a delivery stream in a single call, which can achieve
        /// higher throughput per producer than when writing single records. To write single data
        /// records into a delivery stream, use <a>PutRecord</a>. Applications using these operations
        /// are referred to as producers.
        ///
        ///
        /// <para>
        /// By default, each delivery stream can take in up to 2,000 transactions per second,
        /// 5,000 records per second, or 5 MB per second. If you use <a>PutRecord</a> and <a>PutRecordBatch</a>,
        /// the limits are an aggregate across these two operations for each delivery stream.
        /// For more information about limits, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
        /// Kinesis Firehose Limits</a>.
        /// </para>
        ///
        /// <para>
        /// Each <a>PutRecordBatch</a> request supports up to 500 records. Each record in the
        /// request can be as large as 1,000 KB (before 64-bit encoding), up to a limit of 4 MB
        /// for the entire request. These limits cannot be changed.
        /// </para>
        ///
        /// <para>
        /// You must specify the name of the delivery stream and the data record when using <a>PutRecord</a>.
        /// The data record consists of a data blob that can be up to 1,000 KB in size, and any
        /// kind of data. For example, it could be a segment from a log file, geographic location
        /// data, web site clickstream data, and so on.
        /// </para>
        ///
        /// <para>
        /// Kinesis Firehose buffers records before delivering them to the destination. To disambiguate
        /// the data blobs at the destination, a common solution is to use delimiters in the data,
        /// such as a newline (<code>\n</code>) or some other character unique within the data.
        /// This allows the consumer application to parse individual data items when reading the
        /// data from the destination.
        /// </para>
        ///
        /// <para>
        /// The <a>PutRecordBatch</a> response includes a count of failed records, <b>FailedPutCount</b>,
        /// and an array of responses, <b>RequestResponses</b>. Each entry in the <b>RequestResponses</b>
        /// array provides additional information about the processed record. It directly correlates
        /// with a record in the request array using the same ordering, from the top to the bottom.
        /// The response array always includes the same number of records as the request array.
        /// <b>RequestResponses</b> includes both successfully and unsuccessfully processed records.
        /// Kinesis Firehose attempts to process all records in each <a>PutRecordBatch</a> request.
        /// A single record failure does not stop the processing of subsequent records.
        /// </para>
        ///
        /// <para>
        /// A successfully processed record includes a <b>RecordId</b> value, which is unique
        /// for the record. An unsuccessfully processed record includes <b>ErrorCode</b> and <b>ErrorMessage</b>
        /// values. <b>ErrorCode</b> reflects the type of error, and is one of the following values:
        /// <code>ServiceUnavailable</code> or <code>InternalFailure</code>. <b>ErrorMessage</b>
        /// provides more detailed information about the error.
        /// </para>
        ///
        /// <para>
        /// If there is an internal server error or a timeout, the write might have completed
        /// or it might have failed. If <b>FailedPutCount</b> is greater than 0, retry the request,
        /// resending only those records that might have failed processing. This minimizes the
        /// possible duplicate records and also reduces the total bytes sent (and corresponding
        /// charges). We recommend that you handle any duplicates at the destination.
        /// </para>
        ///
        /// <para>
        /// If <a>PutRecordBatch</a> throws <b>ServiceUnavailableException</b>, back off and retry.
        /// If the exception persists, it is possible that the throughput limits have been exceeded
        /// for the delivery stream.
        /// </para>
        ///
        /// <para>
        /// Data records sent to Kinesis Firehose are stored for 24 hours from the time they are
        /// added to a delivery stream as it attempts to send the records to the destination.
        /// If the destination is unreachable for more than 24 hours, the data is no longer available.
        /// </para>
        /// </summary>
        /// <param name="deliveryStreamName">The name of the delivery stream.</param>
        /// <param name="records">One or more records.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">
        ///     A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///     procedure using the AsyncState property.
        /// </param>
        ///
        /// <returns>The response from the PutRecordBatch service method, as returned by KinesisFirehose.</returns>
        /// <exception cref="Amazon.KinesisFirehose.Model.InvalidArgumentException">
        /// The specified input parameter has a value that is not valid.
        /// </exception>
        /// <exception cref="Amazon.KinesisFirehose.Model.ResourceNotFoundException">
        /// The specified resource could not be found.
        /// </exception>
        /// <exception cref="Amazon.KinesisFirehose.Model.ServiceUnavailableException">
        /// The service is unavailable, back off and retry the operation. If you continue to see
        /// the exception, throughput limits for the delivery stream may have been exceeded. For
        /// more information about limits and how to request an increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
        /// Kinesis Firehose Limits</a>.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecordBatch">REST API Reference for PutRecordBatch Operation</seealso>
        public virtual void PutRecordBatchAsync(string deliveryStreamName, List <Record> records, AmazonServiceCallback <PutRecordBatchRequest, PutRecordBatchResponse> callback, AsyncOptions options = null)
        {
            var request = new PutRecordBatchRequest();

            request.DeliveryStreamName = deliveryStreamName;
            request.Records            = records;
            PutRecordBatchAsync(request, callback, options);
        }
Пример #23
0
 /// <summary>
 /// Creates a Table object with the specified configuration, using the
 /// passed-in client to load the table definition.
 ///
 /// This method will throw an exception if the table does not exist.
 /// </summary>
 /// <param name="ddbClient">Client to use to access DynamoDB.</param>
 /// <param name="config">Configuration to use for the table.</param>
 /// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</param>
 /// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</param>
 public static void LoadTableAsync(IAmazonDynamoDB ddbClient, TableConfig config, AmazonDynamoDBCallback <Table> callback, AsyncOptions asyncOptions = null)
 {
     asyncOptions = asyncOptions ?? new AsyncOptions();
     DynamoDBAsyncExecutor.ExecuteAsync <Table>(
         () => {
         return(LoadTable(ddbClient, config));
     }, asyncOptions, callback);
 }
Пример #24
0
        /// <summary>
        /// Initiates the asynchronous execution of the PutRecordBatch operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the PutRecordBatch operation on AmazonKinesisFirehoseClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecordBatch">REST API Reference for PutRecordBatch Operation</seealso>
        public virtual void PutRecordBatchAsync(PutRecordBatchRequest request, AmazonServiceCallback <PutRecordBatchRequest, PutRecordBatchResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = PutRecordBatchRequestMarshaller.Instance;
            var unmarshaller = PutRecordBatchResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <PutRecordBatchRequest, PutRecordBatchResponse> responseObject
                        = new AmazonServiceResult <PutRecordBatchRequest, PutRecordBatchResponse>((PutRecordBatchRequest)req, (PutRecordBatchResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <PutRecordBatchRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }
Пример #25
0
 /// <summary>
 /// Creates a Table object with the specified name, using the
 /// passed-in client to load the table definition.
 /// The returned table will use the conversion specified by
 /// AWSConfigs.DynamoDBConfig.ConversionSchema
 ///
 /// This method return an exception if the table does not exist within the callback.
 /// </summary>
 /// <param name="ddbClient">Client to use to access DynamoDB.</param>
 /// <param name="tableName">Name of the table.</param>
 /// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</para>
 /// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</para>
 public static void LoadTableAsync(IAmazonDynamoDB ddbClient, string tableName, AmazonDynamoDBCallback <Table> callback, AsyncOptions asyncOptions = null)
 {
     LoadTableAsync(ddbClient, tableName, DynamoDBEntryConversion.CurrentConversion, callback, asyncOptions);
 }
Пример #26
0
        /// <summary>
        /// Initiates the asynchronous execution of the EnableEnhancedMonitoring operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the EnableEnhancedMonitoring operation on AmazonKinesisClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        public void EnableEnhancedMonitoringAsync(EnableEnhancedMonitoringRequest request, AmazonServiceCallback <EnableEnhancedMonitoringRequest, EnableEnhancedMonitoringResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = new EnableEnhancedMonitoringRequestMarshaller();
            var unmarshaller = EnableEnhancedMonitoringResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <EnableEnhancedMonitoringRequest, EnableEnhancedMonitoringResponse> responseObject
                        = new AmazonServiceResult <EnableEnhancedMonitoringRequest, EnableEnhancedMonitoringResponse>((EnableEnhancedMonitoringRequest)req, (EnableEnhancedMonitoringResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <EnableEnhancedMonitoringRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }
Пример #27
0
 internal static void LoadTableAsync(IAmazonDynamoDB ddbClient, string tableName, Table.DynamoDBConsumer consumer, DynamoDBEntryConversion conversion, AmazonDynamoDBCallback <Table> callback, AsyncOptions asyncOptions = null)
 {
     asyncOptions = asyncOptions ?? new AsyncOptions();
     DynamoDBAsyncExecutor.ExecuteAsync <Table>(
         () => {
         return(LoadTable(ddbClient, tableName, consumer, conversion));
     }, asyncOptions, callback);
 }
Пример #28
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetShardIterator operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetShardIterator operation on AmazonKinesisClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        public void GetShardIteratorAsync(GetShardIteratorRequest request, AmazonServiceCallback <GetShardIteratorRequest, GetShardIteratorResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = new GetShardIteratorRequestMarshaller();
            var unmarshaller = GetShardIteratorResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <GetShardIteratorRequest, GetShardIteratorResponse> responseObject
                        = new AmazonServiceResult <GetShardIteratorRequest, GetShardIteratorResponse>((GetShardIteratorRequest)req, (GetShardIteratorResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <GetShardIteratorRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }
Пример #29
0
 public void ListUpdatesAsync(string datasetName, long lastSyncCount, AmazonCognitoSyncCallback <DatasetUpdates> callback, AsyncOptions options = null)
 {
     options = options ?? new AsyncOptions();
     PopulateListUpdatesAsync(datasetName, lastSyncCount, new List <Record>(), null, callback, options);
 }
Пример #30
0
 public void UploadPartAsync(UploadPartRequest request, AmazonServiceCallback <UploadPartRequest, UploadPartResponse> callback, AsyncOptions options = null)
 {
     throw new System.NotImplementedException();
 }