com.pulumi.gcp.datacatalog.kotlin.Taxonomy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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
import kotlin.collections.List
/**
* Builder for [Taxonomy].
*/
@PulumiTagMarker
public class TaxonomyResourceBuilder internal constructor() {
public var name: String? = null
public var args: TaxonomyArgs = TaxonomyArgs()
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 TaxonomyArgsBuilder.() -> Unit) {
val builder = TaxonomyArgsBuilder()
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(): Taxonomy {
val builtJavaResource = com.pulumi.gcp.datacatalog.Taxonomy(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Taxonomy(builtJavaResource)
}
}
/**
* A collection of policy tags that classify data along a common axis.
* To get more information about Taxonomy, see:
* * [API documentation](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.taxonomies)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/data-catalog/docs)
* ## Example Usage
* ### Data Catalog Taxonomy Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const basicTaxonomy = new gcp.datacatalog.Taxonomy("basic_taxonomy", {
* displayName: "my_taxonomy",
* description: "A collection of policy tags",
* activatedPolicyTypes: ["FINE_GRAINED_ACCESS_CONTROL"],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* basic_taxonomy = gcp.datacatalog.Taxonomy("basic_taxonomy",
* display_name="my_taxonomy",
* description="A collection of policy tags",
* activated_policy_types=["FINE_GRAINED_ACCESS_CONTROL"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var basicTaxonomy = new Gcp.DataCatalog.Taxonomy("basic_taxonomy", new()
* {
* DisplayName = "my_taxonomy",
* Description = "A collection of policy tags",
* ActivatedPolicyTypes = new[]
* {
* "FINE_GRAINED_ACCESS_CONTROL",
* },
* });
* });
* ```
* ```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.NewTaxonomy(ctx, "basic_taxonomy", &datacatalog.TaxonomyArgs{
* DisplayName: pulumi.String("my_taxonomy"),
* Description: pulumi.String("A collection of policy tags"),
* ActivatedPolicyTypes: pulumi.StringArray{
* pulumi.String("FINE_GRAINED_ACCESS_CONTROL"),
* },
* })
* 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.Taxonomy;
* import com.pulumi.gcp.datacatalog.TaxonomyArgs;
* 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 basicTaxonomy = new Taxonomy("basicTaxonomy", TaxonomyArgs.builder()
* .displayName("my_taxonomy")
* .description("A collection of policy tags")
* .activatedPolicyTypes("FINE_GRAINED_ACCESS_CONTROL")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* basicTaxonomy:
* type: gcp:datacatalog:Taxonomy
* name: basic_taxonomy
* properties:
* displayName: my_taxonomy
* description: A collection of policy tags
* activatedPolicyTypes:
* - FINE_GRAINED_ACCESS_CONTROL
* ```
*
* ## Import
* Taxonomy can be imported using any of these accepted formats:
* * `{{name}}`
* When using the `pulumi import` command, Taxonomy can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:datacatalog/taxonomy:Taxonomy default {{name}}
* ```
*/
public class Taxonomy internal constructor(
override val javaResource: com.pulumi.gcp.datacatalog.Taxonomy,
) : KotlinCustomResource(javaResource, TaxonomyMapper) {
/**
* A list of policy types that are activated for this taxonomy. If not set,
* defaults to an empty list.
* Each value may be one of: `POLICY_TYPE_UNSPECIFIED`, `FINE_GRAINED_ACCESS_CONTROL`.
*/
public val activatedPolicyTypes: Output>?
get() = javaResource.activatedPolicyTypes().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* Description of this taxonomy. It must: contain only unicode characters,
* tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
* long when encoded in UTF-8. If not set, defaults to an empty description.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* User defined name of this taxonomy.
* The taxonomy display name must be unique within an organization.
* It must: contain only unicode letters, numbers, underscores, dashes
* and spaces; not start or end with spaces; and be at most 200 bytes
* long when encoded in UTF-8.
* - - -
*/
public val displayName: Output
get() = javaResource.displayName().applyValue({ args0 -> args0 })
/**
* Resource name of this taxonomy, whose format is:
* "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
*/
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 })
/**
* Taxonomy location region.
*/
public val region: Output
get() = javaResource.region().applyValue({ args0 -> args0 })
}
public object TaxonomyMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.datacatalog.Taxonomy::class == javaResource::class
override fun map(javaResource: Resource): Taxonomy = Taxonomy(
javaResource as
com.pulumi.gcp.datacatalog.Taxonomy,
)
}
/**
* @see [Taxonomy].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Taxonomy].
*/
public suspend fun taxonomy(name: String, block: suspend TaxonomyResourceBuilder.() -> Unit): Taxonomy {
val builder = TaxonomyResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Taxonomy].
* @param name The _unique_ name of the resulting resource.
*/
public fun taxonomy(name: String): Taxonomy {
val builder = TaxonomyResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy