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

com.pulumi.azurenative.databasewatcher.TargetArgs 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.databasewatcher;

import com.pulumi.azurenative.databasewatcher.enums.TargetAuthenticationType;
import com.pulumi.azurenative.databasewatcher.inputs.VaultSecretArgs;
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.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final TargetArgs Empty = new TargetArgs();

    /**
     * The server name to use in the connection string when connecting to a target. Port number and instance name must be specified separately.
     * 
     */
    @Import(name="connectionServerName", required=true)
    private Output connectionServerName;

    /**
     * @return The server name to use in the connection string when connecting to a target. Port number and instance name must be specified separately.
     * 
     */
    public Output connectionServerName() {
        return this.connectionServerName;
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The type of authentication to use when connecting to a target.
     * 
     */
    @Import(name="targetAuthenticationType", required=true)
    private Output> targetAuthenticationType;

    /**
     * @return The type of authentication to use when connecting to a target.
     * 
     */
    public Output> targetAuthenticationType() {
        return this.targetAuthenticationType;
    }

    /**
     * The target resource name.
     * 
     */
    @Import(name="targetName")
    private @Nullable Output targetName;

    /**
     * @return The target resource name.
     * 
     */
    public Optional> targetName() {
        return Optional.ofNullable(this.targetName);
    }

    /**
     * Discriminator property for TargetProperties.
     * 
     */
    @Import(name="targetType", required=true)
    private Output targetType;

    /**
     * @return Discriminator property for TargetProperties.
     * 
     */
    public Output targetType() {
        return this.targetType;
    }

    /**
     * To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
     * 
     */
    @Import(name="targetVault")
    private @Nullable Output targetVault;

    /**
     * @return To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
     * 
     */
    public Optional> targetVault() {
        return Optional.ofNullable(this.targetVault);
    }

    /**
     * The database watcher name.
     * 
     */
    @Import(name="watcherName", required=true)
    private Output watcherName;

    /**
     * @return The database watcher name.
     * 
     */
    public Output watcherName() {
        return this.watcherName;
    }

    private TargetArgs() {}

    private TargetArgs(TargetArgs $) {
        this.connectionServerName = $.connectionServerName;
        this.resourceGroupName = $.resourceGroupName;
        this.targetAuthenticationType = $.targetAuthenticationType;
        this.targetName = $.targetName;
        this.targetType = $.targetType;
        this.targetVault = $.targetVault;
        this.watcherName = $.watcherName;
    }

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

    public static final class Builder {
        private TargetArgs $;

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

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

        /**
         * @param connectionServerName The server name to use in the connection string when connecting to a target. Port number and instance name must be specified separately.
         * 
         * @return builder
         * 
         */
        public Builder connectionServerName(Output connectionServerName) {
            $.connectionServerName = connectionServerName;
            return this;
        }

        /**
         * @param connectionServerName The server name to use in the connection string when connecting to a target. Port number and instance name must be specified separately.
         * 
         * @return builder
         * 
         */
        public Builder connectionServerName(String connectionServerName) {
            return connectionServerName(Output.of(connectionServerName));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param targetAuthenticationType The type of authentication to use when connecting to a target.
         * 
         * @return builder
         * 
         */
        public Builder targetAuthenticationType(Output> targetAuthenticationType) {
            $.targetAuthenticationType = targetAuthenticationType;
            return this;
        }

        /**
         * @param targetAuthenticationType The type of authentication to use when connecting to a target.
         * 
         * @return builder
         * 
         */
        public Builder targetAuthenticationType(Either targetAuthenticationType) {
            return targetAuthenticationType(Output.of(targetAuthenticationType));
        }

        /**
         * @param targetAuthenticationType The type of authentication to use when connecting to a target.
         * 
         * @return builder
         * 
         */
        public Builder targetAuthenticationType(String targetAuthenticationType) {
            return targetAuthenticationType(Either.ofLeft(targetAuthenticationType));
        }

        /**
         * @param targetAuthenticationType The type of authentication to use when connecting to a target.
         * 
         * @return builder
         * 
         */
        public Builder targetAuthenticationType(TargetAuthenticationType targetAuthenticationType) {
            return targetAuthenticationType(Either.ofRight(targetAuthenticationType));
        }

        /**
         * @param targetName The target resource name.
         * 
         * @return builder
         * 
         */
        public Builder targetName(@Nullable Output targetName) {
            $.targetName = targetName;
            return this;
        }

        /**
         * @param targetName The target resource name.
         * 
         * @return builder
         * 
         */
        public Builder targetName(String targetName) {
            return targetName(Output.of(targetName));
        }

        /**
         * @param targetType Discriminator property for TargetProperties.
         * 
         * @return builder
         * 
         */
        public Builder targetType(Output targetType) {
            $.targetType = targetType;
            return this;
        }

        /**
         * @param targetType Discriminator property for TargetProperties.
         * 
         * @return builder
         * 
         */
        public Builder targetType(String targetType) {
            return targetType(Output.of(targetType));
        }

        /**
         * @param targetVault To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
         * 
         * @return builder
         * 
         */
        public Builder targetVault(@Nullable Output targetVault) {
            $.targetVault = targetVault;
            return this;
        }

        /**
         * @param targetVault To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
         * 
         * @return builder
         * 
         */
        public Builder targetVault(VaultSecretArgs targetVault) {
            return targetVault(Output.of(targetVault));
        }

        /**
         * @param watcherName The database watcher name.
         * 
         * @return builder
         * 
         */
        public Builder watcherName(Output watcherName) {
            $.watcherName = watcherName;
            return this;
        }

        /**
         * @param watcherName The database watcher name.
         * 
         * @return builder
         * 
         */
        public Builder watcherName(String watcherName) {
            return watcherName(Output.of(watcherName));
        }

        public TargetArgs build() {
            if ($.connectionServerName == null) {
                throw new MissingRequiredPropertyException("TargetArgs", "connectionServerName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("TargetArgs", "resourceGroupName");
            }
            if ($.targetAuthenticationType == null) {
                throw new MissingRequiredPropertyException("TargetArgs", "targetAuthenticationType");
            }
            if ($.targetType == null) {
                throw new MissingRequiredPropertyException("TargetArgs", "targetType");
            }
            if ($.watcherName == null) {
                throw new MissingRequiredPropertyException("TargetArgs", "watcherName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy