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

com.pulumi.azure.cosmosdb.CassandraDatacenter Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.cosmosdb;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.cosmosdb.CassandraDatacenterArgs;
import com.pulumi.azure.cosmosdb.inputs.CassandraDatacenterState;
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.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Cassandra Datacenter.
 * 
 * > **NOTE:** In order for the `Azure Managed Instances for Apache Cassandra` to work properly the product requires the `Azure Cosmos DB` Application ID to be present and working in your tenant. If the `Azure Cosmos DB` Application ID is missing in your environment you will need to have an administrator of your tenant run the following command to add the `Azure Cosmos DB` Application ID to your tenant:
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azuread.AzureadFunctions;
 * import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
 * import com.pulumi.azure.authorization.Assignment;
 * import com.pulumi.azure.authorization.AssignmentArgs;
 * import com.pulumi.azure.cosmosdb.CassandraCluster;
 * import com.pulumi.azure.cosmosdb.CassandraClusterArgs;
 * import com.pulumi.azure.cosmosdb.CassandraDatacenter;
 * import com.pulumi.azure.cosmosdb.CassandraDatacenterArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
 *             .name("accexample-rg")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("example-vnet")
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .addressSpaces("10.0.0.0/16")
 *             .build());
 * 
 *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
 *             .name("example-subnet")
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.0.1.0/24")
 *             .build());
 * 
 *         final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
 *             .displayName("Azure Cosmos DB")
 *             .build());
 * 
 *         var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()
 *             .scope(exampleVirtualNetwork.id())
 *             .roleDefinitionName("Network Contributor")
 *             .principalId(example.applyValue(getServicePrincipalResult -> getServicePrincipalResult.objectId()))
 *             .build());
 * 
 *         var exampleCassandraCluster = new CassandraCluster("exampleCassandraCluster", CassandraClusterArgs.builder()
 *             .name("example-cluster")
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .delegatedManagementSubnetId(exampleSubnet.id())
 *             .defaultAdminPassword("Password1234")
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(exampleAssignment)
 *                 .build());
 * 
 *         var exampleCassandraDatacenter = new CassandraDatacenter("exampleCassandraDatacenter", CassandraDatacenterArgs.builder()
 *             .name("example-datacenter")
 *             .location(exampleCassandraCluster.location())
 *             .cassandraClusterId(exampleCassandraCluster.id())
 *             .delegatedManagementSubnetId(exampleSubnet.id())
 *             .nodeCount(3)
 *             .diskCount(4)
 *             .skuName("Standard_DS14_v2")
 *             .availabilityZonesEnabled(false)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Cassandra Datacenters can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:cosmosdb/cassandraDatacenter:CassandraDatacenter example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DocumentDB/cassandraClusters/cluster1/dataCenters/dc1 * ``` * */ @ResourceType(type="azure:cosmosdb/cassandraDatacenter:CassandraDatacenter") public class CassandraDatacenter extends com.pulumi.resources.CustomResource { /** * Determines whether availability zones are enabled. Defaults to `true`. * */ @Export(name="availabilityZonesEnabled", refs={Boolean.class}, tree="[0]") private Output availabilityZonesEnabled; /** * @return Determines whether availability zones are enabled. Defaults to `true`. * */ public Output> availabilityZonesEnabled() { return Codegen.optional(this.availabilityZonesEnabled); } /** * The key URI of the customer key to use for the encryption of the backup Storage Account. * */ @Export(name="backupStorageCustomerKeyUri", refs={String.class}, tree="[0]") private Output backupStorageCustomerKeyUri; /** * @return The key URI of the customer key to use for the encryption of the backup Storage Account. * */ public Output> backupStorageCustomerKeyUri() { return Codegen.optional(this.backupStorageCustomerKeyUri); } /** * The fragment of the cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this Cassandra Datacenter. The fragment should be Base64 encoded and only a subset of keys is allowed. * */ @Export(name="base64EncodedYamlFragment", refs={String.class}, tree="[0]") private Output base64EncodedYamlFragment; /** * @return The fragment of the cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this Cassandra Datacenter. The fragment should be Base64 encoded and only a subset of keys is allowed. * */ public Output> base64EncodedYamlFragment() { return Codegen.optional(this.base64EncodedYamlFragment); } /** * The ID of the Cassandra Cluster. Changing this forces a new Cassandra Datacenter to be created. * */ @Export(name="cassandraClusterId", refs={String.class}, tree="[0]") private Output cassandraClusterId; /** * @return The ID of the Cassandra Cluster. Changing this forces a new Cassandra Datacenter to be created. * */ public Output cassandraClusterId() { return this.cassandraClusterId; } /** * The ID of the delegated management subnet for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created. * */ @Export(name="delegatedManagementSubnetId", refs={String.class}, tree="[0]") private Output delegatedManagementSubnetId; /** * @return The ID of the delegated management subnet for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created. * */ public Output delegatedManagementSubnetId() { return this.delegatedManagementSubnetId; } /** * Determines the number of p30 disks that are attached to each node. * */ @Export(name="diskCount", refs={Integer.class}, tree="[0]") private Output diskCount; /** * @return Determines the number of p30 disks that are attached to each node. * */ public Output> diskCount() { return Codegen.optional(this.diskCount); } /** * The Disk SKU that is used for this Cassandra Datacenter. Defaults to `P30`. * */ @Export(name="diskSku", refs={String.class}, tree="[0]") private Output diskSku; /** * @return The Disk SKU that is used for this Cassandra Datacenter. Defaults to `P30`. * */ public Output> diskSku() { return Codegen.optional(this.diskSku); } /** * The Azure Region where the Cassandra Datacenter should exist. Changing this forces a new Cassandra Datacenter to be created. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The Azure Region where the Cassandra Datacenter should exist. Changing this forces a new Cassandra Datacenter to be created. * */ public Output location() { return this.location; } /** * The key URI of the customer key to use for the encryption of the Managed Disk. * */ @Export(name="managedDiskCustomerKeyUri", refs={String.class}, tree="[0]") private Output managedDiskCustomerKeyUri; /** * @return The key URI of the customer key to use for the encryption of the Managed Disk. * */ public Output> managedDiskCustomerKeyUri() { return Codegen.optional(this.managedDiskCustomerKeyUri); } /** * The name which should be used for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name which should be used for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created. * */ public Output name() { return this.name; } /** * The number of nodes the Cassandra Datacenter should have. The number should be equal or greater than `3`. Defaults to `3`. * */ @Export(name="nodeCount", refs={Integer.class}, tree="[0]") private Output nodeCount; /** * @return The number of nodes the Cassandra Datacenter should have. The number should be equal or greater than `3`. Defaults to `3`. * */ public Output> nodeCount() { return Codegen.optional(this.nodeCount); } /** * A list of IP Address for the seed nodes in this Cassandra Datacenter. * */ @Export(name="seedNodeIpAddresses", refs={List.class,String.class}, tree="[0,1]") private Output> seedNodeIpAddresses; /** * @return A list of IP Address for the seed nodes in this Cassandra Datacenter. * */ public Output> seedNodeIpAddresses() { return this.seedNodeIpAddresses; } /** * Determines the selected sku. * * > **NOTE:** In v4.0 of the provider the `sku_name` will have a default value of `Standard_E16s_v5`. * */ @Export(name="skuName", refs={String.class}, tree="[0]") private Output skuName; /** * @return Determines the selected sku. * * > **NOTE:** In v4.0 of the provider the `sku_name` will have a default value of `Standard_E16s_v5`. * */ public Output> skuName() { return Codegen.optional(this.skuName); } /** * * @param name The _unique_ name of the resulting resource. */ public CassandraDatacenter(java.lang.String name) { this(name, CassandraDatacenterArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public CassandraDatacenter(java.lang.String name, CassandraDatacenterArgs 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 CassandraDatacenter(java.lang.String name, CassandraDatacenterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:cosmosdb/cassandraDatacenter:CassandraDatacenter", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private CassandraDatacenter(java.lang.String name, Output id, @Nullable CassandraDatacenterState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:cosmosdb/cassandraDatacenter:CassandraDatacenter", name, state, makeResourceOptions(options, id), false); } private static CassandraDatacenterArgs makeArgs(CassandraDatacenterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? CassandraDatacenterArgs.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 CassandraDatacenter get(java.lang.String name, Output id, @Nullable CassandraDatacenterState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new CassandraDatacenter(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy