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

com.pulumi.azure.mssql.ManagedInstanceFailoverGroupArgs Maven / Gradle / Ivy

// *** 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.azure.mssql;

import com.pulumi.azure.mssql.inputs.ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs;
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 ManagedInstanceFailoverGroupArgs extends com.pulumi.resources.ResourceArgs {

    public static final ManagedInstanceFailoverGroupArgs Empty = new ManagedInstanceFailoverGroupArgs();

    /**
     * The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="managedInstanceId", required=true)
    private Output managedInstanceId;

    /**
     * @return The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created.
     * 
     */
    public Output managedInstanceId() {
        return this.managedInstanceId;
    }

    /**
     * The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="partnerManagedInstanceId", required=true)
    private Output partnerManagedInstanceId;

    /**
     * @return The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
     * 
     */
    public Output partnerManagedInstanceId() {
        return this.partnerManagedInstanceId;
    }

    /**
     * A `read_write_endpoint_failover_policy` block as defined below.
     * 
     */
    @Import(name="readWriteEndpointFailoverPolicy", required=true)
    private Output readWriteEndpointFailoverPolicy;

    /**
     * @return A `read_write_endpoint_failover_policy` block as defined below.
     * 
     */
    public Output readWriteEndpointFailoverPolicy() {
        return this.readWriteEndpointFailoverPolicy;
    }

    /**
     * Failover policy for the read-only endpoint. Defaults to `true`.
     * 
     */
    @Import(name="readonlyEndpointFailoverPolicyEnabled")
    private @Nullable Output readonlyEndpointFailoverPolicyEnabled;

    /**
     * @return Failover policy for the read-only endpoint. Defaults to `true`.
     * 
     */
    public Optional> readonlyEndpointFailoverPolicyEnabled() {
        return Optional.ofNullable(this.readonlyEndpointFailoverPolicyEnabled);
    }

    private ManagedInstanceFailoverGroupArgs() {}

    private ManagedInstanceFailoverGroupArgs(ManagedInstanceFailoverGroupArgs $) {
        this.location = $.location;
        this.managedInstanceId = $.managedInstanceId;
        this.name = $.name;
        this.partnerManagedInstanceId = $.partnerManagedInstanceId;
        this.readWriteEndpointFailoverPolicy = $.readWriteEndpointFailoverPolicy;
        this.readonlyEndpointFailoverPolicyEnabled = $.readonlyEndpointFailoverPolicyEnabled;
    }

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

    public static final class Builder {
        private ManagedInstanceFailoverGroupArgs $;

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

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

        /**
         * @param location The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param managedInstanceId The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder managedInstanceId(Output managedInstanceId) {
            $.managedInstanceId = managedInstanceId;
            return this;
        }

        /**
         * @param managedInstanceId The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder managedInstanceId(String managedInstanceId) {
            return managedInstanceId(Output.of(managedInstanceId));
        }

        /**
         * @param name The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param partnerManagedInstanceId The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder partnerManagedInstanceId(Output partnerManagedInstanceId) {
            $.partnerManagedInstanceId = partnerManagedInstanceId;
            return this;
        }

        /**
         * @param partnerManagedInstanceId The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder partnerManagedInstanceId(String partnerManagedInstanceId) {
            return partnerManagedInstanceId(Output.of(partnerManagedInstanceId));
        }

        /**
         * @param readWriteEndpointFailoverPolicy A `read_write_endpoint_failover_policy` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder readWriteEndpointFailoverPolicy(Output readWriteEndpointFailoverPolicy) {
            $.readWriteEndpointFailoverPolicy = readWriteEndpointFailoverPolicy;
            return this;
        }

        /**
         * @param readWriteEndpointFailoverPolicy A `read_write_endpoint_failover_policy` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder readWriteEndpointFailoverPolicy(ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs readWriteEndpointFailoverPolicy) {
            return readWriteEndpointFailoverPolicy(Output.of(readWriteEndpointFailoverPolicy));
        }

        /**
         * @param readonlyEndpointFailoverPolicyEnabled Failover policy for the read-only endpoint. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder readonlyEndpointFailoverPolicyEnabled(@Nullable Output readonlyEndpointFailoverPolicyEnabled) {
            $.readonlyEndpointFailoverPolicyEnabled = readonlyEndpointFailoverPolicyEnabled;
            return this;
        }

        /**
         * @param readonlyEndpointFailoverPolicyEnabled Failover policy for the read-only endpoint. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder readonlyEndpointFailoverPolicyEnabled(Boolean readonlyEndpointFailoverPolicyEnabled) {
            return readonlyEndpointFailoverPolicyEnabled(Output.of(readonlyEndpointFailoverPolicyEnabled));
        }

        public ManagedInstanceFailoverGroupArgs build() {
            if ($.managedInstanceId == null) {
                throw new MissingRequiredPropertyException("ManagedInstanceFailoverGroupArgs", "managedInstanceId");
            }
            if ($.partnerManagedInstanceId == null) {
                throw new MissingRequiredPropertyException("ManagedInstanceFailoverGroupArgs", "partnerManagedInstanceId");
            }
            if ($.readWriteEndpointFailoverPolicy == null) {
                throw new MissingRequiredPropertyException("ManagedInstanceFailoverGroupArgs", "readWriteEndpointFailoverPolicy");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy