-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
Copy pathAmazonIVSRealTimeClient.java
2207 lines (1891 loc) · 104 KB
/
AmazonIVSRealTimeClient.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2020-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ivsrealtime;
import org.w3c.dom.*;
import java.net.*;
import java.util.*;
import javax.annotation.Generated;
import org.apache.commons.logging.*;
import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;
import com.amazonaws.services.ivsrealtime.AmazonIVSRealTimeClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.ivsrealtime.model.*;
import com.amazonaws.services.ivsrealtime.model.transform.*;
/**
* Client for accessing ivsrealtime. All service calls made using this client are blocking, and will not return until
* the service call completes.
* <p>
* <p>
* The Amazon Interactive Video Service (IVS) real-time API is REST compatible, using a standard HTTP API and an AWS
* EventBridge event stream for responses. JSON is used for both requests and responses, including errors.
* </p>
* <p>
* <b>Key Concepts</b>
* </p>
* <ul>
* <li>
* <p>
* <b>Stage</b> — A virtual space where participants can exchange video in real time.
* </p>
* </li>
* <li>
* <p>
* <b>Participant token</b> — A token that authenticates a participant when they join a stage.
* </p>
* </li>
* <li>
* <p>
* <b>Participant object</b> — Represents participants (people) in the stage and contains information about them. When a
* token is created, it includes a participant ID; when a participant uses that token to join a stage, the participant
* is associated with that participant ID. There is a 1:1 mapping between participant tokens and participants.
* </p>
* </li>
* </ul>
* <p>
* For server-side composition:
* </p>
* <ul>
* <li>
* <p>
* <b>Composition process</b> — Composites participants of a stage into a single video and forwards it to a set of
* outputs (e.g., IVS channels). Composition endpoints support this process.
* </p>
* </li>
* <li>
* <p>
* <b>Composition</b> — Controls the look of the outputs, including how participants are positioned in the video.
* </p>
* </li>
* </ul>
* <p>
* For more information about your IVS live stream, also see <a
* href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/getting-started.html">Getting Started with Amazon IVS
* Real-Time Streaming</a>.
* </p>
* <p>
* <b>Tagging</b>
* </p>
* <p>
* A <i>tag</i> is a metadata label that you assign to an AWS resource. A tag comprises a <i>key</i> and a <i>value</i>,
* both set by you. For example, you might set a tag as <code>topic:nature</code> to label a particular video category.
* See <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging AWS Resources</a> for more
* information, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS stages
* has no service-specific constraints beyond what is documented there.
* </p>
* <p>
* Tags can help you identify and organize your AWS resources. For example, you can use the same tag for different
* resources to indicate that they are related. You can also use tags to manage access (see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html">Access Tags</a>).
* </p>
* <p>
* The Amazon IVS real-time API has these tag-related endpoints: <a>TagResource</a>, <a>UntagResource</a>, and
* <a>ListTagsForResource</a>. The following resource supports tagging: Stage.
* </p>
* <p>
* At most 50 tags can be applied to a resource.
* </p>
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonIVSRealTimeClient extends AmazonWebServiceClient implements AmazonIVSRealTime {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AmazonIVSRealTime.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "ivs";
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.withContentTypeOverride("application/json")
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller(
com.amazonaws.services.ivsrealtime.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("PendingVerification").withExceptionUnmarshaller(
com.amazonaws.services.ivsrealtime.model.transform.PendingVerificationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller(
com.amazonaws.services.ivsrealtime.model.transform.InternalServerExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller(
com.amazonaws.services.ivsrealtime.model.transform.AccessDeniedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller(
com.amazonaws.services.ivsrealtime.model.transform.ConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.ivsrealtime.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller(
com.amazonaws.services.ivsrealtime.model.transform.ValidationExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.ivsrealtime.model.AmazonIVSRealTimeException.class));
public static AmazonIVSRealTimeClientBuilder builder() {
return AmazonIVSRealTimeClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on ivsrealtime using the specified parameters.
*
* <p>
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AmazonIVSRealTimeClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on ivsrealtime using the specified parameters.
*
* <p>
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AmazonIVSRealTimeClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {
super(clientParams);
this.awsCredentialsProvider = clientParams.getCredentialsProvider();
this.advancedConfig = clientParams.getAdvancedConfig();
init();
}
private void init() {
setServiceNameIntern(DEFAULT_SIGNING_NAME);
setEndpointPrefix(ENDPOINT_PREFIX);
// calling this.setEndPoint(...) will also modify the signer accordingly
setEndpoint("ivsrealtime.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/ivsrealtime/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/ivsrealtime/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
* <p>
* Creates an EncoderConfiguration object.
* </p>
*
* @param createEncoderConfigurationRequest
* @return Result of the CreateEncoderConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ServiceQuotaExceededException
* @throws ConflictException
* @throws PendingVerificationException
* @sample AmazonIVSRealTime.CreateEncoderConfiguration
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/CreateEncoderConfiguration"
* target="_top">AWS API Documentation</a>
*/
@Override
public CreateEncoderConfigurationResult createEncoderConfiguration(CreateEncoderConfigurationRequest request) {
request = beforeClientExecution(request);
return executeCreateEncoderConfiguration(request);
}
@SdkInternalApi
final CreateEncoderConfigurationResult executeCreateEncoderConfiguration(CreateEncoderConfigurationRequest createEncoderConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(createEncoderConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<CreateEncoderConfigurationRequest> request = null;
Response<CreateEncoderConfigurationResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateEncoderConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createEncoderConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateEncoderConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<CreateEncoderConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateEncoderConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Creates an additional token for a specified stage. This can be done after stage creation or when tokens expire.
* Tokens always are scoped to the stage for which they are created.
* </p>
* <p>
* Encryption keys are owned by Amazon IVS and never used directly by your application.
* </p>
*
* @param createParticipantTokenRequest
* @return Result of the CreateParticipantToken operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @throws ServiceQuotaExceededException
* @throws PendingVerificationException
* @sample AmazonIVSRealTime.CreateParticipantToken
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/CreateParticipantToken"
* target="_top">AWS API Documentation</a>
*/
@Override
public CreateParticipantTokenResult createParticipantToken(CreateParticipantTokenRequest request) {
request = beforeClientExecution(request);
return executeCreateParticipantToken(request);
}
@SdkInternalApi
final CreateParticipantTokenResult executeCreateParticipantToken(CreateParticipantTokenRequest createParticipantTokenRequest) {
ExecutionContext executionContext = createExecutionContext(createParticipantTokenRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<CreateParticipantTokenRequest> request = null;
Response<CreateParticipantTokenResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateParticipantTokenRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createParticipantTokenRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateParticipantToken");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<CreateParticipantTokenResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateParticipantTokenResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Creates a new stage (and optionally participant tokens).
* </p>
*
* @param createStageRequest
* @return Result of the CreateStage operation returned by the service.
* @throws ValidationException
* @throws AccessDeniedException
* @throws ServiceQuotaExceededException
* @throws PendingVerificationException
* @sample AmazonIVSRealTime.CreateStage
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/CreateStage" target="_top">AWS API
* Documentation</a>
*/
@Override
public CreateStageResult createStage(CreateStageRequest request) {
request = beforeClientExecution(request);
return executeCreateStage(request);
}
@SdkInternalApi
final CreateStageResult executeCreateStage(CreateStageRequest createStageRequest) {
ExecutionContext executionContext = createExecutionContext(createStageRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<CreateStageRequest> request = null;
Response<CreateStageResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateStageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createStageRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateStage");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<CreateStageResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateStageResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Creates a new storage configuration, used to enable recording to Amazon S3. When a StorageConfiguration is
* created, IVS will modify the S3 bucketPolicy of the provided bucket. This will ensure that IVS has sufficient
* permissions to write content to the provided bucket.
* </p>
*
* @param createStorageConfigurationRequest
* @return Result of the CreateStorageConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ServiceQuotaExceededException
* @throws ConflictException
* @throws PendingVerificationException
* @sample AmazonIVSRealTime.CreateStorageConfiguration
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/CreateStorageConfiguration"
* target="_top">AWS API Documentation</a>
*/
@Override
public CreateStorageConfigurationResult createStorageConfiguration(CreateStorageConfigurationRequest request) {
request = beforeClientExecution(request);
return executeCreateStorageConfiguration(request);
}
@SdkInternalApi
final CreateStorageConfigurationResult executeCreateStorageConfiguration(CreateStorageConfigurationRequest createStorageConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(createStorageConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<CreateStorageConfigurationRequest> request = null;
Response<CreateStorageConfigurationResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateStorageConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createStorageConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateStorageConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<CreateStorageConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateStorageConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Deletes an EncoderConfiguration resource. Ensures that no Compositions are using this template; otherwise,
* returns an error.
* </p>
*
* @param deleteEncoderConfigurationRequest
* @return Result of the DeleteEncoderConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ServiceQuotaExceededException
* @throws ConflictException
* @sample AmazonIVSRealTime.DeleteEncoderConfiguration
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/DeleteEncoderConfiguration"
* target="_top">AWS API Documentation</a>
*/
@Override
public DeleteEncoderConfigurationResult deleteEncoderConfiguration(DeleteEncoderConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDeleteEncoderConfiguration(request);
}
@SdkInternalApi
final DeleteEncoderConfigurationResult executeDeleteEncoderConfiguration(DeleteEncoderConfigurationRequest deleteEncoderConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteEncoderConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<DeleteEncoderConfigurationRequest> request = null;
Response<DeleteEncoderConfigurationResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteEncoderConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteEncoderConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteEncoderConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<DeleteEncoderConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteEncoderConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Deletes the specified public key used to sign stage participant tokens. This invalidates future participant
* tokens generated using the key pair’s private key.
* </p>
*
* @param deletePublicKeyRequest
* @return Result of the DeletePublicKey operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @throws ConflictException
* @throws PendingVerificationException
* @sample AmazonIVSRealTime.DeletePublicKey
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/DeletePublicKey" target="_top">AWS
* API Documentation</a>
*/
@Override
public DeletePublicKeyResult deletePublicKey(DeletePublicKeyRequest request) {
request = beforeClientExecution(request);
return executeDeletePublicKey(request);
}
@SdkInternalApi
final DeletePublicKeyResult executeDeletePublicKey(DeletePublicKeyRequest deletePublicKeyRequest) {
ExecutionContext executionContext = createExecutionContext(deletePublicKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<DeletePublicKeyRequest> request = null;
Response<DeletePublicKeyResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeletePublicKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePublicKeyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePublicKey");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<DeletePublicKeyResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePublicKeyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Shuts down and deletes the specified stage (disconnecting all participants).
* </p>
*
* @param deleteStageRequest
* @return Result of the DeleteStage operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @throws ConflictException
* @throws PendingVerificationException
* @sample AmazonIVSRealTime.DeleteStage
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/DeleteStage" target="_top">AWS API
* Documentation</a>
*/
@Override
public DeleteStageResult deleteStage(DeleteStageRequest request) {
request = beforeClientExecution(request);
return executeDeleteStage(request);
}
@SdkInternalApi
final DeleteStageResult executeDeleteStage(DeleteStageRequest deleteStageRequest) {
ExecutionContext executionContext = createExecutionContext(deleteStageRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<DeleteStageRequest> request = null;
Response<DeleteStageResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteStageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteStageRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteStage");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<DeleteStageResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteStageResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Deletes the storage configuration for the specified ARN.
* </p>
* <p>
* If you try to delete a storage configuration that is used by a Composition, you will get an error (409
* ConflictException). To avoid this, for all Compositions that reference the storage configuration, first use
* <a>StopComposition</a> and wait for it to complete, then use DeleteStorageConfiguration.
* </p>
*
* @param deleteStorageConfigurationRequest
* @return Result of the DeleteStorageConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ServiceQuotaExceededException
* @throws ConflictException
* @sample AmazonIVSRealTime.DeleteStorageConfiguration
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/DeleteStorageConfiguration"
* target="_top">AWS API Documentation</a>
*/
@Override
public DeleteStorageConfigurationResult deleteStorageConfiguration(DeleteStorageConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDeleteStorageConfiguration(request);
}
@SdkInternalApi
final DeleteStorageConfigurationResult executeDeleteStorageConfiguration(DeleteStorageConfigurationRequest deleteStorageConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteStorageConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<DeleteStorageConfigurationRequest> request = null;
Response<DeleteStorageConfigurationResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteStorageConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteStorageConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteStorageConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<DeleteStorageConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteStorageConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Disconnects a specified participant and revokes the participant permanently from a specified stage.
* </p>
*
* @param disconnectParticipantRequest
* @return Result of the DisconnectParticipant operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @throws PendingVerificationException
* @sample AmazonIVSRealTime.DisconnectParticipant
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/DisconnectParticipant"
* target="_top">AWS API Documentation</a>
*/
@Override
public DisconnectParticipantResult disconnectParticipant(DisconnectParticipantRequest request) {
request = beforeClientExecution(request);
return executeDisconnectParticipant(request);
}
@SdkInternalApi
final DisconnectParticipantResult executeDisconnectParticipant(DisconnectParticipantRequest disconnectParticipantRequest) {
ExecutionContext executionContext = createExecutionContext(disconnectParticipantRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<DisconnectParticipantRequest> request = null;
Response<DisconnectParticipantResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DisconnectParticipantRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disconnectParticipantRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisconnectParticipant");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<DisconnectParticipantResult>> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DisconnectParticipantResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Get information about the specified Composition resource.
* </p>
*
* @param getCompositionRequest
* @return Result of the GetComposition operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ServiceQuotaExceededException
* @throws ConflictException
* @sample AmazonIVSRealTime.GetComposition
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/GetComposition" target="_top">AWS
* API Documentation</a>
*/
@Override
public GetCompositionResult getComposition(GetCompositionRequest request) {
request = beforeClientExecution(request);
return executeGetComposition(request);
}
@SdkInternalApi
final GetCompositionResult executeGetComposition(GetCompositionRequest getCompositionRequest) {
ExecutionContext executionContext = createExecutionContext(getCompositionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<GetCompositionRequest> request = null;
Response<GetCompositionResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetCompositionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getCompositionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetComposition");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<GetCompositionResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetCompositionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Gets information about the specified EncoderConfiguration resource.
* </p>
*
* @param getEncoderConfigurationRequest
* @return Result of the GetEncoderConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ServiceQuotaExceededException
* @throws ConflictException
* @sample AmazonIVSRealTime.GetEncoderConfiguration
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/GetEncoderConfiguration"
* target="_top">AWS API Documentation</a>
*/
@Override
public GetEncoderConfigurationResult getEncoderConfiguration(GetEncoderConfigurationRequest request) {
request = beforeClientExecution(request);
return executeGetEncoderConfiguration(request);
}
@SdkInternalApi
final GetEncoderConfigurationResult executeGetEncoderConfiguration(GetEncoderConfigurationRequest getEncoderConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(getEncoderConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<GetEncoderConfigurationRequest> request = null;
Response<GetEncoderConfigurationResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetEncoderConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(getEncoderConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetEncoderConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<GetEncoderConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetEncoderConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Gets information about the specified participant token.
* </p>
*
* @param getParticipantRequest
* @return Result of the GetParticipant operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @sample AmazonIVSRealTime.GetParticipant
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/GetParticipant" target="_top">AWS
* API Documentation</a>
*/
@Override
public GetParticipantResult getParticipant(GetParticipantRequest request) {
request = beforeClientExecution(request);
return executeGetParticipant(request);
}
@SdkInternalApi
final GetParticipantResult executeGetParticipant(GetParticipantRequest getParticipantRequest) {
ExecutionContext executionContext = createExecutionContext(getParticipantRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<GetParticipantRequest> request = null;
Response<GetParticipantResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetParticipantRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getParticipantRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IVS RealTime");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetParticipant");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<GetParticipantResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetParticipantResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Gets information for the specified public key.
* </p>
*
* @param getPublicKeyRequest
* @return Result of the GetPublicKey operation returned by the service.
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AccessDeniedException
* @sample AmazonIVSRealTime.GetPublicKey
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ivs-realtime-2020-07-14/GetPublicKey" target="_top">AWS API
* Documentation</a>
*/
@Override
public GetPublicKeyResult getPublicKey(GetPublicKeyRequest request) {
request = beforeClientExecution(request);
return executeGetPublicKey(request);
}
@SdkInternalApi
final GetPublicKeyResult executeGetPublicKey(GetPublicKeyRequest getPublicKeyRequest) {
ExecutionContext executionContext = createExecutionContext(getPublicKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<GetPublicKeyRequest> request = null;
Response<GetPublicKeyResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetPublicKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getPublicKeyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);