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

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

There is a newer version: 2.72.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.InstanceFailoverGroupReadOnlyEndpointArgs;
import com.pulumi.azurenative.sql.inputs.InstanceFailoverGroupReadWriteEndpointArgs;
import com.pulumi.azurenative.sql.inputs.ManagedInstancePairInfoArgs;
import com.pulumi.azurenative.sql.inputs.PartnerRegionInfoArgs;
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.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final InstanceFailoverGroupArgs Empty = new InstanceFailoverGroupArgs();

    /**
     * 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);
    }

    /**
     * The name of the region where the resource is located.
     * 
     */
    @Import(name="locationName", required=true)
    private Output locationName;

    /**
     * @return The name of the region where the resource is located.
     * 
     */
    public Output locationName() {
        return this.locationName;
    }

    /**
     * List of managed instance pairs in the failover group.
     * 
     */
    @Import(name="managedInstancePairs", required=true)
    private Output> managedInstancePairs;

    /**
     * @return List of managed instance pairs in the failover group.
     * 
     */
    public Output> managedInstancePairs() {
        return this.managedInstancePairs;
    }

    /**
     * Partner region information for the failover group.
     * 
     */
    @Import(name="partnerRegions", required=true)
    private Output> partnerRegions;

    /**
     * @return Partner region information for the failover group.
     * 
     */
    public Output> partnerRegions() {
        return this.partnerRegions;
    }

    /**
     * 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;
    }

    private InstanceFailoverGroupArgs() {}

    private InstanceFailoverGroupArgs(InstanceFailoverGroupArgs $) {
        this.failoverGroupName = $.failoverGroupName;
        this.locationName = $.locationName;
        this.managedInstancePairs = $.managedInstancePairs;
        this.partnerRegions = $.partnerRegions;
        this.readOnlyEndpoint = $.readOnlyEndpoint;
        this.readWriteEndpoint = $.readWriteEndpoint;
        this.resourceGroupName = $.resourceGroupName;
    }

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

    public static final class Builder {
        private InstanceFailoverGroupArgs $;

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

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

        /**
         * @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 locationName The name of the region where the resource is located.
         * 
         * @return builder
         * 
         */
        public Builder locationName(Output locationName) {
            $.locationName = locationName;
            return this;
        }

        /**
         * @param locationName The name of the region where the resource is located.
         * 
         * @return builder
         * 
         */
        public Builder locationName(String locationName) {
            return locationName(Output.of(locationName));
        }

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

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

        /**
         * @param managedInstancePairs List of managed instance pairs in the failover group.
         * 
         * @return builder
         * 
         */
        public Builder managedInstancePairs(ManagedInstancePairInfoArgs... managedInstancePairs) {
            return managedInstancePairs(List.of(managedInstancePairs));
        }

        /**
         * @param partnerRegions Partner region information for the failover group.
         * 
         * @return builder
         * 
         */
        public Builder partnerRegions(Output> partnerRegions) {
            $.partnerRegions = partnerRegions;
            return this;
        }

        /**
         * @param partnerRegions Partner region information for the failover group.
         * 
         * @return builder
         * 
         */
        public Builder partnerRegions(List partnerRegions) {
            return partnerRegions(Output.of(partnerRegions));
        }

        /**
         * @param partnerRegions Partner region information for the failover group.
         * 
         * @return builder
         * 
         */
        public Builder partnerRegions(PartnerRegionInfoArgs... partnerRegions) {
            return partnerRegions(List.of(partnerRegions));
        }

        /**
         * @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(InstanceFailoverGroupReadOnlyEndpointArgs 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(InstanceFailoverGroupReadWriteEndpointArgs 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));
        }

        public InstanceFailoverGroupArgs build() {
            if ($.locationName == null) {
                throw new MissingRequiredPropertyException("InstanceFailoverGroupArgs", "locationName");
            }
            if ($.managedInstancePairs == null) {
                throw new MissingRequiredPropertyException("InstanceFailoverGroupArgs", "managedInstancePairs");
            }
            if ($.partnerRegions == null) {
                throw new MissingRequiredPropertyException("InstanceFailoverGroupArgs", "partnerRegions");
            }
            if ($.readWriteEndpoint == null) {
                throw new MissingRequiredPropertyException("InstanceFailoverGroupArgs", "readWriteEndpoint");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("InstanceFailoverGroupArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy