com.amazonaws.services.ssmincidents.AWSSSMIncidentsClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ssmincidents Show documentation
/*
* 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.ssmincidents;
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.ssmincidents.AWSSSMIncidentsClientBuilder;
import com.amazonaws.services.ssmincidents.waiters.AWSSSMIncidentsWaiters;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.ssmincidents.model.*;
import com.amazonaws.services.ssmincidents.model.transform.*;
/**
* Client for accessing SSM Incidents. 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 AWSSSMIncidentsClient extends AmazonWebServiceClient implements AWSSSMIncidents {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AWSSSMIncidents.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "ssm-incidents";
private volatile AWSSSMIncidentsWaiters waiters;
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.withContentTypeOverride("application/json")
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller(
com.amazonaws.services.ssmincidents.model.transform.ThrottlingExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller(
com.amazonaws.services.ssmincidents.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller(
com.amazonaws.services.ssmincidents.model.transform.InternalServerExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller(
com.amazonaws.services.ssmincidents.model.transform.AccessDeniedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller(
com.amazonaws.services.ssmincidents.model.transform.ConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.ssmincidents.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller(
com.amazonaws.services.ssmincidents.model.transform.ValidationExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.ssmincidents.model.AWSSSMIncidentsException.class));
public static AWSSSMIncidentsClientBuilder builder() {
return AWSSSMIncidentsClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on SSM Incidents 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.
*/
AWSSSMIncidentsClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on SSM Incidents 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.
*/
AWSSSMIncidentsClient(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-incidents.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/ssmincidents/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/ssmincidents/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Retrieves details about all specified findings for an incident, including descriptive details about each finding.
* A finding represents a recent application environment change made by an CodeDeploy deployment or an
* CloudFormation stack creation or update that can be investigated as a potential cause of the incident.
*
*
* @param batchGetIncidentFindingsRequest
* @return Result of the BatchGetIncidentFindings operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.BatchGetIncidentFindings
* @see AWS API Documentation
*/
@Override
public BatchGetIncidentFindingsResult batchGetIncidentFindings(BatchGetIncidentFindingsRequest request) {
request = beforeClientExecution(request);
return executeBatchGetIncidentFindings(request);
}
@SdkInternalApi
final BatchGetIncidentFindingsResult executeBatchGetIncidentFindings(BatchGetIncidentFindingsRequest batchGetIncidentFindingsRequest) {
ExecutionContext executionContext = createExecutionContext(batchGetIncidentFindingsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchGetIncidentFindingsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(batchGetIncidentFindingsRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetIncidentFindings");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchGetIncidentFindingsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* A replication set replicates and encrypts your data to the provided Regions with the provided KMS key.
*
*
* @param createReplicationSetRequest
* @return Result of the CreateReplicationSet operation returned by the service.
* @throws ServiceQuotaExceededException
* Request would cause a service quota to be exceeded.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.CreateReplicationSet
* @see AWS API Documentation
*/
@Override
public CreateReplicationSetResult createReplicationSet(CreateReplicationSetRequest request) {
request = beforeClientExecution(request);
return executeCreateReplicationSet(request);
}
@SdkInternalApi
final CreateReplicationSetResult executeCreateReplicationSet(CreateReplicationSetRequest createReplicationSetRequest) {
ExecutionContext executionContext = createExecutionContext(createReplicationSetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateReplicationSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createReplicationSetRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateReplicationSet");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateReplicationSetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a response plan that automates the initial response to incidents. A response plan engages contacts,
* starts chat channel collaboration, and initiates runbooks at the beginning of an incident.
*
*
* @param createResponsePlanRequest
* @return Result of the CreateResponsePlan operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.CreateResponsePlan
* @see AWS API Documentation
*/
@Override
public CreateResponsePlanResult createResponsePlan(CreateResponsePlanRequest request) {
request = beforeClientExecution(request);
return executeCreateResponsePlan(request);
}
@SdkInternalApi
final CreateResponsePlanResult executeCreateResponsePlan(CreateResponsePlanRequest createResponsePlanRequest) {
ExecutionContext executionContext = createExecutionContext(createResponsePlanRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateResponsePlanRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createResponsePlanRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateResponsePlan");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateResponsePlanResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a custom timeline event on the incident details page of an incident record. Incident Manager
* automatically creates timeline events that mark key moments during an incident. You can create custom timeline
* events to mark important events that Incident Manager can detect automatically.
*
*
* @param createTimelineEventRequest
* @return Result of the CreateTimelineEvent operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.CreateTimelineEvent
* @see AWS API Documentation
*/
@Override
public CreateTimelineEventResult createTimelineEvent(CreateTimelineEventRequest request) {
request = beforeClientExecution(request);
return executeCreateTimelineEvent(request);
}
@SdkInternalApi
final CreateTimelineEventResult executeCreateTimelineEvent(CreateTimelineEventRequest createTimelineEventRequest) {
ExecutionContext executionContext = createExecutionContext(createTimelineEventRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateTimelineEventRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createTimelineEventRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateTimelineEvent");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateTimelineEventResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Delete an incident record from Incident Manager.
*
*
* @param deleteIncidentRecordRequest
* @return Result of the DeleteIncidentRecord operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.DeleteIncidentRecord
* @see AWS API Documentation
*/
@Override
public DeleteIncidentRecordResult deleteIncidentRecord(DeleteIncidentRecordRequest request) {
request = beforeClientExecution(request);
return executeDeleteIncidentRecord(request);
}
@SdkInternalApi
final DeleteIncidentRecordResult executeDeleteIncidentRecord(DeleteIncidentRecordRequest deleteIncidentRecordRequest) {
ExecutionContext executionContext = createExecutionContext(deleteIncidentRecordRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteIncidentRecordRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteIncidentRecordRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteIncidentRecord");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteIncidentRecordResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes all Regions in your replication set. Deleting the replication set deletes all Incident Manager data.
*
*
* @param deleteReplicationSetRequest
* @return Result of the DeleteReplicationSet operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.DeleteReplicationSet
* @see AWS API Documentation
*/
@Override
public DeleteReplicationSetResult deleteReplicationSet(DeleteReplicationSetRequest request) {
request = beforeClientExecution(request);
return executeDeleteReplicationSet(request);
}
@SdkInternalApi
final DeleteReplicationSetResult executeDeleteReplicationSet(DeleteReplicationSetRequest deleteReplicationSetRequest) {
ExecutionContext executionContext = createExecutionContext(deleteReplicationSetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteReplicationSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteReplicationSetRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteReplicationSet");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteReplicationSetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the resource policy that Resource Access Manager uses to share your Incident Manager resource.
*
*
* @param deleteResourcePolicyRequest
* @return Result of the DeleteResourcePolicy operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.DeleteResourcePolicy
* @see AWS API Documentation
*/
@Override
public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) {
request = beforeClientExecution(request);
return executeDeleteResourcePolicy(request);
}
@SdkInternalApi
final DeleteResourcePolicyResult executeDeleteResourcePolicy(DeleteResourcePolicyRequest deleteResourcePolicyRequest) {
ExecutionContext executionContext = createExecutionContext(deleteResourcePolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteResourcePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteResourcePolicyRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteResourcePolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteResourcePolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified response plan. Deleting a response plan stops all linked CloudWatch alarms and EventBridge
* events from creating an incident with this response plan.
*
*
* @param deleteResponsePlanRequest
* @return Result of the DeleteResponsePlan operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.DeleteResponsePlan
* @see AWS API Documentation
*/
@Override
public DeleteResponsePlanResult deleteResponsePlan(DeleteResponsePlanRequest request) {
request = beforeClientExecution(request);
return executeDeleteResponsePlan(request);
}
@SdkInternalApi
final DeleteResponsePlanResult executeDeleteResponsePlan(DeleteResponsePlanRequest deleteResponsePlanRequest) {
ExecutionContext executionContext = createExecutionContext(deleteResponsePlanRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteResponsePlanRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteResponsePlanRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteResponsePlan");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteResponsePlanResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a timeline event from an incident.
*
*
* @param deleteTimelineEventRequest
* @return Result of the DeleteTimelineEvent operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.DeleteTimelineEvent
* @see AWS API Documentation
*/
@Override
public DeleteTimelineEventResult deleteTimelineEvent(DeleteTimelineEventRequest request) {
request = beforeClientExecution(request);
return executeDeleteTimelineEvent(request);
}
@SdkInternalApi
final DeleteTimelineEventResult executeDeleteTimelineEvent(DeleteTimelineEventRequest deleteTimelineEventRequest) {
ExecutionContext executionContext = createExecutionContext(deleteTimelineEventRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteTimelineEventRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteTimelineEventRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTimelineEvent");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteTimelineEventResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the details for the specified incident record.
*
*
* @param getIncidentRecordRequest
* @return Result of the GetIncidentRecord operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.GetIncidentRecord
* @see AWS API Documentation
*/
@Override
public GetIncidentRecordResult getIncidentRecord(GetIncidentRecordRequest request) {
request = beforeClientExecution(request);
return executeGetIncidentRecord(request);
}
@SdkInternalApi
final GetIncidentRecordResult executeGetIncidentRecord(GetIncidentRecordRequest getIncidentRecordRequest) {
ExecutionContext executionContext = createExecutionContext(getIncidentRecordRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetIncidentRecordRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getIncidentRecordRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetIncidentRecord");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetIncidentRecordResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieve your Incident Manager replication set.
*
*
* @param getReplicationSetRequest
* @return Result of the GetReplicationSet operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.GetReplicationSet
* @see AWS API Documentation
*/
@Override
public GetReplicationSetResult getReplicationSet(GetReplicationSetRequest request) {
request = beforeClientExecution(request);
return executeGetReplicationSet(request);
}
@SdkInternalApi
final GetReplicationSetResult executeGetReplicationSet(GetReplicationSetRequest getReplicationSetRequest) {
ExecutionContext executionContext = createExecutionContext(getReplicationSetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetReplicationSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getReplicationSetRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetReplicationSet");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetReplicationSetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves the resource policies attached to the specified response plan.
*
*
* @param getResourcePoliciesRequest
* @return Result of the GetResourcePolicies operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.GetResourcePolicies
* @see AWS API Documentation
*/
@Override
public GetResourcePoliciesResult getResourcePolicies(GetResourcePoliciesRequest request) {
request = beforeClientExecution(request);
return executeGetResourcePolicies(request);
}
@SdkInternalApi
final GetResourcePoliciesResult executeGetResourcePolicies(GetResourcePoliciesRequest getResourcePoliciesRequest) {
ExecutionContext executionContext = createExecutionContext(getResourcePoliciesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetResourcePoliciesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getResourcePoliciesRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetResourcePolicies");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetResourcePoliciesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves the details of the specified response plan.
*
*
* @param getResponsePlanRequest
* @return Result of the GetResponsePlan operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.GetResponsePlan
* @see AWS
* API Documentation
*/
@Override
public GetResponsePlanResult getResponsePlan(GetResponsePlanRequest request) {
request = beforeClientExecution(request);
return executeGetResponsePlan(request);
}
@SdkInternalApi
final GetResponsePlanResult executeGetResponsePlan(GetResponsePlanRequest getResponsePlanRequest) {
ExecutionContext executionContext = createExecutionContext(getResponsePlanRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetResponsePlanRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getResponsePlanRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetResponsePlan");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetResponsePlanResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a timeline event based on its ID and incident record.
*
*
* @param getTimelineEventRequest
* @return Result of the GetTimelineEvent operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.GetTimelineEvent
* @see AWS
* API Documentation
*/
@Override
public GetTimelineEventResult getTimelineEvent(GetTimelineEventRequest request) {
request = beforeClientExecution(request);
return executeGetTimelineEvent(request);
}
@SdkInternalApi
final GetTimelineEventResult executeGetTimelineEvent(GetTimelineEventRequest getTimelineEventRequest) {
ExecutionContext executionContext = createExecutionContext(getTimelineEventRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetTimelineEventRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getTimelineEventRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTimelineEvent");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetTimelineEventResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a list of the IDs of findings, plus their last modified times, that have been identified for a
* specified incident. A finding represents a recent application environment change made by an CloudFormation stack
* creation or update or an CodeDeploy deployment that can be investigated as a potential cause of the incident.
*
*
* @param listIncidentFindingsRequest
* @return Result of the ListIncidentFindings operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.ListIncidentFindings
* @see AWS API Documentation
*/
@Override
public ListIncidentFindingsResult listIncidentFindings(ListIncidentFindingsRequest request) {
request = beforeClientExecution(request);
return executeListIncidentFindings(request);
}
@SdkInternalApi
final ListIncidentFindingsResult executeListIncidentFindings(ListIncidentFindingsRequest listIncidentFindingsRequest) {
ExecutionContext executionContext = createExecutionContext(listIncidentFindingsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListIncidentFindingsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listIncidentFindingsRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIncidentFindings");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListIncidentFindingsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all incident records in your account. Use this command to retrieve the Amazon Resource Name (ARN) of the
* incident record you want to update.
*
*
* @param listIncidentRecordsRequest
* @return Result of the ListIncidentRecords operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.ListIncidentRecords
* @see AWS API Documentation
*/
@Override
public ListIncidentRecordsResult listIncidentRecords(ListIncidentRecordsRequest request) {
request = beforeClientExecution(request);
return executeListIncidentRecords(request);
}
@SdkInternalApi
final ListIncidentRecordsResult executeListIncidentRecords(ListIncidentRecordsRequest listIncidentRecordsRequest) {
ExecutionContext executionContext = createExecutionContext(listIncidentRecordsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListIncidentRecordsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listIncidentRecordsRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIncidentRecords");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListIncidentRecordsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* List all related items for an incident record.
*
*
* @param listRelatedItemsRequest
* @return Result of the ListRelatedItems operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.ListRelatedItems
* @see AWS
* API Documentation
*/
@Override
public ListRelatedItemsResult listRelatedItems(ListRelatedItemsRequest request) {
request = beforeClientExecution(request);
return executeListRelatedItems(request);
}
@SdkInternalApi
final ListRelatedItemsResult executeListRelatedItems(ListRelatedItemsRequest listRelatedItemsRequest) {
ExecutionContext executionContext = createExecutionContext(listRelatedItemsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListRelatedItemsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listRelatedItemsRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRelatedItems");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRelatedItemsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists details about the replication set configured in your account.
*
*
* @param listReplicationSetsRequest
* @return Result of the ListReplicationSets operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.ListReplicationSets
* @see AWS API Documentation
*/
@Override
public ListReplicationSetsResult listReplicationSets(ListReplicationSetsRequest request) {
request = beforeClientExecution(request);
return executeListReplicationSets(request);
}
@SdkInternalApi
final ListReplicationSetsResult executeListReplicationSets(ListReplicationSetsRequest listReplicationSetsRequest) {
ExecutionContext executionContext = createExecutionContext(listReplicationSetsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListReplicationSetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listReplicationSetsRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListReplicationSets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListReplicationSetsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all response plans in your account.
*
*
* @param listResponsePlansRequest
* @return Result of the ListResponsePlans operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.ListResponsePlans
* @see AWS API Documentation
*/
@Override
public ListResponsePlansResult listResponsePlans(ListResponsePlansRequest request) {
request = beforeClientExecution(request);
return executeListResponsePlans(request);
}
@SdkInternalApi
final ListResponsePlansResult executeListResponsePlans(ListResponsePlansRequest listResponsePlansRequest) {
ExecutionContext executionContext = createExecutionContext(listResponsePlansRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListResponsePlansRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listResponsePlansRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListResponsePlans");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListResponsePlansResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the tags that are attached to the specified response plan or incident.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.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 Incidents");
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);
}
}
/**
*
* Lists timeline events for the specified incident record.
*
*
* @param listTimelineEventsRequest
* @return Result of the ListTimelineEvents operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.ListTimelineEvents
* @see AWS API Documentation
*/
@Override
public ListTimelineEventsResult listTimelineEvents(ListTimelineEventsRequest request) {
request = beforeClientExecution(request);
return executeListTimelineEvents(request);
}
@SdkInternalApi
final ListTimelineEventsResult executeListTimelineEvents(ListTimelineEventsRequest listTimelineEventsRequest) {
ExecutionContext executionContext = createExecutionContext(listTimelineEventsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTimelineEventsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTimelineEventsRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTimelineEvents");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTimelineEventsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds a resource policy to the specified response plan. The resource policy is used to share the response plan
* using Resource Access Manager (RAM). For more information about cross-account sharing, see Cross-Region and cross-account incident management.
*
*
* @param putResourcePolicyRequest
* @return Result of the PutResourcePolicy operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.PutResourcePolicy
* @see AWS API Documentation
*/
@Override
public PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest request) {
request = beforeClientExecution(request);
return executePutResourcePolicy(request);
}
@SdkInternalApi
final PutResourcePolicyResult executePutResourcePolicy(PutResourcePolicyRequest putResourcePolicyRequest) {
ExecutionContext executionContext = createExecutionContext(putResourcePolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutResourcePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putResourcePolicyRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutResourcePolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutResourcePolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Used to start an incident from CloudWatch alarms, EventBridge events, or manually.
*
*
* @param startIncidentRequest
* @return Result of the StartIncident operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.StartIncident
* @see AWS
* API Documentation
*/
@Override
public StartIncidentResult startIncident(StartIncidentRequest request) {
request = beforeClientExecution(request);
return executeStartIncident(request);
}
@SdkInternalApi
final StartIncidentResult executeStartIncident(StartIncidentRequest startIncidentRequest) {
ExecutionContext executionContext = createExecutionContext(startIncidentRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StartIncidentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startIncidentRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartIncident");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartIncidentResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds a tag to a response plan.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws ServiceQuotaExceededException
* Request would cause a service quota to be exceeded.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.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 Incidents");
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 a tag from a resource.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.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 Incidents");
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);
}
}
/**
*
* Update deletion protection to either allow or deny deletion of the final Region in a replication set.
*
*
* @param updateDeletionProtectionRequest
* @return Result of the UpdateDeletionProtection operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.UpdateDeletionProtection
* @see AWS API Documentation
*/
@Override
public UpdateDeletionProtectionResult updateDeletionProtection(UpdateDeletionProtectionRequest request) {
request = beforeClientExecution(request);
return executeUpdateDeletionProtection(request);
}
@SdkInternalApi
final UpdateDeletionProtectionResult executeUpdateDeletionProtection(UpdateDeletionProtectionRequest updateDeletionProtectionRequest) {
ExecutionContext executionContext = createExecutionContext(updateDeletionProtectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateDeletionProtectionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateDeletionProtectionRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDeletionProtection");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateDeletionProtectionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Update the details of an incident record. You can use this operation to update an incident record from the
* defined chat channel. For more information about using actions in chat channels, see Interacting through
* chat.
*
*
* @param updateIncidentRecordRequest
* @return Result of the UpdateIncidentRecord operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.UpdateIncidentRecord
* @see AWS API Documentation
*/
@Override
public UpdateIncidentRecordResult updateIncidentRecord(UpdateIncidentRecordRequest request) {
request = beforeClientExecution(request);
return executeUpdateIncidentRecord(request);
}
@SdkInternalApi
final UpdateIncidentRecordResult executeUpdateIncidentRecord(UpdateIncidentRecordRequest updateIncidentRecordRequest) {
ExecutionContext executionContext = createExecutionContext(updateIncidentRecordRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateIncidentRecordRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateIncidentRecordRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateIncidentRecord");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateIncidentRecordResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Add or remove related items from the related items tab of an incident record.
*
*
* @param updateRelatedItemsRequest
* @return Result of the UpdateRelatedItems operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.UpdateRelatedItems
* @see AWS API Documentation
*/
@Override
public UpdateRelatedItemsResult updateRelatedItems(UpdateRelatedItemsRequest request) {
request = beforeClientExecution(request);
return executeUpdateRelatedItems(request);
}
@SdkInternalApi
final UpdateRelatedItemsResult executeUpdateRelatedItems(UpdateRelatedItemsRequest updateRelatedItemsRequest) {
ExecutionContext executionContext = createExecutionContext(updateRelatedItemsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateRelatedItemsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateRelatedItemsRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateRelatedItems");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateRelatedItemsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Add or delete Regions from your replication set.
*
*
* @param updateReplicationSetRequest
* @return Result of the UpdateReplicationSet operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.UpdateReplicationSet
* @see AWS API Documentation
*/
@Override
public UpdateReplicationSetResult updateReplicationSet(UpdateReplicationSetRequest request) {
request = beforeClientExecution(request);
return executeUpdateReplicationSet(request);
}
@SdkInternalApi
final UpdateReplicationSetResult executeUpdateReplicationSet(UpdateReplicationSetRequest updateReplicationSetRequest) {
ExecutionContext executionContext = createExecutionContext(updateReplicationSetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateReplicationSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateReplicationSetRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateReplicationSet");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateReplicationSetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the specified response plan.
*
*
* @param updateResponsePlanRequest
* @return Result of the UpdateResponsePlan operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.UpdateResponsePlan
* @see AWS API Documentation
*/
@Override
public UpdateResponsePlanResult updateResponsePlan(UpdateResponsePlanRequest request) {
request = beforeClientExecution(request);
return executeUpdateResponsePlan(request);
}
@SdkInternalApi
final UpdateResponsePlanResult executeUpdateResponsePlan(UpdateResponsePlanRequest updateResponsePlanRequest) {
ExecutionContext executionContext = createExecutionContext(updateResponsePlanRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateResponsePlanRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateResponsePlanRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateResponsePlan");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateResponsePlanResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates a timeline event. You can update events of type Custom Event
.
*
*
* @param updateTimelineEventRequest
* @return Result of the UpdateTimelineEvent operation returned by the service.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ResourceNotFoundException
* Request references a resource which doesn't exist.
* @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 ConflictException
* Updating or deleting a resource causes an inconsistent state.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception or failure.
* @sample AWSSSMIncidents.UpdateTimelineEvent
* @see AWS API Documentation
*/
@Override
public UpdateTimelineEventResult updateTimelineEvent(UpdateTimelineEventRequest request) {
request = beforeClientExecution(request);
return executeUpdateTimelineEvent(request);
}
@SdkInternalApi
final UpdateTimelineEventResult executeUpdateTimelineEvent(UpdateTimelineEventRequest updateTimelineEventRequest) {
ExecutionContext executionContext = createExecutionContext(updateTimelineEventRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateTimelineEventRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateTimelineEventRequest));
// 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 Incidents");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateTimelineEvent");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateTimelineEventResultJsonUnmarshaller());
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 AWSSSMIncidentsWaiters waiters() {
if (waiters == null) {
synchronized (this) {
if (waiters == null) {
waiters = new AWSSSMIncidentsWaiters(this);
}
}
}
return waiters;
}
@Override
public void shutdown() {
super.shutdown();
if (waiters != null) {
waiters.shutdown();
}
}
}