@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
141 lines • 5.34 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataQualityRuleset = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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]",
* });
* ```
*
* ### 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]",
* });
* ```
*
* ### 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",
* },
* });
* ```
*
* ### With targetTable
*
* ```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,
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Glue Data Quality Ruleset using the `name`. For example:
*
* ```sh
* $ pulumi import aws:glue/dataQualityRuleset:DataQualityRuleset example exampleName
* ```
*/
class DataQualityRuleset extends pulumi.CustomResource {
/**
* Get an existing DataQualityRuleset 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, id, state, opts) {
return new DataQualityRuleset(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of DataQualityRuleset. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === DataQualityRuleset.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["createdOn"] = state?.createdOn;
resourceInputs["description"] = state?.description;
resourceInputs["lastModifiedOn"] = state?.lastModifiedOn;
resourceInputs["name"] = state?.name;
resourceInputs["recommendationRunId"] = state?.recommendationRunId;
resourceInputs["region"] = state?.region;
resourceInputs["ruleset"] = state?.ruleset;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["targetTable"] = state?.targetTable;
}
else {
const args = argsOrState;
if (args?.ruleset === undefined && !opts.urn) {
throw new Error("Missing required property 'ruleset'");
}
resourceInputs["description"] = args?.description;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["ruleset"] = args?.ruleset;
resourceInputs["tags"] = args?.tags;
resourceInputs["targetTable"] = args?.targetTable;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["createdOn"] = undefined /*out*/;
resourceInputs["lastModifiedOn"] = undefined /*out*/;
resourceInputs["recommendationRunId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DataQualityRuleset.__pulumiType, name, resourceInputs, opts);
}
}
exports.DataQualityRuleset = DataQualityRuleset;
/** @internal */
DataQualityRuleset.__pulumiType = 'aws:glue/dataQualityRuleset:DataQualityRuleset';
//# sourceMappingURL=dataQualityRuleset.js.map