SpringCloudAppCosmosDBAssociation

class SpringCloudAppCosmosDBAssociation : KotlinCustomResource

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

Properties

Link copied to clipboard
val apiType: Output<String>

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

Specifies the CosmosDB Account access key.

Link copied to clipboard

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

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

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

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

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 id: Output<String>
Link copied to clipboard
val name: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard
val urn: Output<String>