All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.dataplex.kotlin.Datascan.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.dataplex.kotlin

import com.pulumi.core.Output
import com.pulumi.gcp.dataplex.kotlin.outputs.DatascanData
import com.pulumi.gcp.dataplex.kotlin.outputs.DatascanDataProfileSpec
import com.pulumi.gcp.dataplex.kotlin.outputs.DatascanDataQualitySpec
import com.pulumi.gcp.dataplex.kotlin.outputs.DatascanExecutionSpec
import com.pulumi.gcp.dataplex.kotlin.outputs.DatascanExecutionStatus
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.gcp.dataplex.kotlin.outputs.DatascanData.Companion.toKotlin as datascanDataToKotlin
import com.pulumi.gcp.dataplex.kotlin.outputs.DatascanDataProfileSpec.Companion.toKotlin as datascanDataProfileSpecToKotlin
import com.pulumi.gcp.dataplex.kotlin.outputs.DatascanDataQualitySpec.Companion.toKotlin as datascanDataQualitySpecToKotlin
import com.pulumi.gcp.dataplex.kotlin.outputs.DatascanExecutionSpec.Companion.toKotlin as datascanExecutionSpecToKotlin
import com.pulumi.gcp.dataplex.kotlin.outputs.DatascanExecutionStatus.Companion.toKotlin as datascanExecutionStatusToKotlin

/**
 * Builder for [Datascan].
 */
@PulumiTagMarker
public class DatascanResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: DatascanArgs = DatascanArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend DatascanArgsBuilder.() -> Unit) {
        val builder = DatascanArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Datascan {
        val builtJavaResource = com.pulumi.gcp.dataplex.Datascan(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Datascan(builtJavaResource)
    }
}

/**
 * Represents a user-visible job which provides the insights for the related data source.
 * To get more information about Datascan, see:
 * * [API documentation](https://cloud.google.com/dataplex/docs/reference/rest)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dataplex/docs)
 * ## Example Usage
 * ### Dataplex Datascan Basic Profile
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const basicProfile = new gcp.dataplex.Datascan("basic_profile", {
 *     location: "us-central1",
 *     dataScanId: "dataprofile-basic",
 *     data: {
 *         resource: "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare",
 *     },
 *     executionSpec: {
 *         trigger: {
 *             onDemand: {},
 *         },
 *     },
 *     dataProfileSpec: {},
 *     project: "my-project-name",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * basic_profile = gcp.dataplex.Datascan("basic_profile",
 *     location="us-central1",
 *     data_scan_id="dataprofile-basic",
 *     data=gcp.dataplex.DatascanDataArgs(
 *         resource="//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare",
 *     ),
 *     execution_spec=gcp.dataplex.DatascanExecutionSpecArgs(
 *         trigger=gcp.dataplex.DatascanExecutionSpecTriggerArgs(
 *             on_demand=gcp.dataplex.DatascanExecutionSpecTriggerOnDemandArgs(),
 *         ),
 *     ),
 *     data_profile_spec=gcp.dataplex.DatascanDataProfileSpecArgs(),
 *     project="my-project-name")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var basicProfile = new Gcp.DataPlex.Datascan("basic_profile", new()
 *     {
 *         Location = "us-central1",
 *         DataScanId = "dataprofile-basic",
 *         Data = new Gcp.DataPlex.Inputs.DatascanDataArgs
 *         {
 *             Resource = "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare",
 *         },
 *         ExecutionSpec = new Gcp.DataPlex.Inputs.DatascanExecutionSpecArgs
 *         {
 *             Trigger = new Gcp.DataPlex.Inputs.DatascanExecutionSpecTriggerArgs
 *             {
 *                 OnDemand = null,
 *             },
 *         },
 *         DataProfileSpec = null,
 *         Project = "my-project-name",
 *     });
 * });
 * ```
 * ```go
 * 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.NewDatascan(ctx, "basic_profile", &dataplex.DatascanArgs{
 * 			Location:   pulumi.String("us-central1"),
 * 			DataScanId: pulumi.String("dataprofile-basic"),
 * 			Data: &dataplex.DatascanDataArgs{
 * 				Resource: pulumi.String("//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare"),
 * 			},
 * 			ExecutionSpec: &dataplex.DatascanExecutionSpecArgs{
 * 				Trigger: &dataplex.DatascanExecutionSpecTriggerArgs{
 * 					OnDemand: nil,
 * 				},
 * 			},
 * 			DataProfileSpec: nil,
 * 			Project:         pulumi.String("my-project-name"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.dataplex.Datascan;
 * import com.pulumi.gcp.dataplex.DatascanArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecTriggerArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecTriggerOnDemandArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataProfileSpecArgs;
 * 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 basicProfile = new Datascan("basicProfile", DatascanArgs.builder()
 *             .location("us-central1")
 *             .dataScanId("dataprofile-basic")
 *             .data(DatascanDataArgs.builder()
 *                 .resource("//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare")
 *                 .build())
 *             .executionSpec(DatascanExecutionSpecArgs.builder()
 *                 .trigger(DatascanExecutionSpecTriggerArgs.builder()
 *                     .onDemand()
 *                     .build())
 *                 .build())
 *             .dataProfileSpec()
 *             .project("my-project-name")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   basicProfile:
 *     type: gcp:dataplex:Datascan
 *     name: basic_profile
 *     properties:
 *       location: us-central1
 *       dataScanId: dataprofile-basic
 *       data:
 *         resource: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare
 *       executionSpec:
 *         trigger:
 *           onDemand: {}
 *       dataProfileSpec: {}
 *       project: my-project-name
 * ```
 * 
 * ### Dataplex Datascan Full Profile
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const fullProfile = new gcp.dataplex.Datascan("full_profile", {
 *     location: "us-central1",
 *     displayName: "Full Datascan Profile",
 *     dataScanId: "dataprofile-full",
 *     description: "Example resource - Full Datascan Profile",
 *     labels: {
 *         author: "billing",
 *     },
 *     data: {
 *         resource: "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare",
 *     },
 *     executionSpec: {
 *         trigger: {
 *             schedule: {
 *                 cron: "TZ=America/New_York 1 1 * * *",
 *             },
 *         },
 *     },
 *     dataProfileSpec: {
 *         samplingPercent: 80,
 *         rowFilter: "word_count > 10",
 *         includeFields: {
 *             fieldNames: ["word_count"],
 *         },
 *         excludeFields: {
 *             fieldNames: ["property_type"],
 *         },
 *         postScanActions: {
 *             bigqueryExport: {
 *                 resultsTable: "//bigquery.googleapis.com/projects/my-project-name/datasets/dataplex_dataset/tables/profile_export",
 *             },
 *         },
 *     },
 *     project: "my-project-name",
 * });
 * const source = new gcp.bigquery.Dataset("source", {
 *     datasetId: "dataplex_dataset",
 *     friendlyName: "test",
 *     description: "This is a test description",
 *     location: "US",
 *     deleteContentsOnDestroy: true,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * full_profile = gcp.dataplex.Datascan("full_profile",
 *     location="us-central1",
 *     display_name="Full Datascan Profile",
 *     data_scan_id="dataprofile-full",
 *     description="Example resource - Full Datascan Profile",
 *     labels={
 *         "author": "billing",
 *     },
 *     data=gcp.dataplex.DatascanDataArgs(
 *         resource="//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare",
 *     ),
 *     execution_spec=gcp.dataplex.DatascanExecutionSpecArgs(
 *         trigger=gcp.dataplex.DatascanExecutionSpecTriggerArgs(
 *             schedule=gcp.dataplex.DatascanExecutionSpecTriggerScheduleArgs(
 *                 cron="TZ=America/New_York 1 1 * * *",
 *             ),
 *         ),
 *     ),
 *     data_profile_spec=gcp.dataplex.DatascanDataProfileSpecArgs(
 *         sampling_percent=80,
 *         row_filter="word_count > 10",
 *         include_fields=gcp.dataplex.DatascanDataProfileSpecIncludeFieldsArgs(
 *             field_names=["word_count"],
 *         ),
 *         exclude_fields=gcp.dataplex.DatascanDataProfileSpecExcludeFieldsArgs(
 *             field_names=["property_type"],
 *         ),
 *         post_scan_actions=gcp.dataplex.DatascanDataProfileSpecPostScanActionsArgs(
 *             bigquery_export=gcp.dataplex.DatascanDataProfileSpecPostScanActionsBigqueryExportArgs(
 *                 results_table="//bigquery.googleapis.com/projects/my-project-name/datasets/dataplex_dataset/tables/profile_export",
 *             ),
 *         ),
 *     ),
 *     project="my-project-name")
 * source = gcp.bigquery.Dataset("source",
 *     dataset_id="dataplex_dataset",
 *     friendly_name="test",
 *     description="This is a test description",
 *     location="US",
 *     delete_contents_on_destroy=True)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var fullProfile = new Gcp.DataPlex.Datascan("full_profile", new()
 *     {
 *         Location = "us-central1",
 *         DisplayName = "Full Datascan Profile",
 *         DataScanId = "dataprofile-full",
 *         Description = "Example resource - Full Datascan Profile",
 *         Labels =
 *         {
 *             { "author", "billing" },
 *         },
 *         Data = new Gcp.DataPlex.Inputs.DatascanDataArgs
 *         {
 *             Resource = "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare",
 *         },
 *         ExecutionSpec = new Gcp.DataPlex.Inputs.DatascanExecutionSpecArgs
 *         {
 *             Trigger = new Gcp.DataPlex.Inputs.DatascanExecutionSpecTriggerArgs
 *             {
 *                 Schedule = new Gcp.DataPlex.Inputs.DatascanExecutionSpecTriggerScheduleArgs
 *                 {
 *                     Cron = "TZ=America/New_York 1 1 * * *",
 *                 },
 *             },
 *         },
 *         DataProfileSpec = new Gcp.DataPlex.Inputs.DatascanDataProfileSpecArgs
 *         {
 *             SamplingPercent = 80,
 *             RowFilter = "word_count > 10",
 *             IncludeFields = new Gcp.DataPlex.Inputs.DatascanDataProfileSpecIncludeFieldsArgs
 *             {
 *                 FieldNames = new[]
 *                 {
 *                     "word_count",
 *                 },
 *             },
 *             ExcludeFields = new Gcp.DataPlex.Inputs.DatascanDataProfileSpecExcludeFieldsArgs
 *             {
 *                 FieldNames = new[]
 *                 {
 *                     "property_type",
 *                 },
 *             },
 *             PostScanActions = new Gcp.DataPlex.Inputs.DatascanDataProfileSpecPostScanActionsArgs
 *             {
 *                 BigqueryExport = new Gcp.DataPlex.Inputs.DatascanDataProfileSpecPostScanActionsBigqueryExportArgs
 *                 {
 *                     ResultsTable = "//bigquery.googleapis.com/projects/my-project-name/datasets/dataplex_dataset/tables/profile_export",
 *                 },
 *             },
 *         },
 *         Project = "my-project-name",
 *     });
 *     var source = new Gcp.BigQuery.Dataset("source", new()
 *     {
 *         DatasetId = "dataplex_dataset",
 *         FriendlyName = "test",
 *         Description = "This is a test description",
 *         Location = "US",
 *         DeleteContentsOnDestroy = true,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigquery"
 * 	"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.NewDatascan(ctx, "full_profile", &dataplex.DatascanArgs{
 * 			Location:    pulumi.String("us-central1"),
 * 			DisplayName: pulumi.String("Full Datascan Profile"),
 * 			DataScanId:  pulumi.String("dataprofile-full"),
 * 			Description: pulumi.String("Example resource - Full Datascan Profile"),
 * 			Labels: pulumi.StringMap{
 * 				"author": pulumi.String("billing"),
 * 			},
 * 			Data: &dataplex.DatascanDataArgs{
 * 				Resource: pulumi.String("//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare"),
 * 			},
 * 			ExecutionSpec: &dataplex.DatascanExecutionSpecArgs{
 * 				Trigger: &dataplex.DatascanExecutionSpecTriggerArgs{
 * 					Schedule: &dataplex.DatascanExecutionSpecTriggerScheduleArgs{
 * 						Cron: pulumi.String("TZ=America/New_York 1 1 * * *"),
 * 					},
 * 				},
 * 			},
 * 			DataProfileSpec: &dataplex.DatascanDataProfileSpecArgs{
 * 				SamplingPercent: pulumi.Float64(80),
 * 				RowFilter:       pulumi.String("word_count > 10"),
 * 				IncludeFields: &dataplex.DatascanDataProfileSpecIncludeFieldsArgs{
 * 					FieldNames: pulumi.StringArray{
 * 						pulumi.String("word_count"),
 * 					},
 * 				},
 * 				ExcludeFields: &dataplex.DatascanDataProfileSpecExcludeFieldsArgs{
 * 					FieldNames: pulumi.StringArray{
 * 						pulumi.String("property_type"),
 * 					},
 * 				},
 * 				PostScanActions: &dataplex.DatascanDataProfileSpecPostScanActionsArgs{
 * 					BigqueryExport: &dataplex.DatascanDataProfileSpecPostScanActionsBigqueryExportArgs{
 * 						ResultsTable: pulumi.String("//bigquery.googleapis.com/projects/my-project-name/datasets/dataplex_dataset/tables/profile_export"),
 * 					},
 * 				},
 * 			},
 * 			Project: pulumi.String("my-project-name"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = bigquery.NewDataset(ctx, "source", &bigquery.DatasetArgs{
 * 			DatasetId:               pulumi.String("dataplex_dataset"),
 * 			FriendlyName:            pulumi.String("test"),
 * 			Description:             pulumi.String("This is a test description"),
 * 			Location:                pulumi.String("US"),
 * 			DeleteContentsOnDestroy: pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.dataplex.Datascan;
 * import com.pulumi.gcp.dataplex.DatascanArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecTriggerArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecTriggerScheduleArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataProfileSpecArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataProfileSpecIncludeFieldsArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataProfileSpecExcludeFieldsArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataProfileSpecPostScanActionsArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataProfileSpecPostScanActionsBigqueryExportArgs;
 * import com.pulumi.gcp.bigquery.Dataset;
 * import com.pulumi.gcp.bigquery.DatasetArgs;
 * 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 fullProfile = new Datascan("fullProfile", DatascanArgs.builder()
 *             .location("us-central1")
 *             .displayName("Full Datascan Profile")
 *             .dataScanId("dataprofile-full")
 *             .description("Example resource - Full Datascan Profile")
 *             .labels(Map.of("author", "billing"))
 *             .data(DatascanDataArgs.builder()
 *                 .resource("//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare")
 *                 .build())
 *             .executionSpec(DatascanExecutionSpecArgs.builder()
 *                 .trigger(DatascanExecutionSpecTriggerArgs.builder()
 *                     .schedule(DatascanExecutionSpecTriggerScheduleArgs.builder()
 *                         .cron("TZ=America/New_York 1 1 * * *")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .dataProfileSpec(DatascanDataProfileSpecArgs.builder()
 *                 .samplingPercent(80)
 *                 .rowFilter("word_count > 10")
 *                 .includeFields(DatascanDataProfileSpecIncludeFieldsArgs.builder()
 *                     .fieldNames("word_count")
 *                     .build())
 *                 .excludeFields(DatascanDataProfileSpecExcludeFieldsArgs.builder()
 *                     .fieldNames("property_type")
 *                     .build())
 *                 .postScanActions(DatascanDataProfileSpecPostScanActionsArgs.builder()
 *                     .bigqueryExport(DatascanDataProfileSpecPostScanActionsBigqueryExportArgs.builder()
 *                         .resultsTable("//bigquery.googleapis.com/projects/my-project-name/datasets/dataplex_dataset/tables/profile_export")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .project("my-project-name")
 *             .build());
 *         var source = new Dataset("source", DatasetArgs.builder()
 *             .datasetId("dataplex_dataset")
 *             .friendlyName("test")
 *             .description("This is a test description")
 *             .location("US")
 *             .deleteContentsOnDestroy(true)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   fullProfile:
 *     type: gcp:dataplex:Datascan
 *     name: full_profile
 *     properties:
 *       location: us-central1
 *       displayName: Full Datascan Profile
 *       dataScanId: dataprofile-full
 *       description: Example resource - Full Datascan Profile
 *       labels:
 *         author: billing
 *       data:
 *         resource: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare
 *       executionSpec:
 *         trigger:
 *           schedule:
 *             cron: TZ=America/New_York 1 1 * * *
 *       dataProfileSpec:
 *         samplingPercent: 80
 *         rowFilter: word_count > 10
 *         includeFields:
 *           fieldNames:
 *             - word_count
 *         excludeFields:
 *           fieldNames:
 *             - property_type
 *         postScanActions:
 *           bigqueryExport:
 *             resultsTable: //bigquery.googleapis.com/projects/my-project-name/datasets/dataplex_dataset/tables/profile_export
 *       project: my-project-name
 *   source:
 *     type: gcp:bigquery:Dataset
 *     properties:
 *       datasetId: dataplex_dataset
 *       friendlyName: test
 *       description: This is a test description
 *       location: US
 *       deleteContentsOnDestroy: true
 * ```
 * 
 * ### Dataplex Datascan Basic Quality
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const basicQuality = new gcp.dataplex.Datascan("basic_quality", {
 *     location: "us-central1",
 *     dataScanId: "dataquality-basic",
 *     data: {
 *         resource: "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare",
 *     },
 *     executionSpec: {
 *         trigger: {
 *             onDemand: {},
 *         },
 *     },
 *     dataQualitySpec: {
 *         rules: [{
 *             dimension: "VALIDITY",
 *             name: "rule1",
 *             description: "rule 1 for validity dimension",
 *             tableConditionExpectation: {
 *                 sqlExpression: "COUNT(*) > 0",
 *             },
 *         }],
 *     },
 *     project: "my-project-name",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * basic_quality = gcp.dataplex.Datascan("basic_quality",
 *     location="us-central1",
 *     data_scan_id="dataquality-basic",
 *     data=gcp.dataplex.DatascanDataArgs(
 *         resource="//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare",
 *     ),
 *     execution_spec=gcp.dataplex.DatascanExecutionSpecArgs(
 *         trigger=gcp.dataplex.DatascanExecutionSpecTriggerArgs(
 *             on_demand=gcp.dataplex.DatascanExecutionSpecTriggerOnDemandArgs(),
 *         ),
 *     ),
 *     data_quality_spec=gcp.dataplex.DatascanDataQualitySpecArgs(
 *         rules=[gcp.dataplex.DatascanDataQualitySpecRuleArgs(
 *             dimension="VALIDITY",
 *             name="rule1",
 *             description="rule 1 for validity dimension",
 *             table_condition_expectation=gcp.dataplex.DatascanDataQualitySpecRuleTableConditionExpectationArgs(
 *                 sql_expression="COUNT(*) > 0",
 *             ),
 *         )],
 *     ),
 *     project="my-project-name")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var basicQuality = new Gcp.DataPlex.Datascan("basic_quality", new()
 *     {
 *         Location = "us-central1",
 *         DataScanId = "dataquality-basic",
 *         Data = new Gcp.DataPlex.Inputs.DatascanDataArgs
 *         {
 *             Resource = "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare",
 *         },
 *         ExecutionSpec = new Gcp.DataPlex.Inputs.DatascanExecutionSpecArgs
 *         {
 *             Trigger = new Gcp.DataPlex.Inputs.DatascanExecutionSpecTriggerArgs
 *             {
 *                 OnDemand = null,
 *             },
 *         },
 *         DataQualitySpec = new Gcp.DataPlex.Inputs.DatascanDataQualitySpecArgs
 *         {
 *             Rules = new[]
 *             {
 *                 new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleArgs
 *                 {
 *                     Dimension = "VALIDITY",
 *                     Name = "rule1",
 *                     Description = "rule 1 for validity dimension",
 *                     TableConditionExpectation = new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleTableConditionExpectationArgs
 *                     {
 *                         SqlExpression = "COUNT(*) > 0",
 *                     },
 *                 },
 *             },
 *         },
 *         Project = "my-project-name",
 *     });
 * });
 * ```
 * ```go
 * 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.NewDatascan(ctx, "basic_quality", &dataplex.DatascanArgs{
 * 			Location:   pulumi.String("us-central1"),
 * 			DataScanId: pulumi.String("dataquality-basic"),
 * 			Data: &dataplex.DatascanDataArgs{
 * 				Resource: pulumi.String("//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare"),
 * 			},
 * 			ExecutionSpec: &dataplex.DatascanExecutionSpecArgs{
 * 				Trigger: &dataplex.DatascanExecutionSpecTriggerArgs{
 * 					OnDemand: nil,
 * 				},
 * 			},
 * 			DataQualitySpec: &dataplex.DatascanDataQualitySpecArgs{
 * 				Rules: dataplex.DatascanDataQualitySpecRuleArray{
 * 					&dataplex.DatascanDataQualitySpecRuleArgs{
 * 						Dimension:   pulumi.String("VALIDITY"),
 * 						Name:        pulumi.String("rule1"),
 * 						Description: pulumi.String("rule 1 for validity dimension"),
 * 						TableConditionExpectation: &dataplex.DatascanDataQualitySpecRuleTableConditionExpectationArgs{
 * 							SqlExpression: pulumi.String("COUNT(*) > 0"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 			Project: pulumi.String("my-project-name"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.dataplex.Datascan;
 * import com.pulumi.gcp.dataplex.DatascanArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecTriggerArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecTriggerOnDemandArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataQualitySpecArgs;
 * 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 basicQuality = new Datascan("basicQuality", DatascanArgs.builder()
 *             .location("us-central1")
 *             .dataScanId("dataquality-basic")
 *             .data(DatascanDataArgs.builder()
 *                 .resource("//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare")
 *                 .build())
 *             .executionSpec(DatascanExecutionSpecArgs.builder()
 *                 .trigger(DatascanExecutionSpecTriggerArgs.builder()
 *                     .onDemand()
 *                     .build())
 *                 .build())
 *             .dataQualitySpec(DatascanDataQualitySpecArgs.builder()
 *                 .rules(DatascanDataQualitySpecRuleArgs.builder()
 *                     .dimension("VALIDITY")
 *                     .name("rule1")
 *                     .description("rule 1 for validity dimension")
 *                     .tableConditionExpectation(DatascanDataQualitySpecRuleTableConditionExpectationArgs.builder()
 *                         .sqlExpression("COUNT(*) > 0")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .project("my-project-name")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   basicQuality:
 *     type: gcp:dataplex:Datascan
 *     name: basic_quality
 *     properties:
 *       location: us-central1
 *       dataScanId: dataquality-basic
 *       data:
 *         resource: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare
 *       executionSpec:
 *         trigger:
 *           onDemand: {}
 *       dataQualitySpec:
 *         rules:
 *           - dimension: VALIDITY
 *             name: rule1
 *             description: rule 1 for validity dimension
 *             tableConditionExpectation:
 *               sqlExpression: COUNT(*) > 0
 *       project: my-project-name
 * ```
 * 
 * ### Dataplex Datascan Full Quality
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const fullQuality = new gcp.dataplex.Datascan("full_quality", {
 *     location: "us-central1",
 *     displayName: "Full Datascan Quality",
 *     dataScanId: "dataquality-full",
 *     description: "Example resource - Full Datascan Quality",
 *     labels: {
 *         author: "billing",
 *     },
 *     data: {
 *         resource: "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/austin_bikeshare/tables/bikeshare_stations",
 *     },
 *     executionSpec: {
 *         trigger: {
 *             schedule: {
 *                 cron: "TZ=America/New_York 1 1 * * *",
 *             },
 *         },
 *         field: "modified_date",
 *     },
 *     dataQualitySpec: {
 *         samplingPercent: 5,
 *         rowFilter: "station_id > 1000",
 *         rules: [
 *             {
 *                 column: "address",
 *                 dimension: "VALIDITY",
 *                 threshold: 0.99,
 *                 nonNullExpectation: {},
 *             },
 *             {
 *                 column: "council_district",
 *                 dimension: "VALIDITY",
 *                 ignoreNull: true,
 *                 threshold: 0.9,
 *                 rangeExpectation: {
 *                     minValue: "1",
 *                     maxValue: "10",
 *                     strictMinEnabled: true,
 *                     strictMaxEnabled: false,
 *                 },
 *             },
 *             {
 *                 column: "power_type",
 *                 dimension: "VALIDITY",
 *                 ignoreNull: false,
 *                 regexExpectation: {
 *                     regex: ".*solar.*",
 *                 },
 *             },
 *             {
 *                 column: "property_type",
 *                 dimension: "VALIDITY",
 *                 ignoreNull: false,
 *                 setExpectation: {
 *                     values: [
 *                         "sidewalk",
 *                         "parkland",
 *                     ],
 *                 },
 *             },
 *             {
 *                 column: "address",
 *                 dimension: "UNIQUENESS",
 *                 uniquenessExpectation: {},
 *             },
 *             {
 *                 column: "number_of_docks",
 *                 dimension: "VALIDITY",
 *                 statisticRangeExpectation: {
 *                     statistic: "MEAN",
 *                     minValue: "5",
 *                     maxValue: "15",
 *                     strictMinEnabled: true,
 *                     strictMaxEnabled: true,
 *                 },
 *             },
 *             {
 *                 column: "footprint_length",
 *                 dimension: "VALIDITY",
 *                 rowConditionExpectation: {
 *                     sqlExpression: "footprint_length > 0 AND footprint_length <= 10",
 *                 },
 *             },
 *             {
 *                 dimension: "VALIDITY",
 *                 tableConditionExpectation: {
 *                     sqlExpression: "COUNT(*) > 0",
 *                 },
 *             },
 *         ],
 *     },
 *     project: "my-project-name",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * full_quality = gcp.dataplex.Datascan("full_quality",
 *     location="us-central1",
 *     display_name="Full Datascan Quality",
 *     data_scan_id="dataquality-full",
 *     description="Example resource - Full Datascan Quality",
 *     labels={
 *         "author": "billing",
 *     },
 *     data=gcp.dataplex.DatascanDataArgs(
 *         resource="//bigquery.googleapis.com/projects/bigquery-public-data/datasets/austin_bikeshare/tables/bikeshare_stations",
 *     ),
 *     execution_spec=gcp.dataplex.DatascanExecutionSpecArgs(
 *         trigger=gcp.dataplex.DatascanExecutionSpecTriggerArgs(
 *             schedule=gcp.dataplex.DatascanExecutionSpecTriggerScheduleArgs(
 *                 cron="TZ=America/New_York 1 1 * * *",
 *             ),
 *         ),
 *         field="modified_date",
 *     ),
 *     data_quality_spec=gcp.dataplex.DatascanDataQualitySpecArgs(
 *         sampling_percent=5,
 *         row_filter="station_id > 1000",
 *         rules=[
 *             gcp.dataplex.DatascanDataQualitySpecRuleArgs(
 *                 column="address",
 *                 dimension="VALIDITY",
 *                 threshold=0.99,
 *                 non_null_expectation=gcp.dataplex.DatascanDataQualitySpecRuleNonNullExpectationArgs(),
 *             ),
 *             gcp.dataplex.DatascanDataQualitySpecRuleArgs(
 *                 column="council_district",
 *                 dimension="VALIDITY",
 *                 ignore_null=True,
 *                 threshold=0.9,
 *                 range_expectation=gcp.dataplex.DatascanDataQualitySpecRuleRangeExpectationArgs(
 *                     min_value="1",
 *                     max_value="10",
 *                     strict_min_enabled=True,
 *                     strict_max_enabled=False,
 *                 ),
 *             ),
 *             gcp.dataplex.DatascanDataQualitySpecRuleArgs(
 *                 column="power_type",
 *                 dimension="VALIDITY",
 *                 ignore_null=False,
 *                 regex_expectation=gcp.dataplex.DatascanDataQualitySpecRuleRegexExpectationArgs(
 *                     regex=".*solar.*",
 *                 ),
 *             ),
 *             gcp.dataplex.DatascanDataQualitySpecRuleArgs(
 *                 column="property_type",
 *                 dimension="VALIDITY",
 *                 ignore_null=False,
 *                 set_expectation=gcp.dataplex.DatascanDataQualitySpecRuleSetExpectationArgs(
 *                     values=[
 *                         "sidewalk",
 *                         "parkland",
 *                     ],
 *                 ),
 *             ),
 *             gcp.dataplex.DatascanDataQualitySpecRuleArgs(
 *                 column="address",
 *                 dimension="UNIQUENESS",
 *                 uniqueness_expectation=gcp.dataplex.DatascanDataQualitySpecRuleUniquenessExpectationArgs(),
 *             ),
 *             gcp.dataplex.DatascanDataQualitySpecRuleArgs(
 *                 column="number_of_docks",
 *                 dimension="VALIDITY",
 *                 statistic_range_expectation=gcp.dataplex.DatascanDataQualitySpecRuleStatisticRangeExpectationArgs(
 *                     statistic="MEAN",
 *                     min_value="5",
 *                     max_value="15",
 *                     strict_min_enabled=True,
 *                     strict_max_enabled=True,
 *                 ),
 *             ),
 *             gcp.dataplex.DatascanDataQualitySpecRuleArgs(
 *                 column="footprint_length",
 *                 dimension="VALIDITY",
 *                 row_condition_expectation=gcp.dataplex.DatascanDataQualitySpecRuleRowConditionExpectationArgs(
 *                     sql_expression="footprint_length > 0 AND footprint_length <= 10",
 *                 ),
 *             ),
 *             gcp.dataplex.DatascanDataQualitySpecRuleArgs(
 *                 dimension="VALIDITY",
 *                 table_condition_expectation=gcp.dataplex.DatascanDataQualitySpecRuleTableConditionExpectationArgs(
 *                     sql_expression="COUNT(*) > 0",
 *                 ),
 *             ),
 *         ],
 *     ),
 *     project="my-project-name")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var fullQuality = new Gcp.DataPlex.Datascan("full_quality", new()
 *     {
 *         Location = "us-central1",
 *         DisplayName = "Full Datascan Quality",
 *         DataScanId = "dataquality-full",
 *         Description = "Example resource - Full Datascan Quality",
 *         Labels =
 *         {
 *             { "author", "billing" },
 *         },
 *         Data = new Gcp.DataPlex.Inputs.DatascanDataArgs
 *         {
 *             Resource = "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/austin_bikeshare/tables/bikeshare_stations",
 *         },
 *         ExecutionSpec = new Gcp.DataPlex.Inputs.DatascanExecutionSpecArgs
 *         {
 *             Trigger = new Gcp.DataPlex.Inputs.DatascanExecutionSpecTriggerArgs
 *             {
 *                 Schedule = new Gcp.DataPlex.Inputs.DatascanExecutionSpecTriggerScheduleArgs
 *                 {
 *                     Cron = "TZ=America/New_York 1 1 * * *",
 *                 },
 *             },
 *             Field = "modified_date",
 *         },
 *         DataQualitySpec = new Gcp.DataPlex.Inputs.DatascanDataQualitySpecArgs
 *         {
 *             SamplingPercent = 5,
 *             RowFilter = "station_id > 1000",
 *             Rules = new[]
 *             {
 *                 new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleArgs
 *                 {
 *                     Column = "address",
 *                     Dimension = "VALIDITY",
 *                     Threshold = 0.99,
 *                     NonNullExpectation = null,
 *                 },
 *                 new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleArgs
 *                 {
 *                     Column = "council_district",
 *                     Dimension = "VALIDITY",
 *                     IgnoreNull = true,
 *                     Threshold = 0.9,
 *                     RangeExpectation = new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleRangeExpectationArgs
 *                     {
 *                         MinValue = "1",
 *                         MaxValue = "10",
 *                         StrictMinEnabled = true,
 *                         StrictMaxEnabled = false,
 *                     },
 *                 },
 *                 new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleArgs
 *                 {
 *                     Column = "power_type",
 *                     Dimension = "VALIDITY",
 *                     IgnoreNull = false,
 *                     RegexExpectation = new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleRegexExpectationArgs
 *                     {
 *                         Regex = ".*solar.*",
 *                     },
 *                 },
 *                 new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleArgs
 *                 {
 *                     Column = "property_type",
 *                     Dimension = "VALIDITY",
 *                     IgnoreNull = false,
 *                     SetExpectation = new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleSetExpectationArgs
 *                     {
 *                         Values = new[]
 *                         {
 *                             "sidewalk",
 *                             "parkland",
 *                         },
 *                     },
 *                 },
 *                 new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleArgs
 *                 {
 *                     Column = "address",
 *                     Dimension = "UNIQUENESS",
 *                     UniquenessExpectation = null,
 *                 },
 *                 new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleArgs
 *                 {
 *                     Column = "number_of_docks",
 *                     Dimension = "VALIDITY",
 *                     StatisticRangeExpectation = new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleStatisticRangeExpectationArgs
 *                     {
 *                         Statistic = "MEAN",
 *                         MinValue = "5",
 *                         MaxValue = "15",
 *                         StrictMinEnabled = true,
 *                         StrictMaxEnabled = true,
 *                     },
 *                 },
 *                 new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleArgs
 *                 {
 *                     Column = "footprint_length",
 *                     Dimension = "VALIDITY",
 *                     RowConditionExpectation = new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleRowConditionExpectationArgs
 *                     {
 *                         SqlExpression = "footprint_length > 0 AND footprint_length <= 10",
 *                     },
 *                 },
 *                 new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleArgs
 *                 {
 *                     Dimension = "VALIDITY",
 *                     TableConditionExpectation = new Gcp.DataPlex.Inputs.DatascanDataQualitySpecRuleTableConditionExpectationArgs
 *                     {
 *                         SqlExpression = "COUNT(*) > 0",
 *                     },
 *                 },
 *             },
 *         },
 *         Project = "my-project-name",
 *     });
 * });
 * ```
 * ```go
 * 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.NewDatascan(ctx, "full_quality", &dataplex.DatascanArgs{
 * 			Location:    pulumi.String("us-central1"),
 * 			DisplayName: pulumi.String("Full Datascan Quality"),
 * 			DataScanId:  pulumi.String("dataquality-full"),
 * 			Description: pulumi.String("Example resource - Full Datascan Quality"),
 * 			Labels: pulumi.StringMap{
 * 				"author": pulumi.String("billing"),
 * 			},
 * 			Data: &dataplex.DatascanDataArgs{
 * 				Resource: pulumi.String("//bigquery.googleapis.com/projects/bigquery-public-data/datasets/austin_bikeshare/tables/bikeshare_stations"),
 * 			},
 * 			ExecutionSpec: &dataplex.DatascanExecutionSpecArgs{
 * 				Trigger: &dataplex.DatascanExecutionSpecTriggerArgs{
 * 					Schedule: &dataplex.DatascanExecutionSpecTriggerScheduleArgs{
 * 						Cron: pulumi.String("TZ=America/New_York 1 1 * * *"),
 * 					},
 * 				},
 * 				Field: pulumi.String("modified_date"),
 * 			},
 * 			DataQualitySpec: &dataplex.DatascanDataQualitySpecArgs{
 * 				SamplingPercent: pulumi.Float64(5),
 * 				RowFilter:       pulumi.String("station_id > 1000"),
 * 				Rules: dataplex.DatascanDataQualitySpecRuleArray{
 * 					&dataplex.DatascanDataQualitySpecRuleArgs{
 * 						Column:             pulumi.String("address"),
 * 						Dimension:          pulumi.String("VALIDITY"),
 * 						Threshold:          pulumi.Float64(0.99),
 * 						NonNullExpectation: nil,
 * 					},
 * 					&dataplex.DatascanDataQualitySpecRuleArgs{
 * 						Column:     pulumi.String("council_district"),
 * 						Dimension:  pulumi.String("VALIDITY"),
 * 						IgnoreNull: pulumi.Bool(true),
 * 						Threshold:  pulumi.Float64(0.9),
 * 						RangeExpectation: &dataplex.DatascanDataQualitySpecRuleRangeExpectationArgs{
 * 							MinValue:         pulumi.String("1"),
 * 							MaxValue:         pulumi.String("10"),
 * 							StrictMinEnabled: pulumi.Bool(true),
 * 							StrictMaxEnabled: pulumi.Bool(false),
 * 						},
 * 					},
 * 					&dataplex.DatascanDataQualitySpecRuleArgs{
 * 						Column:     pulumi.String("power_type"),
 * 						Dimension:  pulumi.String("VALIDITY"),
 * 						IgnoreNull: pulumi.Bool(false),
 * 						RegexExpectation: &dataplex.DatascanDataQualitySpecRuleRegexExpectationArgs{
 * 							Regex: pulumi.String(".*solar.*"),
 * 						},
 * 					},
 * 					&dataplex.DatascanDataQualitySpecRuleArgs{
 * 						Column:     pulumi.String("property_type"),
 * 						Dimension:  pulumi.String("VALIDITY"),
 * 						IgnoreNull: pulumi.Bool(false),
 * 						SetExpectation: &dataplex.DatascanDataQualitySpecRuleSetExpectationArgs{
 * 							Values: pulumi.StringArray{
 * 								pulumi.String("sidewalk"),
 * 								pulumi.String("parkland"),
 * 							},
 * 						},
 * 					},
 * 					&dataplex.DatascanDataQualitySpecRuleArgs{
 * 						Column:                pulumi.String("address"),
 * 						Dimension:             pulumi.String("UNIQUENESS"),
 * 						UniquenessExpectation: nil,
 * 					},
 * 					&dataplex.DatascanDataQualitySpecRuleArgs{
 * 						Column:    pulumi.String("number_of_docks"),
 * 						Dimension: pulumi.String("VALIDITY"),
 * 						StatisticRangeExpectation: &dataplex.DatascanDataQualitySpecRuleStatisticRangeExpectationArgs{
 * 							Statistic:        pulumi.String("MEAN"),
 * 							MinValue:         pulumi.String("5"),
 * 							MaxValue:         pulumi.String("15"),
 * 							StrictMinEnabled: pulumi.Bool(true),
 * 							StrictMaxEnabled: pulumi.Bool(true),
 * 						},
 * 					},
 * 					&dataplex.DatascanDataQualitySpecRuleArgs{
 * 						Column:    pulumi.String("footprint_length"),
 * 						Dimension: pulumi.String("VALIDITY"),
 * 						RowConditionExpectation: &dataplex.DatascanDataQualitySpecRuleRowConditionExpectationArgs{
 * 							SqlExpression: pulumi.String("footprint_length > 0 AND footprint_length <= 10"),
 * 						},
 * 					},
 * 					&dataplex.DatascanDataQualitySpecRuleArgs{
 * 						Dimension: pulumi.String("VALIDITY"),
 * 						TableConditionExpectation: &dataplex.DatascanDataQualitySpecRuleTableConditionExpectationArgs{
 * 							SqlExpression: pulumi.String("COUNT(*) > 0"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 			Project: pulumi.String("my-project-name"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.dataplex.Datascan;
 * import com.pulumi.gcp.dataplex.DatascanArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecTriggerArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecTriggerScheduleArgs;
 * import com.pulumi.gcp.dataplex.inputs.DatascanDataQualitySpecArgs;
 * 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 fullQuality = new Datascan("fullQuality", DatascanArgs.builder()
 *             .location("us-central1")
 *             .displayName("Full Datascan Quality")
 *             .dataScanId("dataquality-full")
 *             .description("Example resource - Full Datascan Quality")
 *             .labels(Map.of("author", "billing"))
 *             .data(DatascanDataArgs.builder()
 *                 .resource("//bigquery.googleapis.com/projects/bigquery-public-data/datasets/austin_bikeshare/tables/bikeshare_stations")
 *                 .build())
 *             .executionSpec(DatascanExecutionSpecArgs.builder()
 *                 .trigger(DatascanExecutionSpecTriggerArgs.builder()
 *                     .schedule(DatascanExecutionSpecTriggerScheduleArgs.builder()
 *                         .cron("TZ=America/New_York 1 1 * * *")
 *                         .build())
 *                     .build())
 *                 .field("modified_date")
 *                 .build())
 *             .dataQualitySpec(DatascanDataQualitySpecArgs.builder()
 *                 .samplingPercent(5)
 *                 .rowFilter("station_id > 1000")
 *                 .rules(
 *                     DatascanDataQualitySpecRuleArgs.builder()
 *                         .column("address")
 *                         .dimension("VALIDITY")
 *                         .threshold(0.99)
 *                         .nonNullExpectation()
 *                         .build(),
 *                     DatascanDataQualitySpecRuleArgs.builder()
 *                         .column("council_district")
 *                         .dimension("VALIDITY")
 *                         .ignoreNull(true)
 *                         .threshold(0.9)
 *                         .rangeExpectation(DatascanDataQualitySpecRuleRangeExpectationArgs.builder()
 *                             .minValue(1)
 *                             .maxValue(10)
 *                             .strictMinEnabled(true)
 *                             .strictMaxEnabled(false)
 *                             .build())
 *                         .build(),
 *                     DatascanDataQualitySpecRuleArgs.builder()
 *                         .column("power_type")
 *                         .dimension("VALIDITY")
 *                         .ignoreNull(false)
 *                         .regexExpectation(DatascanDataQualitySpecRuleRegexExpectationArgs.builder()
 *                             .regex(".*solar.*")
 *                             .build())
 *                         .build(),
 *                     DatascanDataQualitySpecRuleArgs.builder()
 *                         .column("property_type")
 *                         .dimension("VALIDITY")
 *                         .ignoreNull(false)
 *                         .setExpectation(DatascanDataQualitySpecRuleSetExpectationArgs.builder()
 *                             .values(
 *                                 "sidewalk",
 *                                 "parkland")
 *                             .build())
 *                         .build(),
 *                     DatascanDataQualitySpecRuleArgs.builder()
 *                         .column("address")
 *                         .dimension("UNIQUENESS")
 *                         .uniquenessExpectation()
 *                         .build(),
 *                     DatascanDataQualitySpecRuleArgs.builder()
 *                         .column("number_of_docks")
 *                         .dimension("VALIDITY")
 *                         .statisticRangeExpectation(DatascanDataQualitySpecRuleStatisticRangeExpectationArgs.builder()
 *                             .statistic("MEAN")
 *                             .minValue(5)
 *                             .maxValue(15)
 *                             .strictMinEnabled(true)
 *                             .strictMaxEnabled(true)
 *                             .build())
 *                         .build(),
 *                     DatascanDataQualitySpecRuleArgs.builder()
 *                         .column("footprint_length")
 *                         .dimension("VALIDITY")
 *                         .rowConditionExpectation(DatascanDataQualitySpecRuleRowConditionExpectationArgs.builder()
 *                             .sqlExpression("footprint_length > 0 AND footprint_length <= 10")
 *                             .build())
 *                         .build(),
 *                     DatascanDataQualitySpecRuleArgs.builder()
 *                         .dimension("VALIDITY")
 *                         .tableConditionExpectation(DatascanDataQualitySpecRuleTableConditionExpectationArgs.builder()
 *                             .sqlExpression("COUNT(*) > 0")
 *                             .build())
 *                         .build())
 *                 .build())
 *             .project("my-project-name")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   fullQuality:
 *     type: gcp:dataplex:Datascan
 *     name: full_quality
 *     properties:
 *       location: us-central1
 *       displayName: Full Datascan Quality
 *       dataScanId: dataquality-full
 *       description: Example resource - Full Datascan Quality
 *       labels:
 *         author: billing
 *       data:
 *         resource: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/austin_bikeshare/tables/bikeshare_stations
 *       executionSpec:
 *         trigger:
 *           schedule:
 *             cron: TZ=America/New_York 1 1 * * *
 *         field: modified_date
 *       dataQualitySpec:
 *         samplingPercent: 5
 *         rowFilter: station_id > 1000
 *         rules:
 *           - column: address
 *             dimension: VALIDITY
 *             threshold: 0.99
 *             nonNullExpectation: {}
 *           - column: council_district
 *             dimension: VALIDITY
 *             ignoreNull: true
 *             threshold: 0.9
 *             rangeExpectation:
 *               minValue: 1
 *               maxValue: 10
 *               strictMinEnabled: true
 *               strictMaxEnabled: false
 *           - column: power_type
 *             dimension: VALIDITY
 *             ignoreNull: false
 *             regexExpectation:
 *               regex: .*solar.*
 *           - column: property_type
 *             dimension: VALIDITY
 *             ignoreNull: false
 *             setExpectation:
 *               values:
 *                 - sidewalk
 *                 - parkland
 *           - column: address
 *             dimension: UNIQUENESS
 *             uniquenessExpectation: {}
 *           - column: number_of_docks
 *             dimension: VALIDITY
 *             statisticRangeExpectation:
 *               statistic: MEAN
 *               minValue: 5
 *               maxValue: 15
 *               strictMinEnabled: true
 *               strictMaxEnabled: true
 *           - column: footprint_length
 *             dimension: VALIDITY
 *             rowConditionExpectation:
 *               sqlExpression: footprint_length > 0 AND footprint_length <= 10
 *           - dimension: VALIDITY
 *             tableConditionExpectation:
 *               sqlExpression: COUNT(*) > 0
 *       project: my-project-name
 * ```
 * 
 * ## Import
 * Datascan can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/dataScans/{{data_scan_id}}`
 * * `{{project}}/{{location}}/{{data_scan_id}}`
 * * `{{location}}/{{data_scan_id}}`
 * * `{{data_scan_id}}`
 * When using the `pulumi import` command, Datascan can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:dataplex/datascan:Datascan default projects/{{project}}/locations/{{location}}/dataScans/{{data_scan_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:dataplex/datascan:Datascan default {{project}}/{{location}}/{{data_scan_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:dataplex/datascan:Datascan default {{location}}/{{data_scan_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:dataplex/datascan:Datascan default {{data_scan_id}}
 * ```
 */
public class Datascan internal constructor(
    override val javaResource: com.pulumi.gcp.dataplex.Datascan,
) : KotlinCustomResource(javaResource, DatascanMapper) {
    /**
     * The time when the scan was created.
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * The data source for DataScan.
     * Structure is documented below.
     */
    public val `data`: Output
        get() = javaResource.`data`().applyValue({ args0 ->
            args0.let({ args0 ->
                datascanDataToKotlin(args0)
            })
        })

    /**
     * DataProfileScan related setting.
     */
    public val dataProfileSpec: Output?
        get() = javaResource.dataProfileSpec().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> datascanDataProfileSpecToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * DataQualityScan related setting.
     */
    public val dataQualitySpec: Output?
        get() = javaResource.dataQualitySpec().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> datascanDataQualitySpecToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * DataScan identifier. Must contain only lowercase letters, numbers and hyphens. Must start with a letter. Must end with a number or a letter.
     */
    public val dataScanId: Output
        get() = javaResource.dataScanId().applyValue({ args0 -> args0 })

    /**
     * Description of the scan.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * User friendly display name.
     */
    public val displayName: Output?
        get() = javaResource.displayName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
     */
    public val effectiveLabels: Output>
        get() = javaResource.effectiveLabels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * DataScan execution settings.
     * Structure is documented below.
     */
    public val executionSpec: Output
        get() = javaResource.executionSpec().applyValue({ args0 ->
            args0.let({ args0 ->
                datascanExecutionSpecToKotlin(args0)
            })
        })

    /**
     * Status of the data scan execution.
     * Structure is documented below.
     */
    public val executionStatuses: Output>
        get() = javaResource.executionStatuses().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> datascanExecutionStatusToKotlin(args0) })
            })
        })

    /**
     * User-defined labels for the scan. A list of key->value pairs. **Note**: This field is non-authoritative, and will only
     * manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels
     * present on the resource.
     */
    public val labels: Output>?
        get() = javaResource.labels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * The location where the data scan should reside.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * The relative resource name of the scan, of the form: projects/{project}/locations/{locationId}/dataScans/{datascan_id}, where project refers to a project_id or project_number and locationId refers to a GCP region.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * The combination of labels configured directly on the resource
     * and default labels configured on the provider.
     */
    public val pulumiLabels: Output>
        get() = javaResource.pulumiLabels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * Current state of the DataScan.
     */
    public val state: Output
        get() = javaResource.state().applyValue({ args0 -> args0 })

    /**
     * The type of DataScan.
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 -> args0 })

    /**
     * System generated globally unique ID for the scan. This ID will be different if the scan is deleted and re-created with the same name.
     */
    public val uid: Output
        get() = javaResource.uid().applyValue({ args0 -> args0 })

    /**
     * The time when the scan was last updated.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object DatascanMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.dataplex.Datascan::class == javaResource::class

    override fun map(javaResource: Resource): Datascan = Datascan(
        javaResource as
            com.pulumi.gcp.dataplex.Datascan,
    )
}

/**
 * @see [Datascan].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Datascan].
 */
public suspend fun datascan(name: String, block: suspend DatascanResourceBuilder.() -> Unit): Datascan {
    val builder = DatascanResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Datascan].
 * @param name The _unique_ name of the resulting resource.
 */
public fun datascan(name: String): Datascan {
    val builder = DatascanResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy