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

com.pulumi.gcp.migrationcenter.kotlin.GroupArgs.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.migrationcenter.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.migrationcenter.GroupArgs.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

/**
 * A resource that represents an asset group. The purpose of an asset group is to bundle a set of assets that have something in common, while allowing users to add annotations to the group.
 * ## Example Usage
 * ### Migration Group Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.migrationcenter.Group("default", {
 *     location: "us-central1",
 *     groupId: "group-test",
 *     description: "Terraform integration test description",
 *     displayName: "Terraform integration test display",
 *     labels: {
 *         key: "value",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.migrationcenter.Group("default",
 *     location="us-central1",
 *     group_id="group-test",
 *     description="Terraform integration test description",
 *     display_name="Terraform integration test display",
 *     labels={
 *         "key": "value",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.MigrationCenter.Group("default", new()
 *     {
 *         Location = "us-central1",
 *         GroupId = "group-test",
 *         Description = "Terraform integration test description",
 *         DisplayName = "Terraform integration test display",
 *         Labels =
 *         {
 *             { "key", "value" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/migrationcenter"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := migrationcenter.NewGroup(ctx, "default", &migrationcenter.GroupArgs{
 * 			Location:    pulumi.String("us-central1"),
 * 			GroupId:     pulumi.String("group-test"),
 * 			Description: pulumi.String("Terraform integration test description"),
 * 			DisplayName: pulumi.String("Terraform integration test display"),
 * 			Labels: pulumi.StringMap{
 * 				"key": pulumi.String("value"),
 * 			},
 * 		})
 * 		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.migrationcenter.Group;
 * import com.pulumi.gcp.migrationcenter.GroupArgs;
 * 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 Group("default", GroupArgs.builder()
 *             .location("us-central1")
 *             .groupId("group-test")
 *             .description("Terraform integration test description")
 *             .displayName("Terraform integration test display")
 *             .labels(Map.of("key", "value"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:migrationcenter:Group
 *     properties:
 *       location: us-central1
 *       groupId: group-test
 *       description: Terraform integration test description
 *       displayName: Terraform integration test display
 *       labels:
 *         key: value
 * ```
 * 
 * ## Import
 * Group can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/groups/{{group_id}}`
 * * `{{project}}/{{location}}/{{group_id}}`
 * * `{{location}}/{{group_id}}`
 * When using the `pulumi import` command, Group can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:migrationcenter/group:Group default projects/{{project}}/locations/{{location}}/groups/{{group_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:migrationcenter/group:Group default {{project}}/{{location}}/{{group_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:migrationcenter/group:Group default {{location}}/{{group_id}}
 * ```
 * @property description Optional. The description of the group.
 * @property displayName Optional. User-friendly display name.
 * @property groupId Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `a-z?`.
 * - - -
 * @property labels Labels as key value pairs.
 * **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 location of the group.
 * @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 GroupArgs(
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val groupId: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val project: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.migrationcenter.GroupArgs =
        com.pulumi.gcp.migrationcenter.GroupArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .groupId(groupId?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 })).build()
}

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

    private var displayName: Output? = null

    private var groupId: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var project: Output? = null

    /**
     * @param value Optional. The description of the group.
     */
    @JvmName("tjcjnhfbtxdqnoeb")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Optional. User-friendly display name.
     */
    @JvmName("cmyxruwqnjrldpun")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `a-z?`.
     * - - -
     */
    @JvmName("fakehjhqtnqkovum")
    public suspend fun groupId(`value`: Output) {
        this.groupId = value
    }

    /**
     * @param value Labels as key value pairs.
     * **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("enpgqjwxnolsfwuq")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The location of the group.
     */
    @JvmName("rfgjinvneqsrumru")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

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

    /**
     * @param value Optional. The description of the group.
     */
    @JvmName("kgqawtxyrgtuvwan")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Optional. User-friendly display name.
     */
    @JvmName("afmrldqtaytjisck")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `a-z?`.
     * - - -
     */
    @JvmName("jmwhpmpsditkanen")
    public suspend fun groupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupId = mapped
    }

    /**
     * @param value Labels as key value pairs.
     * **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("naxdjqjqgnhuxnnx")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Labels as key value pairs.
     * **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("huphaywdblntryms")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The location of the group.
     */
    @JvmName("coejilayolsbpgqu")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

    internal fun build(): GroupArgs = GroupArgs(
        description = description,
        displayName = displayName,
        groupId = groupId,
        labels = labels,
        location = location,
        project = project,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy