Asset

class Asset : KotlinCustomResource

The Dataplex Asset resource

Example Usage

Basic_asset

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.dataplex.Lake;
import com.pulumi.gcp.dataplex.LakeArgs;
import com.pulumi.gcp.dataplex.Zone;
import com.pulumi.gcp.dataplex.ZoneArgs;
import com.pulumi.gcp.dataplex.inputs.ZoneDiscoverySpecArgs;
import com.pulumi.gcp.dataplex.inputs.ZoneResourceSpecArgs;
import com.pulumi.gcp.dataplex.Asset;
import com.pulumi.gcp.dataplex.AssetArgs;
import com.pulumi.gcp.dataplex.inputs.AssetDiscoverySpecArgs;
import com.pulumi.gcp.dataplex.inputs.AssetResourceSpecArgs;
import com.pulumi.resources.CustomResourceOptions;
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 basicBucket = new Bucket("basicBucket", BucketArgs.builder()
.location("us-west1")
.uniformBucketLevelAccess(true)
.project("my-project-name")
.build());
var basicLake = new Lake("basicLake", LakeArgs.builder()
.location("us-west1")
.project("my-project-name")
.build());
var basicZone = new Zone("basicZone", ZoneArgs.builder()
.location("us-west1")
.lake(basicLake.name())
.type("RAW")
.discoverySpec(ZoneDiscoverySpecArgs.builder()
.enabled(false)
.build())
.resourceSpec(ZoneResourceSpecArgs.builder()
.locationType("SINGLE_REGION")
.build())
.project("my-project-name")
.build());
var primary = new Asset("primary", AssetArgs.builder()
.location("us-west1")
.lake(basicLake.name())
.dataplexZone(basicZone.name())
.discoverySpec(AssetDiscoverySpecArgs.builder()
.enabled(false)
.build())
.resourceSpec(AssetResourceSpecArgs.builder()
.name("projects/my-project-name/buckets/bucket")
.type("STORAGE_BUCKET")
.build())
.project("my-project-name")
.build(), CustomResourceOptions.builder()
.dependsOn(basicBucket)
.build());
}
}

Import

Asset can be imported using any of these accepted formats

$ pulumi import gcp:dataplex/asset:Asset default projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{dataplex_zone}}/assets/{{name}}
$ pulumi import gcp:dataplex/asset:Asset default {{project}}/{{location}}/{{lake}}/{{dataplex_zone}}/{{name}}
$ pulumi import gcp:dataplex/asset:Asset default {{location}}/{{lake}}/{{dataplex_zone}}/{{name}}

Properties

Link copied to clipboard
val createTime: Output<String>

Output only. The time when the asset was created.

Link copied to clipboard
val dataplexZone: Output<String>

The zone for the resource

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

Optional. Description of the asset.

Link copied to clipboard

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.

Link copied to clipboard

Output only. Status of the discovery feature applied to data referenced by this asset.

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

Optional. User friendly display name.

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

Optional. User defined labels for the asset.

Link copied to clipboard
val lake: Output<String>

The lake for the resource

Link copied to clipboard
val location: Output<String>

The location for the resource

Link copied to clipboard
val name: Output<String>

The name of the asset.

Link copied to clipboard
val project: Output<String>

The project for the resource

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Required. Immutable. Specification of the resource that is referenced by this asset.

Link copied to clipboard

Output only. Status of the resource referenced by this asset.

Link copied to clipboard

Output only. Status of the security policy applied to resource referenced by this asset.

Link copied to clipboard
val state: Output<String>

Output only. Current state of the asset. Possible values: STATE_UNSPECIFIED, ACTIVE, CREATING, DELETING, ACTION_REQUIRED

Link copied to clipboard
val uid: 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.

Link copied to clipboard
val updateTime: Output<String>

Output only. The time when the asset was last updated.

Link copied to clipboard
val urn: Output<String>