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

com.pulumi.aws.ec2transitgateway.InstanceStateArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
Show newest version
// *** 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.ec2transitgateway;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class InstanceStateArgs extends com.pulumi.resources.ResourceArgs {

    public static final InstanceStateArgs Empty = new InstanceStateArgs();

    /**
     * Whether to request a forced stop when `state` is `stopped`. Otherwise (_i.e._, `state` is `running`), ignored. When an instance is forced to stop, it does not flush file system caches or file system metadata, and you must subsequently perform file system check and repair. Not recommended for Windows instances. Defaults to `false`.
     * 
     */
    @Import(name="force")
    private @Nullable Output force;

    /**
     * @return Whether to request a forced stop when `state` is `stopped`. Otherwise (_i.e._, `state` is `running`), ignored. When an instance is forced to stop, it does not flush file system caches or file system metadata, and you must subsequently perform file system check and repair. Not recommended for Windows instances. Defaults to `false`.
     * 
     */
    public Optional> force() {
        return Optional.ofNullable(this.force);
    }

    /**
     * ID of the instance.
     * 
     */
    @Import(name="instanceId", required=true)
    private Output instanceId;

    /**
     * @return ID of the instance.
     * 
     */
    public Output instanceId() {
        return this.instanceId;
    }

    /**
     * State of the instance. Valid values are `stopped`, `running`.
     * 
     * The following arguments are optional:
     * 
     */
    @Import(name="state", required=true)
    private Output state;

    /**
     * @return State of the instance. Valid values are `stopped`, `running`.
     * 
     * The following arguments are optional:
     * 
     */
    public Output state() {
        return this.state;
    }

    private InstanceStateArgs() {}

    private InstanceStateArgs(InstanceStateArgs $) {
        this.force = $.force;
        this.instanceId = $.instanceId;
        this.state = $.state;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(InstanceStateArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private InstanceStateArgs $;

        public Builder() {
            $ = new InstanceStateArgs();
        }

        public Builder(InstanceStateArgs defaults) {
            $ = new InstanceStateArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param force Whether to request a forced stop when `state` is `stopped`. Otherwise (_i.e._, `state` is `running`), ignored. When an instance is forced to stop, it does not flush file system caches or file system metadata, and you must subsequently perform file system check and repair. Not recommended for Windows instances. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder force(@Nullable Output force) {
            $.force = force;
            return this;
        }

        /**
         * @param force Whether to request a forced stop when `state` is `stopped`. Otherwise (_i.e._, `state` is `running`), ignored. When an instance is forced to stop, it does not flush file system caches or file system metadata, and you must subsequently perform file system check and repair. Not recommended for Windows instances. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder force(Boolean force) {
            return force(Output.of(force));
        }

        /**
         * @param instanceId ID of the instance.
         * 
         * @return builder
         * 
         */
        public Builder instanceId(Output instanceId) {
            $.instanceId = instanceId;
            return this;
        }

        /**
         * @param instanceId ID of the instance.
         * 
         * @return builder
         * 
         */
        public Builder instanceId(String instanceId) {
            return instanceId(Output.of(instanceId));
        }

        /**
         * @param state State of the instance. Valid values are `stopped`, `running`.
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder state(Output state) {
            $.state = state;
            return this;
        }

        /**
         * @param state State of the instance. Valid values are `stopped`, `running`.
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder state(String state) {
            return state(Output.of(state));
        }

        public InstanceStateArgs build() {
            if ($.instanceId == null) {
                throw new MissingRequiredPropertyException("InstanceStateArgs", "instanceId");
            }
            if ($.state == null) {
                throw new MissingRequiredPropertyException("InstanceStateArgs", "state");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy