/* * Copyright 2018-2023 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.ivs; 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.ivs.AmazonIVSClientBuilder; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.ivs.model.*; import com.amazonaws.services.ivs.model.transform.*; /** * Client for accessing Amazon IVS. All service calls made using this client are blocking, and will not return until the * service call completes. *

*

* Introduction *

*

* The Amazon Interactive Video Service (IVS) API is REST compatible, using a standard HTTP API and an Amazon Web * Services EventBridge event stream for responses. JSON is used for both requests and responses, including errors. *

*

* The API is an Amazon Web Services regional service. For a list of supported regions and Amazon IVS HTTPS service * endpoints, see the Amazon IVS page in the * Amazon Web Services General Reference. *

*

* All API request parameters and URLs are case sensitive. *

*

* For a summary of notable documentation changes in each release, see Document History. *

*

* Allowed Header Values *

* *

* Resources *

*

* The following resources contain information about your IVS live stream (see Getting Started with Amazon IVS): *

* *

* Tagging *

*

* A tag is a metadata label that you assign to an Amazon Web Services resource. A tag comprises a key and * a value, both set by you. For example, you might set a tag as topic:nature to label a particular * video category. See Tagging Amazon Web * Services Resources for more information, including restrictions that apply to tags and * "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented there. *

*

* Tags can help you identify and organize your Amazon Web Services 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 Access Tags). *

*

* The Amazon IVS API has these tag-related endpoints: TagResource, UntagResource, and * ListTagsForResource. The following resources support tagging: Channels, Stream Keys, Playback Key Pairs, and * Recording Configurations. *

*

* At most 50 tags can be applied to a resource. *

*

* Authentication versus Authorization *

*

* Note the differences between these concepts: *

* *

* Authentication *

*

* All Amazon IVS API requests must be authenticated with a signature. The Amazon Web Services Command-Line Interface * (CLI) and Amazon IVS Player SDKs take care of signing the underlying API calls for you. However, if your application * calls the Amazon IVS API directly, it’s your responsibility to sign the requests. *

*

* You generate a signature using valid Amazon Web Services credentials that have permission to perform the requested * action. For example, you must sign PutMetadata requests with a signature generated from a user account that has the * ivs:PutMetadata permission. *

*

* For more information: *

* *

* Amazon Resource Names (ARNs) *

*

* ARNs uniquely identify AWS resources. An ARN is required when you need to specify a resource unambiguously across all * of AWS, such as in IAM policies and API calls. For more information, see Amazon Resource Names in the * AWS General Reference. *

*

* Channel Endpoints *

* *

* StreamKey Endpoints *

* *

* Stream Endpoints *

* *

* Private Channel Endpoints *

*

* For more information, see Setting Up * Private Channels in the Amazon IVS User Guide. *

* *

* RecordingConfiguration Endpoints *

* *

* Amazon Web Services Tags Endpoints *

* */ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonIVSClient extends AmazonWebServiceClient implements AmazonIVS { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonIVS.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("StreamUnavailable").withExceptionUnmarshaller( com.amazonaws.services.ivs.model.transform.StreamUnavailableExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ChannelNotBroadcasting").withExceptionUnmarshaller( com.amazonaws.services.ivs.model.transform.ChannelNotBroadcastingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.ivs.model.transform.ThrottlingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.ivs.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("PendingVerification").withExceptionUnmarshaller( com.amazonaws.services.ivs.model.transform.PendingVerificationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller( com.amazonaws.services.ivs.model.transform.InternalServerExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.ivs.model.transform.AccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller( com.amazonaws.services.ivs.model.transform.ConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.ivs.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.ivs.model.transform.ValidationExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.ivs.model.AmazonIVSException.class)); public static AmazonIVSClientBuilder builder() { return AmazonIVSClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on Amazon IVS using the specified parameters. * *

* 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. */ AmazonIVSClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on Amazon IVS using the specified parameters. * *

* 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. */ AmazonIVSClient(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("ivs.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/ivs/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/ivs/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Performs GetChannel on multiple ARNs simultaneously. *

* * @param batchGetChannelRequest * @return Result of the BatchGetChannel operation returned by the service. * @sample AmazonIVS.BatchGetChannel * @see AWS API * Documentation */ @Override public BatchGetChannelResult batchGetChannel(BatchGetChannelRequest request) { request = beforeClientExecution(request); return executeBatchGetChannel(request); } @SdkInternalApi final BatchGetChannelResult executeBatchGetChannel(BatchGetChannelRequest batchGetChannelRequest) { ExecutionContext executionContext = createExecutionContext(batchGetChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new BatchGetChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchGetChannelRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchGetChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Performs GetStreamKey on multiple ARNs simultaneously. *

* * @param batchGetStreamKeyRequest * @return Result of the BatchGetStreamKey operation returned by the service. * @sample AmazonIVS.BatchGetStreamKey * @see AWS API * Documentation */ @Override public BatchGetStreamKeyResult batchGetStreamKey(BatchGetStreamKeyRequest request) { request = beforeClientExecution(request); return executeBatchGetStreamKey(request); } @SdkInternalApi final BatchGetStreamKeyResult executeBatchGetStreamKey(BatchGetStreamKeyRequest batchGetStreamKeyRequest) { ExecutionContext executionContext = createExecutionContext(batchGetStreamKeyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new BatchGetStreamKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchGetStreamKeyRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetStreamKey"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchGetStreamKeyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Performs StartViewerSessionRevocation on multiple channel ARN and viewer ID pairs simultaneously. *

* * @param batchStartViewerSessionRevocationRequest * @return Result of the BatchStartViewerSessionRevocation operation returned by the service. * @throws AccessDeniedException * @throws ValidationException * @throws PendingVerificationException * @throws ThrottlingException * @sample AmazonIVS.BatchStartViewerSessionRevocation * @see AWS API Documentation */ @Override public BatchStartViewerSessionRevocationResult batchStartViewerSessionRevocation(BatchStartViewerSessionRevocationRequest request) { request = beforeClientExecution(request); return executeBatchStartViewerSessionRevocation(request); } @SdkInternalApi final BatchStartViewerSessionRevocationResult executeBatchStartViewerSessionRevocation( BatchStartViewerSessionRevocationRequest batchStartViewerSessionRevocationRequest) { ExecutionContext executionContext = createExecutionContext(batchStartViewerSessionRevocationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new BatchStartViewerSessionRevocationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(batchStartViewerSessionRevocationRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchStartViewerSessionRevocation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchStartViewerSessionRevocationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new channel and an associated stream key to start streaming. *

* * @param createChannelRequest * @return Result of the CreateChannel operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @throws PendingVerificationException * @throws ServiceQuotaExceededException * @sample AmazonIVS.CreateChannel * @see AWS API * Documentation */ @Override public CreateChannelResult createChannel(CreateChannelRequest request) { request = beforeClientExecution(request); return executeCreateChannel(request); } @SdkInternalApi final CreateChannelResult executeCreateChannel(CreateChannelRequest createChannelRequest) { ExecutionContext executionContext = createExecutionContext(createChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createChannelRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new recording configuration, used to enable recording to Amazon S3. *

*

* Known issue: In the us-east-1 region, if you use the Amazon Web Services CLI to create a recording * configuration, it returns success even if the S3 bucket is in a different region. In this case, the * state of the recording configuration is CREATE_FAILED (instead of ACTIVE). * (In other regions, the CLI correctly returns failure if the bucket is in a different region.) *

*

* Workaround: Ensure that your S3 bucket is in the same region as the recording configuration. If you create * a recording configuration in a different region as your S3 bucket, delete that recording configuration and create * a new one with an S3 bucket from the correct region. *

* * @param createRecordingConfigurationRequest * @return Result of the CreateRecordingConfiguration operation returned by the service. * @throws InternalServerException * @throws AccessDeniedException * @throws ValidationException * @throws PendingVerificationException * @throws ConflictException * @throws ServiceQuotaExceededException * @sample AmazonIVS.CreateRecordingConfiguration * @see AWS API Documentation */ @Override public CreateRecordingConfigurationResult createRecordingConfiguration(CreateRecordingConfigurationRequest request) { request = beforeClientExecution(request); return executeCreateRecordingConfiguration(request); } @SdkInternalApi final CreateRecordingConfigurationResult executeCreateRecordingConfiguration(CreateRecordingConfigurationRequest createRecordingConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(createRecordingConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateRecordingConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createRecordingConfigurationRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRecordingConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateRecordingConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a stream key, used to initiate a stream, for the specified channel ARN. *

*

* Note that CreateChannel creates a stream key. If you subsequently use CreateStreamKey on the same channel, * it will fail because a stream key already exists and there is a limit of 1 stream key per channel. To reset the * stream key on a channel, use DeleteStreamKey and then CreateStreamKey. *

* * @param createStreamKeyRequest * @return Result of the CreateStreamKey operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @throws PendingVerificationException * @throws ServiceQuotaExceededException * @sample AmazonIVS.CreateStreamKey * @see AWS API * Documentation */ @Override public CreateStreamKeyResult createStreamKey(CreateStreamKeyRequest request) { request = beforeClientExecution(request); return executeCreateStreamKey(request); } @SdkInternalApi final CreateStreamKeyResult executeCreateStreamKey(CreateStreamKeyRequest createStreamKeyRequest) { ExecutionContext executionContext = createExecutionContext(createStreamKeyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateStreamKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createStreamKeyRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateStreamKey"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateStreamKeyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes the specified channel and its associated stream keys. *

*

* If you try to delete a live channel, you will get an error (409 ConflictException). To delete a channel that is * live, call StopStream, wait for the Amazon EventBridge "Stream End" event (to verify that the stream's * state is no longer Live), then call DeleteChannel. (See Using EventBridge with Amazon IVS.) *

* * @param deleteChannelRequest * @return Result of the DeleteChannel operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @throws PendingVerificationException * @throws ConflictException * @sample AmazonIVS.DeleteChannel * @see AWS API * Documentation */ @Override public DeleteChannelResult deleteChannel(DeleteChannelRequest request) { request = beforeClientExecution(request); return executeDeleteChannel(request); } @SdkInternalApi final DeleteChannelResult executeDeleteChannel(DeleteChannelRequest deleteChannelRequest) { ExecutionContext executionContext = createExecutionContext(deleteChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteChannelRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a specified authorization key pair. This invalidates future viewer tokens generated using the key pair’s * privateKey. For more information, see Setting Up Private Channels in * the Amazon IVS User Guide. *

* * @param deletePlaybackKeyPairRequest * @return Result of the DeletePlaybackKeyPair operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @throws PendingVerificationException * @sample AmazonIVS.DeletePlaybackKeyPair * @see AWS API * Documentation */ @Override public DeletePlaybackKeyPairResult deletePlaybackKeyPair(DeletePlaybackKeyPairRequest request) { request = beforeClientExecution(request); return executeDeletePlaybackKeyPair(request); } @SdkInternalApi final DeletePlaybackKeyPairResult executeDeletePlaybackKeyPair(DeletePlaybackKeyPairRequest deletePlaybackKeyPairRequest) { ExecutionContext executionContext = createExecutionContext(deletePlaybackKeyPairRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeletePlaybackKeyPairRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePlaybackKeyPairRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePlaybackKeyPair"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePlaybackKeyPairResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes the recording configuration for the specified ARN. *

*

* If you try to delete a recording configuration that is associated with a channel, you will get an error (409 * ConflictException). To avoid this, for all channels that reference the recording configuration, first use * UpdateChannel to set the recordingConfigurationArn field to an empty string, then use * DeleteRecordingConfiguration. *

* * @param deleteRecordingConfigurationRequest * @return Result of the DeleteRecordingConfiguration operation returned by the service. * @throws ResourceNotFoundException * @throws InternalServerException * @throws AccessDeniedException * @throws ValidationException * @throws ConflictException * @sample AmazonIVS.DeleteRecordingConfiguration * @see AWS API Documentation */ @Override public DeleteRecordingConfigurationResult deleteRecordingConfiguration(DeleteRecordingConfigurationRequest request) { request = beforeClientExecution(request); return executeDeleteRecordingConfiguration(request); } @SdkInternalApi final DeleteRecordingConfigurationResult executeDeleteRecordingConfiguration(DeleteRecordingConfigurationRequest deleteRecordingConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(deleteRecordingConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteRecordingConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteRecordingConfigurationRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRecordingConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteRecordingConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes the stream key for the specified ARN, so it can no longer be used to stream. *

* * @param deleteStreamKeyRequest * @return Result of the DeleteStreamKey operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @throws PendingVerificationException * @sample AmazonIVS.DeleteStreamKey * @see AWS API * Documentation */ @Override public DeleteStreamKeyResult deleteStreamKey(DeleteStreamKeyRequest request) { request = beforeClientExecution(request); return executeDeleteStreamKey(request); } @SdkInternalApi final DeleteStreamKeyResult executeDeleteStreamKey(DeleteStreamKeyRequest deleteStreamKeyRequest) { ExecutionContext executionContext = createExecutionContext(deleteStreamKeyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteStreamKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteStreamKeyRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteStreamKey"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteStreamKeyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets the channel configuration for the specified channel ARN. See also BatchGetChannel. *

* * @param getChannelRequest * @return Result of the GetChannel operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @sample AmazonIVS.GetChannel * @see AWS API * Documentation */ @Override public GetChannelResult getChannel(GetChannelRequest request) { request = beforeClientExecution(request); return executeGetChannel(request); } @SdkInternalApi final GetChannelResult executeGetChannel(GetChannelRequest getChannelRequest) { ExecutionContext executionContext = createExecutionContext(getChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getChannelRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a specified playback authorization key pair and returns the arn and fingerprint. * The privateKey held by the caller can be used to generate viewer authorization tokens, to grant * viewers access to private channels. For more information, see Setting Up Private Channels in * the Amazon IVS User Guide. *

* * @param getPlaybackKeyPairRequest * @return Result of the GetPlaybackKeyPair operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @sample AmazonIVS.GetPlaybackKeyPair * @see AWS API * Documentation */ @Override public GetPlaybackKeyPairResult getPlaybackKeyPair(GetPlaybackKeyPairRequest request) { request = beforeClientExecution(request); return executeGetPlaybackKeyPair(request); } @SdkInternalApi final GetPlaybackKeyPairResult executeGetPlaybackKeyPair(GetPlaybackKeyPairRequest getPlaybackKeyPairRequest) { ExecutionContext executionContext = createExecutionContext(getPlaybackKeyPairRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetPlaybackKeyPairRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getPlaybackKeyPairRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetPlaybackKeyPair"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetPlaybackKeyPairResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets the recording configuration for the specified ARN. *

* * @param getRecordingConfigurationRequest * @return Result of the GetRecordingConfiguration operation returned by the service. * @throws ResourceNotFoundException * @throws InternalServerException * @throws AccessDeniedException * @throws ValidationException * @sample AmazonIVS.GetRecordingConfiguration * @see AWS * API Documentation */ @Override public GetRecordingConfigurationResult getRecordingConfiguration(GetRecordingConfigurationRequest request) { request = beforeClientExecution(request); return executeGetRecordingConfiguration(request); } @SdkInternalApi final GetRecordingConfigurationResult executeGetRecordingConfiguration(GetRecordingConfigurationRequest getRecordingConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(getRecordingConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetRecordingConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getRecordingConfigurationRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRecordingConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetRecordingConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets information about the active (live) stream on a specified channel. *

* * @param getStreamRequest * @return Result of the GetStream operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @throws ChannelNotBroadcastingException * @sample AmazonIVS.GetStream * @see AWS API * Documentation */ @Override public GetStreamResult getStream(GetStreamRequest request) { request = beforeClientExecution(request); return executeGetStream(request); } @SdkInternalApi final GetStreamResult executeGetStream(GetStreamRequest getStreamRequest) { ExecutionContext executionContext = createExecutionContext(getStreamRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetStreamRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getStreamRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetStream"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetStreamResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets stream-key information for a specified ARN. *

* * @param getStreamKeyRequest * @return Result of the GetStreamKey operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @sample AmazonIVS.GetStreamKey * @see AWS API * Documentation */ @Override public GetStreamKeyResult getStreamKey(GetStreamKeyRequest request) { request = beforeClientExecution(request); return executeGetStreamKey(request); } @SdkInternalApi final GetStreamKeyResult executeGetStreamKey(GetStreamKeyRequest getStreamKeyRequest) { ExecutionContext executionContext = createExecutionContext(getStreamKeyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetStreamKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getStreamKeyRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetStreamKey"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetStreamKeyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets metadata on a specified stream. *

* * @param getStreamSessionRequest * @return Result of the GetStreamSession operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @sample AmazonIVS.GetStreamSession * @see AWS API * Documentation */ @Override public GetStreamSessionResult getStreamSession(GetStreamSessionRequest request) { request = beforeClientExecution(request); return executeGetStreamSession(request); } @SdkInternalApi final GetStreamSessionResult executeGetStreamSession(GetStreamSessionRequest getStreamSessionRequest) { ExecutionContext executionContext = createExecutionContext(getStreamSessionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetStreamSessionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getStreamSessionRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetStreamSession"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetStreamSessionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Imports the public portion of a new key pair and returns its arn and fingerprint. The * privateKey can then be used to generate viewer authorization tokens, to grant viewers access to * private channels. For more information, see Setting Up Private Channels in * the Amazon IVS User Guide. *

* * @param importPlaybackKeyPairRequest * @return Result of the ImportPlaybackKeyPair operation returned by the service. * @throws AccessDeniedException * @throws ValidationException * @throws PendingVerificationException * @throws ConflictException * @throws ServiceQuotaExceededException * @sample AmazonIVS.ImportPlaybackKeyPair * @see AWS API * Documentation */ @Override public ImportPlaybackKeyPairResult importPlaybackKeyPair(ImportPlaybackKeyPairRequest request) { request = beforeClientExecution(request); return executeImportPlaybackKeyPair(request); } @SdkInternalApi final ImportPlaybackKeyPairResult executeImportPlaybackKeyPair(ImportPlaybackKeyPairRequest importPlaybackKeyPairRequest) { ExecutionContext executionContext = createExecutionContext(importPlaybackKeyPairRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ImportPlaybackKeyPairRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importPlaybackKeyPairRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportPlaybackKeyPair"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportPlaybackKeyPairResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets summary information about all channels in your account, in the Amazon Web Services region where the API * request is processed. This list can be filtered to match a specified name or recording-configuration ARN. Filters * are mutually exclusive and cannot be used together. If you try to use both filters, you will get an error (409 * ConflictException). *

* * @param listChannelsRequest * @return Result of the ListChannels operation returned by the service. * @throws AccessDeniedException * @throws ValidationException * @throws ConflictException * @sample AmazonIVS.ListChannels * @see AWS API * Documentation */ @Override public ListChannelsResult listChannels(ListChannelsRequest request) { request = beforeClientExecution(request); return executeListChannels(request); } @SdkInternalApi final ListChannelsResult executeListChannels(ListChannelsRequest listChannelsRequest) { ExecutionContext executionContext = createExecutionContext(listChannelsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListChannelsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listChannelsRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListChannels"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListChannelsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets summary information about playback key pairs. For more information, see Setting Up Private Channels in * the Amazon IVS User Guide. *

* * @param listPlaybackKeyPairsRequest * @return Result of the ListPlaybackKeyPairs operation returned by the service. * @throws AccessDeniedException * @throws ValidationException * @sample AmazonIVS.ListPlaybackKeyPairs * @see AWS API * Documentation */ @Override public ListPlaybackKeyPairsResult listPlaybackKeyPairs(ListPlaybackKeyPairsRequest request) { request = beforeClientExecution(request); return executeListPlaybackKeyPairs(request); } @SdkInternalApi final ListPlaybackKeyPairsResult executeListPlaybackKeyPairs(ListPlaybackKeyPairsRequest listPlaybackKeyPairsRequest) { ExecutionContext executionContext = createExecutionContext(listPlaybackKeyPairsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListPlaybackKeyPairsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPlaybackKeyPairsRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPlaybackKeyPairs"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPlaybackKeyPairsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets summary information about all recording configurations in your account, in the Amazon Web Services region * where the API request is processed. *

* * @param listRecordingConfigurationsRequest * @return Result of the ListRecordingConfigurations operation returned by the service. * @throws InternalServerException * @throws AccessDeniedException * @throws ValidationException * @sample AmazonIVS.ListRecordingConfigurations * @see AWS API Documentation */ @Override public ListRecordingConfigurationsResult listRecordingConfigurations(ListRecordingConfigurationsRequest request) { request = beforeClientExecution(request); return executeListRecordingConfigurations(request); } @SdkInternalApi final ListRecordingConfigurationsResult executeListRecordingConfigurations(ListRecordingConfigurationsRequest listRecordingConfigurationsRequest) { ExecutionContext executionContext = createExecutionContext(listRecordingConfigurationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListRecordingConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listRecordingConfigurationsRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRecordingConfigurations"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRecordingConfigurationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets summary information about stream keys for the specified channel. *

* * @param listStreamKeysRequest * @return Result of the ListStreamKeys operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @sample AmazonIVS.ListStreamKeys * @see AWS API * Documentation */ @Override public ListStreamKeysResult listStreamKeys(ListStreamKeysRequest request) { request = beforeClientExecution(request); return executeListStreamKeys(request); } @SdkInternalApi final ListStreamKeysResult executeListStreamKeys(ListStreamKeysRequest listStreamKeysRequest) { ExecutionContext executionContext = createExecutionContext(listStreamKeysRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListStreamKeysRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listStreamKeysRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListStreamKeys"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListStreamKeysResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a summary of current and previous streams for a specified channel in your account, in the AWS region where * the API request is processed. *

* * @param listStreamSessionsRequest * @return Result of the ListStreamSessions operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @sample AmazonIVS.ListStreamSessions * @see AWS API * Documentation */ @Override public ListStreamSessionsResult listStreamSessions(ListStreamSessionsRequest request) { request = beforeClientExecution(request); return executeListStreamSessions(request); } @SdkInternalApi final ListStreamSessionsResult executeListStreamSessions(ListStreamSessionsRequest listStreamSessionsRequest) { ExecutionContext executionContext = createExecutionContext(listStreamSessionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListStreamSessionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listStreamSessionsRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListStreamSessions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListStreamSessionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets summary information about live streams in your account, in the Amazon Web Services region where the API * request is processed. *

* * @param listStreamsRequest * @return Result of the ListStreams operation returned by the service. * @throws AccessDeniedException * @throws ValidationException * @sample AmazonIVS.ListStreams * @see AWS API * Documentation */ @Override public ListStreamsResult listStreams(ListStreamsRequest request) { request = beforeClientExecution(request); return executeListStreams(request); } @SdkInternalApi final ListStreamsResult executeListStreams(ListStreamsRequest listStreamsRequest) { ExecutionContext executionContext = createExecutionContext(listStreamsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListStreamsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listStreamsRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListStreams"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListStreamsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets information about Amazon Web Services tags for the specified ARN. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ResourceNotFoundException * @throws InternalServerException * @throws ValidationException * @sample AmazonIVS.ListTagsForResource * @see AWS API * Documentation */ @Override public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) { request = beforeClientExecution(request); return executeListTagsForResource(request); } @SdkInternalApi final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) { ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Inserts metadata into the active stream of the specified channel. At most 5 requests per second per channel are * allowed, each with a maximum 1 KB payload. (If 5 TPS is not sufficient for your needs, we recommend batching your * data into a single PutMetadata call.) At most 155 requests per second per account are allowed. Also see Embedding Metadata within a Video * Stream in the Amazon IVS User Guide. *

* * @param putMetadataRequest * @return Result of the PutMetadata operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @throws ChannelNotBroadcastingException * @throws ThrottlingException * @sample AmazonIVS.PutMetadata * @see AWS API * Documentation */ @Override public PutMetadataResult putMetadata(PutMetadataRequest request) { request = beforeClientExecution(request); return executePutMetadata(request); } @SdkInternalApi final PutMetadataResult executePutMetadata(PutMetadataRequest putMetadataRequest) { ExecutionContext executionContext = createExecutionContext(putMetadataRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutMetadataRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putMetadataRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutMetadata"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutMetadataResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Starts the process of revoking the viewer session associated with a specified channel ARN and viewer ID. * Optionally, you can provide a version to revoke viewer sessions less than and including that version. For * instructions on associating a viewer ID with a viewer session, see Setting Up Private Channels. *

* * @param startViewerSessionRevocationRequest * @return Result of the StartViewerSessionRevocation operation returned by the service. * @throws ResourceNotFoundException * @throws InternalServerException * @throws AccessDeniedException * @throws ValidationException * @throws PendingVerificationException * @throws ThrottlingException * @sample AmazonIVS.StartViewerSessionRevocation * @see AWS API Documentation */ @Override public StartViewerSessionRevocationResult startViewerSessionRevocation(StartViewerSessionRevocationRequest request) { request = beforeClientExecution(request); return executeStartViewerSessionRevocation(request); } @SdkInternalApi final StartViewerSessionRevocationResult executeStartViewerSessionRevocation(StartViewerSessionRevocationRequest startViewerSessionRevocationRequest) { ExecutionContext executionContext = createExecutionContext(startViewerSessionRevocationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartViewerSessionRevocationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(startViewerSessionRevocationRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartViewerSessionRevocation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartViewerSessionRevocationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Disconnects the incoming RTMPS stream for the specified channel. Can be used in conjunction with * DeleteStreamKey to prevent further streaming to a channel. *

* *

* Many streaming client-software libraries automatically reconnect a dropped RTMPS session, so to stop the stream * permanently, you may want to first revoke the streamKey attached to the channel. *

*
* * @param stopStreamRequest * @return Result of the StopStream operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @throws ChannelNotBroadcastingException * @throws StreamUnavailableException * @sample AmazonIVS.StopStream * @see AWS API * Documentation */ @Override public StopStreamResult stopStream(StopStreamRequest request) { request = beforeClientExecution(request); return executeStopStream(request); } @SdkInternalApi final StopStreamResult executeStopStream(StopStreamRequest stopStreamRequest) { ExecutionContext executionContext = createExecutionContext(stopStreamRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopStreamRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopStreamRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopStream"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopStreamResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Adds or updates tags for the Amazon Web Services resource with the specified ARN. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ResourceNotFoundException * @throws InternalServerException * @throws ValidationException * @sample AmazonIVS.TagResource * @see AWS API * Documentation */ @Override public TagResourceResult tagResource(TagResourceRequest request) { request = beforeClientExecution(request); return executeTagResource(request); } @SdkInternalApi final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) { ExecutionContext executionContext = createExecutionContext(tagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes tags from the resource with the specified ARN. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ResourceNotFoundException * @throws InternalServerException * @throws ValidationException * @sample AmazonIVS.UntagResource * @see AWS API * Documentation */ @Override public UntagResourceResult untagResource(UntagResourceRequest request) { request = beforeClientExecution(request); return executeUntagResource(request); } @SdkInternalApi final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) { ExecutionContext executionContext = createExecutionContext(untagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a channel's configuration. Live channels cannot be updated. You must stop the ongoing stream, update the * channel, and restart the stream for the changes to take effect. *

* * @param updateChannelRequest * @return Result of the UpdateChannel operation returned by the service. * @throws ResourceNotFoundException * @throws AccessDeniedException * @throws ValidationException * @throws PendingVerificationException * @throws ConflictException * @sample AmazonIVS.UpdateChannel * @see AWS API * Documentation */ @Override public UpdateChannelResult updateChannel(UpdateChannelRequest request) { request = beforeClientExecution(request); return executeUpdateChannel(request); } @SdkInternalApi final UpdateChannelResult executeUpdateChannel(UpdateChannelRequest updateChannelRequest) { ExecutionContext executionContext = createExecutionContext(updateChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateChannelRequest)); // 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"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * Returns additional metadata for a previously executed successful, request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. *

* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic * information for an executed request, you should use this method to retrieve it as soon as possible after * executing the request. * * @param request * The originally executed request * * @return The response metadata for the specified request, or null if none is available. */ public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return invoke(request, responseHandler, executionContext, null, null); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) { executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider)); return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait); } /** * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will * be ignored for this operation. **/ private Response anonymousInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext, null, null); } /** * Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the * ExecutionContext beforehand. **/ private Response doInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) { if (discoveredEndpoint != null) { request.setEndpoint(discoveredEndpoint); request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery"); } else if (uriFromEndpointTrait != null) { request.setEndpoint(uriFromEndpointTrait); } else { request.setEndpoint(endpoint); } request.setTimeOffset(timeOffset); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata()); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } @com.amazonaws.annotation.SdkInternalApi static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() { return protocolFactory; } @Override public void shutdown() { super.shutdown(); } }