com.pulumi.aws.glue.kotlin.DataQualityRuleset.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.glue.kotlin
import com.pulumi.aws.glue.kotlin.outputs.DataQualityRulesetTargetTable
import com.pulumi.aws.glue.kotlin.outputs.DataQualityRulesetTargetTable.Companion.toKotlin
import com.pulumi.core.Output
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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [DataQualityRuleset].
*/
@PulumiTagMarker
public class DataQualityRulesetResourceBuilder internal constructor() {
public var name: String? = null
public var args: DataQualityRulesetArgs = DataQualityRulesetArgs()
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 DataQualityRulesetArgsBuilder.() -> Unit) {
val builder = DataQualityRulesetArgsBuilder()
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(): DataQualityRuleset {
val builtJavaResource = com.pulumi.aws.glue.DataQualityRuleset(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DataQualityRuleset(builtJavaResource)
}
}
/**
* Provides a Glue Data Quality Ruleset Resource. You can refer to the [Glue Developer Guide](https://docs.aws.amazon.com/glue/latest/dg/glue-data-quality.html) for a full explanation of the Glue Data Quality Ruleset functionality
* ## Example Usage
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.glue.DataQualityRuleset("example", {
* name: "example",
* ruleset: "Rules = [Completeness \"colA\" between 0.4 and 0.8]",
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.glue.DataQualityRuleset("example",
* name="example",
* ruleset="Rules = [Completeness \"colA\" between 0.4 and 0.8]")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Glue.DataQualityRuleset("example", new()
* {
* Name = "example",
* Ruleset = "Rules = [Completeness \"colA\" between 0.4 and 0.8]",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := glue.NewDataQualityRuleset(ctx, "example", &glue.DataQualityRulesetArgs{
* Name: pulumi.String("example"),
* Ruleset: pulumi.String("Rules = [Completeness \"colA\" between 0.4 and 0.8]"),
* })
* 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.aws.glue.DataQualityRuleset;
* import com.pulumi.aws.glue.DataQualityRulesetArgs;
* 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 example = new DataQualityRuleset("example", DataQualityRulesetArgs.builder()
* .name("example")
* .ruleset("Rules = [Completeness \"colA\" between 0.4 and 0.8]")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:glue:DataQualityRuleset
* properties:
* name: example
* ruleset: Rules = [Completeness "colA" between 0.4 and 0.8]
* ```
*
* ### With description
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.glue.DataQualityRuleset("example", {
* name: "example",
* description: "example",
* ruleset: "Rules = [Completeness \"colA\" between 0.4 and 0.8]",
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.glue.DataQualityRuleset("example",
* name="example",
* description="example",
* ruleset="Rules = [Completeness \"colA\" between 0.4 and 0.8]")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Glue.DataQualityRuleset("example", new()
* {
* Name = "example",
* Description = "example",
* Ruleset = "Rules = [Completeness \"colA\" between 0.4 and 0.8]",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := glue.NewDataQualityRuleset(ctx, "example", &glue.DataQualityRulesetArgs{
* Name: pulumi.String("example"),
* Description: pulumi.String("example"),
* Ruleset: pulumi.String("Rules = [Completeness \"colA\" between 0.4 and 0.8]"),
* })
* 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.aws.glue.DataQualityRuleset;
* import com.pulumi.aws.glue.DataQualityRulesetArgs;
* 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 example = new DataQualityRuleset("example", DataQualityRulesetArgs.builder()
* .name("example")
* .description("example")
* .ruleset("Rules = [Completeness \"colA\" between 0.4 and 0.8]")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:glue:DataQualityRuleset
* properties:
* name: example
* description: example
* ruleset: Rules = [Completeness "colA" between 0.4 and 0.8]
* ```
*
* ### With tags
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.glue.DataQualityRuleset("example", {
* name: "example",
* ruleset: "Rules = [Completeness \"colA\" between 0.4 and 0.8]",
* tags: {
* hello: "world",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.glue.DataQualityRuleset("example",
* name="example",
* ruleset="Rules = [Completeness \"colA\" between 0.4 and 0.8]",
* tags={
* "hello": "world",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Glue.DataQualityRuleset("example", new()
* {
* Name = "example",
* Ruleset = "Rules = [Completeness \"colA\" between 0.4 and 0.8]",
* Tags =
* {
* { "hello", "world" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := glue.NewDataQualityRuleset(ctx, "example", &glue.DataQualityRulesetArgs{
* Name: pulumi.String("example"),
* Ruleset: pulumi.String("Rules = [Completeness \"colA\" between 0.4 and 0.8]"),
* Tags: pulumi.StringMap{
* "hello": pulumi.String("world"),
* },
* })
* 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.aws.glue.DataQualityRuleset;
* import com.pulumi.aws.glue.DataQualityRulesetArgs;
* 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 example = new DataQualityRuleset("example", DataQualityRulesetArgs.builder()
* .name("example")
* .ruleset("Rules = [Completeness \"colA\" between 0.4 and 0.8]")
* .tags(Map.of("hello", "world"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:glue:DataQualityRuleset
* properties:
* name: example
* ruleset: Rules = [Completeness "colA" between 0.4 and 0.8]
* tags:
* hello: world
* ```
*
* ### With target_table
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.glue.DataQualityRuleset("example", {
* name: "example",
* ruleset: "Rules = [Completeness \"colA\" between 0.4 and 0.8]",
* targetTable: {
* databaseName: exampleAwsGlueCatalogDatabase.name,
* tableName: exampleAwsGlueCatalogTable.name,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.glue.DataQualityRuleset("example",
* name="example",
* ruleset="Rules = [Completeness \"colA\" between 0.4 and 0.8]",
* target_table={
* "database_name": example_aws_glue_catalog_database["name"],
* "table_name": example_aws_glue_catalog_table["name"],
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Glue.DataQualityRuleset("example", new()
* {
* Name = "example",
* Ruleset = "Rules = [Completeness \"colA\" between 0.4 and 0.8]",
* TargetTable = new Aws.Glue.Inputs.DataQualityRulesetTargetTableArgs
* {
* DatabaseName = exampleAwsGlueCatalogDatabase.Name,
* TableName = exampleAwsGlueCatalogTable.Name,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := glue.NewDataQualityRuleset(ctx, "example", &glue.DataQualityRulesetArgs{
* Name: pulumi.String("example"),
* Ruleset: pulumi.String("Rules = [Completeness \"colA\" between 0.4 and 0.8]"),
* TargetTable: &glue.DataQualityRulesetTargetTableArgs{
* DatabaseName: pulumi.Any(exampleAwsGlueCatalogDatabase.Name),
* TableName: pulumi.Any(exampleAwsGlueCatalogTable.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.aws.glue.DataQualityRuleset;
* import com.pulumi.aws.glue.DataQualityRulesetArgs;
* import com.pulumi.aws.glue.inputs.DataQualityRulesetTargetTableArgs;
* 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 example = new DataQualityRuleset("example", DataQualityRulesetArgs.builder()
* .name("example")
* .ruleset("Rules = [Completeness \"colA\" between 0.4 and 0.8]")
* .targetTable(DataQualityRulesetTargetTableArgs.builder()
* .databaseName(exampleAwsGlueCatalogDatabase.name())
* .tableName(exampleAwsGlueCatalogTable.name())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:glue:DataQualityRuleset
* properties:
* name: example
* ruleset: Rules = [Completeness "colA" between 0.4 and 0.8]
* targetTable:
* databaseName: ${exampleAwsGlueCatalogDatabase.name}
* tableName: ${exampleAwsGlueCatalogTable.name}
* ```
*
* ## Import
* Using `pulumi import`, import Glue Data Quality Ruleset using the `name`. For example:
* ```sh
* $ pulumi import aws:glue/dataQualityRuleset:DataQualityRuleset example exampleName
* ```
*/
public class DataQualityRuleset internal constructor(
override val javaResource: com.pulumi.aws.glue.DataQualityRuleset,
) : KotlinCustomResource(javaResource, DataQualityRulesetMapper) {
/**
* ARN of the Glue Data Quality Ruleset.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The time and date that this data quality ruleset was created.
*/
public val createdOn: Output
get() = javaResource.createdOn().applyValue({ args0 -> args0 })
/**
* Description of the data quality ruleset.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The time and date that this data quality ruleset was created.
*/
public val lastModifiedOn: Output
get() = javaResource.lastModifiedOn().applyValue({ args0 -> args0 })
/**
* Name of the data quality ruleset.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* When a ruleset was created from a recommendation run, this run ID is generated to link the two together.
*/
public val recommendationRunId: Output
get() = javaResource.recommendationRunId().applyValue({ args0 -> args0 })
/**
* A Data Quality Definition Language (DQDL) ruleset. For more information, see the AWS Glue developer guide.
*/
public val ruleset: Output
get() = javaResource.ruleset().applyValue({ args0 -> args0 })
/**
* Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy