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

com.pulumi.gcp.datacatalog.kotlin.EntryGroup.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.datacatalog.kotlin

import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [EntryGroup].
 */
@PulumiTagMarker
public class EntryGroupResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: EntryGroupArgs = EntryGroupArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend EntryGroupArgsBuilder.() -> Unit) {
        val builder = EntryGroupArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): EntryGroup {
        val builtJavaResource = com.pulumi.gcp.datacatalog.EntryGroup(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return EntryGroup(builtJavaResource)
    }
}

/**
 * An EntryGroup resource represents a logical grouping of zero or more Data Catalog Entry resources.
 * To get more information about EntryGroup, see:
 * * [API documentation](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/data-catalog/docs)
 * ## Example Usage
 * ### Data Catalog Entry Group Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const basicEntryGroup = new gcp.datacatalog.EntryGroup("basic_entry_group", {entryGroupId: "my_group"});
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * basic_entry_group = gcp.datacatalog.EntryGroup("basic_entry_group", entry_group_id="my_group")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var basicEntryGroup = new Gcp.DataCatalog.EntryGroup("basic_entry_group", new()
 *     {
 *         EntryGroupId = "my_group",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/datacatalog"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := datacatalog.NewEntryGroup(ctx, "basic_entry_group", &datacatalog.EntryGroupArgs{
 * 			EntryGroupId: pulumi.String("my_group"),
 * 		})
 * 		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.datacatalog.EntryGroup;
 * import com.pulumi.gcp.datacatalog.EntryGroupArgs;
 * 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 basicEntryGroup = new EntryGroup("basicEntryGroup", EntryGroupArgs.builder()
 *             .entryGroupId("my_group")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   basicEntryGroup:
 *     type: gcp:datacatalog:EntryGroup
 *     name: basic_entry_group
 *     properties:
 *       entryGroupId: my_group
 * ```
 * 
 * ### Data Catalog Entry Group Full
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const basicEntryGroup = new gcp.datacatalog.EntryGroup("basic_entry_group", {
 *     entryGroupId: "my_group",
 *     displayName: "entry group",
 *     description: "example entry group",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * basic_entry_group = gcp.datacatalog.EntryGroup("basic_entry_group",
 *     entry_group_id="my_group",
 *     display_name="entry group",
 *     description="example entry group")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var basicEntryGroup = new Gcp.DataCatalog.EntryGroup("basic_entry_group", new()
 *     {
 *         EntryGroupId = "my_group",
 *         DisplayName = "entry group",
 *         Description = "example entry group",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/datacatalog"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := datacatalog.NewEntryGroup(ctx, "basic_entry_group", &datacatalog.EntryGroupArgs{
 * 			EntryGroupId: pulumi.String("my_group"),
 * 			DisplayName:  pulumi.String("entry group"),
 * 			Description:  pulumi.String("example entry group"),
 * 		})
 * 		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.datacatalog.EntryGroup;
 * import com.pulumi.gcp.datacatalog.EntryGroupArgs;
 * 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 basicEntryGroup = new EntryGroup("basicEntryGroup", EntryGroupArgs.builder()
 *             .entryGroupId("my_group")
 *             .displayName("entry group")
 *             .description("example entry group")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   basicEntryGroup:
 *     type: gcp:datacatalog:EntryGroup
 *     name: basic_entry_group
 *     properties:
 *       entryGroupId: my_group
 *       displayName: entry group
 *       description: example entry group
 * ```
 * 
 * ## Import
 * EntryGroup can be imported using any of these accepted formats:
 * * `{{name}}`
 * When using the `pulumi import` command, EntryGroup can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:datacatalog/entryGroup:EntryGroup default {{name}}
 * ```
 */
public class EntryGroup internal constructor(
    override val javaResource: com.pulumi.gcp.datacatalog.EntryGroup,
) : KotlinCustomResource(javaResource, EntryGroupMapper) {
    /**
     * Entry group description, which can consist of several sentences or paragraphs that describe entry group contents.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * A short name to identify the entry group, for example, "analytics data - jan 2011".
     */
    public val displayName: Output?
        get() = javaResource.displayName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The id of the entry group to create. The id must begin with a letter or underscore,
     * contain only English letters, numbers and underscores, and be at most 64 characters.
     * - - -
     */
    public val entryGroupId: Output
        get() = javaResource.entryGroupId().applyValue({ args0 -> args0 })

    /**
     * The resource name of the entry group in URL format. Example: projects/{project}/locations/{location}/entryGroups/{entryGroupId}
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * EntryGroup location region.
     */
    public val region: Output
        get() = javaResource.region().applyValue({ args0 -> args0 })
}

public object EntryGroupMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.datacatalog.EntryGroup::class == javaResource::class

    override fun map(javaResource: Resource): EntryGroup = EntryGroup(
        javaResource as
            com.pulumi.gcp.datacatalog.EntryGroup,
    )
}

/**
 * @see [EntryGroup].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [EntryGroup].
 */
public suspend fun entryGroup(name: String, block: suspend EntryGroupResourceBuilder.() -> Unit): EntryGroup {
    val builder = EntryGroupResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [EntryGroup].
 * @param name The _unique_ name of the resulting resource.
 */
public fun entryGroup(name: String): EntryGroup {
    val builder = EntryGroupResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy