@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
331 lines (330 loc) • 11.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* The Dataplex Asset resource
*
* ## Example Usage
*
* ### Basic_asset
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const basicBucket = new gcp.storage.Bucket("basic_bucket", {
* name: "bucket",
* location: "us-west1",
* uniformBucketLevelAccess: true,
* project: "my-project-name",
* });
* const basicLake = new gcp.dataplex.Lake("basic_lake", {
* name: "lake",
* location: "us-west1",
* project: "my-project-name",
* });
* const basicZone = new gcp.dataplex.Zone("basic_zone", {
* name: "zone",
* location: "us-west1",
* lake: basicLake.name,
* type: "RAW",
* discoverySpec: {
* enabled: false,
* },
* resourceSpec: {
* locationType: "SINGLE_REGION",
* },
* project: "my-project-name",
* });
* const primary = new gcp.dataplex.Asset("primary", {
* name: "asset",
* location: "us-west1",
* lake: basicLake.name,
* dataplexZone: basicZone.name,
* discoverySpec: {
* enabled: false,
* },
* resourceSpec: {
* name: "projects/my-project-name/buckets/bucket",
* type: "STORAGE_BUCKET",
* },
* labels: {
* env: "foo",
* "my-asset": "exists",
* },
* project: "my-project-name",
* }, {
* dependsOn: [basicBucket],
* });
* ```
*
* ## Import
*
* Asset can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{dataplex_zone}}/assets/{{name}}`
*
* * `{{project}}/{{location}}/{{lake}}/{{dataplex_zone}}/{{name}}`
*
* * `{{location}}/{{lake}}/{{dataplex_zone}}/{{name}}`
*
* When using the `pulumi import` command, Asset can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:dataplex/asset:Asset default projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{dataplex_zone}}/assets/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:dataplex/asset:Asset default {{project}}/{{location}}/{{lake}}/{{dataplex_zone}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:dataplex/asset:Asset default {{location}}/{{lake}}/{{dataplex_zone}}/{{name}}
* ```
*/
export declare class Asset extends pulumi.CustomResource {
/**
* Get an existing Asset 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?: AssetState, opts?: pulumi.CustomResourceOptions): Asset;
/**
* Returns true if the given object is an instance of Asset. 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 Asset;
/**
* Output only. The time when the asset was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* The zone for the resource
*/
readonly dataplexZone: pulumi.Output<string>;
/**
* Optional. Description of the asset.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Required. Specification of the discovery feature applied to data referenced by this asset. When this spec is left unset, the asset will use the spec set on the parent zone.
*/
readonly discoverySpec: pulumi.Output<outputs.dataplex.AssetDiscoverySpec>;
/**
* Output only. Status of the discovery feature applied to data referenced by this asset.
*/
readonly discoveryStatuses: pulumi.Output<outputs.dataplex.AssetDiscoveryStatus[]>;
/**
* Optional. 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;
}>;
/**
* Optional. User defined labels for the asset. **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 lake for the resource
*/
readonly lake: pulumi.Output<string>;
/**
* The location for the resource
*/
readonly location: pulumi.Output<string>;
/**
* The name of the asset.
*/
readonly name: pulumi.Output<string>;
/**
* The project for the resource
*/
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;
}>;
/**
* Required. Immutable. Specification of the resource that is referenced by this asset.
*/
readonly resourceSpec: pulumi.Output<outputs.dataplex.AssetResourceSpec>;
/**
* Output only. Status of the resource referenced by this asset.
*/
readonly resourceStatuses: pulumi.Output<outputs.dataplex.AssetResourceStatus[]>;
/**
* Output only. Status of the security policy applied to resource referenced by this asset.
*/
readonly securityStatuses: pulumi.Output<outputs.dataplex.AssetSecurityStatus[]>;
/**
* Output only. Current state of the asset. Possible values: STATE_UNSPECIFIED, ACTIVE, CREATING, DELETING, ACTION_REQUIRED
*/
readonly state: pulumi.Output<string>;
/**
* Output only. System generated globally unique ID for the asset. This ID will be different if the asset is deleted and re-created with the same name.
*/
readonly uid: pulumi.Output<string>;
/**
* Output only. The time when the asset was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a Asset 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: AssetArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Asset resources.
*/
export interface AssetState {
/**
* Output only. The time when the asset was created.
*/
createTime?: pulumi.Input<string>;
/**
* The zone for the resource
*/
dataplexZone?: pulumi.Input<string>;
/**
* Optional. Description of the asset.
*/
description?: pulumi.Input<string>;
/**
* Required. Specification of the discovery feature applied to data referenced by this asset. When this spec is left unset, the asset will use the spec set on the parent zone.
*/
discoverySpec?: pulumi.Input<inputs.dataplex.AssetDiscoverySpec>;
/**
* Output only. Status of the discovery feature applied to data referenced by this asset.
*/
discoveryStatuses?: pulumi.Input<pulumi.Input<inputs.dataplex.AssetDiscoveryStatus>[]>;
/**
* Optional. 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>;
}>;
/**
* Optional. User defined labels for the asset. **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 lake for the resource
*/
lake?: pulumi.Input<string>;
/**
* The location for the resource
*/
location?: pulumi.Input<string>;
/**
* The name of the asset.
*/
name?: pulumi.Input<string>;
/**
* The project for the resource
*/
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>;
}>;
/**
* Required. Immutable. Specification of the resource that is referenced by this asset.
*/
resourceSpec?: pulumi.Input<inputs.dataplex.AssetResourceSpec>;
/**
* Output only. Status of the resource referenced by this asset.
*/
resourceStatuses?: pulumi.Input<pulumi.Input<inputs.dataplex.AssetResourceStatus>[]>;
/**
* Output only. Status of the security policy applied to resource referenced by this asset.
*/
securityStatuses?: pulumi.Input<pulumi.Input<inputs.dataplex.AssetSecurityStatus>[]>;
/**
* Output only. Current state of the asset. Possible values: STATE_UNSPECIFIED, ACTIVE, CREATING, DELETING, ACTION_REQUIRED
*/
state?: pulumi.Input<string>;
/**
* Output only. System generated globally unique ID for the asset. This ID will be different if the asset is deleted and re-created with the same name.
*/
uid?: pulumi.Input<string>;
/**
* Output only. The time when the asset was last updated.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Asset resource.
*/
export interface AssetArgs {
/**
* The zone for the resource
*/
dataplexZone: pulumi.Input<string>;
/**
* Optional. Description of the asset.
*/
description?: pulumi.Input<string>;
/**
* Required. Specification of the discovery feature applied to data referenced by this asset. When this spec is left unset, the asset will use the spec set on the parent zone.
*/
discoverySpec: pulumi.Input<inputs.dataplex.AssetDiscoverySpec>;
/**
* Optional. User friendly display name.
*/
displayName?: pulumi.Input<string>;
/**
* Optional. User defined labels for the asset. **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 lake for the resource
*/
lake: pulumi.Input<string>;
/**
* The location for the resource
*/
location: pulumi.Input<string>;
/**
* The name of the asset.
*/
name?: pulumi.Input<string>;
/**
* The project for the resource
*/
project?: pulumi.Input<string>;
/**
* Required. Immutable. Specification of the resource that is referenced by this asset.
*/
resourceSpec: pulumi.Input<inputs.dataplex.AssetResourceSpec>;
}