use of com.amazonaws.services.kinesisvideo.model.DescribeStreamRequest in project aws-sdk-android by aws-amplify.
the class KinesisVideoAndroidServiceClient method describeStream.
@Override
public StreamDescription describeStream(@NonNull final String streamName, long timeoutInMillis, @Nullable final KinesisVideoCredentialsProvider credentialsProvider) throws KinesisVideoException {
final AWSKinesisVideoClient serviceClient = createAwsKinesisVideoClient(credentialsProvider, Region.getRegion(Regions.fromName(configuration.getRegion())), configuration.getEndpoint(), (int) timeoutInMillis);
final DescribeStreamRequest describeStreamRequest = new DescribeStreamRequest().withStreamName(streamName);
log.debug("calling describe stream: " + describeStreamRequest.toString());
final DescribeStreamResult describeStreamResult;
try {
describeStreamResult = serviceClient.describeStream(describeStreamRequest);
} catch (final AmazonClientException e) {
log.exception(e, "Service call failed.");
throw new KinesisVideoException(e);
}
if (null == describeStreamResult) {
log.debug("describe stream returned null");
return null;
}
log.debug("describe stream result: " + describeStreamResult.toString());
return toStreamDescription(describeStreamResult);
}
Aggregations