All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ssmcontacts.AWSSSMContactsClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Systems Manager Incident Manager Contacts module holds the client classes that are used for communicating with AWS Systems Manager Incident Manager Contacts Service

The newest version!
/*
 * Copyright 2019-2024 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.ssmcontacts;

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.ssmcontacts.AWSSSMContactsClientBuilder;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.services.ssmcontacts.model.*;

import com.amazonaws.services.ssmcontacts.model.transform.*;

/**
 * Client for accessing SSM Contacts. All service calls made using this client are blocking, and will not return until
 * the service call completes.
 * 

*

* Systems Manager Incident Manager is an incident management console designed to help users mitigate and recover from * incidents affecting their Amazon Web Services-hosted applications. An incident is any unplanned interruption or * reduction in quality of services. *

*

* Incident Manager increases incident resolution by notifying responders of impact, highlighting relevant * troubleshooting data, and providing collaboration tools to get services back up and running. To achieve the primary * goal of reducing the time-to-resolution of critical incidents, Incident Manager automates response plans and enables * responder team escalation. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSSSMContactsClient extends AmazonWebServiceClient implements AWSSSMContacts { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSSSMContacts.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "ssm-contacts"; /** 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) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.ssmcontacts.model.transform.ThrottlingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.ssmcontacts.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller( com.amazonaws.services.ssmcontacts.model.transform.InternalServerExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.ssmcontacts.model.transform.AccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller( com.amazonaws.services.ssmcontacts.model.transform.ConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.ssmcontacts.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.ssmcontacts.model.transform.ValidationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("DataEncryptionException").withExceptionUnmarshaller( com.amazonaws.services.ssmcontacts.model.transform.DataEncryptionExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.ssmcontacts.model.AWSSSMContactsException.class)); public static AWSSSMContactsClientBuilder builder() { return AWSSSMContactsClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on SSM Contacts 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. */ AWSSSMContactsClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on SSM Contacts 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. */ AWSSSMContactsClient(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("ssm-contacts.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/ssmcontacts/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/ssmcontacts/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Used to acknowledge an engagement to a contact channel during an incident. *

* * @param acceptPageRequest * @return Result of the AcceptPage operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.AcceptPage * @see AWS API * Documentation */ @Override public AcceptPageResult acceptPage(AcceptPageRequest request) { request = beforeClientExecution(request); return executeAcceptPage(request); } @SdkInternalApi final AcceptPageResult executeAcceptPage(AcceptPageRequest acceptPageRequest) { ExecutionContext executionContext = createExecutionContext(acceptPageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AcceptPageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(acceptPageRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AcceptPage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new AcceptPageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Activates a contact's contact channel. Incident Manager can't engage a contact until the contact channel has been * activated. *

* * @param activateContactChannelRequest * @return Result of the ActivateContactChannel operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ActivateContactChannel * @see AWS API Documentation */ @Override public ActivateContactChannelResult activateContactChannel(ActivateContactChannelRequest request) { request = beforeClientExecution(request); return executeActivateContactChannel(request); } @SdkInternalApi final ActivateContactChannelResult executeActivateContactChannel(ActivateContactChannelRequest activateContactChannelRequest) { ExecutionContext executionContext = createExecutionContext(activateContactChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ActivateContactChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(activateContactChannelRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ActivateContactChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ActivateContactChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Contacts are either the contacts that Incident Manager engages during an incident or the escalation plans that * Incident Manager uses to engage contacts in phases during an incident. *

* * @param createContactRequest * @return Result of the CreateContact operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ConflictException * Updating or deleting a resource causes an inconsistent state. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @sample AWSSSMContacts.CreateContact * @see AWS API * Documentation */ @Override public CreateContactResult createContact(CreateContactRequest request) { request = beforeClientExecution(request); return executeCreateContact(request); } @SdkInternalApi final CreateContactResult executeCreateContact(CreateContactRequest createContactRequest) { ExecutionContext executionContext = createExecutionContext(createContactRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateContactRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createContactRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateContact"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateContactResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* A contact channel is the method that Incident Manager uses to engage your contact. *

* * @param createContactChannelRequest * @return Result of the CreateContactChannel operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ConflictException * Updating or deleting a resource causes an inconsistent state. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.CreateContactChannel * @see AWS API Documentation */ @Override public CreateContactChannelResult createContactChannel(CreateContactChannelRequest request) { request = beforeClientExecution(request); return executeCreateContactChannel(request); } @SdkInternalApi final CreateContactChannelResult executeCreateContactChannel(CreateContactChannelRequest createContactChannelRequest) { ExecutionContext executionContext = createExecutionContext(createContactChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateContactChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createContactChannelRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateContactChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateContactChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a rotation in an on-call schedule. *

* * @param createRotationRequest * @return Result of the CreateRotation operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.CreateRotation * @see AWS * API Documentation */ @Override public CreateRotationResult createRotation(CreateRotationRequest request) { request = beforeClientExecution(request); return executeCreateRotation(request); } @SdkInternalApi final CreateRotationResult executeCreateRotation(CreateRotationRequest createRotationRequest) { ExecutionContext executionContext = createExecutionContext(createRotationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateRotationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createRotationRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRotation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateRotationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an override for a rotation in an on-call schedule. *

* * @param createRotationOverrideRequest * @return Result of the CreateRotationOverride operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.CreateRotationOverride * @see AWS API Documentation */ @Override public CreateRotationOverrideResult createRotationOverride(CreateRotationOverrideRequest request) { request = beforeClientExecution(request); return executeCreateRotationOverride(request); } @SdkInternalApi final CreateRotationOverrideResult executeCreateRotationOverride(CreateRotationOverrideRequest createRotationOverrideRequest) { ExecutionContext executionContext = createExecutionContext(createRotationOverrideRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateRotationOverrideRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createRotationOverrideRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRotationOverride"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateRotationOverrideResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* To no longer receive Incident Manager engagements to a contact channel, you can deactivate the channel. *

* * @param deactivateContactChannelRequest * @return Result of the DeactivateContactChannel operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.DeactivateContactChannel * @see AWS API Documentation */ @Override public DeactivateContactChannelResult deactivateContactChannel(DeactivateContactChannelRequest request) { request = beforeClientExecution(request); return executeDeactivateContactChannel(request); } @SdkInternalApi final DeactivateContactChannelResult executeDeactivateContactChannel(DeactivateContactChannelRequest deactivateContactChannelRequest) { ExecutionContext executionContext = createExecutionContext(deactivateContactChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeactivateContactChannelRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deactivateContactChannelRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeactivateContactChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeactivateContactChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* To remove a contact from Incident Manager, you can delete the contact. Deleting a contact removes them from all * escalation plans and related response plans. Deleting an escalation plan removes it from all related response * plans. You will have to recreate the contact and its contact channels before you can use it again. *

* * @param deleteContactRequest * @return Result of the DeleteContact operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ConflictException * Updating or deleting a resource causes an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.DeleteContact * @see AWS API * Documentation */ @Override public DeleteContactResult deleteContact(DeleteContactRequest request) { request = beforeClientExecution(request); return executeDeleteContact(request); } @SdkInternalApi final DeleteContactResult executeDeleteContact(DeleteContactRequest deleteContactRequest) { ExecutionContext executionContext = createExecutionContext(deleteContactRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteContactRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteContactRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteContact"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteContactResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* To no longer receive engagements on a contact channel, you can delete the channel from a contact. Deleting the * contact channel removes it from the contact's engagement plan. If you delete the only contact channel for a * contact, you won't be able to engage that contact during an incident. *

* * @param deleteContactChannelRequest * @return Result of the DeleteContactChannel operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.DeleteContactChannel * @see AWS API Documentation */ @Override public DeleteContactChannelResult deleteContactChannel(DeleteContactChannelRequest request) { request = beforeClientExecution(request); return executeDeleteContactChannel(request); } @SdkInternalApi final DeleteContactChannelResult executeDeleteContactChannel(DeleteContactChannelRequest deleteContactChannelRequest) { ExecutionContext executionContext = createExecutionContext(deleteContactChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteContactChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteContactChannelRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteContactChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteContactChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a rotation from the system. If a rotation belongs to more than one on-call schedule, this operation * deletes it from all of them. *

* * @param deleteRotationRequest * @return Result of the DeleteRotation operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ConflictException * Updating or deleting a resource causes an inconsistent state. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.DeleteRotation * @see AWS * API Documentation */ @Override public DeleteRotationResult deleteRotation(DeleteRotationRequest request) { request = beforeClientExecution(request); return executeDeleteRotation(request); } @SdkInternalApi final DeleteRotationResult executeDeleteRotation(DeleteRotationRequest deleteRotationRequest) { ExecutionContext executionContext = createExecutionContext(deleteRotationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteRotationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteRotationRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRotation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteRotationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes an existing override for an on-call rotation. *

* * @param deleteRotationOverrideRequest * @return Result of the DeleteRotationOverride operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.DeleteRotationOverride * @see AWS API Documentation */ @Override public DeleteRotationOverrideResult deleteRotationOverride(DeleteRotationOverrideRequest request) { request = beforeClientExecution(request); return executeDeleteRotationOverride(request); } @SdkInternalApi final DeleteRotationOverrideResult executeDeleteRotationOverride(DeleteRotationOverrideRequest deleteRotationOverrideRequest) { ExecutionContext executionContext = createExecutionContext(deleteRotationOverrideRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteRotationOverrideRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteRotationOverrideRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRotationOverride"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteRotationOverrideResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Incident Manager uses engagements to engage contacts and escalation plans during an incident. Use this command to * describe the engagement that occurred during an incident. *

* * @param describeEngagementRequest * @return Result of the DescribeEngagement operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.DescribeEngagement * @see AWS API Documentation */ @Override public DescribeEngagementResult describeEngagement(DescribeEngagementRequest request) { request = beforeClientExecution(request); return executeDescribeEngagement(request); } @SdkInternalApi final DescribeEngagementResult executeDescribeEngagement(DescribeEngagementRequest describeEngagementRequest) { ExecutionContext executionContext = createExecutionContext(describeEngagementRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEngagementRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeEngagementRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEngagement"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEngagementResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists details of the engagement to a contact channel. *

* * @param describePageRequest * @return Result of the DescribePage operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.DescribePage * @see AWS API * Documentation */ @Override public DescribePageResult describePage(DescribePageRequest request) { request = beforeClientExecution(request); return executeDescribePage(request); } @SdkInternalApi final DescribePageResult executeDescribePage(DescribePageRequest describePageRequest) { ExecutionContext executionContext = createExecutionContext(describePageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribePageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describePageRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribePageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves information about the specified contact or escalation plan. *

* * @param getContactRequest * @return Result of the GetContact operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @sample AWSSSMContacts.GetContact * @see AWS API * Documentation */ @Override public GetContactResult getContact(GetContactRequest request) { request = beforeClientExecution(request); return executeGetContact(request); } @SdkInternalApi final GetContactResult executeGetContact(GetContactRequest getContactRequest) { ExecutionContext executionContext = createExecutionContext(getContactRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetContactRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getContactRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetContact"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetContactResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List details about a specific contact channel. *

* * @param getContactChannelRequest * @return Result of the GetContactChannel operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.GetContactChannel * @see AWS * API Documentation */ @Override public GetContactChannelResult getContactChannel(GetContactChannelRequest request) { request = beforeClientExecution(request); return executeGetContactChannel(request); } @SdkInternalApi final GetContactChannelResult executeGetContactChannel(GetContactChannelRequest getContactChannelRequest) { ExecutionContext executionContext = createExecutionContext(getContactChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetContactChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getContactChannelRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetContactChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetContactChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves the resource policies attached to the specified contact or escalation plan. *

* * @param getContactPolicyRequest * @return Result of the GetContactPolicy operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.GetContactPolicy * @see AWS * API Documentation */ @Override public GetContactPolicyResult getContactPolicy(GetContactPolicyRequest request) { request = beforeClientExecution(request); return executeGetContactPolicy(request); } @SdkInternalApi final GetContactPolicyResult executeGetContactPolicy(GetContactPolicyRequest getContactPolicyRequest) { ExecutionContext executionContext = createExecutionContext(getContactPolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetContactPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getContactPolicyRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetContactPolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetContactPolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves information about an on-call rotation. *

* * @param getRotationRequest * @return Result of the GetRotation operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.GetRotation * @see AWS API * Documentation */ @Override public GetRotationResult getRotation(GetRotationRequest request) { request = beforeClientExecution(request); return executeGetRotation(request); } @SdkInternalApi final GetRotationResult executeGetRotation(GetRotationRequest getRotationRequest) { ExecutionContext executionContext = createExecutionContext(getRotationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetRotationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getRotationRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRotation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetRotationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves information about an override to an on-call rotation. *

* * @param getRotationOverrideRequest * @return Result of the GetRotationOverride operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.GetRotationOverride * @see AWS API Documentation */ @Override public GetRotationOverrideResult getRotationOverride(GetRotationOverrideRequest request) { request = beforeClientExecution(request); return executeGetRotationOverride(request); } @SdkInternalApi final GetRotationOverrideResult executeGetRotationOverride(GetRotationOverrideRequest getRotationOverrideRequest) { ExecutionContext executionContext = createExecutionContext(getRotationOverrideRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetRotationOverrideRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getRotationOverrideRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRotationOverride"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetRotationOverrideResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists all contact channels for the specified contact. *

* * @param listContactChannelsRequest * @return Result of the ListContactChannels operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListContactChannels * @see AWS API Documentation */ @Override public ListContactChannelsResult listContactChannels(ListContactChannelsRequest request) { request = beforeClientExecution(request); return executeListContactChannels(request); } @SdkInternalApi final ListContactChannelsResult executeListContactChannels(ListContactChannelsRequest listContactChannelsRequest) { ExecutionContext executionContext = createExecutionContext(listContactChannelsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListContactChannelsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listContactChannelsRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListContactChannels"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListContactChannelsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists all contacts and escalation plans in Incident Manager. *

* * @param listContactsRequest * @return Result of the ListContacts operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListContacts * @see AWS API * Documentation */ @Override public ListContactsResult listContacts(ListContactsRequest request) { request = beforeClientExecution(request); return executeListContacts(request); } @SdkInternalApi final ListContactsResult executeListContacts(ListContactsRequest listContactsRequest) { ExecutionContext executionContext = createExecutionContext(listContactsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListContactsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listContactsRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListContacts"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListContactsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists all engagements that have happened in an incident. *

* * @param listEngagementsRequest * @return Result of the ListEngagements operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListEngagements * @see AWS * API Documentation */ @Override public ListEngagementsResult listEngagements(ListEngagementsRequest request) { request = beforeClientExecution(request); return executeListEngagements(request); } @SdkInternalApi final ListEngagementsResult executeListEngagements(ListEngagementsRequest listEngagementsRequest) { ExecutionContext executionContext = createExecutionContext(listEngagementsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListEngagementsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listEngagementsRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEngagements"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEngagementsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists all of the engagements to contact channels that have been acknowledged. *

* * @param listPageReceiptsRequest * @return Result of the ListPageReceipts operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListPageReceipts * @see AWS * API Documentation */ @Override public ListPageReceiptsResult listPageReceipts(ListPageReceiptsRequest request) { request = beforeClientExecution(request); return executeListPageReceipts(request); } @SdkInternalApi final ListPageReceiptsResult executeListPageReceipts(ListPageReceiptsRequest listPageReceiptsRequest) { ExecutionContext executionContext = createExecutionContext(listPageReceiptsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListPageReceiptsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPageReceiptsRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPageReceipts"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPageReceiptsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the resolution path of an engagement. For example, the escalation plan engaged in an incident might * target an on-call schedule that includes several contacts in a rotation, but just one contact on-call when the * incident starts. The resolution path indicates the hierarchy of escalation plan > on-call schedule > * contact. *

* * @param listPageResolutionsRequest * @return Result of the ListPageResolutions operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListPageResolutions * @see AWS API Documentation */ @Override public ListPageResolutionsResult listPageResolutions(ListPageResolutionsRequest request) { request = beforeClientExecution(request); return executeListPageResolutions(request); } @SdkInternalApi final ListPageResolutionsResult executeListPageResolutions(ListPageResolutionsRequest listPageResolutionsRequest) { ExecutionContext executionContext = createExecutionContext(listPageResolutionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListPageResolutionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPageResolutionsRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPageResolutions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPageResolutionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the engagements to a contact's contact channels. *

* * @param listPagesByContactRequest * @return Result of the ListPagesByContact operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListPagesByContact * @see AWS API Documentation */ @Override public ListPagesByContactResult listPagesByContact(ListPagesByContactRequest request) { request = beforeClientExecution(request); return executeListPagesByContact(request); } @SdkInternalApi final ListPagesByContactResult executeListPagesByContact(ListPagesByContactRequest listPagesByContactRequest) { ExecutionContext executionContext = createExecutionContext(listPagesByContactRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListPagesByContactRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPagesByContactRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPagesByContact"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPagesByContactResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the engagements to contact channels that occurred by engaging a contact. *

* * @param listPagesByEngagementRequest * @return Result of the ListPagesByEngagement operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListPagesByEngagement * @see AWS API Documentation */ @Override public ListPagesByEngagementResult listPagesByEngagement(ListPagesByEngagementRequest request) { request = beforeClientExecution(request); return executeListPagesByEngagement(request); } @SdkInternalApi final ListPagesByEngagementResult executeListPagesByEngagement(ListPagesByEngagementRequest listPagesByEngagementRequest) { ExecutionContext executionContext = createExecutionContext(listPagesByEngagementRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListPagesByEngagementRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPagesByEngagementRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPagesByEngagement"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPagesByEngagementResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of shifts based on rotation configuration parameters. *

* *

* The Incident Manager primarily uses this operation to populate the Preview calendar. It is not typically * run by end users. *

*
* * @param listPreviewRotationShiftsRequest * @return Result of the ListPreviewRotationShifts operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListPreviewRotationShifts * @see AWS API Documentation */ @Override public ListPreviewRotationShiftsResult listPreviewRotationShifts(ListPreviewRotationShiftsRequest request) { request = beforeClientExecution(request); return executeListPreviewRotationShifts(request); } @SdkInternalApi final ListPreviewRotationShiftsResult executeListPreviewRotationShifts(ListPreviewRotationShiftsRequest listPreviewRotationShiftsRequest) { ExecutionContext executionContext = createExecutionContext(listPreviewRotationShiftsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListPreviewRotationShiftsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listPreviewRotationShiftsRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPreviewRotationShifts"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPreviewRotationShiftsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves a list of overrides currently specified for an on-call rotation. *

* * @param listRotationOverridesRequest * @return Result of the ListRotationOverrides operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListRotationOverrides * @see AWS API Documentation */ @Override public ListRotationOverridesResult listRotationOverrides(ListRotationOverridesRequest request) { request = beforeClientExecution(request); return executeListRotationOverrides(request); } @SdkInternalApi final ListRotationOverridesResult executeListRotationOverrides(ListRotationOverridesRequest listRotationOverridesRequest) { ExecutionContext executionContext = createExecutionContext(listRotationOverridesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListRotationOverridesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listRotationOverridesRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRotationOverrides"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRotationOverridesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of shifts generated by an existing rotation in the system. *

* * @param listRotationShiftsRequest * @return Result of the ListRotationShifts operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ConflictException * Updating or deleting a resource causes an inconsistent state. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListRotationShifts * @see AWS API Documentation */ @Override public ListRotationShiftsResult listRotationShifts(ListRotationShiftsRequest request) { request = beforeClientExecution(request); return executeListRotationShifts(request); } @SdkInternalApi final ListRotationShiftsResult executeListRotationShifts(ListRotationShiftsRequest listRotationShiftsRequest) { ExecutionContext executionContext = createExecutionContext(listRotationShiftsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListRotationShiftsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listRotationShiftsRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRotationShifts"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRotationShiftsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves a list of on-call rotations. *

* * @param listRotationsRequest * @return Result of the ListRotations operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.ListRotations * @see AWS API * Documentation */ @Override public ListRotationsResult listRotations(ListRotationsRequest request) { request = beforeClientExecution(request); return executeListRotations(request); } @SdkInternalApi final ListRotationsResult executeListRotations(ListRotationsRequest listRotationsRequest) { ExecutionContext executionContext = createExecutionContext(listRotationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListRotationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listRotationsRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRotations"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRotationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the tags of an escalation plan or contact. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @throws InternalServerException * Unexpected error occurred while processing the request. * @sample AWSSSMContacts.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, "SSM Contacts"); 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); } } /** *

* Adds a resource policy to the specified contact or escalation plan. The resource policy is used to share the * contact or escalation plan using Resource Access Manager (RAM). For more information about cross-account sharing, * see Setting up cross-account * functionality. *

* * @param putContactPolicyRequest * @return Result of the PutContactPolicy operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ConflictException * Updating or deleting a resource causes an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws InternalServerException * Unexpected error occurred while processing the request. * @sample AWSSSMContacts.PutContactPolicy * @see AWS * API Documentation */ @Override public PutContactPolicyResult putContactPolicy(PutContactPolicyRequest request) { request = beforeClientExecution(request); return executePutContactPolicy(request); } @SdkInternalApi final PutContactPolicyResult executePutContactPolicy(PutContactPolicyRequest putContactPolicyRequest) { ExecutionContext executionContext = createExecutionContext(putContactPolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutContactPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putContactPolicyRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutContactPolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutContactPolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Sends an activation code to a contact channel. The contact can use this code to activate the contact channel in * the console or with the ActivateChannel operation. Incident Manager can't engage a contact channel * until it has been activated. *

* * @param sendActivationCodeRequest * @return Result of the SendActivationCode operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.SendActivationCode * @see AWS API Documentation */ @Override public SendActivationCodeResult sendActivationCode(SendActivationCodeRequest request) { request = beforeClientExecution(request); return executeSendActivationCode(request); } @SdkInternalApi final SendActivationCodeResult executeSendActivationCode(SendActivationCodeRequest sendActivationCodeRequest) { ExecutionContext executionContext = createExecutionContext(sendActivationCodeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new SendActivationCodeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(sendActivationCodeRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SendActivationCode"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new SendActivationCodeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Starts an engagement to a contact or escalation plan. The engagement engages each contact specified in the * incident. *

* * @param startEngagementRequest * @return Result of the StartEngagement operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.StartEngagement * @see AWS * API Documentation */ @Override public StartEngagementResult startEngagement(StartEngagementRequest request) { request = beforeClientExecution(request); return executeStartEngagement(request); } @SdkInternalApi final StartEngagementResult executeStartEngagement(StartEngagementRequest startEngagementRequest) { ExecutionContext executionContext = createExecutionContext(startEngagementRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartEngagementRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startEngagementRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartEngagement"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartEngagementResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Stops an engagement before it finishes the final stage of the escalation plan or engagement plan. Further * contacts aren't engaged. *

* * @param stopEngagementRequest * @return Result of the StopEngagement operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws InternalServerException * Unexpected error occurred while processing the request. * @sample AWSSSMContacts.StopEngagement * @see AWS * API Documentation */ @Override public StopEngagementResult stopEngagement(StopEngagementRequest request) { request = beforeClientExecution(request); return executeStopEngagement(request); } @SdkInternalApi final StopEngagementResult executeStopEngagement(StopEngagementRequest stopEngagementRequest) { ExecutionContext executionContext = createExecutionContext(stopEngagementRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopEngagementRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopEngagementRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopEngagement"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopEngagementResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Tags a contact or escalation plan. You can tag only contacts and escalation plans in the first region of your * replication set. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.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, "SSM Contacts"); 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 specified resource. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @throws InternalServerException * Unexpected error occurred while processing the request. * @sample AWSSSMContacts.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, "SSM Contacts"); 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 the contact or escalation plan specified. *

* * @param updateContactRequest * @return Result of the UpdateContact operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @sample AWSSSMContacts.UpdateContact * @see AWS API * Documentation */ @Override public UpdateContactResult updateContact(UpdateContactRequest request) { request = beforeClientExecution(request); return executeUpdateContact(request); } @SdkInternalApi final UpdateContactResult executeUpdateContact(UpdateContactRequest updateContactRequest) { ExecutionContext executionContext = createExecutionContext(updateContactRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateContactRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateContactRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateContact"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateContactResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a contact's contact channel. *

* * @param updateContactChannelRequest * @return Result of the UpdateContactChannel operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ConflictException * Updating or deleting a resource causes an inconsistent state. * @throws DataEncryptionException * The operation failed to due an encryption key error. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.UpdateContactChannel * @see AWS API Documentation */ @Override public UpdateContactChannelResult updateContactChannel(UpdateContactChannelRequest request) { request = beforeClientExecution(request); return executeUpdateContactChannel(request); } @SdkInternalApi final UpdateContactChannelResult executeUpdateContactChannel(UpdateContactChannelRequest updateContactChannelRequest) { ExecutionContext executionContext = createExecutionContext(updateContactChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateContactChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateContactChannelRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateContactChannel"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateContactChannelResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the information specified for an on-call rotation. *

* * @param updateRotationRequest * @return Result of the UpdateRotation operation returned by the service. * @throws AccessDeniedException * You don't have sufficient access to perform this operation. * @throws ConflictException * Updating or deleting a resource causes an inconsistent state. * @throws InternalServerException * Unexpected error occurred while processing the request. * @throws ResourceNotFoundException * Request references a resource that doesn't exist. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an Amazon Web Services service. * @sample AWSSSMContacts.UpdateRotation * @see AWS * API Documentation */ @Override public UpdateRotationResult updateRotation(UpdateRotationRequest request) { request = beforeClientExecution(request); return executeUpdateRotation(request); } @SdkInternalApi final UpdateRotationResult executeUpdateRotation(UpdateRotationRequest updateRotationRequest) { ExecutionContext executionContext = createExecutionContext(updateRotationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateRotationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateRotationRequest)); // 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, "SSM Contacts"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateRotation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateRotationResultJsonUnmarshaller()); 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(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy