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

com.pulumi.azurenative.sql.FailoverGroupArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.sql;

import com.pulumi.azurenative.sql.inputs.FailoverGroupReadOnlyEndpointArgs;
import com.pulumi.azurenative.sql.inputs.FailoverGroupReadWriteEndpointArgs;
import com.pulumi.azurenative.sql.inputs.PartnerInfoArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final FailoverGroupArgs Empty = new FailoverGroupArgs();

    /**
     * List of databases in the failover group.
     * 
     */
    @Import(name="databases")
    private @Nullable Output> databases;

    /**
     * @return List of databases in the failover group.
     * 
     */
    public Optional>> databases() {
        return Optional.ofNullable(this.databases);
    }

    /**
     * The name of the failover group.
     * 
     */
    @Import(name="failoverGroupName")
    private @Nullable Output failoverGroupName;

    /**
     * @return The name of the failover group.
     * 
     */
    public Optional> failoverGroupName() {
        return Optional.ofNullable(this.failoverGroupName);
    }

    /**
     * List of partner server information for the failover group.
     * 
     */
    @Import(name="partnerServers", required=true)
    private Output> partnerServers;

    /**
     * @return List of partner server information for the failover group.
     * 
     */
    public Output> partnerServers() {
        return this.partnerServers;
    }

    /**
     * Read-only endpoint of the failover group instance.
     * 
     */
    @Import(name="readOnlyEndpoint")
    private @Nullable Output readOnlyEndpoint;

    /**
     * @return Read-only endpoint of the failover group instance.
     * 
     */
    public Optional> readOnlyEndpoint() {
        return Optional.ofNullable(this.readOnlyEndpoint);
    }

    /**
     * Read-write endpoint of the failover group instance.
     * 
     */
    @Import(name="readWriteEndpoint", required=true)
    private Output readWriteEndpoint;

    /**
     * @return Read-write endpoint of the failover group instance.
     * 
     */
    public Output readWriteEndpoint() {
        return this.readWriteEndpoint;
    }

    /**
     * The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The name of the server containing the failover group.
     * 
     */
    @Import(name="serverName", required=true)
    private Output serverName;

    /**
     * @return The name of the server containing the failover group.
     * 
     */
    public Output serverName() {
        return this.serverName;
    }

    /**
     * Resource tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private FailoverGroupArgs() {}

    private FailoverGroupArgs(FailoverGroupArgs $) {
        this.databases = $.databases;
        this.failoverGroupName = $.failoverGroupName;
        this.partnerServers = $.partnerServers;
        this.readOnlyEndpoint = $.readOnlyEndpoint;
        this.readWriteEndpoint = $.readWriteEndpoint;
        this.resourceGroupName = $.resourceGroupName;
        this.serverName = $.serverName;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private FailoverGroupArgs $;

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

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

        /**
         * @param databases List of databases in the failover group.
         * 
         * @return builder
         * 
         */
        public Builder databases(@Nullable Output> databases) {
            $.databases = databases;
            return this;
        }

        /**
         * @param databases List of databases in the failover group.
         * 
         * @return builder
         * 
         */
        public Builder databases(List databases) {
            return databases(Output.of(databases));
        }

        /**
         * @param databases List of databases in the failover group.
         * 
         * @return builder
         * 
         */
        public Builder databases(String... databases) {
            return databases(List.of(databases));
        }

        /**
         * @param failoverGroupName The name of the failover group.
         * 
         * @return builder
         * 
         */
        public Builder failoverGroupName(@Nullable Output failoverGroupName) {
            $.failoverGroupName = failoverGroupName;
            return this;
        }

        /**
         * @param failoverGroupName The name of the failover group.
         * 
         * @return builder
         * 
         */
        public Builder failoverGroupName(String failoverGroupName) {
            return failoverGroupName(Output.of(failoverGroupName));
        }

        /**
         * @param partnerServers List of partner server information for the failover group.
         * 
         * @return builder
         * 
         */
        public Builder partnerServers(Output> partnerServers) {
            $.partnerServers = partnerServers;
            return this;
        }

        /**
         * @param partnerServers List of partner server information for the failover group.
         * 
         * @return builder
         * 
         */
        public Builder partnerServers(List partnerServers) {
            return partnerServers(Output.of(partnerServers));
        }

        /**
         * @param partnerServers List of partner server information for the failover group.
         * 
         * @return builder
         * 
         */
        public Builder partnerServers(PartnerInfoArgs... partnerServers) {
            return partnerServers(List.of(partnerServers));
        }

        /**
         * @param readOnlyEndpoint Read-only endpoint of the failover group instance.
         * 
         * @return builder
         * 
         */
        public Builder readOnlyEndpoint(@Nullable Output readOnlyEndpoint) {
            $.readOnlyEndpoint = readOnlyEndpoint;
            return this;
        }

        /**
         * @param readOnlyEndpoint Read-only endpoint of the failover group instance.
         * 
         * @return builder
         * 
         */
        public Builder readOnlyEndpoint(FailoverGroupReadOnlyEndpointArgs readOnlyEndpoint) {
            return readOnlyEndpoint(Output.of(readOnlyEndpoint));
        }

        /**
         * @param readWriteEndpoint Read-write endpoint of the failover group instance.
         * 
         * @return builder
         * 
         */
        public Builder readWriteEndpoint(Output readWriteEndpoint) {
            $.readWriteEndpoint = readWriteEndpoint;
            return this;
        }

        /**
         * @param readWriteEndpoint Read-write endpoint of the failover group instance.
         * 
         * @return builder
         * 
         */
        public Builder readWriteEndpoint(FailoverGroupReadWriteEndpointArgs readWriteEndpoint) {
            return readWriteEndpoint(Output.of(readWriteEndpoint));
        }

        /**
         * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param serverName The name of the server containing the failover group.
         * 
         * @return builder
         * 
         */
        public Builder serverName(Output serverName) {
            $.serverName = serverName;
            return this;
        }

        /**
         * @param serverName The name of the server containing the failover group.
         * 
         * @return builder
         * 
         */
        public Builder serverName(String serverName) {
            return serverName(Output.of(serverName));
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        public FailoverGroupArgs build() {
            if ($.partnerServers == null) {
                throw new MissingRequiredPropertyException("FailoverGroupArgs", "partnerServers");
            }
            if ($.readWriteEndpoint == null) {
                throw new MissingRequiredPropertyException("FailoverGroupArgs", "readWriteEndpoint");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("FailoverGroupArgs", "resourceGroupName");
            }
            if ($.serverName == null) {
                throw new MissingRequiredPropertyException("FailoverGroupArgs", "serverName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy