Aspect Type
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 thepulumi 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}}
Properties
The aspect type id of the aspect type.
The time when the AspectType was created.
Description of the AspectType.
User friendly display name.
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
MetadataTemplate of the Aspect.
The combination of labels configured directly on the resource and default labels configured on the provider.
Denotes the transfer status of the Aspect Type. It is unspecified for Aspect Type created from Dataplex API.
The time when the AspectType was last updated.