![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.cloudflare.kotlin.WorkersDomainArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-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.cloudflare.kotlin
import com.pulumi.cloudflare.WorkersDomainArgs.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
/**
* Creates a Worker Custom Domain.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.WorkersDomain("example", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* hostname: "subdomain.example.com",
* service: "my-service",
* zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.WorkersDomain("example",
* account_id="f037e56e89293a057740de681ac9abbe",
* hostname="subdomain.example.com",
* service="my-service",
* zone_id="0da42c8d2132a9ddaf714f9e7c920711")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.WorkersDomain("example", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Hostname = "subdomain.example.com",
* Service = "my-service",
* ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
* });
* });
* ```
* ```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.NewWorkersDomain(ctx, "example", &cloudflare.WorkersDomainArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Hostname: pulumi.String("subdomain.example.com"),
* Service: pulumi.String("my-service"),
* ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
* })
* 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.WorkersDomain;
* import com.pulumi.cloudflare.WorkersDomainArgs;
* 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 WorkersDomain("example", WorkersDomainArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .hostname("subdomain.example.com")
* .service("my-service")
* .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:WorkersDomain
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* hostname: subdomain.example.com
* service: my-service
* zoneId: 0da42c8d2132a9ddaf714f9e7c920711
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/workersDomain:WorkersDomain example /
* ```
* @property accountId The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
* @property environment The name of the Worker environment. Defaults to `production`.
* @property hostname Hostname of the Worker Domain.
* @property service Name of worker script to attach the domain to.
* @property zoneId The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
public data class WorkersDomainArgs(
public val accountId: Output? = null,
public val environment: Output? = null,
public val hostname: Output? = null,
public val service: Output? = null,
public val zoneId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.WorkersDomainArgs =
com.pulumi.cloudflare.WorkersDomainArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.environment(environment?.applyValue({ args0 -> args0 }))
.hostname(hostname?.applyValue({ args0 -> args0 }))
.service(service?.applyValue({ args0 -> args0 }))
.zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [WorkersDomainArgs].
*/
@PulumiTagMarker
public class WorkersDomainArgsBuilder internal constructor() {
private var accountId: Output? = null
private var environment: Output? = null
private var hostname: Output? = null
private var service: Output? = null
private var zoneId: Output? = null
/**
* @param value The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("haascklumjhbbyli")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value The name of the Worker environment. Defaults to `production`.
*/
@JvmName("gqkhwpacyfftcmci")
public suspend fun environment(`value`: Output) {
this.environment = value
}
/**
* @param value Hostname of the Worker Domain.
*/
@JvmName("bggecqmsmjogxpru")
public suspend fun hostname(`value`: Output) {
this.hostname = value
}
/**
* @param value Name of worker script to attach the domain to.
*/
@JvmName("mbtifnaxcthykywt")
public suspend fun service(`value`: Output) {
this.service = value
}
/**
* @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("juobbddmscbqsbgv")
public suspend fun zoneId(`value`: Output) {
this.zoneId = value
}
/**
* @param value The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("jdqoterpgwmajpgo")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value The name of the Worker environment. Defaults to `production`.
*/
@JvmName("lsfchdbvkwgwulhn")
public suspend fun environment(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.environment = mapped
}
/**
* @param value Hostname of the Worker Domain.
*/
@JvmName("nanlemdglvjkkbpq")
public suspend fun hostname(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hostname = mapped
}
/**
* @param value Name of worker script to attach the domain to.
*/
@JvmName("qibsfmgetxblbgek")
public suspend fun service(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.service = mapped
}
/**
* @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("bckdtvljhbwqitcw")
public suspend fun zoneId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.zoneId = mapped
}
internal fun build(): WorkersDomainArgs = WorkersDomainArgs(
accountId = accountId,
environment = environment,
hostname = hostname,
service = service,
zoneId = zoneId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy