AspectTypeArgs

data class AspectTypeArgs(val aspectTypeId: Output<String>? = null, val description: Output<String>? = null, val displayName: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val location: Output<String>? = null, val metadataTemplate: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<AspectTypeArgs>

An Aspect Type is a template for creating Aspects.

Example Usage

Dataplex Aspect Type Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const testAspectTypeBasic = new gcp.dataplex.AspectType("test_aspect_type_basic", {
aspectTypeId: "aspect-type-basic",
project: "my-project-name",
location: "us-central1",
metadataTemplate: `{
"name": "tf-test-template",
"type": "record",
"recordFields": [
{
"name": "type",
"type": "enum",
"annotations": {
"displayName": "Type",
"description": "Specifies the type of view represented by the entry."
},
"index": 1,
"constraints": {
"required": true
},
"enumValues": [
{
"name": "VIEW",
"index": 1
}
]
}
]
}
`,
});
import pulumi
import pulumi_gcp as gcp
test_aspect_type_basic = gcp.dataplex.AspectType("test_aspect_type_basic",
aspect_type_id="aspect-type-basic",
project="my-project-name",
location="us-central1",
metadata_template="""{
"name": "tf-test-template",
"type": "record",
"recordFields": [
{
"name": "type",
"type": "enum",
"annotations": {
"displayName": "Type",
"description": "Specifies the type of view represented by the entry."
},
"index": 1,
"constraints": {
"required": true
},
"enumValues": [
{
"name": "VIEW",
"index": 1
}
]
}
]
}
""")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var testAspectTypeBasic = new Gcp.DataPlex.AspectType("test_aspect_type_basic", new()
{
AspectTypeId = "aspect-type-basic",
Project = "my-project-name",
Location = "us-central1",
MetadataTemplate = @"{
""name"": ""tf-test-template"",
""type"": ""record"",
""recordFields"": [
{
""name"": ""type"",
""type"": ""enum"",
""annotations"": {
""displayName"": ""Type"",
""description"": ""Specifies the type of view represented by the entry.""
},
""index"": 1,
""constraints"": {
""required"": true
},
""enumValues"": [
{
""name"": ""VIEW"",
""index"": 1
}
]
}
]
}
",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataplex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dataplex.NewAspectType(ctx, "test_aspect_type_basic", &dataplex.AspectTypeArgs{
AspectTypeId: pulumi.String("aspect-type-basic"),
Project: pulumi.String("my-project-name"),
Location: pulumi.String("us-central1"),
MetadataTemplate: pulumi.String(`{
"name": "tf-test-template",
"type": "record",
"recordFields": [
{
"name": "type",
"type": "enum",
"annotations": {
"displayName": "Type",
"description": "Specifies the type of view represented by the entry."
},
"index": 1,
"constraints": {
"required": true
},
"enumValues": [
{
"name": "VIEW",
"index": 1
}
]
}
]
}
`),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataplex.AspectType;
import com.pulumi.gcp.dataplex.AspectTypeArgs;
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 testAspectTypeBasic = new AspectType("testAspectTypeBasic", AspectTypeArgs.builder()
.aspectTypeId("aspect-type-basic")
.project("my-project-name")
.location("us-central1")
.metadataTemplate("""
{
"name": "tf-test-template",
"type": "record",
"recordFields": [
{
"name": "type",
"type": "enum",
"annotations": {
"displayName": "Type",
"description": "Specifies the type of view represented by the entry."
},
"index": 1,
"constraints": {
"required": true
},
"enumValues": [
{
"name": "VIEW",
"index": 1
}
]
}
]
}
""")
.build());
}
}
resources:
testAspectTypeBasic:
type: gcp:dataplex:AspectType
name: test_aspect_type_basic
properties:
aspectTypeId: aspect-type-basic
project: my-project-name
location: us-central1
metadataTemplate: |
{
"name": "tf-test-template",
"type": "record",
"recordFields": [
{
"name": "type",
"type": "enum",
"annotations": {
"displayName": "Type",
"description": "Specifies the type of view represented by the entry."
},
"index": 1,
"constraints": {
"required": true
},
"enumValues": [
{
"name": "VIEW",
"index": 1
}
]
}
]
}

Dataplex Aspect Type Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const testAspectTypeFull = new gcp.dataplex.AspectType("test_aspect_type_full", {
aspectTypeId: "aspect-type-full",
project: "my-project-name",
location: "us-central1",
labels: {
tag: "test-tf",
},
displayName: "terraform aspect type",
description: "aspect type created by Terraform",
metadataTemplate: `{
"type": "record",
"name": "Schema",
"recordFields": [
{
"name": "fields",
"type": "array",
"index": 1,
"arrayItems": {
"name": "field",
"type": "record",
"typeId": "field",
"recordFields": [
{
"name": "name",
"type": "string",
"index": 1,
"constraints": {
"required": true
}
},
{
"name": "description",
"type": "string",
"index": 2
},
{
"name": "dataType",
"type": "string",
"index": 3,
"constraints": {
"required": true
}
},
{
"name": "metadataType",
"type": "enum",
"index": 4,
"constraints": {
"required": true
},
"enumValues": [
{
"name": "BOOLEAN",
"index": 1
},
{
"name": "NUMBER",
"index": 2
},
{
"name": "STRING",
"index": 3
},
{
"name": "BYTES",
"index": 4
},
{
"name": "DATETIME",
"index": 5
},
{
"name": "TIMESTAMP",
"index": 6
},
{
"name": "GEOSPATIAL",
"index": 7
},
{
"name": "STRUCT",
"index": 8
},
{
"name": "OTHER",
"index": 100
}
]
},
{
"name": "mode",
"type": "enum",
"index": 5,
"enumValues": [
{
"name": "NULLABLE",
"index": 1
},
{
"name": "REPEATED",
"index": 2
},
{
"name": "REQUIRED",
"index": 3
}
]
},
{
"name": "defaultValue",
"type": "string",
"index": 6
},
{
"name": "annotations",
"type": "map",
"index": 7,
"mapItems": {
"name": "label",
"type": "string"
}
},
{
"name": "fields",
"type": "array",
"index": 20,
"arrayItems": {
"name": "field",
"type": "record",
"typeRef": "field"
}
}
]
}
}
]
}
`,
});
import pulumi
import pulumi_gcp as gcp
test_aspect_type_full = gcp.dataplex.AspectType("test_aspect_type_full",
aspect_type_id="aspect-type-full",
project="my-project-name",
location="us-central1",
labels={
"tag": "test-tf",
},
display_name="terraform aspect type",
description="aspect type created by Terraform",
metadata_template="""{
"type": "record",
"name": "Schema",
"recordFields": [
{
"name": "fields",
"type": "array",
"index": 1,
"arrayItems": {
"name": "field",
"type": "record",
"typeId": "field",
"recordFields": [
{
"name": "name",
"type": "string",
"index": 1,
"constraints": {
"required": true
}
},
{
"name": "description",
"type": "string",
"index": 2
},
{
"name": "dataType",
"type": "string",
"index": 3,
"constraints": {
"required": true
}
},
{
"name": "metadataType",
"type": "enum",
"index": 4,
"constraints": {
"required": true
},
"enumValues": [
{
"name": "BOOLEAN",
"index": 1
},
{
"name": "NUMBER",
"index": 2
},
{
"name": "STRING",
"index": 3
},
{
"name": "BYTES",
"index": 4
},
{
"name": "DATETIME",
"index": 5
},
{
"name": "TIMESTAMP",
"index": 6
},
{
"name": "GEOSPATIAL",
"index": 7
},
{
"name": "STRUCT",
"index": 8
},
{
"name": "OTHER",
"index": 100
}
]
},
{
"name": "mode",
"type": "enum",
"index": 5,
"enumValues": [
{
"name": "NULLABLE",
"index": 1
},
{
"name": "REPEATED",
"index": 2
},
{
"name": "REQUIRED",
"index": 3
}
]
},
{
"name": "defaultValue",
"type": "string",
"index": 6
},
{
"name": "annotations",
"type": "map",
"index": 7,
"mapItems": {
"name": "label",
"type": "string"
}
},
{
"name": "fields",
"type": "array",
"index": 20,
"arrayItems": {
"name": "field",
"type": "record",
"typeRef": "field"
}
}
]
}
}
]
}
""")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var testAspectTypeFull = new Gcp.DataPlex.AspectType("test_aspect_type_full", new()
{
AspectTypeId = "aspect-type-full",
Project = "my-project-name",
Location = "us-central1",
Labels =
{
{ "tag", "test-tf" },
},
DisplayName = "terraform aspect type",
Description = "aspect type created by Terraform",
MetadataTemplate = @"{
""type"": ""record"",
""name"": ""Schema"",
""recordFields"": [
{
""name"": ""fields"",
""type"": ""array"",
""index"": 1,
""arrayItems"": {
""name"": ""field"",
""type"": ""record"",
""typeId"": ""field"",
""recordFields"": [
{
""name"": ""name"",
""type"": ""string"",
""index"": 1,
""constraints"": {
""required"": true
}
},
{
""name"": ""description"",
""type"": ""string"",
""index"": 2
},
{
""name"": ""dataType"",
""type"": ""string"",
""index"": 3,
""constraints"": {
""required"": true
}
},
{
""name"": ""metadataType"",
""type"": ""enum"",
""index"": 4,
""constraints"": {
""required"": true
},
""enumValues"": [
{
""name"": ""BOOLEAN"",
""index"": 1
},
{
""name"": ""NUMBER"",
""index"": 2
},
{
""name"": ""STRING"",
""index"": 3
},
{
""name"": ""BYTES"",
""index"": 4
},
{
""name"": ""DATETIME"",
""index"": 5
},
{
""name"": ""TIMESTAMP"",
""index"": 6
},
{
""name"": ""GEOSPATIAL"",
""index"": 7
},
{
""name"": ""STRUCT"",
""index"": 8
},
{
""name"": ""OTHER"",
""index"": 100
}
]
},
{
""name"": ""mode"",
""type"": ""enum"",
""index"": 5,
""enumValues"": [
{
""name"": ""NULLABLE"",
""index"": 1
},
{
""name"": ""REPEATED"",
""index"": 2
},
{
""name"": ""REQUIRED"",
""index"": 3
}
]
},
{
""name"": ""defaultValue"",
""type"": ""string"",
""index"": 6
},
{
""name"": ""annotations"",
""type"": ""map"",
""index"": 7,
""mapItems"": {
""name"": ""label"",
""type"": ""string""
}
},
{
""name"": ""fields"",
""type"": ""array"",
""index"": 20,
""arrayItems"": {
""name"": ""field"",
""type"": ""record"",
""typeRef"": ""field""
}
}
]
}
}
]
}
",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataplex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dataplex.NewAspectType(ctx, "test_aspect_type_full", &dataplex.AspectTypeArgs{
AspectTypeId: pulumi.String("aspect-type-full"),
Project: pulumi.String("my-project-name"),
Location: pulumi.String("us-central1"),
Labels: pulumi.StringMap{
"tag": pulumi.String("test-tf"),
},
DisplayName: pulumi.String("terraform aspect type"),
Description: pulumi.String("aspect type created by Terraform"),
MetadataTemplate: pulumi.String(`{
"type": "record",
"name": "Schema",
"recordFields": [
{
"name": "fields",
"type": "array",
"index": 1,
"arrayItems": {
"name": "field",
"type": "record",
"typeId": "field",
"recordFields": [
{
"name": "name",
"type": "string",
"index": 1,
"constraints": {
"required": true
}
},
{
"name": "description",
"type": "string",
"index": 2
},
{
"name": "dataType",
"type": "string",
"index": 3,
"constraints": {
"required": true
}
},
{
"name": "metadataType",
"type": "enum",
"index": 4,
"constraints": {
"required": true
},
"enumValues": [
{
"name": "BOOLEAN",
"index": 1
},
{
"name": "NUMBER",
"index": 2
},
{
"name": "STRING",
"index": 3
},
{
"name": "BYTES",
"index": 4
},
{
"name": "DATETIME",
"index": 5
},
{
"name": "TIMESTAMP",
"index": 6
},
{
"name": "GEOSPATIAL",
"index": 7
},
{
"name": "STRUCT",
"index": 8
},
{
"name": "OTHER",
"index": 100
}
]
},
{
"name": "mode",
"type": "enum",
"index": 5,
"enumValues": [
{
"name": "NULLABLE",
"index": 1
},
{
"name": "REPEATED",
"index": 2
},
{
"name": "REQUIRED",
"index": 3
}
]
},
{
"name": "defaultValue",
"type": "string",
"index": 6
},
{
"name": "annotations",
"type": "map",
"index": 7,
"mapItems": {
"name": "label",
"type": "string"
}
},
{
"name": "fields",
"type": "array",
"index": 20,
"arrayItems": {
"name": "field",
"type": "record",
"typeRef": "field"
}
}
]
}
}
]
}
`),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataplex.AspectType;
import com.pulumi.gcp.dataplex.AspectTypeArgs;
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 testAspectTypeFull = new AspectType("testAspectTypeFull", AspectTypeArgs.builder()
.aspectTypeId("aspect-type-full")
.project("my-project-name")
.location("us-central1")
.labels(Map.of("tag", "test-tf"))
.displayName("terraform aspect type")
.description("aspect type created by Terraform")
.metadataTemplate("""
{
"type": "record",
"name": "Schema",
"recordFields": [
{
"name": "fields",
"type": "array",
"index": 1,
"arrayItems": {
"name": "field",
"type": "record",
"typeId": "field",
"recordFields": [
{
"name": "name",
"type": "string",
"index": 1,
"constraints": {
"required": true
}
},
{
"name": "description",
"type": "string",
"index": 2
},
{
"name": "dataType",
"type": "string",
"index": 3,
"constraints": {
"required": true
}
},
{
"name": "metadataType",
"type": "enum",
"index": 4,
"constraints": {
"required": true
},
"enumValues": [
{
"name": "BOOLEAN",
"index": 1
},
{
"name": "NUMBER",
"index": 2
},
{
"name": "STRING",
"index": 3
},
{
"name": "BYTES",
"index": 4
},
{
"name": "DATETIME",
"index": 5
},
{
"name": "TIMESTAMP",
"index": 6
},
{
"name": "GEOSPATIAL",
"index": 7
},
{
"name": "STRUCT",
"index": 8
},
{
"name": "OTHER",
"index": 100
}
]
},
{
"name": "mode",
"type": "enum",
"index": 5,
"enumValues": [
{
"name": "NULLABLE",
"index": 1
},
{
"name": "REPEATED",
"index": 2
},
{
"name": "REQUIRED",
"index": 3
}
]
},
{
"name": "defaultValue",
"type": "string",
"index": 6
},
{
"name": "annotations",
"type": "map",
"index": 7,
"mapItems": {
"name": "label",
"type": "string"
}
},
{
"name": "fields",
"type": "array",
"index": 20,
"arrayItems": {
"name": "field",
"type": "record",
"typeRef": "field"
}
}
]
}
}
]
}
""")
.build());
}
}
resources:
testAspectTypeFull:
type: gcp:dataplex:AspectType
name: test_aspect_type_full
properties:
aspectTypeId: aspect-type-full
project: my-project-name
location: us-central1
labels:
tag: test-tf
displayName: terraform aspect type
description: aspect type created by Terraform
metadataTemplate: |
{
"type": "record",
"name": "Schema",
"recordFields": [
{
"name": "fields",
"type": "array",
"index": 1,
"arrayItems": {
"name": "field",
"type": "record",
"typeId": "field",
"recordFields": [
{
"name": "name",
"type": "string",
"index": 1,
"constraints": {
"required": true
}
},
{
"name": "description",
"type": "string",
"index": 2
},
{
"name": "dataType",
"type": "string",
"index": 3,
"constraints": {
"required": true
}
},
{
"name": "metadataType",
"type": "enum",
"index": 4,
"constraints": {
"required": true
},
"enumValues": [
{
"name": "BOOLEAN",
"index": 1
},
{
"name": "NUMBER",
"index": 2
},
{
"name": "STRING",
"index": 3
},
{
"name": "BYTES",
"index": 4
},
{
"name": "DATETIME",
"index": 5
},
{
"name": "TIMESTAMP",
"index": 6
},
{
"name": "GEOSPATIAL",
"index": 7
},
{
"name": "STRUCT",
"index": 8
},
{
"name": "OTHER",
"index": 100
}
]
},
{
"name": "mode",
"type": "enum",
"index": 5,
"enumValues": [
{
"name": "NULLABLE",
"index": 1
},
{
"name": "REPEATED",
"index": 2
},
{
"name": "REQUIRED",
"index": 3
}
]
},
{
"name": "defaultValue",
"type": "string",
"index": 6
},
{
"name": "annotations",
"type": "map",
"index": 7,
"mapItems": {
"name": "label",
"type": "string"
}
},
{
"name": "fields",
"type": "array",
"index": 20,
"arrayItems": {
"name": "field",
"type": "record",
"typeRef": "field"
}
}
]
}
}
]
}

