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

com.pulumi.gcp.certificatemanager.kotlin.DnsAuthorizationArgs.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.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.certificatemanager.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.certificatemanager.DnsAuthorizationArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * DnsAuthorization represents a HTTP-reachable backend for a DnsAuthorization.
 * ## Example Usage
 * ### Certificate Manager Dns Authorization Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.certificatemanager.DnsAuthorization("default", {
 *     name: "dns-auth",
 *     location: "global",
 *     description: "The default dns",
 *     domain: "subdomain.hashicorptest.com",
 * });
 * export const recordNameToInsert = _default.dnsResourceRecords.apply(dnsResourceRecords => dnsResourceRecords[0].name);
 * export const recordTypeToInsert = _default.dnsResourceRecords.apply(dnsResourceRecords => dnsResourceRecords[0].type);
 * export const recordDataToInsert = _default.dnsResourceRecords.apply(dnsResourceRecords => dnsResourceRecords[0].data);
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.certificatemanager.DnsAuthorization("default",
 *     name="dns-auth",
 *     location="global",
 *     description="The default dns",
 *     domain="subdomain.hashicorptest.com")
 * pulumi.export("recordNameToInsert", default.dns_resource_records[0].name)
 * pulumi.export("recordTypeToInsert", default.dns_resource_records[0].type)
 * pulumi.export("recordDataToInsert", default.dns_resource_records[0].data)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.CertificateManager.DnsAuthorization("default", new()
 *     {
 *         Name = "dns-auth",
 *         Location = "global",
 *         Description = "The default dns",
 *         Domain = "subdomain.hashicorptest.com",
 *     });
 *     return new Dictionary
 *     {
 *         ["recordNameToInsert"] = @default.DnsResourceRecords.Apply(dnsResourceRecords => dnsResourceRecords[0].Name),
 *         ["recordTypeToInsert"] = @default.DnsResourceRecords.Apply(dnsResourceRecords => dnsResourceRecords[0].Type),
 *         ["recordDataToInsert"] = @default.DnsResourceRecords.Apply(dnsResourceRecords => dnsResourceRecords[0].Data),
 *     };
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/certificatemanager"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := certificatemanager.NewDnsAuthorization(ctx, "default", &certificatemanager.DnsAuthorizationArgs{
 * 			Name:        pulumi.String("dns-auth"),
 * 			Location:    pulumi.String("global"),
 * 			Description: pulumi.String("The default dns"),
 * 			Domain:      pulumi.String("subdomain.hashicorptest.com"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		ctx.Export("recordNameToInsert", _default.DnsResourceRecords.ApplyT(func(dnsResourceRecords []certificatemanager.DnsAuthorizationDnsResourceRecord) (*string, error) {
 * 			return &dnsResourceRecords[0].Name, nil
 * 		}).(pulumi.StringPtrOutput))
 * 		ctx.Export("recordTypeToInsert", _default.DnsResourceRecords.ApplyT(func(dnsResourceRecords []certificatemanager.DnsAuthorizationDnsResourceRecord) (*string, error) {
 * 			return &dnsResourceRecords[0].Type, nil
 * 		}).(pulumi.StringPtrOutput))
 * 		ctx.Export("recordDataToInsert", _default.DnsResourceRecords.ApplyT(func(dnsResourceRecords []certificatemanager.DnsAuthorizationDnsResourceRecord) (*string, error) {
 * 			return &dnsResourceRecords[0].Data, nil
 * 		}).(pulumi.StringPtrOutput))
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.certificatemanager.DnsAuthorization;
 * import com.pulumi.gcp.certificatemanager.DnsAuthorizationArgs;
 * 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 default_ = new DnsAuthorization("default", DnsAuthorizationArgs.builder()
 *             .name("dns-auth")
 *             .location("global")
 *             .description("The default dns")
 *             .domain("subdomain.hashicorptest.com")
 *             .build());
 *         ctx.export("recordNameToInsert", default_.dnsResourceRecords().applyValue(dnsResourceRecords -> dnsResourceRecords[0].name()));
 *         ctx.export("recordTypeToInsert", default_.dnsResourceRecords().applyValue(dnsResourceRecords -> dnsResourceRecords[0].type()));
 *         ctx.export("recordDataToInsert", default_.dnsResourceRecords().applyValue(dnsResourceRecords -> dnsResourceRecords[0].data()));
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:certificatemanager:DnsAuthorization
 *     properties:
 *       name: dns-auth
 *       location: global
 *       description: The default dns
 *       domain: subdomain.hashicorptest.com
 * outputs:
 *   recordNameToInsert: ${default.dnsResourceRecords[0].name}
 *   recordTypeToInsert: ${default.dnsResourceRecords[0].type}
 *   recordDataToInsert: ${default.dnsResourceRecords[0].data}
 * ```
 * 
 * ### Certificate Manager Dns Authorization Regional
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.certificatemanager.DnsAuthorization("default", {
 *     name: "dns-auth",
 *     location: "us-central1",
 *     description: "reginal dns",
 *     type: "PER_PROJECT_RECORD",
 *     domain: "subdomain.hashicorptest.com",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.certificatemanager.DnsAuthorization("default",
 *     name="dns-auth",
 *     location="us-central1",
 *     description="reginal dns",
 *     type="PER_PROJECT_RECORD",
 *     domain="subdomain.hashicorptest.com")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.CertificateManager.DnsAuthorization("default", new()
 *     {
 *         Name = "dns-auth",
 *         Location = "us-central1",
 *         Description = "reginal dns",
 *         Type = "PER_PROJECT_RECORD",
 *         Domain = "subdomain.hashicorptest.com",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/certificatemanager"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := certificatemanager.NewDnsAuthorization(ctx, "default", &certificatemanager.DnsAuthorizationArgs{
 * 			Name:        pulumi.String("dns-auth"),
 * 			Location:    pulumi.String("us-central1"),
 * 			Description: pulumi.String("reginal dns"),
 * 			Type:        pulumi.String("PER_PROJECT_RECORD"),
 * 			Domain:      pulumi.String("subdomain.hashicorptest.com"),
 * 		})
 * 		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.certificatemanager.DnsAuthorization;
 * import com.pulumi.gcp.certificatemanager.DnsAuthorizationArgs;
 * 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 default_ = new DnsAuthorization("default", DnsAuthorizationArgs.builder()
 *             .name("dns-auth")
 *             .location("us-central1")
 *             .description("reginal dns")
 *             .type("PER_PROJECT_RECORD")
 *             .domain("subdomain.hashicorptest.com")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:certificatemanager:DnsAuthorization
 *     properties:
 *       name: dns-auth
 *       location: us-central1
 *       description: reginal dns
 *       type: PER_PROJECT_RECORD
 *       domain: subdomain.hashicorptest.com
 * ```
 * 
 * ## Import
 * DnsAuthorization can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/dnsAuthorizations/{{name}}`
 * * `{{project}}/{{location}}/{{name}}`
 * * `{{location}}/{{name}}`
 * When using the `pulumi import` command, DnsAuthorization can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:certificatemanager/dnsAuthorization:DnsAuthorization default projects/{{project}}/locations/{{location}}/dnsAuthorizations/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:certificatemanager/dnsAuthorization:DnsAuthorization default {{project}}/{{location}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:certificatemanager/dnsAuthorization:DnsAuthorization default {{location}}/{{name}}
 * ```
 * @property description A human-readable description of the resource.
 * @property domain A domain which is being authorized. A DnsAuthorization resource covers a
 * single domain and its wildcard, e.g. authorization for "example.com" can
 * be used to issue certificates for "example.com" and "*.example.com".
 * @property labels Set of label tags associated with the DNS Authorization resource.
 * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
 * Please refer to the field `effective_labels` for all of the labels present on the resource.
 * @property location The Certificate Manager location. If not specified, "global" is used.
 * @property name Name of the resource; provided by the client when the resource is created.
 * The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter,
 * and all following characters must be a dash, underscore, letter or digit.
 * - - -
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property type type of DNS authorization. If unset during the resource creation, FIXED_RECORD will
 * be used for global resources, and PER_PROJECT_RECORD will be used for other locations.
 * FIXED_RECORD DNS authorization uses DNS-01 validation method
 * PER_PROJECT_RECORD DNS authorization allows for independent management
 * of Google-managed certificates with DNS authorization across multiple
 * projects.
 * Possible values are: `FIXED_RECORD`, `PER_PROJECT_RECORD`.
 */
public data class DnsAuthorizationArgs(
    public val description: Output? = null,
    public val domain: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.certificatemanager.DnsAuthorizationArgs =
        com.pulumi.gcp.certificatemanager.DnsAuthorizationArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .domain(domain?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DnsAuthorizationArgs].
 */
@PulumiTagMarker
public class DnsAuthorizationArgsBuilder internal constructor() {
    private var description: Output? = null

    private var domain: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var type: Output? = null

    /**
     * @param value A human-readable description of the resource.
     */
    @JvmName("drqwpxyelngrsxnd")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value A domain which is being authorized. A DnsAuthorization resource covers a
     * single domain and its wildcard, e.g. authorization for "example.com" can
     * be used to issue certificates for "example.com" and "*.example.com".
     */
    @JvmName("rnnocyutjdfmvxeb")
    public suspend fun domain(`value`: Output) {
        this.domain = value
    }

    /**
     * @param value Set of label tags associated with the DNS Authorization resource.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("bdmfslsyhvwyaxcy")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The Certificate Manager location. If not specified, "global" is used.
     */
    @JvmName("binlhdsougqcfovs")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Name of the resource; provided by the client when the resource is created.
     * The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter,
     * and all following characters must be a dash, underscore, letter or digit.
     * - - -
     */
    @JvmName("uurucprvwihncujr")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

    /**
     * @param value type of DNS authorization. If unset during the resource creation, FIXED_RECORD will
     * be used for global resources, and PER_PROJECT_RECORD will be used for other locations.
     * FIXED_RECORD DNS authorization uses DNS-01 validation method
     * PER_PROJECT_RECORD DNS authorization allows for independent management
     * of Google-managed certificates with DNS authorization across multiple
     * projects.
     * Possible values are: `FIXED_RECORD`, `PER_PROJECT_RECORD`.
     */
    @JvmName("hqlwsmlvhfoovmky")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value A human-readable description of the resource.
     */
    @JvmName("rxppueuyydoovias")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value A domain which is being authorized. A DnsAuthorization resource covers a
     * single domain and its wildcard, e.g. authorization for "example.com" can
     * be used to issue certificates for "example.com" and "*.example.com".
     */
    @JvmName("ddelppxhjwoowtde")
    public suspend fun domain(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domain = mapped
    }

    /**
     * @param value Set of label tags associated with the DNS Authorization resource.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("dhmayenrapncajhf")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Set of label tags associated with the DNS Authorization resource.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("yoyqulbjysteious")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The Certificate Manager location. If not specified, "global" is used.
     */
    @JvmName("swpvtbkyaoalvedu")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Name of the resource; provided by the client when the resource is created.
     * The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter,
     * and all following characters must be a dash, underscore, letter or digit.
     * - - -
     */
    @JvmName("kmhlqrmknaeeuvia")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

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

    /**
     * @param value type of DNS authorization. If unset during the resource creation, FIXED_RECORD will
     * be used for global resources, and PER_PROJECT_RECORD will be used for other locations.
     * FIXED_RECORD DNS authorization uses DNS-01 validation method
     * PER_PROJECT_RECORD DNS authorization allows for independent management
     * of Google-managed certificates with DNS authorization across multiple
     * projects.
     * Possible values are: `FIXED_RECORD`, `PER_PROJECT_RECORD`.
     */
    @JvmName("kqkbipocmtudyuto")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): DnsAuthorizationArgs = DnsAuthorizationArgs(
        description = description,
        domain = domain,
        labels = labels,
        location = location,
        name = name,
        project = project,
        type = type,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy