@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
420 lines (419 loc) • 12.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* An Aspect Type is a template for creating Aspects.
*
* ## Example Usage
*
* ### Dataplex Aspect Type Basic
*
* ```typescript
* 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
* }
* ]
* }
* ]
* }
* `,
* });
* ```
* ### Dataplex Aspect Type Full
*
* ```typescript
* 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
*
* 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:
*
* ```sh
* $ pulumi import gcp:dataplex/aspectType:AspectType default projects/{{project}}/locations/{{location}}/aspectTypes/{{aspect_type_id}}
* ```
*
* ```sh
* $ pulumi import gcp:dataplex/aspectType:AspectType default {{project}}/{{location}}/{{aspect_type_id}}
* ```
*
* ```sh
* $ pulumi import gcp:dataplex/aspectType:AspectType default {{location}}/{{aspect_type_id}}
* ```
*/
export declare class AspectType extends pulumi.CustomResource {
/**
* Get an existing AspectType resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AspectTypeState, opts?: pulumi.CustomResourceOptions): AspectType;
/**
* Returns true if the given object is an instance of AspectType. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is AspectType;
/**
* The aspect type id of the aspect type.
*/
readonly aspectTypeId: pulumi.Output<string | undefined>;
/**
* The time when the AspectType was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* Description of the AspectType.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* User friendly display name.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* 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 `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The location where aspect type will be created in.
*/
readonly location: pulumi.Output<string | undefined>;
/**
* MetadataTemplate of the Aspect.
*/
readonly metadataTemplate: pulumi.Output<string | undefined>;
/**
* The relative resource name of the AspectType, of the form: projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Denotes the transfer status of the Aspect Type. It is unspecified
* for Aspect Type created from Dataplex API.
*/
readonly transferStatus: pulumi.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.
*/
readonly uid: pulumi.Output<string>;
/**
* The time when the AspectType was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a AspectType resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: AspectTypeArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AspectType resources.
*/
export interface AspectTypeState {
/**
* The aspect type id of the aspect type.
*/
aspectTypeId?: pulumi.Input<string>;
/**
* The time when the AspectType was created.
*/
createTime?: pulumi.Input<string>;
/**
* Description of the AspectType.
*/
description?: pulumi.Input<string>;
/**
* User friendly display name.
*/
displayName?: pulumi.Input<string>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* 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 `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The location where aspect type will be created in.
*/
location?: pulumi.Input<string>;
/**
* MetadataTemplate of the Aspect.
*/
metadataTemplate?: pulumi.Input<string>;
/**
* The relative resource name of the AspectType, of the form: projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Denotes the transfer status of the Aspect Type. It is unspecified
* for Aspect Type created from Dataplex API.
*/
transferStatus?: pulumi.Input<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.
*/
uid?: pulumi.Input<string>;
/**
* The time when the AspectType was last updated.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a AspectType resource.
*/
export interface AspectTypeArgs {
/**
* The aspect type id of the aspect type.
*/
aspectTypeId?: pulumi.Input<string>;
/**
* Description of the AspectType.
*/
description?: pulumi.Input<string>;
/**
* User friendly display name.
*/
displayName?: pulumi.Input<string>;
/**
* 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 `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The location where aspect type will be created in.
*/
location?: pulumi.Input<string>;
/**
* MetadataTemplate of the Aspect.
*/
metadataTemplate?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}