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

com.pulumi.azurenative.kusto.DatabasePrincipalAssignmentArgs 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.kusto;

import com.pulumi.azurenative.kusto.enums.DatabasePrincipalRole;
import com.pulumi.azurenative.kusto.enums.PrincipalType;
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 DatabasePrincipalAssignmentArgs extends com.pulumi.resources.ResourceArgs {

    public static final DatabasePrincipalAssignmentArgs Empty = new DatabasePrincipalAssignmentArgs();

    /**
     * The name of the Kusto cluster.
     * 
     */
    @Import(name="clusterName", required=true)
    private Output clusterName;

    /**
     * @return The name of the Kusto cluster.
     * 
     */
    public Output clusterName() {
        return this.clusterName;
    }

    /**
     * The name of the database in the Kusto cluster.
     * 
     */
    @Import(name="databaseName", required=true)
    private Output databaseName;

    /**
     * @return The name of the database in the Kusto cluster.
     * 
     */
    public Output databaseName() {
        return this.databaseName;
    }

    /**
     * The name of the Kusto principalAssignment.
     * 
     */
    @Import(name="principalAssignmentName")
    private @Nullable Output principalAssignmentName;

    /**
     * @return The name of the Kusto principalAssignment.
     * 
     */
    public Optional> principalAssignmentName() {
        return Optional.ofNullable(this.principalAssignmentName);
    }

    /**
     * The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
     * 
     */
    @Import(name="principalId", required=true)
    private Output principalId;

    /**
     * @return The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
     * 
     */
    public Output principalId() {
        return this.principalId;
    }

    /**
     * Principal type.
     * 
     */
    @Import(name="principalType", required=true)
    private Output> principalType;

    /**
     * @return Principal type.
     * 
     */
    public Output> principalType() {
        return this.principalType;
    }

    /**
     * The name of the resource group containing the Kusto cluster.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group containing the Kusto cluster.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Database principal role.
     * 
     */
    @Import(name="role", required=true)
    private Output> role;

    /**
     * @return Database principal role.
     * 
     */
    public Output> role() {
        return this.role;
    }

    /**
     * The tenant id of the principal
     * 
     */
    @Import(name="tenantId")
    private @Nullable Output tenantId;

    /**
     * @return The tenant id of the principal
     * 
     */
    public Optional> tenantId() {
        return Optional.ofNullable(this.tenantId);
    }

    private DatabasePrincipalAssignmentArgs() {}

    private DatabasePrincipalAssignmentArgs(DatabasePrincipalAssignmentArgs $) {
        this.clusterName = $.clusterName;
        this.databaseName = $.databaseName;
        this.principalAssignmentName = $.principalAssignmentName;
        this.principalId = $.principalId;
        this.principalType = $.principalType;
        this.resourceGroupName = $.resourceGroupName;
        this.role = $.role;
        this.tenantId = $.tenantId;
    }

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

    public static final class Builder {
        private DatabasePrincipalAssignmentArgs $;

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

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

        /**
         * @param clusterName The name of the Kusto cluster.
         * 
         * @return builder
         * 
         */
        public Builder clusterName(Output clusterName) {
            $.clusterName = clusterName;
            return this;
        }

        /**
         * @param clusterName The name of the Kusto cluster.
         * 
         * @return builder
         * 
         */
        public Builder clusterName(String clusterName) {
            return clusterName(Output.of(clusterName));
        }

        /**
         * @param databaseName The name of the database in the Kusto cluster.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(Output databaseName) {
            $.databaseName = databaseName;
            return this;
        }

        /**
         * @param databaseName The name of the database in the Kusto cluster.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(String databaseName) {
            return databaseName(Output.of(databaseName));
        }

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

        /**
         * @param principalAssignmentName The name of the Kusto principalAssignment.
         * 
         * @return builder
         * 
         */
        public Builder principalAssignmentName(String principalAssignmentName) {
            return principalAssignmentName(Output.of(principalAssignmentName));
        }

        /**
         * @param principalId The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
         * 
         * @return builder
         * 
         */
        public Builder principalId(Output principalId) {
            $.principalId = principalId;
            return this;
        }

        /**
         * @param principalId The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
         * 
         * @return builder
         * 
         */
        public Builder principalId(String principalId) {
            return principalId(Output.of(principalId));
        }

        /**
         * @param principalType Principal type.
         * 
         * @return builder
         * 
         */
        public Builder principalType(Output> principalType) {
            $.principalType = principalType;
            return this;
        }

        /**
         * @param principalType Principal type.
         * 
         * @return builder
         * 
         */
        public Builder principalType(Either principalType) {
            return principalType(Output.of(principalType));
        }

        /**
         * @param principalType Principal type.
         * 
         * @return builder
         * 
         */
        public Builder principalType(String principalType) {
            return principalType(Either.ofLeft(principalType));
        }

        /**
         * @param principalType Principal type.
         * 
         * @return builder
         * 
         */
        public Builder principalType(PrincipalType principalType) {
            return principalType(Either.ofRight(principalType));
        }

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

        /**
         * @param resourceGroupName The name of the resource group containing the Kusto cluster.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param role Database principal role.
         * 
         * @return builder
         * 
         */
        public Builder role(Output> role) {
            $.role = role;
            return this;
        }

        /**
         * @param role Database principal role.
         * 
         * @return builder
         * 
         */
        public Builder role(Either role) {
            return role(Output.of(role));
        }

        /**
         * @param role Database principal role.
         * 
         * @return builder
         * 
         */
        public Builder role(String role) {
            return role(Either.ofLeft(role));
        }

        /**
         * @param role Database principal role.
         * 
         * @return builder
         * 
         */
        public Builder role(DatabasePrincipalRole role) {
            return role(Either.ofRight(role));
        }

        /**
         * @param tenantId The tenant id of the principal
         * 
         * @return builder
         * 
         */
        public Builder tenantId(@Nullable Output tenantId) {
            $.tenantId = tenantId;
            return this;
        }

        /**
         * @param tenantId The tenant id of the principal
         * 
         * @return builder
         * 
         */
        public Builder tenantId(String tenantId) {
            return tenantId(Output.of(tenantId));
        }

        public DatabasePrincipalAssignmentArgs build() {
            if ($.clusterName == null) {
                throw new MissingRequiredPropertyException("DatabasePrincipalAssignmentArgs", "clusterName");
            }
            if ($.databaseName == null) {
                throw new MissingRequiredPropertyException("DatabasePrincipalAssignmentArgs", "databaseName");
            }
            if ($.principalId == null) {
                throw new MissingRequiredPropertyException("DatabasePrincipalAssignmentArgs", "principalId");
            }
            if ($.principalType == null) {
                throw new MissingRequiredPropertyException("DatabasePrincipalAssignmentArgs", "principalType");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("DatabasePrincipalAssignmentArgs", "resourceGroupName");
            }
            if ($.role == null) {
                throw new MissingRequiredPropertyException("DatabasePrincipalAssignmentArgs", "role");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy