SpringCloudAppCosmosDBAssociationArgs

data class SpringCloudAppCosmosDBAssociationArgs(val apiType: Output<String>? = null, val cosmosdbAccessKey: Output<String>? = null, val cosmosdbAccountId: Output<String>? = null, val cosmosdbCassandraKeyspaceName: Output<String>? = null, val cosmosdbGremlinDatabaseName: Output<String>? = null, val cosmosdbGremlinGraphName: Output<String>? = null, val cosmosdbMongoDatabaseName: Output<String>? = null, val cosmosdbSqlDatabaseName: Output<String>? = null, val name: Output<String>? = null, val springCloudAppId: Output<String>? = null) : ConvertibleToJava<SpringCloudAppCosmosDBAssociationArgs>

Associates a Spring Cloud Application with a CosmosDB Account.

Example Usage

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.appplatform.SpringCloudService;
import com.pulumi.azure.appplatform.SpringCloudServiceArgs;
import com.pulumi.azure.appplatform.SpringCloudApp;
import com.pulumi.azure.appplatform.SpringCloudAppArgs;
import com.pulumi.azure.cosmosdb.Account;
import com.pulumi.azure.cosmosdb.AccountArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs;
import com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs;
import com.pulumi.azure.appplatform.SpringCloudAppCosmosDBAssociation;
import com.pulumi.azure.appplatform.SpringCloudAppCosmosDBAssociationArgs;
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()
.location("West Europe")
.build());
var exampleSpringCloudService = new SpringCloudService("exampleSpringCloudService", SpringCloudServiceArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.build());
var exampleSpringCloudApp = new SpringCloudApp("exampleSpringCloudApp", SpringCloudAppArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.serviceName(exampleSpringCloudService.name())
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.offerType("Standard")
.kind("GlobalDocumentDB")
.consistencyPolicy(AccountConsistencyPolicyArgs.builder()
.consistencyLevel("Strong")
.build())
.geoLocations(AccountGeoLocationArgs.builder()
.location(exampleResourceGroup.location())
.failoverPriority(0)
.build())
.build());
var exampleSpringCloudAppCosmosDBAssociation = new SpringCloudAppCosmosDBAssociation("exampleSpringCloudAppCosmosDBAssociation", SpringCloudAppCosmosDBAssociationArgs.builder()
.springCloudAppId(exampleSpringCloudApp.id())
.cosmosdbAccountId(exampleAccount.id())
.apiType("table")
.cosmosdbAccessKey(exampleAccount.primaryKey())
.build());
}
}

Import

Spring Cloud Application CosmosDB Association can be imported using the resource id, e.g.

$ pulumi import azure:appplatform/springCloudAppCosmosDBAssociation:SpringCloudAppCosmosDBAssociation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.AppPlatform/spring/service1/apps/app1/bindings/bind1

Constructors

Link copied to clipboard
fun SpringCloudAppCosmosDBAssociationArgs(apiType: Output<String>? = null, cosmosdbAccessKey: Output<String>? = null, cosmosdbAccountId: Output<String>? = null, cosmosdbCassandraKeyspaceName: Output<String>? = null, cosmosdbGremlinDatabaseName: Output<String>? = null, cosmosdbGremlinGraphName: Output<String>? = null, cosmosdbMongoDatabaseName: Output<String>? = null, cosmosdbSqlDatabaseName: Output<String>? = null, name: Output<String>? = null, springCloudAppId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): SpringCloudAppCosmosDBAssociationArgs

Properties

Link copied to clipboard
val apiType: Output<String>? = null

Specifies the API type which should be used when connecting to the CosmosDB Account. Possible values are cassandra, gremlin, mongo, sql or table. Changing this forces a new resource to be created.

Link copied to clipboard
val cosmosdbAccessKey: Output<String>? = null

Specifies the CosmosDB Account access key.

Link copied to clipboard
val cosmosdbAccountId: Output<String>? = null

Specifies the ID of the CosmosDB Account. Changing this forces a new resource to be created.

Link copied to clipboard

Specifies the name of the Cassandra Keyspace which the Spring Cloud App should be associated with. Should only be set when api_type is cassandra.

Link copied to clipboard
val cosmosdbGremlinDatabaseName: Output<String>? = null

Specifies the name of the Gremlin Database which the Spring Cloud App should be associated with. Should only be set when api_type is gremlin.

Link copied to clipboard
val cosmosdbGremlinGraphName: Output<String>? = null

Specifies the name of the Gremlin Graph which the Spring Cloud App should be associated with. Should only be set when api_type is gremlin.

Link copied to clipboard
val cosmosdbMongoDatabaseName: Output<String>? = null

Specifies the name of the Mongo Database which the Spring Cloud App should be associated with. Should only be set when api_type is mongo.

Link copied to clipboard
val cosmosdbSqlDatabaseName: Output<String>? = null

Specifies the name of the SQL Database which the Spring Cloud App should be associated with. Should only be set when api_type is sql.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.

Link copied to clipboard
val springCloudAppId: Output<String>? = null

Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.