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

com.pulumi.azurenative.documentdb.MongoDBResourceMongoRoleDefinitionArgs 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.documentdb;

import com.pulumi.azurenative.documentdb.enums.MongoRoleDefinitionType;
import com.pulumi.azurenative.documentdb.inputs.PrivilegeArgs;
import com.pulumi.azurenative.documentdb.inputs.RoleArgs;
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 MongoDBResourceMongoRoleDefinitionArgs extends com.pulumi.resources.ResourceArgs {

    public static final MongoDBResourceMongoRoleDefinitionArgs Empty = new MongoDBResourceMongoRoleDefinitionArgs();

    /**
     * Cosmos DB database account name.
     * 
     */
    @Import(name="accountName", required=true)
    private Output accountName;

    /**
     * @return Cosmos DB database account name.
     * 
     */
    public Output accountName() {
        return this.accountName;
    }

    /**
     * The database name for which access is being granted for this Role Definition.
     * 
     */
    @Import(name="databaseName")
    private @Nullable Output databaseName;

    /**
     * @return The database name for which access is being granted for this Role Definition.
     * 
     */
    public Optional> databaseName() {
        return Optional.ofNullable(this.databaseName);
    }

    /**
     * The ID for the Role Definition {dbName.roleName}.
     * 
     */
    @Import(name="mongoRoleDefinitionId")
    private @Nullable Output mongoRoleDefinitionId;

    /**
     * @return The ID for the Role Definition {dbName.roleName}.
     * 
     */
    public Optional> mongoRoleDefinitionId() {
        return Optional.ofNullable(this.mongoRoleDefinitionId);
    }

    /**
     * A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Scopes higher than Database are not enforceable as privilege.
     * 
     */
    @Import(name="privileges")
    private @Nullable Output> privileges;

    /**
     * @return A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Scopes higher than Database are not enforceable as privilege.
     * 
     */
    public Optional>> privileges() {
        return Optional.ofNullable(this.privileges);
    }

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

    /**
     * A user-friendly name for the Role Definition. Must be unique for the database account.
     * 
     */
    @Import(name="roleName")
    private @Nullable Output roleName;

    /**
     * @return A user-friendly name for the Role Definition. Must be unique for the database account.
     * 
     */
    public Optional> roleName() {
        return Optional.ofNullable(this.roleName);
    }

    /**
     * The set of roles inherited by this Role Definition.
     * 
     */
    @Import(name="roles")
    private @Nullable Output> roles;

    /**
     * @return The set of roles inherited by this Role Definition.
     * 
     */
    public Optional>> roles() {
        return Optional.ofNullable(this.roles);
    }

    /**
     * Indicates whether the Role Definition was built-in or user created.
     * 
     */
    @Import(name="type")
    private @Nullable Output type;

    /**
     * @return Indicates whether the Role Definition was built-in or user created.
     * 
     */
    public Optional> type() {
        return Optional.ofNullable(this.type);
    }

    private MongoDBResourceMongoRoleDefinitionArgs() {}

    private MongoDBResourceMongoRoleDefinitionArgs(MongoDBResourceMongoRoleDefinitionArgs $) {
        this.accountName = $.accountName;
        this.databaseName = $.databaseName;
        this.mongoRoleDefinitionId = $.mongoRoleDefinitionId;
        this.privileges = $.privileges;
        this.resourceGroupName = $.resourceGroupName;
        this.roleName = $.roleName;
        this.roles = $.roles;
        this.type = $.type;
    }

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

    public static final class Builder {
        private MongoDBResourceMongoRoleDefinitionArgs $;

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

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

        /**
         * @param accountName Cosmos DB database account name.
         * 
         * @return builder
         * 
         */
        public Builder accountName(Output accountName) {
            $.accountName = accountName;
            return this;
        }

        /**
         * @param accountName Cosmos DB database account name.
         * 
         * @return builder
         * 
         */
        public Builder accountName(String accountName) {
            return accountName(Output.of(accountName));
        }

        /**
         * @param databaseName The database name for which access is being granted for this Role Definition.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(@Nullable Output databaseName) {
            $.databaseName = databaseName;
            return this;
        }

        /**
         * @param databaseName The database name for which access is being granted for this Role Definition.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(String databaseName) {
            return databaseName(Output.of(databaseName));
        }

        /**
         * @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
         * 
         * @return builder
         * 
         */
        public Builder mongoRoleDefinitionId(@Nullable Output mongoRoleDefinitionId) {
            $.mongoRoleDefinitionId = mongoRoleDefinitionId;
            return this;
        }

        /**
         * @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
         * 
         * @return builder
         * 
         */
        public Builder mongoRoleDefinitionId(String mongoRoleDefinitionId) {
            return mongoRoleDefinitionId(Output.of(mongoRoleDefinitionId));
        }

        /**
         * @param privileges A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Scopes higher than Database are not enforceable as privilege.
         * 
         * @return builder
         * 
         */
        public Builder privileges(@Nullable Output> privileges) {
            $.privileges = privileges;
            return this;
        }

        /**
         * @param privileges A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Scopes higher than Database are not enforceable as privilege.
         * 
         * @return builder
         * 
         */
        public Builder privileges(List privileges) {
            return privileges(Output.of(privileges));
        }

        /**
         * @param privileges A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Scopes higher than Database are not enforceable as privilege.
         * 
         * @return builder
         * 
         */
        public Builder privileges(PrivilegeArgs... privileges) {
            return privileges(List.of(privileges));
        }

        /**
         * @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 roleName A user-friendly name for the Role Definition. Must be unique for the database account.
         * 
         * @return builder
         * 
         */
        public Builder roleName(@Nullable Output roleName) {
            $.roleName = roleName;
            return this;
        }

        /**
         * @param roleName A user-friendly name for the Role Definition. Must be unique for the database account.
         * 
         * @return builder
         * 
         */
        public Builder roleName(String roleName) {
            return roleName(Output.of(roleName));
        }

        /**
         * @param roles The set of roles inherited by this Role Definition.
         * 
         * @return builder
         * 
         */
        public Builder roles(@Nullable Output> roles) {
            $.roles = roles;
            return this;
        }

        /**
         * @param roles The set of roles inherited by this Role Definition.
         * 
         * @return builder
         * 
         */
        public Builder roles(List roles) {
            return roles(Output.of(roles));
        }

        /**
         * @param roles The set of roles inherited by this Role Definition.
         * 
         * @return builder
         * 
         */
        public Builder roles(RoleArgs... roles) {
            return roles(List.of(roles));
        }

        /**
         * @param type Indicates whether the Role Definition was built-in or user created.
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Indicates whether the Role Definition was built-in or user created.
         * 
         * @return builder
         * 
         */
        public Builder type(MongoRoleDefinitionType type) {
            return type(Output.of(type));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy