Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// *** 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.cosmosdb;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.cosmosdb.MongoRoleDefinitionArgs;
import com.pulumi.azure.cosmosdb.inputs.MongoRoleDefinitionState;
import com.pulumi.azure.cosmosdb.outputs.MongoRoleDefinitionPrivilege;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages a Cosmos DB Mongo Role Definition.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Cosmos DB Mongo Role Definitions can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:cosmosdb/mongoRoleDefinition:MongoRoleDefinition example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1/mongodbRoleDefinitions/dbname1.rolename1
* ```
*
*/
@ResourceType(type="azure:cosmosdb/mongoRoleDefinition:MongoRoleDefinition")
public class MongoRoleDefinition extends com.pulumi.resources.CustomResource {
/**
* The resource ID of the Mongo DB. Changing this forces a new resource to be created.
*
*/
@Export(name="cosmosMongoDatabaseId", refs={String.class}, tree="[0]")
private Output cosmosMongoDatabaseId;
/**
* @return The resource ID of the Mongo DB. Changing this forces a new resource to be created.
*
*/
public Output cosmosMongoDatabaseId() {
return this.cosmosMongoDatabaseId;
}
/**
* A list of Mongo Roles which are inherited to the Mongo Role Definition.
*
* > **Note:** The role that needs to be inherited should exist in the Mongo DB of `cosmos_mongo_database_id`.
*
*/
@Export(name="inheritedRoleNames", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> inheritedRoleNames;
/**
* @return A list of Mongo Roles which are inherited to the Mongo Role Definition.
*
* > **Note:** The role that needs to be inherited should exist in the Mongo DB of `cosmos_mongo_database_id`.
*
*/
public Output>> inheritedRoleNames() {
return Codegen.optional(this.inheritedRoleNames);
}
/**
* A `privilege` block as defined below.
*
*/
@Export(name="privileges", refs={List.class,MongoRoleDefinitionPrivilege.class}, tree="[0,1]")
private Output* @Nullable */ List> privileges;
/**
* @return A `privilege` block as defined below.
*
*/
public Output>> privileges() {
return Codegen.optional(this.privileges);
}
/**
* The user-friendly name for the Mongo Role Definition. It must be unique for the database account. Changing this forces a new resource to be created.
*
*/
@Export(name="roleName", refs={String.class}, tree="[0]")
private Output roleName;
/**
* @return The user-friendly name for the Mongo Role Definition. It must be unique for the database account. Changing this forces a new resource to be created.
*
*/
public Output roleName() {
return this.roleName;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public MongoRoleDefinition(java.lang.String name) {
this(name, MongoRoleDefinitionArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public MongoRoleDefinition(java.lang.String name, MongoRoleDefinitionArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public MongoRoleDefinition(java.lang.String name, MongoRoleDefinitionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:cosmosdb/mongoRoleDefinition:MongoRoleDefinition", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private MongoRoleDefinition(java.lang.String name, Output id, @Nullable MongoRoleDefinitionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:cosmosdb/mongoRoleDefinition:MongoRoleDefinition", name, state, makeResourceOptions(options, id), false);
}
private static MongoRoleDefinitionArgs makeArgs(MongoRoleDefinitionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? MongoRoleDefinitionArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static MongoRoleDefinition get(java.lang.String name, Output id, @Nullable MongoRoleDefinitionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new MongoRoleDefinition(name, id, state, options);
}
}