AspectType class

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",
    dataClassification: "DATA_CLASSIFICATION_UNSPECIFIED",
    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",
    data_classification="DATA_CLASSIFICATION_UNSPECIFIED",
    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",
        DataClassification = "DATA_CLASSIFICATION_UNSPECIFIED",
        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/v9/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"),
			DataClassification: pulumi.String("DATA_CLASSIFICATION_UNSPECIFIED"),
			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
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_dataplex_aspecttype" "test_aspect_type_basic" {
  aspect_type_id      = "aspect-type-basic"
  project             = "my-project-name"
  location            = "us-central1"
  data_classification = "DATA_CLASSIFICATION_UNSPECIFIED"
  metadata_template   = "{\n  \\\"name\\\": \\\"tf-test-template\\\",\n  \\\"type\\\": \\\"record\\\",\n  \\\"recordFields\\\": [\n    {\n      \\\"name\\\": \\\"type\\\",\n      \\\"type\\\": \\\"enum\\\",\n      \\\"annotations\\\": {\n        \\\"displayName\\\": \\\"Type\\\",\n        \\\"description\\\": \\\"Specifies the type of view represented by the entry.\\\"\n      },\n      \\\"index\\\": 1,\n      \\\"constraints\\\": {\n        \\\"required\\\": true\n      },\n      \\\"enumValues\\\": [\n        {\n          \\\"name\\\": \\\"VIEW\\\",\n          \\\"index\\\": 1\n        }\n      ]\n    }\n  ]\n}\n"
}
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.ArrayList;
import java.util.Arrays;
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")
            .dataClassification("DATA_CLASSIFICATION_UNSPECIFIED")
            .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
      dataClassification: DATA_CLASSIFICATION_UNSPECIFIED
      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: "data aspect type created by Terraform",
    dataClassification: "METADATA_AND_DATA",
    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="data aspect type created by Terraform",
    data_classification="METADATA_AND_DATA",
    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 = "data aspect type created by Terraform",
        DataClassification = "METADATA_AND_DATA",
        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/v9/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("data aspect type created by Terraform"),
			DataClassification: pulumi.String("METADATA_AND_DATA"),
			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
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "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         = "data aspect type created by Terraform"
  data_classification = "METADATA_AND_DATA"
  metadata_template   = "{\n  \\\"type\\\": \\\"record\\\",\n  \\\"name\\\": \\\"Schema\\\",\n  \\\"recordFields\\\": [\n    {\n      \\\"name\\\": \\\"fields\\\",\n      \\\"type\\\": \\\"array\\\",\n      \\\"index\\\": 1,\n      \\\"arrayItems\\\": {\n        \\\"name\\\": \\\"field\\\",\n        \\\"type\\\": \\\"record\\\",\n        \\\"typeId\\\": \\\"field\\\",\n        \\\"recordFields\\\": [\n          {\n            \\\"name\\\": \\\"name\\\",\n            \\\"type\\\": \\\"string\\\",\n            \\\"index\\\": 1,\n            \\\"constraints\\\": {\n              \\\"required\\\": true\n            }\n          },\n          {\n            \\\"name\\\": \\\"description\\\",\n            \\\"type\\\": \\\"string\\\",\n            \\\"index\\\": 2\n          },\n          {\n            \\\"name\\\": \\\"dataType\\\",\n            \\\"type\\\": \\\"string\\\",\n            \\\"index\\\": 3,\n            \\\"constraints\\\": {\n              \\\"required\\\": true\n            }\n          },\n          {\n            \\\"name\\\": \\\"metadataType\\\",\n            \\\"type\\\": \\\"enum\\\",\n            \\\"index\\\": 4,\n            \\\"constraints\\\": {\n              \\\"required\\\": true\n            },\n            \\\"enumValues\\\": [\n              {\n                \\\"name\\\": \\\"BOOLEAN\\\",\n                \\\"index\\\": 1\n              },\n              {\n                \\\"name\\\": \\\"NUMBER\\\",\n                \\\"index\\\": 2\n              },\n              {\n                \\\"name\\\": \\\"STRING\\\",\n                \\\"index\\\": 3\n              },\n              {\n                \\\"name\\\": \\\"BYTES\\\",\n                \\\"index\\\": 4\n              },\n              {\n                \\\"name\\\": \\\"DATETIME\\\",\n                \\\"index\\\": 5\n              },\n              {\n                \\\"name\\\": \\\"TIMESTAMP\\\",\n                \\\"index\\\": 6\n              },\n              {\n                \\\"name\\\": \\\"GEOSPATIAL\\\",\n                \\\"index\\\": 7\n              },\n              {\n                \\\"name\\\": \\\"STRUCT\\\",\n                \\\"index\\\": 8\n              },\n              {\n                \\\"name\\\": \\\"OTHER\\\",\n                \\\"index\\\": 100\n              }\n            ]\n          },\n          {\n            \\\"name\\\": \\\"mode\\\",\n            \\\"type\\\": \\\"enum\\\",\n            \\\"index\\\": 5,\n            \\\"enumValues\\\": [\n              {\n                \\\"name\\\": \\\"NULLABLE\\\",\n                \\\"index\\\": 1\n              },\n              {\n                \\\"name\\\": \\\"REPEATED\\\",\n                \\\"index\\\": 2\n              },\n              {\n                \\\"name\\\": \\\"REQUIRED\\\",\n                \\\"index\\\": 3\n              }\n            ]\n          },\n          {\n            \\\"name\\\": \\\"defaultValue\\\",\n            \\\"type\\\": \\\"string\\\",\n            \\\"index\\\": 6\n          },\n          {\n            \\\"name\\\": \\\"annotations\\\",\n            \\\"type\\\": \\\"map\\\",\n            \\\"index\\\": 7,\n            \\\"mapItems\\\": {\n              \\\"name\\\": \\\"label\\\",\n              \\\"type\\\": \\\"string\\\"\n            }\n          },\n          {\n            \\\"name\\\": \\\"fields\\\",\n            \\\"type\\\": \\\"array\\\",\n            \\\"index\\\": 20,\n            \\\"arrayItems\\\": {\n              \\\"name\\\": \\\"field\\\",\n              \\\"type\\\": \\\"record\\\",\n              \\\"typeRef\\\": \\\"field\\\"\n            }\n          }\n        ]\n      }\n    }\n  ]\n}\n"
}
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.ArrayList;
import java.util.Arrays;
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("data aspect type created by Terraform")
            .dataClassification("METADATA_AND_DATA")
            .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: data aspect type created by Terraform
      dataClassification: METADATA_AND_DATA
      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

AspectType(String name, {AspectTypeArgs? args, CustomResourceOptions? options})
Creates a new AspectType. name The Pulumi resource name. args Arguments used to configure this AspectType. The set of arguments for AspectType. options Resource options controlling this resource's behavior.
AspectType.reference(String urn)
Creates a typed reference to an existing AspectType resource.

Properties

aspectTypeId ↔ Output<String?>
The aspect type id of the aspect type.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
createTime ↔ Output<String>
The time when the AspectType was created.
latefinal
dataClassification ↔ Output<String?>
Classifies the data stored by the aspect. DATA_CLASSIFICATION_UNSPECIFIED denotes that the aspect contains only metadata while METADATA_AND_DATA indicates data derived content. <br><br> Possible values are: DATA_CLASSIFICATION_UNSPECIFIED, METADATA_AND_DATA.
latefinal
deletionPolicy ↔ Output<String>
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
latefinal
description ↔ Output<String?>
Description of the AspectType.
latefinal
displayName ↔ Output<String?>
User friendly display name.
latefinal
effectiveLabels ↔ Output<Map<String, String>>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
labels ↔ Output<Map<String, String>?>
User-defined labels for the AspectType.
latefinal
location ↔ Output<String?>
The location where aspect type will be created in.
latefinal
metadataTemplate ↔ Output<String?>
MetadataTemplate of the Aspect.
latefinal
name ↔ Output<String>
The relative resource name of the AspectType, of the form: projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}
latefinal
project ↔ Output<String>
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
latefinal
pulumiLabels ↔ Output<Map<String, String>>
The combination of labels configured directly on the resource and default labels configured on the provider.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transferStatus ↔ Output<String>
Denotes the transfer status of the Aspect Type. It is unspecified for Aspect Type created from Dataplex API.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
uid ↔ Output<String>
System generated globally unique ID for the AspectType. This ID will be different if the AspectType is deleted and re-created with the same name.
latefinal
updateTime ↔ Output<String>
The time when the AspectType was last updated.
latefinal
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {AspectTypeState? state, CustomResourceOptions? options}) → AspectType
Gets an existing AspectType resource's state with the given name and id.