All Downloads are FREE. Search and download functionalities are using the official Maven repository.
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.cloudflare.kotlin.CustomHostnameArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.CustomHostnameArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.CustomHostnameSslArgs
import com.pulumi.cloudflare.kotlin.inputs.CustomHostnameSslArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a Cloudflare custom hostname (also known as SSL for SaaS) resource.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.CustomHostname("example", {
* zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* hostname: "hostname.example.com",
* ssls: [{
* method: "txt",
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.CustomHostname("example",
* zone_id="0da42c8d2132a9ddaf714f9e7c920711",
* hostname="hostname.example.com",
* ssls=[{
* "method": "txt",
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.CustomHostname("example", new()
* {
* ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
* Hostname = "hostname.example.com",
* Ssls = new[]
* {
* new Cloudflare.Inputs.CustomHostnameSslArgs
* {
* Method = "txt",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.NewCustomHostname(ctx, "example", &cloudflare.CustomHostnameArgs{
* ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
* Hostname: pulumi.String("hostname.example.com"),
* Ssls: cloudflare.CustomHostnameSslArray{
* &cloudflare.CustomHostnameSslArgs{
* Method: pulumi.String("txt"),
* },
* },
* })
* 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.cloudflare.CustomHostname;
* import com.pulumi.cloudflare.CustomHostnameArgs;
* import com.pulumi.cloudflare.inputs.CustomHostnameSslArgs;
* 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 CustomHostname("example", CustomHostnameArgs.builder()
* .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
* .hostname("hostname.example.com")
* .ssls(CustomHostnameSslArgs.builder()
* .method("txt")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:CustomHostname
* properties:
* zoneId: 0da42c8d2132a9ddaf714f9e7c920711
* hostname: hostname.example.com
* ssls:
* - method: txt
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/customHostname:CustomHostname example 1d5fdc9e88c8a8c4518b068cd94331fe/0d89c70d-ad9f-4843-b99f-6cc0252067e9
* ```
* @property customMetadata Custom metadata associated with custom hostname. Only supports primitive string values, all other values are accessible via the API directly.
* @property customOriginServer The custom origin server used for certificates.
* @property customOriginSni The [custom origin SNI](https://developers.cloudflare.com/ssl/ssl-for-saas/hostname-specific-behavior/custom-origin) used for certificates.
* @property hostname Hostname you intend to request a certificate for. **Modifying this attribute will force creation of a new resource.**
* @property ssls SSL properties used when creating the custom hostname.
* @property waitForSslPendingValidation Whether to wait for a custom hostname SSL sub-object to reach status `pending_validation` during creation. Defaults to `false`.
* @property zoneId The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
public data class CustomHostnameArgs(
public val customMetadata: Output>? = null,
public val customOriginServer: Output? = null,
public val customOriginSni: Output? = null,
public val hostname: Output? = null,
public val ssls: Output>? = null,
public val waitForSslPendingValidation: Output? = null,
public val zoneId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.CustomHostnameArgs =
com.pulumi.cloudflare.CustomHostnameArgs.builder()
.customMetadata(
customMetadata?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.customOriginServer(customOriginServer?.applyValue({ args0 -> args0 }))
.customOriginSni(customOriginSni?.applyValue({ args0 -> args0 }))
.hostname(hostname?.applyValue({ args0 -> args0 }))
.ssls(ssls?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.waitForSslPendingValidation(waitForSslPendingValidation?.applyValue({ args0 -> args0 }))
.zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [CustomHostnameArgs].
*/
@PulumiTagMarker
public class CustomHostnameArgsBuilder internal constructor() {
private var customMetadata: Output>? = null
private var customOriginServer: Output? = null
private var customOriginSni: Output? = null
private var hostname: Output? = null
private var ssls: Output>? = null
private var waitForSslPendingValidation: Output? = null
private var zoneId: Output? = null
/**
* @param value Custom metadata associated with custom hostname. Only supports primitive string values, all other values are accessible via the API directly.
*/
@JvmName("gyonferywmfrjfjl")
public suspend fun customMetadata(`value`: Output>) {
this.customMetadata = value
}
/**
* @param value The custom origin server used for certificates.
*/
@JvmName("nmmxscjfgqxnilqj")
public suspend fun customOriginServer(`value`: Output) {
this.customOriginServer = value
}
/**
* @param value The [custom origin SNI](https://developers.cloudflare.com/ssl/ssl-for-saas/hostname-specific-behavior/custom-origin) used for certificates.
*/
@JvmName("ndyntoniktkwfybl")
public suspend fun customOriginSni(`value`: Output) {
this.customOriginSni = value
}
/**
* @param value Hostname you intend to request a certificate for. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("vmlubeqfiwlgvbdw")
public suspend fun hostname(`value`: Output) {
this.hostname = value
}
/**
* @param value SSL properties used when creating the custom hostname.
*/
@JvmName("tjkvqirmkwsbhscx")
public suspend fun ssls(`value`: Output>) {
this.ssls = value
}
@JvmName("hrveiygvdwlprebw")
public suspend fun ssls(vararg values: Output) {
this.ssls = Output.all(values.asList())
}
/**
* @param values SSL properties used when creating the custom hostname.
*/
@JvmName("fpenekavyttnhwkn")
public suspend fun ssls(values: List>) {
this.ssls = Output.all(values)
}
/**
* @param value Whether to wait for a custom hostname SSL sub-object to reach status `pending_validation` during creation. Defaults to `false`.
*/
@JvmName("bdrvirwwdlbbmino")
public suspend fun waitForSslPendingValidation(`value`: Output) {
this.waitForSslPendingValidation = value
}
/**
* @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("tnfdischeprxejtw")
public suspend fun zoneId(`value`: Output) {
this.zoneId = value
}
/**
* @param value Custom metadata associated with custom hostname. Only supports primitive string values, all other values are accessible via the API directly.
*/
@JvmName("epnvqnktwsplfgjs")
public suspend fun customMetadata(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.customMetadata = mapped
}
/**
* @param values Custom metadata associated with custom hostname. Only supports primitive string values, all other values are accessible via the API directly.
*/
@JvmName("protkjnvyytgvsim")
public fun customMetadata(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.customMetadata = mapped
}
/**
* @param value The custom origin server used for certificates.
*/
@JvmName("jxirapfogqeyemmi")
public suspend fun customOriginServer(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.customOriginServer = mapped
}
/**
* @param value The [custom origin SNI](https://developers.cloudflare.com/ssl/ssl-for-saas/hostname-specific-behavior/custom-origin) used for certificates.
*/
@JvmName("wgrtudqpctynoevr")
public suspend fun customOriginSni(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.customOriginSni = mapped
}
/**
* @param value Hostname you intend to request a certificate for. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("fekgsaijmrkgprtp")
public suspend fun hostname(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hostname = mapped
}
/**
* @param value SSL properties used when creating the custom hostname.
*/
@JvmName("mancqsqotvvccyvs")
public suspend fun ssls(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ssls = mapped
}
/**
* @param argument SSL properties used when creating the custom hostname.
*/
@JvmName("ssimrkbswbchifft")
public suspend fun ssls(argument: List Unit>) {
val toBeMapped = argument.toList().map {
CustomHostnameSslArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.ssls = mapped
}
/**
* @param argument SSL properties used when creating the custom hostname.
*/
@JvmName("viqntllgfiggrudd")
public suspend fun ssls(vararg argument: suspend CustomHostnameSslArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
CustomHostnameSslArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.ssls = mapped
}
/**
* @param argument SSL properties used when creating the custom hostname.
*/
@JvmName("owyshftldqvyclyp")
public suspend fun ssls(argument: suspend CustomHostnameSslArgsBuilder.() -> Unit) {
val toBeMapped = listOf(CustomHostnameSslArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.ssls = mapped
}
/**
* @param values SSL properties used when creating the custom hostname.
*/
@JvmName("rutauranctahvxdh")
public suspend fun ssls(vararg values: CustomHostnameSslArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.ssls = mapped
}
/**
* @param value Whether to wait for a custom hostname SSL sub-object to reach status `pending_validation` during creation. Defaults to `false`.
*/
@JvmName("tcuibfuqoawfjcsk")
public suspend fun waitForSslPendingValidation(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.waitForSslPendingValidation = mapped
}
/**
* @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("qaxvuuxowtvfktci")
public suspend fun zoneId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.zoneId = mapped
}
internal fun build(): CustomHostnameArgs = CustomHostnameArgs(
customMetadata = customMetadata,
customOriginServer = customOriginServer,
customOriginSni = customOriginSni,
hostname = hostname,
ssls = ssls,
waitForSslPendingValidation = waitForSslPendingValidation,
zoneId = zoneId,
)
}