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

com.pulumi.azure.appplatform.kotlin.SpringCloudAppArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.appplatform.kotlin

import com.pulumi.azure.appplatform.SpringCloudAppArgs.builder
import com.pulumi.azure.appplatform.kotlin.inputs.SpringCloudAppCustomPersistentDiskArgs
import com.pulumi.azure.appplatform.kotlin.inputs.SpringCloudAppCustomPersistentDiskArgsBuilder
import com.pulumi.azure.appplatform.kotlin.inputs.SpringCloudAppIdentityArgs
import com.pulumi.azure.appplatform.kotlin.inputs.SpringCloudAppIdentityArgsBuilder
import com.pulumi.azure.appplatform.kotlin.inputs.SpringCloudAppIngressSettingsArgs
import com.pulumi.azure.appplatform.kotlin.inputs.SpringCloudAppIngressSettingsArgsBuilder
import com.pulumi.azure.appplatform.kotlin.inputs.SpringCloudAppPersistentDiskArgs
import com.pulumi.azure.appplatform.kotlin.inputs.SpringCloudAppPersistentDiskArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Manage an Azure Spring Cloud Application.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleSpringCloudService = new azure.appplatform.SpringCloudService("example", {
 *     name: "example-springcloud",
 *     resourceGroupName: example.name,
 *     location: example.location,
 * });
 * const exampleSpringCloudApp = new azure.appplatform.SpringCloudApp("example", {
 *     name: "example-springcloudapp",
 *     resourceGroupName: example.name,
 *     serviceName: exampleSpringCloudService.name,
 *     identity: {
 *         type: "SystemAssigned",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_spring_cloud_service = azure.appplatform.SpringCloudService("example",
 *     name="example-springcloud",
 *     resource_group_name=example.name,
 *     location=example.location)
 * example_spring_cloud_app = azure.appplatform.SpringCloudApp("example",
 *     name="example-springcloudapp",
 *     resource_group_name=example.name,
 *     service_name=example_spring_cloud_service.name,
 *     identity={
 *         "type": "SystemAssigned",
 *     })
 * ```
 * ```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-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleSpringCloudService = new Azure.AppPlatform.SpringCloudService("example", new()
 *     {
 *         Name = "example-springcloud",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *     });
 *     var exampleSpringCloudApp = new Azure.AppPlatform.SpringCloudApp("example", new()
 *     {
 *         Name = "example-springcloudapp",
 *         ResourceGroupName = example.Name,
 *         ServiceName = exampleSpringCloudService.Name,
 *         Identity = new Azure.AppPlatform.Inputs.SpringCloudAppIdentityArgs
 *         {
 *             Type = "SystemAssigned",
 *         },
 *     });
 * });
 * ```
 * ```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-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
 * 			Name:              pulumi.String("example-springcloud"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
 * 			Name:              pulumi.String("example-springcloudapp"),
 * 			ResourceGroupName: example.Name,
 * 			ServiceName:       exampleSpringCloudService.Name,
 * 			Identity: &appplatform.SpringCloudAppIdentityArgs{
 * 				Type: pulumi.String("SystemAssigned"),
 * 			},
 * 		})
 * 		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.SpringCloudApp;
 * import com.pulumi.azure.appplatform.SpringCloudAppArgs;
 * import com.pulumi.azure.appplatform.inputs.SpringCloudAppIdentityArgs;
 * 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-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleSpringCloudService = new SpringCloudService("exampleSpringCloudService", SpringCloudServiceArgs.builder()
 *             .name("example-springcloud")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .build());
 *         var exampleSpringCloudApp = new SpringCloudApp("exampleSpringCloudApp", SpringCloudAppArgs.builder()
 *             .name("example-springcloudapp")
 *             .resourceGroupName(example.name())
 *             .serviceName(exampleSpringCloudService.name())
 *             .identity(SpringCloudAppIdentityArgs.builder()
 *                 .type("SystemAssigned")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleSpringCloudService:
 *     type: azure:appplatform:SpringCloudService
 *     name: example
 *     properties:
 *       name: example-springcloud
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *   exampleSpringCloudApp:
 *     type: azure:appplatform:SpringCloudApp
 *     name: example
 *     properties:
 *       name: example-springcloudapp
 *       resourceGroupName: ${example.name}
 *       serviceName: ${exampleSpringCloudService.name}
 *       identity:
 *         type: SystemAssigned
 * ```
 * 
 * ## Import
 * Spring Cloud Application can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:appplatform/springCloudApp:SpringCloudApp example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.AppPlatform/spring/myservice/apps/myapp
 * ```
 * @property addonJson A JSON object that contains the addon configurations of the Spring Cloud Service.
 * @property customPersistentDisks A `custom_persistent_disk` block as defined below.
 * @property httpsOnly Is only HTTPS allowed? Defaults to `false`.
 * @property identity An `identity` block as defined below.
 * @property ingressSettings An `ingress_settings` block as defined below.
 * @property isPublic Does the Spring Cloud Application have public endpoint? Defaults to `false`.
 * @property name Specifies the name of the Spring Cloud Application. Changing this forces a new resource to be created.
 * @property persistentDisk An `persistent_disk` block as defined below.
 * @property publicEndpointEnabled Should the App in vnet injection instance exposes endpoint which could be accessed from Internet?
 * @property resourceGroupName Specifies the name of the resource group in which to create the Spring Cloud Application. Changing this forces a new resource to be created.
 * @property serviceName Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
 * @property tlsEnabled Is End to End TLS Enabled? Defaults to `false`.
 */
public data class SpringCloudAppArgs(
    public val addonJson: Output? = null,
    public val customPersistentDisks: Output>? = null,
    public val httpsOnly: Output? = null,
    public val identity: Output? = null,
    public val ingressSettings: Output? = null,
    public val isPublic: Output? = null,
    public val name: Output? = null,
    public val persistentDisk: Output? = null,
    public val publicEndpointEnabled: Output? = null,
    public val resourceGroupName: Output? = null,
    public val serviceName: Output? = null,
    public val tlsEnabled: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.appplatform.SpringCloudAppArgs =
        com.pulumi.azure.appplatform.SpringCloudAppArgs.builder()
            .addonJson(addonJson?.applyValue({ args0 -> args0 }))
            .customPersistentDisks(
                customPersistentDisks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .httpsOnly(httpsOnly?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ingressSettings(ingressSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .isPublic(isPublic?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .persistentDisk(persistentDisk?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .publicEndpointEnabled(publicEndpointEnabled?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .serviceName(serviceName?.applyValue({ args0 -> args0 }))
            .tlsEnabled(tlsEnabled?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SpringCloudAppArgs].
 */
@PulumiTagMarker
public class SpringCloudAppArgsBuilder internal constructor() {
    private var addonJson: Output? = null

    private var customPersistentDisks: Output>? = null

    private var httpsOnly: Output? = null

    private var identity: Output? = null

    private var ingressSettings: Output? = null

    private var isPublic: Output? = null

    private var name: Output? = null

    private var persistentDisk: Output? = null

    private var publicEndpointEnabled: Output? = null

    private var resourceGroupName: Output? = null

    private var serviceName: Output? = null

    private var tlsEnabled: Output? = null

    /**
     * @param value A JSON object that contains the addon configurations of the Spring Cloud Service.
     */
    @JvmName("spcupolhfrtwjucv")
    public suspend fun addonJson(`value`: Output) {
        this.addonJson = value
    }

    /**
     * @param value A `custom_persistent_disk` block as defined below.
     */
    @JvmName("dvukceslltpjjimt")
    public suspend fun customPersistentDisks(`value`: Output>) {
        this.customPersistentDisks = value
    }

    @JvmName("waeocphihmtmynne")
    public suspend fun customPersistentDisks(vararg values: Output) {
        this.customPersistentDisks = Output.all(values.asList())
    }

    /**
     * @param values A `custom_persistent_disk` block as defined below.
     */
    @JvmName("chmsvxodbhgbllfe")
    public suspend fun customPersistentDisks(values: List>) {
        this.customPersistentDisks = Output.all(values)
    }

    /**
     * @param value Is only HTTPS allowed? Defaults to `false`.
     */
    @JvmName("gabadtcfrlvqdiyj")
    public suspend fun httpsOnly(`value`: Output) {
        this.httpsOnly = value
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("kjoudpkcxevouykg")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value An `ingress_settings` block as defined below.
     */
    @JvmName("cnkyhmnaasqsxqec")
    public suspend fun ingressSettings(`value`: Output) {
        this.ingressSettings = value
    }

    /**
     * @param value Does the Spring Cloud Application have public endpoint? Defaults to `false`.
     */
    @JvmName("snwkikoskuswgooi")
    public suspend fun isPublic(`value`: Output) {
        this.isPublic = value
    }

    /**
     * @param value Specifies the name of the Spring Cloud Application. Changing this forces a new resource to be created.
     */
    @JvmName("ofdfdfhowltjyenw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value An `persistent_disk` block as defined below.
     */
    @JvmName("hgvjhberohogumcj")
    public suspend fun persistentDisk(`value`: Output) {
        this.persistentDisk = value
    }

    /**
     * @param value Should the App in vnet injection instance exposes endpoint which could be accessed from Internet?
     */
    @JvmName("fomcadqdirgwfmxv")
    public suspend fun publicEndpointEnabled(`value`: Output) {
        this.publicEndpointEnabled = value
    }

    /**
     * @param value Specifies the name of the resource group in which to create the Spring Cloud Application. Changing this forces a new resource to be created.
     */
    @JvmName("umwjaoahucjvgfdt")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
     */
    @JvmName("rlhfjnxluuehqyqm")
    public suspend fun serviceName(`value`: Output) {
        this.serviceName = value
    }

    /**
     * @param value Is End to End TLS Enabled? Defaults to `false`.
     */
    @JvmName("cfygmfyqkuvgoqwe")
    public suspend fun tlsEnabled(`value`: Output) {
        this.tlsEnabled = value
    }

    /**
     * @param value A JSON object that contains the addon configurations of the Spring Cloud Service.
     */
    @JvmName("dvxfkcfsahorujun")
    public suspend fun addonJson(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.addonJson = mapped
    }

    /**
     * @param value A `custom_persistent_disk` block as defined below.
     */
    @JvmName("dtnpcwlqsatmwnte")
    public suspend fun customPersistentDisks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customPersistentDisks = mapped
    }

    /**
     * @param argument A `custom_persistent_disk` block as defined below.
     */
    @JvmName("uevxiwhowaflouqi")
    public suspend fun customPersistentDisks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SpringCloudAppCustomPersistentDiskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customPersistentDisks = mapped
    }

    /**
     * @param argument A `custom_persistent_disk` block as defined below.
     */
    @JvmName("qrunrxdemdwxuvuq")
    public suspend fun customPersistentDisks(vararg argument: suspend SpringCloudAppCustomPersistentDiskArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SpringCloudAppCustomPersistentDiskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customPersistentDisks = mapped
    }

    /**
     * @param argument A `custom_persistent_disk` block as defined below.
     */
    @JvmName("evvxjcfuunlhnyfo")
    public suspend fun customPersistentDisks(argument: suspend SpringCloudAppCustomPersistentDiskArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SpringCloudAppCustomPersistentDiskArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.customPersistentDisks = mapped
    }

    /**
     * @param values A `custom_persistent_disk` block as defined below.
     */
    @JvmName("bmcdcyckhiqiqhxq")
    public suspend fun customPersistentDisks(vararg values: SpringCloudAppCustomPersistentDiskArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customPersistentDisks = mapped
    }

    /**
     * @param value Is only HTTPS allowed? Defaults to `false`.
     */
    @JvmName("crxiilitdyfwhmfw")
    public suspend fun httpsOnly(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpsOnly = mapped
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("keghnxosaqixmehb")
    public suspend fun identity(`value`: SpringCloudAppIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below.
     */
    @JvmName("nkthkrdnwsplnonf")
    public suspend fun identity(argument: suspend SpringCloudAppIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = SpringCloudAppIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value An `ingress_settings` block as defined below.
     */
    @JvmName("pnihnuubcqpulvrd")
    public suspend fun ingressSettings(`value`: SpringCloudAppIngressSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ingressSettings = mapped
    }

    /**
     * @param argument An `ingress_settings` block as defined below.
     */
    @JvmName("xccwfdjfihvptdgv")
    public suspend fun ingressSettings(argument: suspend SpringCloudAppIngressSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = SpringCloudAppIngressSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ingressSettings = mapped
    }

    /**
     * @param value Does the Spring Cloud Application have public endpoint? Defaults to `false`.
     */
    @JvmName("yqayqybbknnwtbhm")
    public suspend fun isPublic(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isPublic = mapped
    }

    /**
     * @param value Specifies the name of the Spring Cloud Application. Changing this forces a new resource to be created.
     */
    @JvmName("pwaamafjucbergtx")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value An `persistent_disk` block as defined below.
     */
    @JvmName("eduojurumhidgwtm")
    public suspend fun persistentDisk(`value`: SpringCloudAppPersistentDiskArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.persistentDisk = mapped
    }

    /**
     * @param argument An `persistent_disk` block as defined below.
     */
    @JvmName("mpqywxkmrtuncaeb")
    public suspend fun persistentDisk(argument: suspend SpringCloudAppPersistentDiskArgsBuilder.() -> Unit) {
        val toBeMapped = SpringCloudAppPersistentDiskArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.persistentDisk = mapped
    }

    /**
     * @param value Should the App in vnet injection instance exposes endpoint which could be accessed from Internet?
     */
    @JvmName("hiwrfktcfnhmivom")
    public suspend fun publicEndpointEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicEndpointEnabled = mapped
    }

    /**
     * @param value Specifies the name of the resource group in which to create the Spring Cloud Application. Changing this forces a new resource to be created.
     */
    @JvmName("jkawfjfommrgkayr")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
     */
    @JvmName("hsicliqxntbikggt")
    public suspend fun serviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceName = mapped
    }

    /**
     * @param value Is End to End TLS Enabled? Defaults to `false`.
     */
    @JvmName("ajfihjjbagjpnyyc")
    public suspend fun tlsEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tlsEnabled = mapped
    }

    internal fun build(): SpringCloudAppArgs = SpringCloudAppArgs(
        addonJson = addonJson,
        customPersistentDisks = customPersistentDisks,
        httpsOnly = httpsOnly,
        identity = identity,
        ingressSettings = ingressSettings,
        isPublic = isPublic,
        name = name,
        persistentDisk = persistentDisk,
        publicEndpointEnabled = publicEndpointEnabled,
        resourceGroupName = resourceGroupName,
        serviceName = serviceName,
        tlsEnabled = tlsEnabled,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy