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

com.pulumi.gcp.vertex.kotlin.AiDataset.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.vertex.kotlin

import com.pulumi.core.Output
import com.pulumi.gcp.vertex.kotlin.outputs.AiDatasetEncryptionSpec
import com.pulumi.gcp.vertex.kotlin.outputs.AiDatasetEncryptionSpec.Companion.toKotlin
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
import kotlin.collections.Map

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

    public var args: AiDatasetArgs = AiDatasetArgs()

    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 AiDatasetArgsBuilder.() -> Unit) {
        val builder = AiDatasetArgsBuilder()
        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(): AiDataset {
        val builtJavaResource = com.pulumi.gcp.vertex.AiDataset(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return AiDataset(builtJavaResource)
    }
}

/**
 * A collection of DataItems and Annotations on them.
 * To get more information about Dataset, see:
 * * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/vertex-ai/docs)
 * ## Example Usage
 * ### Vertex Ai Dataset
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const dataset = new gcp.vertex.AiDataset("dataset", {
 *     displayName: "terraform",
 *     metadataSchemaUri: "gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml",
 *     region: "us-central1",
 *     labels: {
 *         env: "test",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * dataset = gcp.vertex.AiDataset("dataset",
 *     display_name="terraform",
 *     metadata_schema_uri="gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml",
 *     region="us-central1",
 *     labels={
 *         "env": "test",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var dataset = new Gcp.Vertex.AiDataset("dataset", new()
 *     {
 *         DisplayName = "terraform",
 *         MetadataSchemaUri = "gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml",
 *         Region = "us-central1",
 *         Labels =
 *         {
 *             { "env", "test" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/vertex"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := vertex.NewAiDataset(ctx, "dataset", &vertex.AiDatasetArgs{
 * 			DisplayName:       pulumi.String("terraform"),
 * 			MetadataSchemaUri: pulumi.String("gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml"),
 * 			Region:            pulumi.String("us-central1"),
 * 			Labels: pulumi.StringMap{
 * 				"env": pulumi.String("test"),
 * 			},
 * 		})
 * 		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.vertex.AiDataset;
 * import com.pulumi.gcp.vertex.AiDatasetArgs;
 * 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 dataset = new AiDataset("dataset", AiDatasetArgs.builder()
 *             .displayName("terraform")
 *             .metadataSchemaUri("gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml")
 *             .region("us-central1")
 *             .labels(Map.of("env", "test"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   dataset:
 *     type: gcp:vertex:AiDataset
 *     properties:
 *       displayName: terraform
 *       metadataSchemaUri: gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml
 *       region: us-central1
 *       labels:
 *         env: test
 * ```
 * 
 * ## Import
 * This resource does not support import.
 */
public class AiDataset internal constructor(
    override val javaResource: com.pulumi.gcp.vertex.AiDataset,
) : KotlinCustomResource(javaResource, AiDatasetMapper) {
    /**
     * The timestamp of when the dataset was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * The user-defined name of the Dataset. The name can be up to 128 characters long and can be consist of any UTF-8 characters.
     */
    public val displayName: Output
        get() = javaResource.displayName().applyValue({ args0 -> args0 })

    /**
     * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
     */
    public val effectiveLabels: Output>
        get() = javaResource.effectiveLabels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * Customer-managed encryption key spec for a Dataset. If set, this Dataset and all sub-resources of this Dataset will be secured by this key.
     * Structure is documented below.
     */
    public val encryptionSpec: Output?
        get() = javaResource.encryptionSpec().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> toKotlin(args0) })
            }).orElse(null)
        })

    /**
     * A set of key/value label pairs to assign to this Workflow.
     * **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.
     */
    public val labels: Output>?
        get() = javaResource.labels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * Points to a YAML file stored on Google Cloud Storage describing additional information about the Dataset. The schema is defined as an OpenAPI 3.0.2 Schema Object. The schema files that can be used here are found in gs://google-cloud-aiplatform/schema/dataset/metadata/.
     * - - -
     */
    public val metadataSchemaUri: Output
        get() = javaResource.metadataSchemaUri().applyValue({ args0 -> args0 })

    /**
     * The resource name of the Dataset. This value is set by Google.
     */
    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 })

    /**
     * The combination of labels configured directly on the resource
     * and default labels configured on the provider.
     */
    public val pulumiLabels: Output>
        get() = javaResource.pulumiLabels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * The region of the dataset. eg us-central1
     */
    public val region: Output
        get() = javaResource.region().applyValue({ args0 -> args0 })

    /**
     * The timestamp of when the dataset was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object AiDatasetMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.vertex.AiDataset::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy