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

com.pulumi.gcp.appengine.kotlin.DomainMappingArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.appengine.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.appengine.DomainMappingArgs.builder
import com.pulumi.gcp.appengine.kotlin.inputs.DomainMappingSslSettingsArgs
import com.pulumi.gcp.appengine.kotlin.inputs.DomainMappingSslSettingsArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * A domain serving an App Engine application.
 * To get more information about DomainMapping, see:
 * * [API documentation](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.domainMappings)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains)
 * ## Example Usage
 * ### App Engine Domain Mapping Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const domainMapping = new gcp.appengine.DomainMapping("domain_mapping", {
 *     domainName: "verified-domain.com",
 *     sslSettings: {
 *         sslManagementType: "AUTOMATIC",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * domain_mapping = gcp.appengine.DomainMapping("domain_mapping",
 *     domain_name="verified-domain.com",
 *     ssl_settings={
 *         "ssl_management_type": "AUTOMATIC",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var domainMapping = new Gcp.AppEngine.DomainMapping("domain_mapping", new()
 *     {
 *         DomainName = "verified-domain.com",
 *         SslSettings = new Gcp.AppEngine.Inputs.DomainMappingSslSettingsArgs
 *         {
 *             SslManagementType = "AUTOMATIC",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/appengine"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := appengine.NewDomainMapping(ctx, "domain_mapping", &appengine.DomainMappingArgs{
 * 			DomainName: pulumi.String("verified-domain.com"),
 * 			SslSettings: &appengine.DomainMappingSslSettingsArgs{
 * 				SslManagementType: pulumi.String("AUTOMATIC"),
 * 			},
 * 		})
 * 		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.gcp.appengine.DomainMapping;
 * import com.pulumi.gcp.appengine.DomainMappingArgs;
 * import com.pulumi.gcp.appengine.inputs.DomainMappingSslSettingsArgs;
 * 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 domainMapping = new DomainMapping("domainMapping", DomainMappingArgs.builder()
 *             .domainName("verified-domain.com")
 *             .sslSettings(DomainMappingSslSettingsArgs.builder()
 *                 .sslManagementType("AUTOMATIC")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   domainMapping:
 *     type: gcp:appengine:DomainMapping
 *     name: domain_mapping
 *     properties:
 *       domainName: verified-domain.com
 *       sslSettings:
 *         sslManagementType: AUTOMATIC
 * ```
 * 
 * ## Import
 * DomainMapping can be imported using any of these accepted formats:
 * * `apps/{{project}}/domainMappings/{{domain_name}}`
 * * `{{project}}/{{domain_name}}`
 * * `{{domain_name}}`
 * When using the `pulumi import` command, DomainMapping can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:appengine/domainMapping:DomainMapping default apps/{{project}}/domainMappings/{{domain_name}}
 * ```
 * ```sh
 * $ pulumi import gcp:appengine/domainMapping:DomainMapping default {{project}}/{{domain_name}}
 * ```
 * ```sh
 * $ pulumi import gcp:appengine/domainMapping:DomainMapping default {{domain_name}}
 * ```
 * @property domainName Relative name of the domain serving the application. Example: example.com.
 * - - -
 * @property overrideStrategy Whether the domain creation should override any existing mappings for this domain.
 * By default, overrides are rejected.
 * Default value is `STRICT`.
 * Possible values are: `STRICT`, `OVERRIDE`.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property sslSettings SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.
 * Structure is documented below.
 */
public data class DomainMappingArgs(
    public val domainName: Output? = null,
    public val overrideStrategy: Output? = null,
    public val project: Output? = null,
    public val sslSettings: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.appengine.DomainMappingArgs =
        com.pulumi.gcp.appengine.DomainMappingArgs.builder()
            .domainName(domainName?.applyValue({ args0 -> args0 }))
            .overrideStrategy(overrideStrategy?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .sslSettings(sslSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [DomainMappingArgs].
 */
@PulumiTagMarker
public class DomainMappingArgsBuilder internal constructor() {
    private var domainName: Output? = null

    private var overrideStrategy: Output? = null

    private var project: Output? = null

    private var sslSettings: Output? = null

    /**
     * @param value Relative name of the domain serving the application. Example: example.com.
     * - - -
     */
    @JvmName("nvxjaqyruicguwlx")
    public suspend fun domainName(`value`: Output) {
        this.domainName = value
    }

    /**
     * @param value Whether the domain creation should override any existing mappings for this domain.
     * By default, overrides are rejected.
     * Default value is `STRICT`.
     * Possible values are: `STRICT`, `OVERRIDE`.
     */
    @JvmName("kossvpnlckgiinfu")
    public suspend fun overrideStrategy(`value`: Output) {
        this.overrideStrategy = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("udvuhaqrxdvnadev")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.
     * Structure is documented below.
     */
    @JvmName("xjjiiwuluqysyfkm")
    public suspend fun sslSettings(`value`: Output) {
        this.sslSettings = value
    }

    /**
     * @param value Relative name of the domain serving the application. Example: example.com.
     * - - -
     */
    @JvmName("qlrlomlobcpnoacr")
    public suspend fun domainName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainName = mapped
    }

    /**
     * @param value Whether the domain creation should override any existing mappings for this domain.
     * By default, overrides are rejected.
     * Default value is `STRICT`.
     * Possible values are: `STRICT`, `OVERRIDE`.
     */
    @JvmName("twtalkwqsccewjwm")
    public suspend fun overrideStrategy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.overrideStrategy = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("vwntwoimneysxoax")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.
     * Structure is documented below.
     */
    @JvmName("dsgqgappskbgwavr")
    public suspend fun sslSettings(`value`: DomainMappingSslSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sslSettings = mapped
    }

    /**
     * @param argument SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.
     * Structure is documented below.
     */
    @JvmName("xkntextghudbkuyg")
    public suspend fun sslSettings(argument: suspend DomainMappingSslSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = DomainMappingSslSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sslSettings = mapped
    }

    internal fun build(): DomainMappingArgs = DomainMappingArgs(
        domainName = domainName,
        overrideStrategy = overrideStrategy,
        project = project,
        sslSettings = sslSettings,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy