コード例 #1
0
        internal GetKinesisStreamResponse GetKinesisStream(GetKinesisStreamRequest request)
        {
            var marshaller   = new GetKinesisStreamRequestMarshaller();
            var unmarshaller = GetKinesisStreamResponseUnmarshaller.Instance;

            return(Invoke <GetKinesisStreamRequest, GetKinesisStreamResponse>(request, marshaller, unmarshaller));
        }
コード例 #2
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetKinesisStream operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetKinesisStream operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/GetKinesisStream">REST API Reference for GetKinesisStream Operation</seealso>
        public Task <GetKinesisStreamResponse> GetKinesisStreamAsync(GetKinesisStreamRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetKinesisStreamRequestMarshaller();
            var unmarshaller = GetKinesisStreamResponseUnmarshaller.Instance;

            return(InvokeAsync <GetKinesisStreamRequest, GetKinesisStreamResponse>(request, marshaller,
                                                                                   unmarshaller, cancellationToken));
        }
コード例 #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetKinesisStream operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetKinesisStream 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/GetKinesisStream">REST API Reference for GetKinesisStream Operation</seealso>
        public void GetKinesisStreamAsync(GetKinesisStreamRequest request, AmazonServiceCallback <GetKinesisStreamRequest, GetKinesisStreamResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = new GetKinesisStreamRequestMarshaller();
            var unmarshaller = GetKinesisStreamResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

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