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

com.pulumi.azure.cosmosdb.CassandraTable 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.CassandraTableArgs;
import com.pulumi.azure.cosmosdb.inputs.CassandraTableState;
import com.pulumi.azure.cosmosdb.outputs.CassandraTableAutoscaleSettings;
import com.pulumi.azure.cosmosdb.outputs.CassandraTableSchema;
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.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Cassandra Table within a Cosmos DB Cassandra Keyspace.
 * 
 * ## 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.cosmosdb.Account;
 * import com.pulumi.azure.cosmosdb.AccountArgs;
 * import com.pulumi.azure.cosmosdb.inputs.AccountCapabilityArgs;
 * import com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs;
 * import com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs;
 * import com.pulumi.azure.cosmosdb.CassandraKeyspace;
 * import com.pulumi.azure.cosmosdb.CassandraKeyspaceArgs;
 * import com.pulumi.azure.cosmosdb.CassandraTable;
 * import com.pulumi.azure.cosmosdb.CassandraTableArgs;
 * import com.pulumi.azure.cosmosdb.inputs.CassandraTableSchemaArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("tflex-cosmosdb-account-rg")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("tfex-cosmosdb-account")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .offerType("Standard")
 *             .capabilities(AccountCapabilityArgs.builder()
 *                 .name("EnableCassandra")
 *                 .build())
 *             .consistencyPolicy(AccountConsistencyPolicyArgs.builder()
 *                 .consistencyLevel("Strong")
 *                 .build())
 *             .geoLocations(AccountGeoLocationArgs.builder()
 *                 .location(example.location())
 *                 .failoverPriority(0)
 *                 .build())
 *             .build());
 * 
 *         var exampleCassandraKeyspace = new CassandraKeyspace("exampleCassandraKeyspace", CassandraKeyspaceArgs.builder()
 *             .name("tfex-cosmos-cassandra-keyspace")
 *             .resourceGroupName(exampleAccount.resourceGroupName())
 *             .accountName(exampleAccount.name())
 *             .throughput(400)
 *             .build());
 * 
 *         var exampleCassandraTable = new CassandraTable("exampleCassandraTable", CassandraTableArgs.builder()
 *             .name("testtable")
 *             .cassandraKeyspaceId(exampleCassandraKeyspace.id())
 *             .schema(CassandraTableSchemaArgs.builder()
 *                 .columns(                
 *                     CassandraTableSchemaColumnArgs.builder()
 *                         .name("test1")
 *                         .type("ascii")
 *                         .build(),
 *                     CassandraTableSchemaColumnArgs.builder()
 *                         .name("test2")
 *                         .type("int")
 *                         .build())
 *                 .partitionKeys(CassandraTableSchemaPartitionKeyArgs.builder()
 *                     .name("test1")
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Cosmos Cassandra Table can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:cosmosdb/cassandraTable:CassandraTable ks1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/account1/cassandraKeyspaces/ks1/tables/table1 * ``` * */ @ResourceType(type="azure:cosmosdb/cassandraTable:CassandraTable") public class CassandraTable extends com.pulumi.resources.CustomResource { /** * Time to live of the Analytical Storage. Possible values are between `-1` and `2147483647` except `0`. `-1` means the Analytical Storage never expires. Changing this forces a new resource to be created. * * > **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support * */ @Export(name="analyticalStorageTtl", refs={Integer.class}, tree="[0]") private Output analyticalStorageTtl; /** * @return Time to live of the Analytical Storage. Possible values are between `-1` and `2147483647` except `0`. `-1` means the Analytical Storage never expires. Changing this forces a new resource to be created. * * > **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support * */ public Output> analyticalStorageTtl() { return Codegen.optional(this.analyticalStorageTtl); } @Export(name="autoscaleSettings", refs={CassandraTableAutoscaleSettings.class}, tree="[0]") private Output autoscaleSettings; public Output> autoscaleSettings() { return Codegen.optional(this.autoscaleSettings); } /** * The ID of the Cosmos DB Cassandra Keyspace to create the table within. Changing this forces a new resource to be created. * */ @Export(name="cassandraKeyspaceId", refs={String.class}, tree="[0]") private Output cassandraKeyspaceId; /** * @return The ID of the Cosmos DB Cassandra Keyspace to create the table within. Changing this forces a new resource to be created. * */ public Output cassandraKeyspaceId() { return this.cassandraKeyspaceId; } /** * Time to live of the Cosmos DB Cassandra table. Possible values are at least `-1`. `-1` means the Cassandra table never expires. * */ @Export(name="defaultTtl", refs={Integer.class}, tree="[0]") private Output defaultTtl; /** * @return Time to live of the Cosmos DB Cassandra table. Possible values are at least `-1`. `-1` means the Cassandra table never expires. * */ public Output> defaultTtl() { return Codegen.optional(this.defaultTtl); } /** * Specifies the name of the Cosmos DB Cassandra Table. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Specifies the name of the Cosmos DB Cassandra Table. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * A `schema` block as defined below. * */ @Export(name="schema", refs={CassandraTableSchema.class}, tree="[0]") private Output schema; /** * @return A `schema` block as defined below. * */ public Output schema() { return this.schema; } @Export(name="throughput", refs={Integer.class}, tree="[0]") private Output throughput; public Output throughput() { return this.throughput; } /** * * @param name The _unique_ name of the resulting resource. */ public CassandraTable(java.lang.String name) { this(name, CassandraTableArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public CassandraTable(java.lang.String name, CassandraTableArgs 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 CassandraTable(java.lang.String name, CassandraTableArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:cosmosdb/cassandraTable:CassandraTable", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private CassandraTable(java.lang.String name, Output id, @Nullable CassandraTableState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:cosmosdb/cassandraTable:CassandraTable", name, state, makeResourceOptions(options, id), false); } private static CassandraTableArgs makeArgs(CassandraTableArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? CassandraTableArgs.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 CassandraTable get(java.lang.String name, Output id, @Nullable CassandraTableState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new CassandraTable(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy