Search in sources :

Example 1 with TagStreamRequest

use of com.amazonaws.services.kinesisvideo.model.TagStreamRequest in project aws-sdk-android by aws-amplify.

the class KinesisVideoAndroidServiceClient method tagStream.

@Override
public void tagStream(@NonNull final String streamArn, @Nullable final Map<String, String> tags, long timeoutInMillis, @Nullable final KinesisVideoCredentialsProvider credentialsProvider) throws KinesisVideoException {
    final AWSKinesisVideoClient serviceClient = createAwsKinesisVideoClient(credentialsProvider, Region.getRegion(Regions.fromName(configuration.getRegion())), configuration.getEndpoint(), (int) timeoutInMillis);
    final TagStreamRequest tagStreamRequest = new TagStreamRequest().withStreamARN(streamArn).withTags(tags);
    log.debug("calling tag resource: " + tagStreamRequest.toString());
    final TagStreamResult tagStreamResult;
    try {
        tagStreamResult = serviceClient.tagStream(tagStreamRequest);
    } catch (final AmazonClientException e) {
        log.exception(e, "Service call failed.");
        throw new KinesisVideoException(e);
    }
    log.debug("tag resource result: " + tagStreamResult.toString());
}
Also used : AWSKinesisVideoClient(com.amazonaws.services.kinesisvideo.AWSKinesisVideoClient) AmazonClientException(com.amazonaws.AmazonClientException) TagStreamRequest(com.amazonaws.services.kinesisvideo.model.TagStreamRequest) KinesisVideoException(com.amazonaws.kinesisvideo.common.exception.KinesisVideoException) TagStreamResult(com.amazonaws.services.kinesisvideo.model.TagStreamResult)

Aggregations

AmazonClientException (com.amazonaws.AmazonClientException)1 KinesisVideoException (com.amazonaws.kinesisvideo.common.exception.KinesisVideoException)1 AWSKinesisVideoClient (com.amazonaws.services.kinesisvideo.AWSKinesisVideoClient)1 TagStreamRequest (com.amazonaws.services.kinesisvideo.model.TagStreamRequest)1 TagStreamResult (com.amazonaws.services.kinesisvideo.model.TagStreamResult)1