com.pulumi.azurenative.web.kotlin.StaticSiteCustomDomainArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.web.kotlin
import com.pulumi.azurenative.web.StaticSiteCustomDomainArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Static Site Custom Domain Overview ARM resource.
* Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2020-12-01.
* Other available API versions: 2023-01-01, 2023-12-01.
* ## Example Usage
* ### Create or update a custom domain for a static site
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var staticSiteCustomDomain = new AzureNative.Web.StaticSiteCustomDomain("staticSiteCustomDomain", new()
* {
* DomainName = "custom.domain.net",
* Name = "testStaticSite0",
* ResourceGroupName = "rg",
* });
* });
* ```
* ```go
* package main
* import (
* web "github.com/pulumi/pulumi-azure-native-sdk/web/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := web.NewStaticSiteCustomDomain(ctx, "staticSiteCustomDomain", &web.StaticSiteCustomDomainArgs{
* DomainName: pulumi.String("custom.domain.net"),
* Name: pulumi.String("testStaticSite0"),
* ResourceGroupName: pulumi.String("rg"),
* })
* 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.azurenative.web.StaticSiteCustomDomain;
* import com.pulumi.azurenative.web.StaticSiteCustomDomainArgs;
* 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 staticSiteCustomDomain = new StaticSiteCustomDomain("staticSiteCustomDomain", StaticSiteCustomDomainArgs.builder()
* .domainName("custom.domain.net")
* .name("testStaticSite0")
* .resourceGroupName("rg")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:web:StaticSiteCustomDomain myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}
* ```
* @property domainName The custom domain to create.
* @property kind Kind of resource.
* @property name Name of the static site.
* @property resourceGroupName Name of the resource group to which the resource belongs.
* @property validationMethod Validation method for adding a custom domain
*/
public data class StaticSiteCustomDomainArgs(
public val domainName: Output? = null,
public val kind: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val validationMethod: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.web.StaticSiteCustomDomainArgs =
com.pulumi.azurenative.web.StaticSiteCustomDomainArgs.builder()
.domainName(domainName?.applyValue({ args0 -> args0 }))
.kind(kind?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.validationMethod(validationMethod?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [StaticSiteCustomDomainArgs].
*/
@PulumiTagMarker
public class StaticSiteCustomDomainArgsBuilder internal constructor() {
private var domainName: Output? = null
private var kind: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var validationMethod: Output? = null
/**
* @param value The custom domain to create.
*/
@JvmName("jgvoushuwlidtoed")
public suspend fun domainName(`value`: Output) {
this.domainName = value
}
/**
* @param value Kind of resource.
*/
@JvmName("opacyepyujbnifkt")
public suspend fun kind(`value`: Output) {
this.kind = value
}
/**
* @param value Name of the static site.
*/
@JvmName("sldjufwjbcloarlw")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Name of the resource group to which the resource belongs.
*/
@JvmName("lupaacaaroctuatm")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Validation method for adding a custom domain
*/
@JvmName("sapfbdryuukopkgp")
public suspend fun validationMethod(`value`: Output) {
this.validationMethod = value
}
/**
* @param value The custom domain to create.
*/
@JvmName("gekyvcopeiuydxet")
public suspend fun domainName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.domainName = mapped
}
/**
* @param value Kind of resource.
*/
@JvmName("kfcecrqydudlwejc")
public suspend fun kind(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value Name of the static site.
*/
@JvmName("wuxmqtqfgttqukxg")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Name of the resource group to which the resource belongs.
*/
@JvmName("arhfjyjdcanvosqt")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Validation method for adding a custom domain
*/
@JvmName("ypoflftrmbiutkxg")
public suspend fun validationMethod(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.validationMethod = mapped
}
internal fun build(): StaticSiteCustomDomainArgs = StaticSiteCustomDomainArgs(
domainName = domainName,
kind = kind,
name = name,
resourceGroupName = resourceGroupName,
validationMethod = validationMethod,
)
}