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

software.amazon.awscdk.AutoScalingCreationPolicy Maven / Gradle / Ivy

There is a newer version: 0.36.1
Show newest version
package software.amazon.awscdk;

/**
 * For an Auto Scaling group replacement update, specifies how many instances must signal success for the update to succeed.
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.10.5 (build 46bc9b0)", date = "2019-05-06T20:49:40.932Z")
public interface AutoScalingCreationPolicy extends software.amazon.jsii.JsiiSerializable {
    /**
     * Specifies the percentage of instances in an Auto Scaling replacement update that must signal success for the update to succeed.
     * 
     * You can specify a value from 0 to 100. AWS CloudFormation rounds to the nearest tenth of a percent.
     * For example, if you update five instances with a minimum successful percentage of 50, three instances must signal success.
     * If an instance doesn't send a signal within the time specified by the Timeout property, AWS CloudFormation assumes that the
     * instance wasn't created.
     */
    java.lang.Number getMinSuccessfulInstancesPercent();

    /**
     * @return a {@link Builder} of {@link AutoScalingCreationPolicy}
     */
    static Builder builder() {
        return new Builder();
    }

    /**
     * A builder for {@link AutoScalingCreationPolicy}
     */
    final class Builder {
        @javax.annotation.Nullable
        private java.lang.Number _minSuccessfulInstancesPercent;

        /**
         * Sets the value of MinSuccessfulInstancesPercent
         * @param value Specifies the percentage of instances in an Auto Scaling replacement update that must signal success for the update to succeed.
         * @return {@code this}
         */
        public Builder withMinSuccessfulInstancesPercent(@javax.annotation.Nullable final java.lang.Number value) {
            this._minSuccessfulInstancesPercent = value;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link AutoScalingCreationPolicy}
         * @throws NullPointerException if any required attribute was not provided
         */
        public AutoScalingCreationPolicy build() {
            return new AutoScalingCreationPolicy() {
                @javax.annotation.Nullable
                private final java.lang.Number $minSuccessfulInstancesPercent = _minSuccessfulInstancesPercent;

                @Override
                public java.lang.Number getMinSuccessfulInstancesPercent() {
                    return this.$minSuccessfulInstancesPercent;
                }

                public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
                    com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
                    com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
                    obj.set("minSuccessfulInstancesPercent", om.valueToTree(this.getMinSuccessfulInstancesPercent()));
                    return obj;
                }

            };
        }
    }

    /**
     * A proxy class which represents a concrete javascript instance of this type.
     */
    final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.AutoScalingCreationPolicy {
        protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
            super(mode);
        }

        /**
         * Specifies the percentage of instances in an Auto Scaling replacement update that must signal success for the update to succeed.
         * 
         * You can specify a value from 0 to 100. AWS CloudFormation rounds to the nearest tenth of a percent.
         * For example, if you update five instances with a minimum successful percentage of 50, three instances must signal success.
         * If an instance doesn't send a signal within the time specified by the Timeout property, AWS CloudFormation assumes that the
         * instance wasn't created.
         */
        @Override
        @javax.annotation.Nullable
        public java.lang.Number getMinSuccessfulInstancesPercent() {
            return this.jsiiGet("minSuccessfulInstancesPercent", java.lang.Number.class);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy