static DescribeStreamResponse DescribeStream(IAmazonKinesis kinesisClient, string streamName)
        {
            var request = new DescribeStreamRequest {
                StreamName = streamName
            };

            try
            {
                var response = kinesisClient.DescribeStream(request);
                return(response);
            }
            catch (ResourceNotFoundException)
            {
                return(null);
            }
        }
Ejemplo n.º 2
0
 private Amazon.Kinesis.Model.DescribeStreamResponse CallAWSServiceOperation(IAmazonKinesis client, Amazon.Kinesis.Model.DescribeStreamRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Kinesis", "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;
     }
 }
 static DescribeStreamResponse DescribeStream(IAmazonKinesis kinesisClient, string streamName)
 {
     var request = new DescribeStreamRequest { StreamName = streamName };
     try
     {
         var response = kinesisClient.DescribeStream(request);
         return response;
     }
     catch (ResourceNotFoundException)
     {
         return null;
     }
 }