Import

AspectType can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/aspectTypes/{{aspect_type_id}}

  • {{project}}/{{location}}/{{aspect_type_id}}

  • {{location}}/{{aspect_type_id}} When using the pulumi import command, AspectType can be imported using one of the formats above. For example:

$ pulumi import gcp:dataplex/aspectType:AspectType default projects/{{project}}/locations/{{location}}/aspectTypes/{{aspect_type_id}}
$ pulumi import gcp:dataplex/aspectType:AspectType default {{project}}/{{location}}/{{aspect_type_id}}
$ pulumi import gcp:dataplex/aspectType:AspectType default {{location}}/{{aspect_type_id}}

Constructors

Link copied to clipboard
constructor(aspectTypeId: Output<String>? = null, description: Output<String>? = null, displayName: Output<String>? = null, labels: Output<Map<String, String>>? = null, location: Output<String>? = null, metadataTemplate: Output<String>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard
val aspectTypeId: Output<String>? = null

The aspect type id of the aspect type.

Link copied to clipboard
val description: Output<String>? = null

Description of the AspectType.

Link copied to clipboard
val displayName: Output<String>? = null

User friendly display name.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

User-defined labels for the AspectType. 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.

Link copied to clipboard
val location: Output<String>? = null

The location where aspect type will be created in.

Link copied to clipboard
val metadataTemplate: Output<String>? = null

MetadataTemplate of the Aspect.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Functions

Link copied to clipboard
open override fun toJava(): AspectTypeArgs