public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.DynamoDBv2.Model.DescribeStreamRequest(); if (cmdletContext.ExclusiveStartShardId != null) { request.ExclusiveStartShardId = cmdletContext.ExclusiveStartShardId; } if (cmdletContext.Limit != null) { request.Limit = cmdletContext.Limit.Value; } if (cmdletContext.StreamArn != null) { request.StreamArn = cmdletContext.StreamArn; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
/// <summary> /// Initiates the asynchronous execution of the DescribeStream operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeStream 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> public Task<DescribeStreamResponse> DescribeStreamAsync(DescribeStreamRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeStreamRequestMarshaller(); var unmarshaller = DescribeStreamResponseUnmarshaller.Instance; return InvokeAsync<DescribeStreamRequest,DescribeStreamResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Returns information about a stream, including the current status of the stream, its /// Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB /// table. /// /// <note> /// <para> /// You can call <i>DescribeStream</i> at a maximum rate of 10 times per second. /// </para> /// </note> /// <para> /// Each shard in the stream has a <code>SequenceNumberRange</code> associated with it. /// If the <code>SequenceNumberRange</code> has a <code>StartingSequenceNumber</code> /// but no <code>EndingSequenceNumber</code>, then the shard is still open (able to receive /// more stream records). If both <code>StartingSequenceNumber</code> and <code>EndingSequenceNumber</code> /// are present, then that shard is closed and can no longer receive more data. /// </para> /// </summary> /// <param name="streamArn">The Amazon Resource Name (ARN) for the stream.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeStream service method, as returned by DynamoDBStreams.</returns> /// <exception cref="Amazon.DynamoDBv2.Model.InternalServerErrorException"> /// An error occurred on the server side. /// </exception> /// <exception cref="Amazon.DynamoDBv2.Model.ResourceNotFoundException"> /// The operation tried to access a nonexistent stream. /// </exception> public Task<DescribeStreamResponse> DescribeStreamAsync(string streamArn, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var request = new DescribeStreamRequest(); request.StreamArn = streamArn; return DescribeStreamAsync(request, cancellationToken); }
internal DescribeStreamResponse DescribeStream(DescribeStreamRequest request) { var marshaller = new DescribeStreamRequestMarshaller(); var unmarshaller = DescribeStreamResponseUnmarshaller.Instance; return Invoke<DescribeStreamRequest,DescribeStreamResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DescribeStream operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeStream operation on AmazonDynamoDBStreamsClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">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>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeStream /// operation.</returns> public IAsyncResult BeginDescribeStream(DescribeStreamRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeStreamRequestMarshaller(); var unmarshaller = DescribeStreamResponseUnmarshaller.Instance; return BeginInvoke<DescribeStreamRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Returns information about a stream, including the current status of the stream, its /// Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB /// table. /// /// <note> /// <para> /// You can call <i>DescribeStream</i> at a maximum rate of 10 times per second. /// </para> /// </note> /// <para> /// Each shard in the stream has a <code>SequenceNumberRange</code> associated with it. /// If the <code>SequenceNumberRange</code> has a <code>StartingSequenceNumber</code> /// but no <code>EndingSequenceNumber</code>, then the shard is still open (able to receive /// more stream records). If both <code>StartingSequenceNumber</code> and <code>EndingSequenceNumber</code> /// are present, the that shared is closed and can no longer receive more data. /// </para> /// </summary> /// <param name="streamArn">The Amazon Resource Name (ARN) for the stream.</param> /// /// <returns>The response from the DescribeStream service method, as returned by DynamoDBStreams.</returns> /// <exception cref="Amazon.DynamoDBv2.Model.InternalServerErrorException"> /// An error occurred on the server side. /// </exception> /// <exception cref="Amazon.DynamoDBv2.Model.ResourceNotFoundException"> /// The operation tried to access a nonexistent stream. /// </exception> public DescribeStreamResponse DescribeStream(string streamArn) { var request = new DescribeStreamRequest(); request.StreamArn = streamArn; return DescribeStream(request); }
private Amazon.DynamoDBv2.Model.DescribeStreamResponse CallAWSServiceOperation(IAmazonDynamoDBStreams client, Amazon.DynamoDBv2.Model.DescribeStreamRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon DynamoDB", "DescribeStream"); try { #if DESKTOP return(client.DescribeStream(request)); #elif CORECLR return(client.DescribeStreamAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }