@Override
    public PutAlarmResult putAlarm(PutAlarmRequest request) {
        request = beforeClientExecution(request);
        return executePutAlarm(request);
    }
<p>
Creates or updates an alarm, and associates it with the specified metric.
</p>
<p>
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 <a href="https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-alarms">Alarms
in Amazon Lightsail</a>.
</p>
<p>
When this action creates an alarm, the alarm state is immediately set to <code>INSUFFICIENT_DATA</code>. The
alarm is then evaluated and its state is set appropriately. Any actions associated with the new state are then
executed.
</p>
<p>
When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous
configuration of the alarm. The alarm is then evaluated with the updated configuration.
</p>

@param putAlarmRequest
@return Result of the PutAlarm 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.</p> <note>
        <p>
        Domain and distribution APIs are only available in the N. Virginia (<code>us-east-1</code>) Amazon Web
        Services Region. Please set your Amazon Web Services Region configuration to <code>us-east-1</code> to
        create, view, or edit these resources.
        </p>
@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.
@throws NotFoundException
        Lightsail throws this exception when it cannot find a resource.
@sample AmazonLightsail.PutAlarm
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutAlarm" target="_top">AWS API
     Documentation</a>
aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/AmazonLightsailClient.java