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

com.pulumi.azurenative.sql.ServerArgs 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.enums.ServerNetworkAccessFlag;
import com.pulumi.azurenative.sql.inputs.ResourceIdentityArgs;
import com.pulumi.azurenative.sql.inputs.ServerExternalAdministratorArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ServerArgs Empty = new ServerArgs();

    /**
     * Administrator username for the server. Once created it cannot be changed.
     * 
     */
    @Import(name="administratorLogin")
    private @Nullable Output administratorLogin;

    /**
     * @return Administrator username for the server. Once created it cannot be changed.
     * 
     */
    public Optional> administratorLogin() {
        return Optional.ofNullable(this.administratorLogin);
    }

    /**
     * The administrator login password (required for server creation).
     * 
     */
    @Import(name="administratorLoginPassword")
    private @Nullable Output administratorLoginPassword;

    /**
     * @return The administrator login password (required for server creation).
     * 
     */
    public Optional> administratorLoginPassword() {
        return Optional.ofNullable(this.administratorLoginPassword);
    }

    /**
     * The Azure Active Directory administrator of the server.
     * 
     */
    @Import(name="administrators")
    private @Nullable Output administrators;

    /**
     * @return The Azure Active Directory administrator of the server.
     * 
     */
    public Optional> administrators() {
        return Optional.ofNullable(this.administrators);
    }

    /**
     * The Client id used for cross tenant CMK scenario
     * 
     */
    @Import(name="federatedClientId")
    private @Nullable Output federatedClientId;

    /**
     * @return The Client id used for cross tenant CMK scenario
     * 
     */
    public Optional> federatedClientId() {
        return Optional.ofNullable(this.federatedClientId);
    }

    /**
     * The Azure Active Directory identity of the server.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return The Azure Active Directory identity of the server.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * A CMK URI of the key to use for encryption.
     * 
     */
    @Import(name="keyId")
    private @Nullable Output keyId;

    /**
     * @return A CMK URI of the key to use for encryption.
     * 
     */
    public Optional> keyId() {
        return Optional.ofNullable(this.keyId);
    }

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

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

    /**
     * Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'
     * 
     */
    @Import(name="minimalTlsVersion")
    private @Nullable Output minimalTlsVersion;

    /**
     * @return Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'
     * 
     */
    public Optional> minimalTlsVersion() {
        return Optional.ofNullable(this.minimalTlsVersion);
    }

    /**
     * The resource id of a user assigned identity to be used by default.
     * 
     */
    @Import(name="primaryUserAssignedIdentityId")
    private @Nullable Output primaryUserAssignedIdentityId;

    /**
     * @return The resource id of a user assigned identity to be used by default.
     * 
     */
    public Optional> primaryUserAssignedIdentityId() {
        return Optional.ofNullable(this.primaryUserAssignedIdentityId);
    }

    /**
     * Whether or not public endpoint access is allowed for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
     * 
     */
    @Import(name="publicNetworkAccess")
    private @Nullable Output> publicNetworkAccess;

    /**
     * @return Whether or not public endpoint access is allowed for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
     * 
     */
    public Optional>> publicNetworkAccess() {
        return Optional.ofNullable(this.publicNetworkAccess);
    }

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

    /**
     * Whether or not to restrict outbound network access for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
     * 
     */
    @Import(name="restrictOutboundNetworkAccess")
    private @Nullable Output> restrictOutboundNetworkAccess;

    /**
     * @return Whether or not to restrict outbound network access for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
     * 
     */
    public Optional>> restrictOutboundNetworkAccess() {
        return Optional.ofNullable(this.restrictOutboundNetworkAccess);
    }

    /**
     * The name of the server.
     * 
     */
    @Import(name="serverName")
    private @Nullable Output serverName;

    /**
     * @return The name of the server.
     * 
     */
    public Optional> serverName() {
        return Optional.ofNullable(this.serverName);
    }

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

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

    /**
     * The version of the server.
     * 
     */
    @Import(name="version")
    private @Nullable Output version;

    /**
     * @return The version of the server.
     * 
     */
    public Optional> version() {
        return Optional.ofNullable(this.version);
    }

    private ServerArgs() {}

    private ServerArgs(ServerArgs $) {
        this.administratorLogin = $.administratorLogin;
        this.administratorLoginPassword = $.administratorLoginPassword;
        this.administrators = $.administrators;
        this.federatedClientId = $.federatedClientId;
        this.identity = $.identity;
        this.keyId = $.keyId;
        this.location = $.location;
        this.minimalTlsVersion = $.minimalTlsVersion;
        this.primaryUserAssignedIdentityId = $.primaryUserAssignedIdentityId;
        this.publicNetworkAccess = $.publicNetworkAccess;
        this.resourceGroupName = $.resourceGroupName;
        this.restrictOutboundNetworkAccess = $.restrictOutboundNetworkAccess;
        this.serverName = $.serverName;
        this.tags = $.tags;
        this.version = $.version;
    }

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

    public static final class Builder {
        private ServerArgs $;

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

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

        /**
         * @param administratorLogin Administrator username for the server. Once created it cannot be changed.
         * 
         * @return builder
         * 
         */
        public Builder administratorLogin(@Nullable Output administratorLogin) {
            $.administratorLogin = administratorLogin;
            return this;
        }

        /**
         * @param administratorLogin Administrator username for the server. Once created it cannot be changed.
         * 
         * @return builder
         * 
         */
        public Builder administratorLogin(String administratorLogin) {
            return administratorLogin(Output.of(administratorLogin));
        }

        /**
         * @param administratorLoginPassword The administrator login password (required for server creation).
         * 
         * @return builder
         * 
         */
        public Builder administratorLoginPassword(@Nullable Output administratorLoginPassword) {
            $.administratorLoginPassword = administratorLoginPassword;
            return this;
        }

        /**
         * @param administratorLoginPassword The administrator login password (required for server creation).
         * 
         * @return builder
         * 
         */
        public Builder administratorLoginPassword(String administratorLoginPassword) {
            return administratorLoginPassword(Output.of(administratorLoginPassword));
        }

        /**
         * @param administrators The Azure Active Directory administrator of the server.
         * 
         * @return builder
         * 
         */
        public Builder administrators(@Nullable Output administrators) {
            $.administrators = administrators;
            return this;
        }

        /**
         * @param administrators The Azure Active Directory administrator of the server.
         * 
         * @return builder
         * 
         */
        public Builder administrators(ServerExternalAdministratorArgs administrators) {
            return administrators(Output.of(administrators));
        }

        /**
         * @param federatedClientId The Client id used for cross tenant CMK scenario
         * 
         * @return builder
         * 
         */
        public Builder federatedClientId(@Nullable Output federatedClientId) {
            $.federatedClientId = federatedClientId;
            return this;
        }

        /**
         * @param federatedClientId The Client id used for cross tenant CMK scenario
         * 
         * @return builder
         * 
         */
        public Builder federatedClientId(String federatedClientId) {
            return federatedClientId(Output.of(federatedClientId));
        }

        /**
         * @param identity The Azure Active Directory identity of the server.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity The Azure Active Directory identity of the server.
         * 
         * @return builder
         * 
         */
        public Builder identity(ResourceIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param keyId A CMK URI of the key to use for encryption.
         * 
         * @return builder
         * 
         */
        public Builder keyId(@Nullable Output keyId) {
            $.keyId = keyId;
            return this;
        }

        /**
         * @param keyId A CMK URI of the key to use for encryption.
         * 
         * @return builder
         * 
         */
        public Builder keyId(String keyId) {
            return keyId(Output.of(keyId));
        }

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

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

        /**
         * @param minimalTlsVersion Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'
         * 
         * @return builder
         * 
         */
        public Builder minimalTlsVersion(@Nullable Output minimalTlsVersion) {
            $.minimalTlsVersion = minimalTlsVersion;
            return this;
        }

        /**
         * @param minimalTlsVersion Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'
         * 
         * @return builder
         * 
         */
        public Builder minimalTlsVersion(String minimalTlsVersion) {
            return minimalTlsVersion(Output.of(minimalTlsVersion));
        }

        /**
         * @param primaryUserAssignedIdentityId The resource id of a user assigned identity to be used by default.
         * 
         * @return builder
         * 
         */
        public Builder primaryUserAssignedIdentityId(@Nullable Output primaryUserAssignedIdentityId) {
            $.primaryUserAssignedIdentityId = primaryUserAssignedIdentityId;
            return this;
        }

        /**
         * @param primaryUserAssignedIdentityId The resource id of a user assigned identity to be used by default.
         * 
         * @return builder
         * 
         */
        public Builder primaryUserAssignedIdentityId(String primaryUserAssignedIdentityId) {
            return primaryUserAssignedIdentityId(Output.of(primaryUserAssignedIdentityId));
        }

        /**
         * @param publicNetworkAccess Whether or not public endpoint access is allowed for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(@Nullable Output> publicNetworkAccess) {
            $.publicNetworkAccess = publicNetworkAccess;
            return this;
        }

        /**
         * @param publicNetworkAccess Whether or not public endpoint access is allowed for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(Either publicNetworkAccess) {
            return publicNetworkAccess(Output.of(publicNetworkAccess));
        }

        /**
         * @param publicNetworkAccess Whether or not public endpoint access is allowed for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(String publicNetworkAccess) {
            return publicNetworkAccess(Either.ofLeft(publicNetworkAccess));
        }

        /**
         * @param publicNetworkAccess Whether or not public endpoint access is allowed for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(ServerNetworkAccessFlag publicNetworkAccess) {
            return publicNetworkAccess(Either.ofRight(publicNetworkAccess));
        }

        /**
         * @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 restrictOutboundNetworkAccess Whether or not to restrict outbound network access for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
         * 
         * @return builder
         * 
         */
        public Builder restrictOutboundNetworkAccess(@Nullable Output> restrictOutboundNetworkAccess) {
            $.restrictOutboundNetworkAccess = restrictOutboundNetworkAccess;
            return this;
        }

        /**
         * @param restrictOutboundNetworkAccess Whether or not to restrict outbound network access for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
         * 
         * @return builder
         * 
         */
        public Builder restrictOutboundNetworkAccess(Either restrictOutboundNetworkAccess) {
            return restrictOutboundNetworkAccess(Output.of(restrictOutboundNetworkAccess));
        }

        /**
         * @param restrictOutboundNetworkAccess Whether or not to restrict outbound network access for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
         * 
         * @return builder
         * 
         */
        public Builder restrictOutboundNetworkAccess(String restrictOutboundNetworkAccess) {
            return restrictOutboundNetworkAccess(Either.ofLeft(restrictOutboundNetworkAccess));
        }

        /**
         * @param restrictOutboundNetworkAccess Whether or not to restrict outbound network access for this server.  Value is optional but if passed in, must be 'Enabled' or 'Disabled'
         * 
         * @return builder
         * 
         */
        public Builder restrictOutboundNetworkAccess(ServerNetworkAccessFlag restrictOutboundNetworkAccess) {
            return restrictOutboundNetworkAccess(Either.ofRight(restrictOutboundNetworkAccess));
        }

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

        /**
         * @param serverName The name of the server.
         * 
         * @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));
        }

        /**
         * @param version The version of the server.
         * 
         * @return builder
         * 
         */
        public Builder version(@Nullable Output version) {
            $.version = version;
            return this;
        }

        /**
         * @param version The version of the server.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

        public ServerArgs build() {
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ServerArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy