com.pulumi.azure.appplatform.kotlin.SpringCloudGatewayCustomDomain.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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 [SpringCloudGatewayCustomDomain].
*/
@PulumiTagMarker
public class SpringCloudGatewayCustomDomainResourceBuilder internal constructor() {
public var name: String? = null
public var args: SpringCloudGatewayCustomDomainArgs = SpringCloudGatewayCustomDomainArgs()
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 SpringCloudGatewayCustomDomainArgsBuilder.() -> Unit) {
val builder = SpringCloudGatewayCustomDomainArgsBuilder()
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(): SpringCloudGatewayCustomDomain {
val builtJavaResource =
com.pulumi.azure.appplatform.SpringCloudGatewayCustomDomain(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SpringCloudGatewayCustomDomain(builtJavaResource)
}
}
/**
* Manages a Spring Cloud Gateway Custom Domain.
* > **NOTE:** This resource is applicable only for Spring Cloud Service with enterprise tier.
* ## 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 exampleSpringCloudGateway = new azure.appplatform.SpringCloudGateway("example", {
* name: "default",
* springCloudServiceId: exampleSpringCloudService.id,
* });
* const exampleSpringCloudGatewayCustomDomain = new azure.appplatform.SpringCloudGatewayCustomDomain("example", {
* name: "example.com",
* springCloudGatewayId: exampleSpringCloudGateway.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_gateway = azure.appplatform.SpringCloudGateway("example",
* name="default",
* spring_cloud_service_id=example_spring_cloud_service.id)
* example_spring_cloud_gateway_custom_domain = azure.appplatform.SpringCloudGatewayCustomDomain("example",
* name="example.com",
* spring_cloud_gateway_id=example_spring_cloud_gateway.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 exampleSpringCloudGateway = new Azure.AppPlatform.SpringCloudGateway("example", new()
* {
* Name = "default",
* SpringCloudServiceId = exampleSpringCloudService.Id,
* });
* var exampleSpringCloudGatewayCustomDomain = new Azure.AppPlatform.SpringCloudGatewayCustomDomain("example", new()
* {
* Name = "example.com",
* SpringCloudGatewayId = exampleSpringCloudGateway.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
* }
* exampleSpringCloudGateway, err := appplatform.NewSpringCloudGateway(ctx, "example", &appplatform.SpringCloudGatewayArgs{
* Name: pulumi.String("default"),
* SpringCloudServiceId: exampleSpringCloudService.ID(),
* })
* if err != nil {
* return err
* }
* _, err = appplatform.NewSpringCloudGatewayCustomDomain(ctx, "example", &appplatform.SpringCloudGatewayCustomDomainArgs{
* Name: pulumi.String("example.com"),
* SpringCloudGatewayId: exampleSpringCloudGateway.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.SpringCloudGateway;
* import com.pulumi.azure.appplatform.SpringCloudGatewayArgs;
* import com.pulumi.azure.appplatform.SpringCloudGatewayCustomDomain;
* import com.pulumi.azure.appplatform.SpringCloudGatewayCustomDomainArgs;
* 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 exampleSpringCloudGateway = new SpringCloudGateway("exampleSpringCloudGateway", SpringCloudGatewayArgs.builder()
* .name("default")
* .springCloudServiceId(exampleSpringCloudService.id())
* .build());
* var exampleSpringCloudGatewayCustomDomain = new SpringCloudGatewayCustomDomain("exampleSpringCloudGatewayCustomDomain", SpringCloudGatewayCustomDomainArgs.builder()
* .name("example.com")
* .springCloudGatewayId(exampleSpringCloudGateway.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
* exampleSpringCloudGateway:
* type: azure:appplatform:SpringCloudGateway
* name: example
* properties:
* name: default
* springCloudServiceId: ${exampleSpringCloudService.id}
* exampleSpringCloudGatewayCustomDomain:
* type: azure:appplatform:SpringCloudGatewayCustomDomain
* name: example
* properties:
* name: example.com
* springCloudGatewayId: ${exampleSpringCloudGateway.id}
* ```
*
* ## Import
* Spring Cloud Gateway Custom Domains can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:appplatform/springCloudGatewayCustomDomain:SpringCloudGatewayCustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/gateways/gateway1/domains/domain1
* ```
*/
public class SpringCloudGatewayCustomDomain internal constructor(
override val javaResource: com.pulumi.azure.appplatform.SpringCloudGatewayCustomDomain,
) : KotlinCustomResource(javaResource, SpringCloudGatewayCustomDomainMapper) {
/**
* The name which should be used for this Spring Cloud Gateway Custom Domain. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
*/
public val springCloudGatewayId: Output
get() = javaResource.springCloudGatewayId().applyValue({ args0 -> args0 })
/**
* Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Gateway Custom Domain.
*/
public val thumbprint: Output?
get() = javaResource.thumbprint().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object SpringCloudGatewayCustomDomainMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.appplatform.SpringCloudGatewayCustomDomain::class == javaResource::class
override fun map(javaResource: Resource): SpringCloudGatewayCustomDomain =
SpringCloudGatewayCustomDomain(
javaResource as
com.pulumi.azure.appplatform.SpringCloudGatewayCustomDomain,
)
}
/**
* @see [SpringCloudGatewayCustomDomain].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [SpringCloudGatewayCustomDomain].
*/
public suspend fun springCloudGatewayCustomDomain(
name: String,
block: suspend SpringCloudGatewayCustomDomainResourceBuilder.() -> Unit,
):
SpringCloudGatewayCustomDomain {
val builder = SpringCloudGatewayCustomDomainResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [SpringCloudGatewayCustomDomain].
* @param name The _unique_ name of the resulting resource.
*/
public fun springCloudGatewayCustomDomain(name: String): SpringCloudGatewayCustomDomain {
val builder = SpringCloudGatewayCustomDomainResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy