Please wait. This can take some minutes ...
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.
com.pulumi.azure.appplatform.kotlin.SpringCloudAccelerator.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.appplatform.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [SpringCloudAccelerator].
*/
@PulumiTagMarker
public class SpringCloudAcceleratorResourceBuilder internal constructor() {
public var name: String? = null
public var args: SpringCloudAcceleratorArgs = SpringCloudAcceleratorArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend SpringCloudAcceleratorArgsBuilder.() -> Unit) {
val builder = SpringCloudAcceleratorArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): SpringCloudAccelerator {
val builtJavaResource =
com.pulumi.azure.appplatform.SpringCloudAccelerator(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SpringCloudAccelerator(builtJavaResource)
}
}
/**
* > **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier.
* Manages a Spring Cloud Accelerator.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example",
* location: "West Europe",
* });
* const exampleSpringCloudService = new azure.appplatform.SpringCloudService("example", {
* name: "example",
* location: example.location,
* resourceGroupName: example.name,
* skuName: "E0",
* });
* const exampleSpringCloudAccelerator = new azure.appplatform.SpringCloudAccelerator("example", {
* name: "default",
* springCloudServiceId: exampleSpringCloudService.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example",
* location="West Europe")
* example_spring_cloud_service = azure.appplatform.SpringCloudService("example",
* name="example",
* location=example.location,
* resource_group_name=example.name,
* sku_name="E0")
* example_spring_cloud_accelerator = azure.appplatform.SpringCloudAccelerator("example",
* name="default",
* spring_cloud_service_id=example_spring_cloud_service.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example",
* Location = "West Europe",
* });
* var exampleSpringCloudService = new Azure.AppPlatform.SpringCloudService("example", new()
* {
* Name = "example",
* Location = example.Location,
* ResourceGroupName = example.Name,
* SkuName = "E0",
* });
* var exampleSpringCloudAccelerator = new Azure.AppPlatform.SpringCloudAccelerator("example", new()
* {
* Name = "default",
* SpringCloudServiceId = exampleSpringCloudService.Id,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appplatform"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
* Name: pulumi.String("example"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* SkuName: pulumi.String("E0"),
* })
* if err != nil {
* return err
* }
* _, err = appplatform.NewSpringCloudAccelerator(ctx, "example", &appplatform.SpringCloudAcceleratorArgs{
* Name: pulumi.String("default"),
* SpringCloudServiceId: exampleSpringCloudService.ID(),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.SpringCloudAccelerator;
* import com.pulumi.azure.appplatform.SpringCloudAcceleratorArgs;
* 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("example")
* .location("West Europe")
* .build());
* var exampleSpringCloudService = new SpringCloudService("exampleSpringCloudService", SpringCloudServiceArgs.builder()
* .name("example")
* .location(example.location())
* .resourceGroupName(example.name())
* .skuName("E0")
* .build());
* var exampleSpringCloudAccelerator = new SpringCloudAccelerator("exampleSpringCloudAccelerator", SpringCloudAcceleratorArgs.builder()
* .name("default")
* .springCloudServiceId(exampleSpringCloudService.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example
* location: West Europe
* exampleSpringCloudService:
* type: azure:appplatform:SpringCloudService
* name: example
* properties:
* name: example
* location: ${example.location}
* resourceGroupName: ${example.name}
* skuName: E0
* exampleSpringCloudAccelerator:
* type: azure:appplatform:SpringCloudAccelerator
* name: example
* properties:
* name: default
* springCloudServiceId: ${exampleSpringCloudService.id}
* ```
*
* ## Import
* Spring Cloud Accelerators can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:appplatform/springCloudAccelerator:SpringCloudAccelerator example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/applicationAccelerators/default
* ```
*/
public class SpringCloudAccelerator internal constructor(
override val javaResource: com.pulumi.azure.appplatform.SpringCloudAccelerator,
) : KotlinCustomResource(javaResource, SpringCloudAcceleratorMapper) {
/**
* The name which should be used for this Spring Cloud Accelerator. Changing this forces a new Spring Cloud Accelerator to be created. The only possible value is `default`.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Accelerator to be created.
*/
public val springCloudServiceId: Output
get() = javaResource.springCloudServiceId().applyValue({ args0 -> args0 })
}
public object SpringCloudAcceleratorMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.appplatform.SpringCloudAccelerator::class == javaResource::class
override fun map(javaResource: Resource): SpringCloudAccelerator =
SpringCloudAccelerator(javaResource as com.pulumi.azure.appplatform.SpringCloudAccelerator)
}
/**
* @see [SpringCloudAccelerator].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [SpringCloudAccelerator].
*/
public suspend fun springCloudAccelerator(
name: String,
block: suspend SpringCloudAcceleratorResourceBuilder.() -> Unit,
): SpringCloudAccelerator {
val builder = SpringCloudAcceleratorResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [SpringCloudAccelerator].
* @param name The _unique_ name of the resulting resource.
*/
public fun springCloudAccelerator(name: String): SpringCloudAccelerator {
val builder = SpringCloudAcceleratorResourceBuilder()
builder.name(name)
return builder.build()
}