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

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

/**
 * CertificateMap defines a collection of certificate configurations,
 * which are usable by any associated target proxies
 * ## Example Usage
 * ### Certificate Manager Certificate Map Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.certificatemanager.CertificateMap("default", {
 *     name: "cert-map",
 *     description: "My acceptance test certificate map",
 *     labels: {
 *         terraform: "true",
 *         "acc-test": "true",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.certificatemanager.CertificateMap("default",
 *     name="cert-map",
 *     description="My acceptance test certificate map",
 *     labels={
 *         "terraform": "true",
 *         "acc-test": "true",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.CertificateManager.CertificateMap("default", new()
 *     {
 *         Name = "cert-map",
 *         Description = "My acceptance test certificate map",
 *         Labels =
 *         {
 *             { "terraform", "true" },
 *             { "acc-test", "true" },
 *         },
 *     });
 * });
 * ```
 * ```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.NewCertificateMap(ctx, "default", &certificatemanager.CertificateMapArgs{
 * 			Name:        pulumi.String("cert-map"),
 * 			Description: pulumi.String("My acceptance test certificate map"),
 * 			Labels: pulumi.StringMap{
 * 				"terraform": pulumi.String("true"),
 * 				"acc-test":  pulumi.String("true"),
 * 			},
 * 		})
 * 		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.CertificateMap;
 * import com.pulumi.gcp.certificatemanager.CertificateMapArgs;
 * 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 CertificateMap("default", CertificateMapArgs.builder()
 *             .name("cert-map")
 *             .description("My acceptance test certificate map")
 *             .labels(Map.ofEntries(
 *                 Map.entry("terraform", true),
 *                 Map.entry("acc-test", true)
 *             ))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:certificatemanager:CertificateMap
 *     properties:
 *       name: cert-map
 *       description: My acceptance test certificate map
 *       labels:
 *         terraform: true
 *         acc-test: true
 * ```
 * 
 * ## Import
 * CertificateMap can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/global/certificateMaps/{{name}}`
 * * `{{project}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, CertificateMap can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:certificatemanager/certificateMap:CertificateMap default projects/{{project}}/locations/global/certificateMaps/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:certificatemanager/certificateMap:CertificateMap default {{project}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:certificatemanager/certificateMap:CertificateMap default {{name}}
 * ```
 * @property description A human-readable description of the resource.
 * @property labels Set of labels associated with a Certificate Map 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 name A user-defined name of the Certificate Map. Certificate Map names must be unique
 * globally and match the pattern `projects/*/locations/*/certificateMaps/*`.
 * - - -
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * */*/*/
 */
public data class CertificateMapArgs(
    public val description: Output? = null,
    public val labels: Output>? = null,
    public val name: Output? = null,
    public val project: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.certificatemanager.CertificateMapArgs =
        com.pulumi.gcp.certificatemanager.CertificateMapArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 })).build()
}

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

    private var labels: Output>? = null

    private var name: Output? = null

    private var project: Output? = null

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

    /**
     * @param value Set of labels associated with a Certificate Map 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("iolasqcxwopkoimy")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value A user-defined name of the Certificate Map. Certificate Map names must be unique
     * globally and match the pattern `projects/*/locations/*/certificateMaps/*`.
     * - - -
     * */*/*/
     */
    @JvmName("xuqdntisrmpqkbym")
    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("jxlckfrgqfurlxij")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

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

    /**
     * @param value Set of labels associated with a Certificate Map 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("huqinaamtvsnfkab")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Set of labels associated with a Certificate Map 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("misonsloqosgekwr")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value A user-defined name of the Certificate Map. Certificate Map names must be unique
     * globally and match the pattern `projects/*/locations/*/certificateMaps/*`.
     * - - -
     * */*/*/
     */
    @JvmName("mahwpbtjgtafcsjc")
    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("dmvudadukfirqigp")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    internal fun build(): CertificateMapArgs = CertificateMapArgs(
        description = description,
        labels = labels,
        name = name,
        project = project,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy