/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.lightsail;
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.lightsail.AmazonLightsailClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.lightsail.model.*;
import com.amazonaws.services.lightsail.model.transform.*;
/**
* Client for accessing Amazon Lightsail. All service calls made using this client are blocking, and will not return
* until the service call completes.
*
*
* Amazon Lightsail is the easiest way to get started with Amazon Web Services (Amazon Web Services) for developers who
* need to build websites or web applications. It includes everything you need to launch your project quickly -
* instances (virtual private servers), container services, storage buckets, managed databases, SSD-based block storage,
* static IP addresses, load balancers, content delivery network (CDN) distributions, DNS management of registered
* domains, and resource snapshots (backups) - for a low, predictable monthly price.
*
*
* You can manage your Lightsail resources using the Lightsail console, Lightsail API, Command Line Interface (CLI), or
* SDKs. For more information about Lightsail concepts and tasks, see the Amazon Lightsail Developer Guide.
*
*
* This API Reference provides detailed information about the actions, data types, parameters, and errors of the
* Lightsail service. For more information about the supported Amazon Web Services Regions, endpoints, and service
* quotas of the Lightsail service, see Amazon
* Lightsail Endpoints and Quotas in the Amazon Web Services General Reference.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonLightsailClient extends AmazonWebServiceClient implements AmazonLightsail {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AmazonLightsail.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "lightsail";
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("UnauthenticatedException").withExceptionUnmarshaller(
com.amazonaws.services.lightsail.model.transform.UnauthenticatedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceException").withExceptionUnmarshaller(
com.amazonaws.services.lightsail.model.transform.ServiceExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("NotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.lightsail.model.transform.NotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidInputException").withExceptionUnmarshaller(
com.amazonaws.services.lightsail.model.transform.InvalidInputExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccountSetupInProgressException").withExceptionUnmarshaller(
com.amazonaws.services.lightsail.model.transform.AccountSetupInProgressExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("OperationFailureException").withExceptionUnmarshaller(
com.amazonaws.services.lightsail.model.transform.OperationFailureExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller(
com.amazonaws.services.lightsail.model.transform.AccessDeniedExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.lightsail.model.AmazonLightsailException.class));
/**
* Constructs a new client to invoke service methods on Amazon Lightsail. A credentials provider chain will be used
* that searches for credentials in this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Instance profile credentials delivered through the Amazon EC2 metadata service
*
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @see DefaultAWSCredentialsProviderChain
* @deprecated use {@link AmazonLightsailClientBuilder#defaultClient()}
*/
@Deprecated
public AmazonLightsailClient() {
this(DefaultAWSCredentialsProviderChain.getInstance(), configFactory.getConfig());
}
/**
* Constructs a new client to invoke service methods on Amazon Lightsail. A credentials provider chain will be used
* that searches for credentials in this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Instance profile credentials delivered through the Amazon EC2 metadata service
*
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientConfiguration
* The client configuration options controlling how this client connects to Amazon Lightsail (ex: proxy
* settings, retry counts, etc.).
*
* @see DefaultAWSCredentialsProviderChain
* @deprecated use {@link AmazonLightsailClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonLightsailClient(ClientConfiguration clientConfiguration) {
this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration);
}
/**
* Constructs a new client to invoke service methods on Amazon Lightsail using the specified AWS account
* credentials.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
* @deprecated use {@link AmazonLightsailClientBuilder#withCredentials(AWSCredentialsProvider)} for example:
* {@code AmazonLightsailClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();}
*/
@Deprecated
public AmazonLightsailClient(AWSCredentials awsCredentials) {
this(awsCredentials, configFactory.getConfig());
}
/**
* Constructs a new client to invoke service methods on Amazon Lightsail using the specified AWS account credentials
* and client configuration options.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
* @param clientConfiguration
* The client configuration options controlling how this client connects to Amazon Lightsail (ex: proxy
* settings, retry counts, etc.).
* @deprecated use {@link AmazonLightsailClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonLightsailClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonLightsailClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) {
super(clientConfiguration);
this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials);
this.advancedConfig = AdvancedConfig.EMPTY;
init();
}
/**
* Constructs a new client to invoke service methods on Amazon Lightsail using the specified AWS account credentials
* provider.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @deprecated use {@link AmazonLightsailClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonLightsailClient(AWSCredentialsProvider awsCredentialsProvider) {
this(awsCredentialsProvider, configFactory.getConfig());
}
/**
* Constructs a new client to invoke service methods on Amazon Lightsail using the specified AWS account credentials
* provider and client configuration options.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @param clientConfiguration
* The client configuration options controlling how this client connects to Amazon Lightsail (ex: proxy
* settings, retry counts, etc.).
* @deprecated use {@link AmazonLightsailClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonLightsailClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonLightsailClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, null);
}
/**
* Constructs a new client to invoke service methods on Amazon Lightsail using the specified AWS account credentials
* provider, client configuration options, and request metric collector.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @param clientConfiguration
* The client configuration options controlling how this client connects to Amazon Lightsail (ex: proxy
* settings, retry counts, etc.).
* @param requestMetricCollector
* optional request metric collector
* @deprecated use {@link AmazonLightsailClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonLightsailClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonLightsailClientBuilder#withMetricsCollector(RequestMetricCollector)}
*/
@Deprecated
public AmazonLightsailClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector) {
super(clientConfiguration, requestMetricCollector);
this.awsCredentialsProvider = awsCredentialsProvider;
this.advancedConfig = AdvancedConfig.EMPTY;
init();
}
public static AmazonLightsailClientBuilder builder() {
return AmazonLightsailClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on Amazon Lightsail 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.
*/
AmazonLightsailClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on Amazon Lightsail 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.
*/
AmazonLightsailClient(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("lightsail.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/lightsail/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/lightsail/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Allocates a static IP address.
*
*
* @param allocateStaticIpRequest
* @return Result of the AllocateStaticIp operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.AllocateStaticIp
* @see AWS API
* Documentation
*/
@Override
public AllocateStaticIpResult allocateStaticIp(AllocateStaticIpRequest request) {
request = beforeClientExecution(request);
return executeAllocateStaticIp(request);
}
@SdkInternalApi
final AllocateStaticIpResult executeAllocateStaticIp(AllocateStaticIpRequest allocateStaticIpRequest) {
ExecutionContext executionContext = createExecutionContext(allocateStaticIpRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AllocateStaticIpRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(allocateStaticIpRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AllocateStaticIp");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AllocateStaticIpResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Attaches an SSL/TLS certificate to your Amazon Lightsail content delivery network (CDN) distribution.
*
*
* After the certificate is attached, your distribution accepts HTTPS traffic for all of the domains that are
* associated with the certificate.
*
*
* Use the CreateCertificate
action to create a certificate that you can attach to your distribution.
*
*
*
* Only certificates created in the us-east-1
Amazon Web Services Region can be attached to Lightsail
* distributions. Lightsail distributions are global resources that can reference an origin in any Amazon Web
* Services Region, and distribute its content globally. However, all distributions are located in the
* us-east-1
Region.
*
*
*
* @param attachCertificateToDistributionRequest
* @return Result of the AttachCertificateToDistribution operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.AttachCertificateToDistribution
* @see AWS API Documentation
*/
@Override
public AttachCertificateToDistributionResult attachCertificateToDistribution(AttachCertificateToDistributionRequest request) {
request = beforeClientExecution(request);
return executeAttachCertificateToDistribution(request);
}
@SdkInternalApi
final AttachCertificateToDistributionResult executeAttachCertificateToDistribution(
AttachCertificateToDistributionRequest attachCertificateToDistributionRequest) {
ExecutionContext executionContext = createExecutionContext(attachCertificateToDistributionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AttachCertificateToDistributionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(attachCertificateToDistributionRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AttachCertificateToDistribution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AttachCertificateToDistributionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Attaches a block storage disk to a running or stopped Lightsail instance and exposes it to the instance with the
* specified disk name.
*
*
* The attach disk
operation supports tag-based access control via resource tags applied to the
* resource identified by disk name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param attachDiskRequest
* @return Result of the AttachDisk operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.AttachDisk
* @see AWS API
* Documentation
*/
@Override
public AttachDiskResult attachDisk(AttachDiskRequest request) {
request = beforeClientExecution(request);
return executeAttachDisk(request);
}
@SdkInternalApi
final AttachDiskResult executeAttachDisk(AttachDiskRequest attachDiskRequest) {
ExecutionContext executionContext = createExecutionContext(attachDiskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AttachDiskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(attachDiskRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AttachDisk");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new AttachDiskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Attaches one or more Lightsail instances to a load balancer.
*
*
* After some time, the instances are attached to the load balancer and the health check status is available.
*
*
* The attach instances to load balancer
operation supports tag-based access control via resource tags
* applied to the resource identified by load balancer name
. For more information, see the Lightsail Developer Guide.
*
*
* @param attachInstancesToLoadBalancerRequest
* @return Result of the AttachInstancesToLoadBalancer operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.AttachInstancesToLoadBalancer
* @see AWS API Documentation
*/
@Override
public AttachInstancesToLoadBalancerResult attachInstancesToLoadBalancer(AttachInstancesToLoadBalancerRequest request) {
request = beforeClientExecution(request);
return executeAttachInstancesToLoadBalancer(request);
}
@SdkInternalApi
final AttachInstancesToLoadBalancerResult executeAttachInstancesToLoadBalancer(AttachInstancesToLoadBalancerRequest attachInstancesToLoadBalancerRequest) {
ExecutionContext executionContext = createExecutionContext(attachInstancesToLoadBalancerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AttachInstancesToLoadBalancerRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(attachInstancesToLoadBalancerRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AttachInstancesToLoadBalancer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AttachInstancesToLoadBalancerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Attaches a Transport Layer Security (TLS) certificate to your load balancer. TLS is just an updated, more secure
* version of Secure Socket Layer (SSL).
*
*
* Once you create and validate your certificate, you can attach it to your load balancer. You can also use this API
* to rotate the certificates on your account. Use the AttachLoadBalancerTlsCertificate
action with the
* non-attached certificate, and it will replace the existing one and become the attached certificate.
*
*
* The AttachLoadBalancerTlsCertificate
operation supports tag-based access control via resource tags
* applied to the resource identified by load balancer name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param attachLoadBalancerTlsCertificateRequest
* @return Result of the AttachLoadBalancerTlsCertificate operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.AttachLoadBalancerTlsCertificate
* @see AWS API Documentation
*/
@Override
public AttachLoadBalancerTlsCertificateResult attachLoadBalancerTlsCertificate(AttachLoadBalancerTlsCertificateRequest request) {
request = beforeClientExecution(request);
return executeAttachLoadBalancerTlsCertificate(request);
}
@SdkInternalApi
final AttachLoadBalancerTlsCertificateResult executeAttachLoadBalancerTlsCertificate(
AttachLoadBalancerTlsCertificateRequest attachLoadBalancerTlsCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(attachLoadBalancerTlsCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AttachLoadBalancerTlsCertificateRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(attachLoadBalancerTlsCertificateRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AttachLoadBalancerTlsCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AttachLoadBalancerTlsCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Attaches a static IP address to a specific Amazon Lightsail instance.
*
*
* @param attachStaticIpRequest
* @return Result of the AttachStaticIp operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.AttachStaticIp
* @see AWS API
* Documentation
*/
@Override
public AttachStaticIpResult attachStaticIp(AttachStaticIpRequest request) {
request = beforeClientExecution(request);
return executeAttachStaticIp(request);
}
@SdkInternalApi
final AttachStaticIpResult executeAttachStaticIp(AttachStaticIpRequest attachStaticIpRequest) {
ExecutionContext executionContext = createExecutionContext(attachStaticIpRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AttachStaticIpRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(attachStaticIpRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AttachStaticIp");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AttachStaticIpResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Closes ports for a specific Amazon Lightsail instance.
*
*
* The CloseInstancePublicPorts
action supports tag-based access control via resource tags applied to
* the resource identified by instanceName
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param closeInstancePublicPortsRequest
* @return Result of the CloseInstancePublicPorts operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CloseInstancePublicPorts
* @see AWS API Documentation
*/
@Override
public CloseInstancePublicPortsResult closeInstancePublicPorts(CloseInstancePublicPortsRequest request) {
request = beforeClientExecution(request);
return executeCloseInstancePublicPorts(request);
}
@SdkInternalApi
final CloseInstancePublicPortsResult executeCloseInstancePublicPorts(CloseInstancePublicPortsRequest closeInstancePublicPortsRequest) {
ExecutionContext executionContext = createExecutionContext(closeInstancePublicPortsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CloseInstancePublicPortsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(closeInstancePublicPortsRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CloseInstancePublicPorts");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CloseInstancePublicPortsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Copies a manual snapshot of an instance or disk as another manual snapshot, or copies an automatic snapshot of an
* instance or disk as a manual snapshot. This operation can also be used to copy a manual or automatic snapshot of
* an instance or a disk from one Amazon Web Services Region to another in Amazon Lightsail.
*
*
* When copying a manual snapshot, be sure to define the source region
,
* source snapshot name
, and target snapshot name
parameters.
*
*
* When copying an automatic snapshot, be sure to define the source region
,
* source resource name
, target snapshot name
, and either the restore date
or
* the use latest restorable auto snapshot
parameters.
*
*
* @param copySnapshotRequest
* @return Result of the CopySnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CopySnapshot
* @see AWS API
* Documentation
*/
@Override
public CopySnapshotResult copySnapshot(CopySnapshotRequest request) {
request = beforeClientExecution(request);
return executeCopySnapshot(request);
}
@SdkInternalApi
final CopySnapshotResult executeCopySnapshot(CopySnapshotRequest copySnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(copySnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CopySnapshotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(copySnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CopySnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CopySnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an Amazon Lightsail bucket.
*
*
* A bucket is a cloud storage resource available in the Lightsail object storage service. Use buckets to store
* objects such as data and its descriptive metadata. For more information about buckets, see Buckets in Amazon
* Lightsail in the Amazon Lightsail Developer Guide.
*
*
* @param createBucketRequest
* @return Result of the CreateBucket operation returned by the service.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws ServiceException
* A general service exception.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateBucket
* @see AWS API
* Documentation
*/
@Override
public CreateBucketResult createBucket(CreateBucketRequest request) {
request = beforeClientExecution(request);
return executeCreateBucket(request);
}
@SdkInternalApi
final CreateBucketResult executeCreateBucket(CreateBucketRequest createBucketRequest) {
ExecutionContext executionContext = createExecutionContext(createBucketRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateBucketRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBucketRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBucket");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBucketResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new access key for the specified Amazon Lightsail bucket. Access keys consist of an access key ID and
* corresponding secret access key.
*
*
* Access keys grant full programmatic access to the specified bucket and its objects. You can have a maximum of two
* access keys per bucket. Use the GetBucketAccessKeys action to get a list of current access keys for a specific bucket. For more information
* about access keys, see Creating access keys for a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide.
*
*
*
* The secretAccessKey
value is returned only in response to the CreateBucketAccessKey
* action. You can get a secret access key only when you first create an access key; you cannot get the secret
* access key later. If you lose the secret access key, you must create a new access key.
*
*
*
* @param createBucketAccessKeyRequest
* @return Result of the CreateBucketAccessKey operation returned by the service.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws ServiceException
* A general service exception.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateBucketAccessKey
* @see AWS API Documentation
*/
@Override
public CreateBucketAccessKeyResult createBucketAccessKey(CreateBucketAccessKeyRequest request) {
request = beforeClientExecution(request);
return executeCreateBucketAccessKey(request);
}
@SdkInternalApi
final CreateBucketAccessKeyResult executeCreateBucketAccessKey(CreateBucketAccessKeyRequest createBucketAccessKeyRequest) {
ExecutionContext executionContext = createExecutionContext(createBucketAccessKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateBucketAccessKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBucketAccessKeyRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBucketAccessKey");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateBucketAccessKeyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an SSL/TLS certificate for an Amazon Lightsail content delivery network (CDN) distribution and a
* container service.
*
*
* After the certificate is valid, use the AttachCertificateToDistribution
action to use the
* certificate and its domains with your distribution. Or use the UpdateContainerService
action to use
* the certificate and its domains with your container service.
*
*
*
* Only certificates created in the us-east-1
Amazon Web Services Region can be attached to Lightsail
* distributions. Lightsail distributions are global resources that can reference an origin in any Amazon Web
* Services Region, and distribute its content globally. However, all distributions are located in the
* us-east-1
Region.
*
*
*
* @param createCertificateRequest
* @return Result of the CreateCertificate operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateCertificate
* @see AWS
* API Documentation
*/
@Override
public CreateCertificateResult createCertificate(CreateCertificateRequest request) {
request = beforeClientExecution(request);
return executeCreateCertificate(request);
}
@SdkInternalApi
final CreateCertificateResult executeCreateCertificate(CreateCertificateRequest createCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(createCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createCertificateRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an AWS CloudFormation stack, which creates a new Amazon EC2 instance from an exported Amazon Lightsail
* snapshot. This operation results in a CloudFormation stack record that can be used to track the AWS
* CloudFormation stack created. Use the get cloud formation stack records
operation to get a list of
* the CloudFormation stacks created.
*
*
*
* Wait until after your new Amazon EC2 instance is created before running the
* create cloud formation stack
operation again with the same export snapshot record.
*
*
*
* @param createCloudFormationStackRequest
* @return Result of the CreateCloudFormationStack operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateCloudFormationStack
* @see AWS API Documentation
*/
@Override
public CreateCloudFormationStackResult createCloudFormationStack(CreateCloudFormationStackRequest request) {
request = beforeClientExecution(request);
return executeCreateCloudFormationStack(request);
}
@SdkInternalApi
final CreateCloudFormationStackResult executeCreateCloudFormationStack(CreateCloudFormationStackRequest createCloudFormationStackRequest) {
ExecutionContext executionContext = createExecutionContext(createCloudFormationStackRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateCloudFormationStackRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createCloudFormationStackRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateCloudFormationStack");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateCloudFormationStackResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an email or SMS text message contact method.
*
*
* A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email
* address and one mobile phone number contact method in each Amazon Web Services Region. However, SMS text
* messaging is not supported in some Amazon Web Services Regions, and SMS text messages cannot be sent to some
* countries/regions. For more information, see Notifications in
* Amazon Lightsail.
*
*
* @param createContactMethodRequest
* @return Result of the CreateContactMethod operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateContactMethod
* @see AWS
* API Documentation
*/
@Override
public CreateContactMethodResult createContactMethod(CreateContactMethodRequest request) {
request = beforeClientExecution(request);
return executeCreateContactMethod(request);
}
@SdkInternalApi
final CreateContactMethodResult executeCreateContactMethod(CreateContactMethodRequest createContactMethodRequest) {
ExecutionContext executionContext = createExecutionContext(createContactMethodRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateContactMethodRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createContactMethodRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateContactMethod");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateContactMethodResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an Amazon Lightsail container service.
*
*
* A Lightsail container service is a compute resource to which you can deploy containers. For more information, see
* Container
* services in Amazon Lightsail in the Lightsail Dev Guide.
*
*
* @param createContainerServiceRequest
* @return Result of the CreateContainerService operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateContainerService
* @see AWS API Documentation
*/
@Override
public CreateContainerServiceResult createContainerService(CreateContainerServiceRequest request) {
request = beforeClientExecution(request);
return executeCreateContainerService(request);
}
@SdkInternalApi
final CreateContainerServiceResult executeCreateContainerService(CreateContainerServiceRequest createContainerServiceRequest) {
ExecutionContext executionContext = createExecutionContext(createContainerServiceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateContainerServiceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createContainerServiceRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateContainerService");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateContainerServiceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a deployment for your Amazon Lightsail container service.
*
*
* A deployment specifies the containers that will be launched on the container service and their settings, such as
* the ports to open, the environment variables to apply, and the launch command to run. It also specifies the
* container that will serve as the public endpoint of the deployment and its settings, such as the HTTP or HTTPS
* port to use, and the health check configuration.
*
*
* You can deploy containers to your container service using container images from a public registry such as Amazon
* ECR Public, or from your local machine. For more information, see Creating container images for your Amazon Lightsail container services in the Amazon Lightsail Developer
* Guide.
*
*
* @param createContainerServiceDeploymentRequest
* @return Result of the CreateContainerServiceDeployment operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateContainerServiceDeployment
* @see AWS API Documentation
*/
@Override
public CreateContainerServiceDeploymentResult createContainerServiceDeployment(CreateContainerServiceDeploymentRequest request) {
request = beforeClientExecution(request);
return executeCreateContainerServiceDeployment(request);
}
@SdkInternalApi
final CreateContainerServiceDeploymentResult executeCreateContainerServiceDeployment(
CreateContainerServiceDeploymentRequest createContainerServiceDeploymentRequest) {
ExecutionContext executionContext = createExecutionContext(createContainerServiceDeploymentRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateContainerServiceDeploymentRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createContainerServiceDeploymentRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateContainerServiceDeployment");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateContainerServiceDeploymentResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a temporary set of log in credentials that you can use to log in to the Docker process on your local
* machine. After you're logged in, you can use the native Docker commands to push your local container images to
* the container image registry of your Amazon Lightsail account so that you can use them with your Lightsail
* container service. The log in credentials expire 12 hours after they are created, at which point you will need to
* create a new set of log in credentials.
*
*
*
* You can only push container images to the container service registry of your Lightsail account. You cannot pull
* container images or perform any other container image management actions on the container service registry.
*
*
*
* After you push your container images to the container image registry of your Lightsail account, use the
* RegisterContainerImage
action to register the pushed images to a specific Lightsail container
* service.
*
*
*
* This action is not required if you install and use the Lightsail Control (lightsailctl) plugin to push container
* images to your Lightsail container service. For more information, see Pushing
* and managing container images on your Amazon Lightsail container services in the Amazon Lightsail
* Developer Guide.
*
*
*
* @param createContainerServiceRegistryLoginRequest
* @return Result of the CreateContainerServiceRegistryLogin operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateContainerServiceRegistryLogin
* @see AWS API Documentation
*/
@Override
public CreateContainerServiceRegistryLoginResult createContainerServiceRegistryLogin(CreateContainerServiceRegistryLoginRequest request) {
request = beforeClientExecution(request);
return executeCreateContainerServiceRegistryLogin(request);
}
@SdkInternalApi
final CreateContainerServiceRegistryLoginResult executeCreateContainerServiceRegistryLogin(
CreateContainerServiceRegistryLoginRequest createContainerServiceRegistryLoginRequest) {
ExecutionContext executionContext = createExecutionContext(createContainerServiceRegistryLoginRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateContainerServiceRegistryLoginRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createContainerServiceRegistryLoginRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateContainerServiceRegistryLogin");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateContainerServiceRegistryLoginResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a block storage disk that can be attached to an Amazon Lightsail instance in the same Availability Zone
* (e.g., us-east-2a
).
*
*
* The create disk
operation supports tag-based access control via request tags. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
* @param createDiskRequest
* @return Result of the CreateDisk operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateDisk
* @see AWS API
* Documentation
*/
@Override
public CreateDiskResult createDisk(CreateDiskRequest request) {
request = beforeClientExecution(request);
return executeCreateDisk(request);
}
@SdkInternalApi
final CreateDiskResult executeCreateDisk(CreateDiskRequest createDiskRequest) {
ExecutionContext executionContext = createExecutionContext(createDiskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDiskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDiskRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDisk");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDiskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a block storage disk from a manual or automatic snapshot of a disk. The resulting disk can be attached to
* an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a
).
*
*
* The create disk from snapshot
operation supports tag-based access control via request tags and
* resource tags applied to the resource identified by disk snapshot name
. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
* @param createDiskFromSnapshotRequest
* @return Result of the CreateDiskFromSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateDiskFromSnapshot
* @see AWS API Documentation
*/
@Override
public CreateDiskFromSnapshotResult createDiskFromSnapshot(CreateDiskFromSnapshotRequest request) {
request = beforeClientExecution(request);
return executeCreateDiskFromSnapshot(request);
}
@SdkInternalApi
final CreateDiskFromSnapshotResult executeCreateDiskFromSnapshot(CreateDiskFromSnapshotRequest createDiskFromSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(createDiskFromSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDiskFromSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDiskFromSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDiskFromSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateDiskFromSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a snapshot of a block storage disk. You can use snapshots for backups, to make copies of disks, and to
* save data before shutting down a Lightsail instance.
*
*
* You can take a snapshot of an attached disk that is in use; however, snapshots only capture data that has been
* written to your disk at the time the snapshot command is issued. This may exclude any data that has been cached
* by any applications or the operating system. If you can pause any file systems on the disk long enough to take a
* snapshot, your snapshot should be complete. Nevertheless, if you cannot pause all file writes to the disk, you
* should unmount the disk from within the Lightsail instance, issue the create disk snapshot command, and then
* remount the disk to ensure a consistent and complete snapshot. You may remount and use your disk while the
* snapshot status is pending.
*
*
* You can also use this operation to create a snapshot of an instance's system volume. You might want to do this,
* for example, to recover data from the system volume of a botched instance or to create a backup of the system
* volume like you would for a block storage disk. To create a snapshot of a system volume, just define the
* instance name
parameter when issuing the snapshot command, and a snapshot of the defined instance's
* system volume will be created. After the snapshot is available, you can create a block storage disk from the
* snapshot and attach it to a running instance to access the data on the disk.
*
*
* The create disk snapshot
operation supports tag-based access control via request tags. For more
* information, see the Amazon Lightsail Developer Guide.
*
*
* @param createDiskSnapshotRequest
* @return Result of the CreateDiskSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateDiskSnapshot
* @see AWS
* API Documentation
*/
@Override
public CreateDiskSnapshotResult createDiskSnapshot(CreateDiskSnapshotRequest request) {
request = beforeClientExecution(request);
return executeCreateDiskSnapshot(request);
}
@SdkInternalApi
final CreateDiskSnapshotResult executeCreateDiskSnapshot(CreateDiskSnapshotRequest createDiskSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(createDiskSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDiskSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDiskSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDiskSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDiskSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an Amazon Lightsail content delivery network (CDN) distribution.
*
*
* A distribution is a globally distributed network of caching servers that improve the performance of your website
* or web application hosted on a Lightsail instance. For more information, see Content delivery networks in Amazon Lightsail.
*
*
* @param createDistributionRequest
* @return Result of the CreateDistribution operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateDistribution
* @see AWS
* API Documentation
*/
@Override
public CreateDistributionResult createDistribution(CreateDistributionRequest request) {
request = beforeClientExecution(request);
return executeCreateDistribution(request);
}
@SdkInternalApi
final CreateDistributionResult executeCreateDistribution(CreateDistributionRequest createDistributionRequest) {
ExecutionContext executionContext = createExecutionContext(createDistributionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDistributionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDistributionRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDistribution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDistributionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a domain resource for the specified domain (e.g., example.com).
*
*
* The create domain
operation supports tag-based access control via request tags. For more
* information, see the Amazon Lightsail Developer Guide.
*
*
* @param createDomainRequest
* @return Result of the CreateDomain operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateDomain
* @see AWS API
* Documentation
*/
@Override
public CreateDomainResult createDomain(CreateDomainRequest request) {
request = beforeClientExecution(request);
return executeCreateDomain(request);
}
@SdkInternalApi
final CreateDomainResult executeCreateDomain(CreateDomainRequest createDomainRequest) {
ExecutionContext executionContext = createExecutionContext(createDomainRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDomainRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDomain");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDomainResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates one of the following domain name system (DNS) records in a domain DNS zone: Address (A), canonical name
* (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
*
*
* The create domain entry
operation supports tag-based access control via resource tags applied to the
* resource identified by domain name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param createDomainEntryRequest
* @return Result of the CreateDomainEntry operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateDomainEntry
* @see AWS
* API Documentation
*/
@Override
public CreateDomainEntryResult createDomainEntry(CreateDomainEntryRequest request) {
request = beforeClientExecution(request);
return executeCreateDomainEntry(request);
}
@SdkInternalApi
final CreateDomainEntryResult executeCreateDomainEntry(CreateDomainEntryRequest createDomainEntryRequest) {
ExecutionContext executionContext = createExecutionContext(createDomainEntryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDomainEntryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDomainEntryRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDomainEntry");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDomainEntryResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates two URLs that are used to access a virtual computer’s graphical user interface (GUI) session. The primary
* URL initiates a web-based NICE DCV session to the virtual computer's application. The secondary URL initiates a
* web-based NICE DCV session to the virtual computer's operating session.
*
*
* Use StartGUISession
to open the session.
*
*
* @param createGUISessionAccessDetailsRequest
* @return Result of the CreateGUISessionAccessDetails operation returned by the service.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws ServiceException
* A general service exception.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateGUISessionAccessDetails
* @see AWS API Documentation
*/
@Override
public CreateGUISessionAccessDetailsResult createGUISessionAccessDetails(CreateGUISessionAccessDetailsRequest request) {
request = beforeClientExecution(request);
return executeCreateGUISessionAccessDetails(request);
}
@SdkInternalApi
final CreateGUISessionAccessDetailsResult executeCreateGUISessionAccessDetails(CreateGUISessionAccessDetailsRequest createGUISessionAccessDetailsRequest) {
ExecutionContext executionContext = createExecutionContext(createGUISessionAccessDetailsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateGUISessionAccessDetailsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createGUISessionAccessDetailsRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateGUISessionAccessDetails");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateGUISessionAccessDetailsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a snapshot of a specific virtual private server, or instance. You can use a snapshot to create a
* new instance that is based on that snapshot.
*
*
* The create instance snapshot
operation supports tag-based access control via request tags. For more
* information, see the Amazon Lightsail Developer Guide.
*
*
* @param createInstanceSnapshotRequest
* @return Result of the CreateInstanceSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateInstanceSnapshot
* @see AWS API Documentation
*/
@Override
public CreateInstanceSnapshotResult createInstanceSnapshot(CreateInstanceSnapshotRequest request) {
request = beforeClientExecution(request);
return executeCreateInstanceSnapshot(request);
}
@SdkInternalApi
final CreateInstanceSnapshotResult executeCreateInstanceSnapshot(CreateInstanceSnapshotRequest createInstanceSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(createInstanceSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateInstanceSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createInstanceSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateInstanceSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateInstanceSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates one or more Amazon Lightsail instances.
*
*
* The create instances
operation supports tag-based access control via request tags. For more
* information, see the Lightsail Developer Guide.
*
*
* @param createInstancesRequest
* @return Result of the CreateInstances operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateInstances
* @see AWS API
* Documentation
*/
@Override
public CreateInstancesResult createInstances(CreateInstancesRequest request) {
request = beforeClientExecution(request);
return executeCreateInstances(request);
}
@SdkInternalApi
final CreateInstancesResult executeCreateInstances(CreateInstancesRequest createInstancesRequest) {
ExecutionContext executionContext = createExecutionContext(createInstancesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateInstancesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createInstancesRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateInstances");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateInstancesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates one or more new instances from a manual or automatic snapshot of an instance.
*
*
* The create instances from snapshot
operation supports tag-based access control via request tags and
* resource tags applied to the resource identified by instance snapshot name
. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
* @param createInstancesFromSnapshotRequest
* @return Result of the CreateInstancesFromSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateInstancesFromSnapshot
* @see AWS API Documentation
*/
@Override
public CreateInstancesFromSnapshotResult createInstancesFromSnapshot(CreateInstancesFromSnapshotRequest request) {
request = beforeClientExecution(request);
return executeCreateInstancesFromSnapshot(request);
}
@SdkInternalApi
final CreateInstancesFromSnapshotResult executeCreateInstancesFromSnapshot(CreateInstancesFromSnapshotRequest createInstancesFromSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(createInstancesFromSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateInstancesFromSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createInstancesFromSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateInstancesFromSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateInstancesFromSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a custom SSH key pair that you can use with an Amazon Lightsail instance.
*
*
*
* Use the
* DownloadDefaultKeyPair action to create a Lightsail default key pair in an Amazon Web Services Region where a
* default key pair does not currently exist.
*
*
*
* The create key pair
operation supports tag-based access control via request tags. For more
* information, see the Amazon Lightsail Developer Guide.
*
*
* @param createKeyPairRequest
* @return Result of the CreateKeyPair operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateKeyPair
* @see AWS API
* Documentation
*/
@Override
public CreateKeyPairResult createKeyPair(CreateKeyPairRequest request) {
request = beforeClientExecution(request);
return executeCreateKeyPair(request);
}
@SdkInternalApi
final CreateKeyPairResult executeCreateKeyPair(CreateKeyPairRequest createKeyPairRequest) {
ExecutionContext executionContext = createExecutionContext(createKeyPairRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateKeyPairRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createKeyPairRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateKeyPair");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateKeyPairResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a Lightsail load balancer. To learn more about deciding whether to load balance your application, see
* Configure your Lightsail instances for load balancing. You can create up to 5 load balancers per AWS Region
* in your account.
*
*
* When you create a load balancer, you can specify a unique name and port settings. To change additional load
* balancer settings, use the UpdateLoadBalancerAttribute
operation.
*
*
* The create load balancer
operation supports tag-based access control via request tags. For more
* information, see the Amazon Lightsail Developer Guide.
*
*
* @param createLoadBalancerRequest
* @return Result of the CreateLoadBalancer operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateLoadBalancer
* @see AWS
* API Documentation
*/
@Override
public CreateLoadBalancerResult createLoadBalancer(CreateLoadBalancerRequest request) {
request = beforeClientExecution(request);
return executeCreateLoadBalancer(request);
}
@SdkInternalApi
final CreateLoadBalancerResult executeCreateLoadBalancer(CreateLoadBalancerRequest createLoadBalancerRequest) {
ExecutionContext executionContext = createExecutionContext(createLoadBalancerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLoadBalancerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createLoadBalancerRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLoadBalancer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateLoadBalancerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an SSL/TLS certificate for an Amazon Lightsail load balancer.
*
*
* TLS is just an updated, more secure version of Secure Socket Layer (SSL).
*
*
* The CreateLoadBalancerTlsCertificate
operation supports tag-based access control via resource tags
* applied to the resource identified by load balancer name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param createLoadBalancerTlsCertificateRequest
* @return Result of the CreateLoadBalancerTlsCertificate operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateLoadBalancerTlsCertificate
* @see AWS API Documentation
*/
@Override
public CreateLoadBalancerTlsCertificateResult createLoadBalancerTlsCertificate(CreateLoadBalancerTlsCertificateRequest request) {
request = beforeClientExecution(request);
return executeCreateLoadBalancerTlsCertificate(request);
}
@SdkInternalApi
final CreateLoadBalancerTlsCertificateResult executeCreateLoadBalancerTlsCertificate(
CreateLoadBalancerTlsCertificateRequest createLoadBalancerTlsCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(createLoadBalancerTlsCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLoadBalancerTlsCertificateRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createLoadBalancerTlsCertificateRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLoadBalancerTlsCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateLoadBalancerTlsCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new database in Amazon Lightsail.
*
*
* The create relational database
operation supports tag-based access control via request tags. For
* more information, see the Amazon Lightsail Developer Guide.
*
*
* @param createRelationalDatabaseRequest
* @return Result of the CreateRelationalDatabase operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateRelationalDatabase
* @see AWS API Documentation
*/
@Override
public CreateRelationalDatabaseResult createRelationalDatabase(CreateRelationalDatabaseRequest request) {
request = beforeClientExecution(request);
return executeCreateRelationalDatabase(request);
}
@SdkInternalApi
final CreateRelationalDatabaseResult executeCreateRelationalDatabase(CreateRelationalDatabaseRequest createRelationalDatabaseRequest) {
ExecutionContext executionContext = createExecutionContext(createRelationalDatabaseRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateRelationalDatabaseRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createRelationalDatabaseRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRelationalDatabase");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateRelationalDatabaseResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new database from an existing database snapshot in Amazon Lightsail.
*
*
* You can create a new database from a snapshot in if something goes wrong with your original database, or to
* change it to a different plan, such as a high availability or standard plan.
*
*
* The create relational database from snapshot
operation supports tag-based access control via request
* tags and resource tags applied to the resource identified by relationalDatabaseSnapshotName. For more
* information, see the Amazon Lightsail Developer Guide.
*
*
* @param createRelationalDatabaseFromSnapshotRequest
* @return Result of the CreateRelationalDatabaseFromSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateRelationalDatabaseFromSnapshot
* @see AWS API Documentation
*/
@Override
public CreateRelationalDatabaseFromSnapshotResult createRelationalDatabaseFromSnapshot(CreateRelationalDatabaseFromSnapshotRequest request) {
request = beforeClientExecution(request);
return executeCreateRelationalDatabaseFromSnapshot(request);
}
@SdkInternalApi
final CreateRelationalDatabaseFromSnapshotResult executeCreateRelationalDatabaseFromSnapshot(
CreateRelationalDatabaseFromSnapshotRequest createRelationalDatabaseFromSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(createRelationalDatabaseFromSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateRelationalDatabaseFromSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createRelationalDatabaseFromSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRelationalDatabaseFromSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateRelationalDatabaseFromSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a snapshot of your database in Amazon Lightsail. You can use snapshots for backups, to make copies of a
* database, and to save data before deleting a database.
*
*
* The create relational database snapshot
operation supports tag-based access control via request
* tags. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param createRelationalDatabaseSnapshotRequest
* @return Result of the CreateRelationalDatabaseSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.CreateRelationalDatabaseSnapshot
* @see AWS API Documentation
*/
@Override
public CreateRelationalDatabaseSnapshotResult createRelationalDatabaseSnapshot(CreateRelationalDatabaseSnapshotRequest request) {
request = beforeClientExecution(request);
return executeCreateRelationalDatabaseSnapshot(request);
}
@SdkInternalApi
final CreateRelationalDatabaseSnapshotResult executeCreateRelationalDatabaseSnapshot(
CreateRelationalDatabaseSnapshotRequest createRelationalDatabaseSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(createRelationalDatabaseSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateRelationalDatabaseSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createRelationalDatabaseSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRelationalDatabaseSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateRelationalDatabaseSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an alarm.
*
*
* An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm
* can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more
* information, see Alarms
* in Amazon Lightsail.
*
*
* @param deleteAlarmRequest
* @return Result of the DeleteAlarm operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @sample AmazonLightsail.DeleteAlarm
* @see AWS API
* Documentation
*/
@Override
public DeleteAlarmResult deleteAlarm(DeleteAlarmRequest request) {
request = beforeClientExecution(request);
return executeDeleteAlarm(request);
}
@SdkInternalApi
final DeleteAlarmResult executeDeleteAlarm(DeleteAlarmRequest deleteAlarmRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAlarmRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAlarmRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAlarmRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAlarm");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAlarmResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an automatic snapshot of an instance or disk. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteAutoSnapshotRequest
* @return Result of the DeleteAutoSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteAutoSnapshot
* @see AWS
* API Documentation
*/
@Override
public DeleteAutoSnapshotResult deleteAutoSnapshot(DeleteAutoSnapshotRequest request) {
request = beforeClientExecution(request);
return executeDeleteAutoSnapshot(request);
}
@SdkInternalApi
final DeleteAutoSnapshotResult executeDeleteAutoSnapshot(DeleteAutoSnapshotRequest deleteAutoSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAutoSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAutoSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAutoSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAutoSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAutoSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a Amazon Lightsail bucket.
*
*
*
* When you delete your bucket, the bucket name is released and can be reused for a new bucket in your account or
* another Amazon Web Services account.
*
*
*
* @param deleteBucketRequest
* @return Result of the DeleteBucket operation returned by the service.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws ServiceException
* A general service exception.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteBucket
* @see AWS API
* Documentation
*/
@Override
public DeleteBucketResult deleteBucket(DeleteBucketRequest request) {
request = beforeClientExecution(request);
return executeDeleteBucket(request);
}
@SdkInternalApi
final DeleteBucketResult executeDeleteBucket(DeleteBucketRequest deleteBucketRequest) {
ExecutionContext executionContext = createExecutionContext(deleteBucketRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteBucketRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBucketRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBucket");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBucketResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an access key for the specified Amazon Lightsail bucket.
*
*
* We recommend that you delete an access key if the secret access key is compromised.
*
*
* For more information about access keys, see Creating access keys for a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide.
*
*
* @param deleteBucketAccessKeyRequest
* @return Result of the DeleteBucketAccessKey operation returned by the service.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws ServiceException
* A general service exception.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteBucketAccessKey
* @see AWS API Documentation
*/
@Override
public DeleteBucketAccessKeyResult deleteBucketAccessKey(DeleteBucketAccessKeyRequest request) {
request = beforeClientExecution(request);
return executeDeleteBucketAccessKey(request);
}
@SdkInternalApi
final DeleteBucketAccessKeyResult executeDeleteBucketAccessKey(DeleteBucketAccessKeyRequest deleteBucketAccessKeyRequest) {
ExecutionContext executionContext = createExecutionContext(deleteBucketAccessKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteBucketAccessKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBucketAccessKeyRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBucketAccessKey");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteBucketAccessKeyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an SSL/TLS certificate for your Amazon Lightsail content delivery network (CDN) distribution.
*
*
* Certificates that are currently attached to a distribution cannot be deleted. Use the
* DetachCertificateFromDistribution
action to detach a certificate from a distribution.
*
*
* @param deleteCertificateRequest
* @return Result of the DeleteCertificate operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteCertificate
* @see AWS
* API Documentation
*/
@Override
public DeleteCertificateResult deleteCertificate(DeleteCertificateRequest request) {
request = beforeClientExecution(request);
return executeDeleteCertificate(request);
}
@SdkInternalApi
final DeleteCertificateResult executeDeleteCertificate(DeleteCertificateRequest deleteCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(deleteCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteCertificateRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a contact method.
*
*
* A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email
* address and one mobile phone number contact method in each Amazon Web Services Region. However, SMS text
* messaging is not supported in some Amazon Web Services Regions, and SMS text messages cannot be sent to some
* countries/regions. For more information, see Notifications in
* Amazon Lightsail.
*
*
* @param deleteContactMethodRequest
* @return Result of the DeleteContactMethod operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @sample AmazonLightsail.DeleteContactMethod
* @see AWS
* API Documentation
*/
@Override
public DeleteContactMethodResult deleteContactMethod(DeleteContactMethodRequest request) {
request = beforeClientExecution(request);
return executeDeleteContactMethod(request);
}
@SdkInternalApi
final DeleteContactMethodResult executeDeleteContactMethod(DeleteContactMethodRequest deleteContactMethodRequest) {
ExecutionContext executionContext = createExecutionContext(deleteContactMethodRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteContactMethodRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteContactMethodRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteContactMethod");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteContactMethodResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a container image that is registered to your Amazon Lightsail container service.
*
*
* @param deleteContainerImageRequest
* @return Result of the DeleteContainerImage operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteContainerImage
* @see AWS
* API Documentation
*/
@Override
public DeleteContainerImageResult deleteContainerImage(DeleteContainerImageRequest request) {
request = beforeClientExecution(request);
return executeDeleteContainerImage(request);
}
@SdkInternalApi
final DeleteContainerImageResult executeDeleteContainerImage(DeleteContainerImageRequest deleteContainerImageRequest) {
ExecutionContext executionContext = createExecutionContext(deleteContainerImageRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteContainerImageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteContainerImageRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteContainerImage");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteContainerImageResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes your Amazon Lightsail container service.
*
*
* @param deleteContainerServiceRequest
* @return Result of the DeleteContainerService operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteContainerService
* @see AWS API Documentation
*/
@Override
public DeleteContainerServiceResult deleteContainerService(DeleteContainerServiceRequest request) {
request = beforeClientExecution(request);
return executeDeleteContainerService(request);
}
@SdkInternalApi
final DeleteContainerServiceResult executeDeleteContainerService(DeleteContainerServiceRequest deleteContainerServiceRequest) {
ExecutionContext executionContext = createExecutionContext(deleteContainerServiceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteContainerServiceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteContainerServiceRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteContainerService");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteContainerServiceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified block storage disk. The disk must be in the available
state (not attached to a
* Lightsail instance).
*
*
*
* The disk may remain in the deleting
state for several minutes.
*
*
*
* The delete disk
operation supports tag-based access control via resource tags applied to the
* resource identified by disk name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteDiskRequest
* @return Result of the DeleteDisk operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteDisk
* @see AWS API
* Documentation
*/
@Override
public DeleteDiskResult deleteDisk(DeleteDiskRequest request) {
request = beforeClientExecution(request);
return executeDeleteDisk(request);
}
@SdkInternalApi
final DeleteDiskResult executeDeleteDisk(DeleteDiskRequest deleteDiskRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDiskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDiskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteDiskRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDisk");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDiskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified disk snapshot.
*
*
* When you make periodic snapshots of a disk, the snapshots are incremental, and only the blocks on the device that
* have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data
* not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all
* active snapshots will have access to all the information needed to restore the disk.
*
*
* The delete disk snapshot
operation supports tag-based access control via resource tags applied to
* the resource identified by disk snapshot name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteDiskSnapshotRequest
* @return Result of the DeleteDiskSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteDiskSnapshot
* @see AWS
* API Documentation
*/
@Override
public DeleteDiskSnapshotResult deleteDiskSnapshot(DeleteDiskSnapshotRequest request) {
request = beforeClientExecution(request);
return executeDeleteDiskSnapshot(request);
}
@SdkInternalApi
final DeleteDiskSnapshotResult executeDeleteDiskSnapshot(DeleteDiskSnapshotRequest deleteDiskSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDiskSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDiskSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteDiskSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDiskSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDiskSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes your Amazon Lightsail content delivery network (CDN) distribution.
*
*
* @param deleteDistributionRequest
* @return Result of the DeleteDistribution operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteDistribution
* @see AWS
* API Documentation
*/
@Override
public DeleteDistributionResult deleteDistribution(DeleteDistributionRequest request) {
request = beforeClientExecution(request);
return executeDeleteDistribution(request);
}
@SdkInternalApi
final DeleteDistributionResult executeDeleteDistribution(DeleteDistributionRequest deleteDistributionRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDistributionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDistributionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteDistributionRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDistribution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDistributionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified domain recordset and all of its domain records.
*
*
* The delete domain
operation supports tag-based access control via resource tags applied to the
* resource identified by domain name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteDomainRequest
* @return Result of the DeleteDomain operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteDomain
* @see AWS API
* Documentation
*/
@Override
public DeleteDomainResult deleteDomain(DeleteDomainRequest request) {
request = beforeClientExecution(request);
return executeDeleteDomain(request);
}
@SdkInternalApi
final DeleteDomainResult executeDeleteDomain(DeleteDomainRequest deleteDomainRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDomainRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteDomainRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDomain");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDomainResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a specific domain entry.
*
*
* The delete domain entry
operation supports tag-based access control via resource tags applied to the
* resource identified by domain name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteDomainEntryRequest
* @return Result of the DeleteDomainEntry operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteDomainEntry
* @see AWS
* API Documentation
*/
@Override
public DeleteDomainEntryResult deleteDomainEntry(DeleteDomainEntryRequest request) {
request = beforeClientExecution(request);
return executeDeleteDomainEntry(request);
}
@SdkInternalApi
final DeleteDomainEntryResult executeDeleteDomainEntry(DeleteDomainEntryRequest deleteDomainEntryRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDomainEntryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDomainEntryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteDomainEntryRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDomainEntry");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDomainEntryResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an Amazon Lightsail instance.
*
*
* The delete instance
operation supports tag-based access control via resource tags applied to the
* resource identified by instance name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteInstanceRequest
* @return Result of the DeleteInstance operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteInstance
* @see AWS API
* Documentation
*/
@Override
public DeleteInstanceResult deleteInstance(DeleteInstanceRequest request) {
request = beforeClientExecution(request);
return executeDeleteInstance(request);
}
@SdkInternalApi
final DeleteInstanceResult executeDeleteInstance(DeleteInstanceRequest deleteInstanceRequest) {
ExecutionContext executionContext = createExecutionContext(deleteInstanceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteInstanceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteInstanceRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteInstance");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteInstanceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a specific snapshot of a virtual private server (or instance).
*
*
* The delete instance snapshot
operation supports tag-based access control via resource tags applied
* to the resource identified by instance snapshot name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteInstanceSnapshotRequest
* @return Result of the DeleteInstanceSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteInstanceSnapshot
* @see AWS API Documentation
*/
@Override
public DeleteInstanceSnapshotResult deleteInstanceSnapshot(DeleteInstanceSnapshotRequest request) {
request = beforeClientExecution(request);
return executeDeleteInstanceSnapshot(request);
}
@SdkInternalApi
final DeleteInstanceSnapshotResult executeDeleteInstanceSnapshot(DeleteInstanceSnapshotRequest deleteInstanceSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(deleteInstanceSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteInstanceSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteInstanceSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteInstanceSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteInstanceSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified key pair by removing the public key from Amazon Lightsail.
*
*
* You can delete key pairs that were created using the ImportKeyPair
* and CreateKeyPair
* actions, as well as the Lightsail default key pair. A new default key pair will not be created unless you launch
* an instance without specifying a custom key pair, or you call the DownloadDefaultKeyPair API.
*
*
* The delete key pair
operation supports tag-based access control via resource tags applied to the
* resource identified by key pair name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteKeyPairRequest
* @return Result of the DeleteKeyPair operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteKeyPair
* @see AWS API
* Documentation
*/
@Override
public DeleteKeyPairResult deleteKeyPair(DeleteKeyPairRequest request) {
request = beforeClientExecution(request);
return executeDeleteKeyPair(request);
}
@SdkInternalApi
final DeleteKeyPairResult executeDeleteKeyPair(DeleteKeyPairRequest deleteKeyPairRequest) {
ExecutionContext executionContext = createExecutionContext(deleteKeyPairRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteKeyPairRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteKeyPairRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteKeyPair");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteKeyPairResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the known host key or certificate used by the Amazon Lightsail browser-based SSH or RDP clients to
* authenticate an instance. This operation enables the Lightsail browser-based SSH or RDP clients to connect to the
* instance after a host key mismatch.
*
*
*
* Perform this operation only if you were expecting the host key or certificate mismatch or if you are familiar
* with the new host key or certificate on the instance. For more information, see Troubleshooting connection issues when using the Amazon Lightsail browser-based SSH or RDP client.
*
*
*
* @param deleteKnownHostKeysRequest
* @return Result of the DeleteKnownHostKeys operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteKnownHostKeys
* @see AWS
* API Documentation
*/
@Override
public DeleteKnownHostKeysResult deleteKnownHostKeys(DeleteKnownHostKeysRequest request) {
request = beforeClientExecution(request);
return executeDeleteKnownHostKeys(request);
}
@SdkInternalApi
final DeleteKnownHostKeysResult executeDeleteKnownHostKeys(DeleteKnownHostKeysRequest deleteKnownHostKeysRequest) {
ExecutionContext executionContext = createExecutionContext(deleteKnownHostKeysRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteKnownHostKeysRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteKnownHostKeysRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteKnownHostKeys");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteKnownHostKeysResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a Lightsail load balancer and all its associated SSL/TLS certificates. Once the load balancer is deleted,
* you will need to create a new load balancer, create a new certificate, and verify domain ownership again.
*
*
* The delete load balancer
operation supports tag-based access control via resource tags applied to
* the resource identified by load balancer name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteLoadBalancerRequest
* @return Result of the DeleteLoadBalancer operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteLoadBalancer
* @see AWS
* API Documentation
*/
@Override
public DeleteLoadBalancerResult deleteLoadBalancer(DeleteLoadBalancerRequest request) {
request = beforeClientExecution(request);
return executeDeleteLoadBalancer(request);
}
@SdkInternalApi
final DeleteLoadBalancerResult executeDeleteLoadBalancer(DeleteLoadBalancerRequest deleteLoadBalancerRequest) {
ExecutionContext executionContext = createExecutionContext(deleteLoadBalancerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteLoadBalancerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteLoadBalancerRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteLoadBalancer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteLoadBalancerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an SSL/TLS certificate associated with a Lightsail load balancer.
*
*
* The DeleteLoadBalancerTlsCertificate
operation supports tag-based access control via resource tags
* applied to the resource identified by load balancer name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteLoadBalancerTlsCertificateRequest
* @return Result of the DeleteLoadBalancerTlsCertificate operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteLoadBalancerTlsCertificate
* @see AWS API Documentation
*/
@Override
public DeleteLoadBalancerTlsCertificateResult deleteLoadBalancerTlsCertificate(DeleteLoadBalancerTlsCertificateRequest request) {
request = beforeClientExecution(request);
return executeDeleteLoadBalancerTlsCertificate(request);
}
@SdkInternalApi
final DeleteLoadBalancerTlsCertificateResult executeDeleteLoadBalancerTlsCertificate(
DeleteLoadBalancerTlsCertificateRequest deleteLoadBalancerTlsCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(deleteLoadBalancerTlsCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteLoadBalancerTlsCertificateRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteLoadBalancerTlsCertificateRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteLoadBalancerTlsCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteLoadBalancerTlsCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a database in Amazon Lightsail.
*
*
* The delete relational database
operation supports tag-based access control via resource tags applied
* to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteRelationalDatabaseRequest
* @return Result of the DeleteRelationalDatabase operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteRelationalDatabase
* @see AWS API Documentation
*/
@Override
public DeleteRelationalDatabaseResult deleteRelationalDatabase(DeleteRelationalDatabaseRequest request) {
request = beforeClientExecution(request);
return executeDeleteRelationalDatabase(request);
}
@SdkInternalApi
final DeleteRelationalDatabaseResult executeDeleteRelationalDatabase(DeleteRelationalDatabaseRequest deleteRelationalDatabaseRequest) {
ExecutionContext executionContext = createExecutionContext(deleteRelationalDatabaseRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteRelationalDatabaseRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteRelationalDatabaseRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRelationalDatabase");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteRelationalDatabaseResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a database snapshot in Amazon Lightsail.
*
*
* The delete relational database snapshot
operation supports tag-based access control via resource
* tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param deleteRelationalDatabaseSnapshotRequest
* @return Result of the DeleteRelationalDatabaseSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DeleteRelationalDatabaseSnapshot
* @see AWS API Documentation
*/
@Override
public DeleteRelationalDatabaseSnapshotResult deleteRelationalDatabaseSnapshot(DeleteRelationalDatabaseSnapshotRequest request) {
request = beforeClientExecution(request);
return executeDeleteRelationalDatabaseSnapshot(request);
}
@SdkInternalApi
final DeleteRelationalDatabaseSnapshotResult executeDeleteRelationalDatabaseSnapshot(
DeleteRelationalDatabaseSnapshotRequest deleteRelationalDatabaseSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(deleteRelationalDatabaseSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteRelationalDatabaseSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteRelationalDatabaseSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRelationalDatabaseSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteRelationalDatabaseSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Detaches an SSL/TLS certificate from your Amazon Lightsail content delivery network (CDN) distribution.
*
*
* After the certificate is detached, your distribution stops accepting traffic for all of the domains that are
* associated with the certificate.
*
*
* @param detachCertificateFromDistributionRequest
* @return Result of the DetachCertificateFromDistribution operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DetachCertificateFromDistribution
* @see AWS API Documentation
*/
@Override
public DetachCertificateFromDistributionResult detachCertificateFromDistribution(DetachCertificateFromDistributionRequest request) {
request = beforeClientExecution(request);
return executeDetachCertificateFromDistribution(request);
}
@SdkInternalApi
final DetachCertificateFromDistributionResult executeDetachCertificateFromDistribution(
DetachCertificateFromDistributionRequest detachCertificateFromDistributionRequest) {
ExecutionContext executionContext = createExecutionContext(detachCertificateFromDistributionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DetachCertificateFromDistributionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(detachCertificateFromDistributionRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DetachCertificateFromDistribution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DetachCertificateFromDistributionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Detaches a stopped block storage disk from a Lightsail instance. Make sure to unmount any file systems on the
* device within your operating system before stopping the instance and detaching the disk.
*
*
* The detach disk
operation supports tag-based access control via resource tags applied to the
* resource identified by disk name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param detachDiskRequest
* @return Result of the DetachDisk operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DetachDisk
* @see AWS API
* Documentation
*/
@Override
public DetachDiskResult detachDisk(DetachDiskRequest request) {
request = beforeClientExecution(request);
return executeDetachDisk(request);
}
@SdkInternalApi
final DetachDiskResult executeDetachDisk(DetachDiskRequest detachDiskRequest) {
ExecutionContext executionContext = createExecutionContext(detachDiskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DetachDiskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(detachDiskRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DetachDisk");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new DetachDiskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Detaches the specified instances from a Lightsail load balancer.
*
*
* This operation waits until the instances are no longer needed before they are detached from the load balancer.
*
*
* The detach instances from load balancer
operation supports tag-based access control via resource
* tags applied to the resource identified by load balancer name
. For more information, see the Amazon
* Lightsail Developer Guide.
*
*
* @param detachInstancesFromLoadBalancerRequest
* @return Result of the DetachInstancesFromLoadBalancer operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DetachInstancesFromLoadBalancer
* @see AWS API Documentation
*/
@Override
public DetachInstancesFromLoadBalancerResult detachInstancesFromLoadBalancer(DetachInstancesFromLoadBalancerRequest request) {
request = beforeClientExecution(request);
return executeDetachInstancesFromLoadBalancer(request);
}
@SdkInternalApi
final DetachInstancesFromLoadBalancerResult executeDetachInstancesFromLoadBalancer(
DetachInstancesFromLoadBalancerRequest detachInstancesFromLoadBalancerRequest) {
ExecutionContext executionContext = createExecutionContext(detachInstancesFromLoadBalancerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DetachInstancesFromLoadBalancerRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(detachInstancesFromLoadBalancerRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DetachInstancesFromLoadBalancer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DetachInstancesFromLoadBalancerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Detaches a static IP from the Amazon Lightsail instance to which it is attached.
*
*
* @param detachStaticIpRequest
* @return Result of the DetachStaticIp operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DetachStaticIp
* @see AWS API
* Documentation
*/
@Override
public DetachStaticIpResult detachStaticIp(DetachStaticIpRequest request) {
request = beforeClientExecution(request);
return executeDetachStaticIp(request);
}
@SdkInternalApi
final DetachStaticIpResult executeDetachStaticIp(DetachStaticIpRequest detachStaticIpRequest) {
ExecutionContext executionContext = createExecutionContext(detachStaticIpRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DetachStaticIpRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(detachStaticIpRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DetachStaticIp");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DetachStaticIpResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Disables an add-on for an Amazon Lightsail resource. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param disableAddOnRequest
* @return Result of the DisableAddOn operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DisableAddOn
* @see AWS API
* Documentation
*/
@Override
public DisableAddOnResult disableAddOn(DisableAddOnRequest request) {
request = beforeClientExecution(request);
return executeDisableAddOn(request);
}
@SdkInternalApi
final DisableAddOnResult executeDisableAddOn(DisableAddOnRequest disableAddOnRequest) {
ExecutionContext executionContext = createExecutionContext(disableAddOnRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DisableAddOnRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disableAddOnRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisableAddOn");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DisableAddOnResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Downloads the regional Amazon Lightsail default key pair.
*
*
* This action also creates a Lightsail default key pair if a default key pair does not currently exist in the
* Amazon Web Services Region.
*
*
* @param downloadDefaultKeyPairRequest
* @return Result of the DownloadDefaultKeyPair operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.DownloadDefaultKeyPair
* @see AWS API Documentation
*/
@Override
public DownloadDefaultKeyPairResult downloadDefaultKeyPair(DownloadDefaultKeyPairRequest request) {
request = beforeClientExecution(request);
return executeDownloadDefaultKeyPair(request);
}
@SdkInternalApi
final DownloadDefaultKeyPairResult executeDownloadDefaultKeyPair(DownloadDefaultKeyPairRequest downloadDefaultKeyPairRequest) {
ExecutionContext executionContext = createExecutionContext(downloadDefaultKeyPairRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DownloadDefaultKeyPairRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(downloadDefaultKeyPairRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DownloadDefaultKeyPair");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DownloadDefaultKeyPairResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Enables or modifies an add-on for an Amazon Lightsail resource. For more information, see the Amazon Lightsail Developer Guide.
*
*
* @param enableAddOnRequest
* @return Result of the EnableAddOn operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.EnableAddOn
* @see AWS API
* Documentation
*/
@Override
public EnableAddOnResult enableAddOn(EnableAddOnRequest request) {
request = beforeClientExecution(request);
return executeEnableAddOn(request);
}
@SdkInternalApi
final EnableAddOnResult executeEnableAddOn(EnableAddOnRequest enableAddOnRequest) {
ExecutionContext executionContext = createExecutionContext(enableAddOnRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new EnableAddOnRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(enableAddOnRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "EnableAddOn");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new EnableAddOnResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Exports an Amazon Lightsail instance or block storage disk snapshot to Amazon Elastic Compute Cloud (Amazon EC2).
* This operation results in an export snapshot record that can be used with the
* create cloud formation stack
operation to create new Amazon EC2 instances.
*
*
* Exported instance snapshots appear in Amazon EC2 as Amazon Machine Images (AMIs), and the instance system disk
* appears as an Amazon Elastic Block Store (Amazon EBS) volume. Exported disk snapshots appear in Amazon EC2 as
* Amazon EBS volumes. Snapshots are exported to the same Amazon Web Services Region in Amazon EC2 as the source
* Lightsail snapshot.
*
*
*
* The export snapshot
operation supports tag-based access control via resource tags applied to the
* resource identified by source snapshot name
. For more information, see the Amazon Lightsail Developer Guide.
*
*
*
* Use the get instance snapshots
or get disk snapshots
operations to get a list of
* snapshots that you can export to Amazon EC2.
*
*
*
* @param exportSnapshotRequest
* @return Result of the ExportSnapshot operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.ExportSnapshot
* @see AWS API
* Documentation
*/
@Override
public ExportSnapshotResult exportSnapshot(ExportSnapshotRequest request) {
request = beforeClientExecution(request);
return executeExportSnapshot(request);
}
@SdkInternalApi
final ExportSnapshotResult executeExportSnapshot(ExportSnapshotRequest exportSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(exportSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ExportSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(exportSnapshotRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ExportSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ExportSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the names of all active (not deleted) resources.
*
*
* @param getActiveNamesRequest
* @return Result of the GetActiveNames operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @sample AmazonLightsail.GetActiveNames
* @see AWS API
* Documentation
*/
@Override
public GetActiveNamesResult getActiveNames(GetActiveNamesRequest request) {
request = beforeClientExecution(request);
return executeGetActiveNames(request);
}
@SdkInternalApi
final GetActiveNamesResult executeGetActiveNames(GetActiveNamesRequest getActiveNamesRequest) {
ExecutionContext executionContext = createExecutionContext(getActiveNamesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetActiveNamesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getActiveNamesRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetActiveNames");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetActiveNamesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information about the configured alarms. Specify an alarm name in your request to return information
* about a specific alarm, or specify a monitored resource name to return information about all alarms for a
* specific resource.
*
*
* An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm
* can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more
* information, see Alarms
* in Amazon Lightsail.
*
*
* @param getAlarmsRequest
* @return Result of the GetAlarms operation returned by the service.
* @throws ServiceException
* A general service exception.
* @throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field.
*
* Domain and distribution APIs are only available in the N. Virginia (us-east-1
) Amazon Web
* Services Region. Please set your Amazon Web Services Region configuration to us-east-1
to
* create, view, or edit these resources.
*
* @throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute.
* @throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated.
* @throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource.
* @throws NotFoundException
* Lightsail throws this exception when it cannot find a resource.
* @sample AmazonLightsail.GetAlarms
* @see AWS API
* Documentation
*/
@Override
public GetAlarmsResult getAlarms(GetAlarmsRequest request) {
request = beforeClientExecution(request);
return executeGetAlarms(request);
}
@SdkInternalApi
final GetAlarmsResult executeGetAlarms(GetAlarmsRequest getAlarmsRequest) {
ExecutionContext executionContext = createExecutionContext(getAlarmsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetAlarmsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getAlarmsRequest));
// 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, "Lightsail");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAlarms");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetAlarmsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the available automatic snapshots for an instance or disk. For more information, see the