com.pulumi.aws.ecs.outputs.ServiceAlarms Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.ecs.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
@CustomType
public final class ServiceAlarms {
/**
* @return One or more CloudWatch alarm names.
*
*/
private List alarmNames;
/**
* @return Whether to use the CloudWatch alarm option in the service deployment process.
*
*/
private Boolean enable;
/**
* @return Whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
*
*/
private Boolean rollback;
private ServiceAlarms() {}
/**
* @return One or more CloudWatch alarm names.
*
*/
public List alarmNames() {
return this.alarmNames;
}
/**
* @return Whether to use the CloudWatch alarm option in the service deployment process.
*
*/
public Boolean enable() {
return this.enable;
}
/**
* @return Whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
*
*/
public Boolean rollback() {
return this.rollback;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ServiceAlarms defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private List alarmNames;
private Boolean enable;
private Boolean rollback;
public Builder() {}
public Builder(ServiceAlarms defaults) {
Objects.requireNonNull(defaults);
this.alarmNames = defaults.alarmNames;
this.enable = defaults.enable;
this.rollback = defaults.rollback;
}
@CustomType.Setter
public Builder alarmNames(List alarmNames) {
if (alarmNames == null) {
throw new MissingRequiredPropertyException("ServiceAlarms", "alarmNames");
}
this.alarmNames = alarmNames;
return this;
}
public Builder alarmNames(String... alarmNames) {
return alarmNames(List.of(alarmNames));
}
@CustomType.Setter
public Builder enable(Boolean enable) {
if (enable == null) {
throw new MissingRequiredPropertyException("ServiceAlarms", "enable");
}
this.enable = enable;
return this;
}
@CustomType.Setter
public Builder rollback(Boolean rollback) {
if (rollback == null) {
throw new MissingRequiredPropertyException("ServiceAlarms", "rollback");
}
this.rollback = rollback;
return this;
}
public ServiceAlarms build() {
final var _resultValue = new ServiceAlarms();
_resultValue.alarmNames = alarmNames;
_resultValue.enable = enable;
_resultValue.rollback = rollback;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy