@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
262 lines • 10.2 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.DataSet = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing a QuickSight Data Set.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.quicksight.DataSet("example", {
* dataSetId: "example-id",
* name: "example-name",
* importMode: "SPICE",
* physicalTableMaps: [{
* physicalTableMapId: "example-id",
* s3Source: {
* dataSourceArn: exampleAwsQuicksightDataSource.arn,
* inputColumns: [{
* name: "Column1",
* type: "STRING",
* }],
* uploadSettings: {
* format: "JSON",
* },
* },
* }],
* });
* ```
*
* ### With Column Level Permission Rules
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.quicksight.DataSet("example", {
* dataSetId: "example-id",
* name: "example-name",
* importMode: "SPICE",
* physicalTableMaps: [{
* physicalTableMapId: "example-id",
* s3Source: {
* dataSourceArn: exampleAwsQuicksightDataSource.arn,
* inputColumns: [{
* name: "Column1",
* type: "STRING",
* }],
* uploadSettings: {
* format: "JSON",
* },
* },
* }],
* columnLevelPermissionRules: [{
* columnNames: ["Column1"],
* principals: [exampleAwsQuicksightUser.arn],
* }],
* });
* ```
*
* ### With Field Folders
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.quicksight.DataSet("example", {
* dataSetId: "example-id",
* name: "example-name",
* importMode: "SPICE",
* physicalTableMaps: [{
* physicalTableMapId: "example-id",
* s3Source: {
* dataSourceArn: exampleAwsQuicksightDataSource.arn,
* inputColumns: [{
* name: "Column1",
* type: "STRING",
* }],
* uploadSettings: {
* format: "JSON",
* },
* },
* }],
* fieldFolders: [{
* fieldFoldersId: "example-id",
* columns: ["Column1"],
* description: "example description",
* }],
* });
* ```
*
* ### With Permissions
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.quicksight.DataSet("example", {
* dataSetId: "example-id",
* name: "example-name",
* importMode: "SPICE",
* physicalTableMaps: [{
* physicalTableMapId: "example-id",
* s3Source: {
* dataSourceArn: exampleAwsQuicksightDataSource.arn,
* inputColumns: [{
* name: "Column1",
* type: "STRING",
* }],
* uploadSettings: {
* format: "JSON",
* },
* },
* }],
* permissions: [{
* actions: [
* "quicksight:DescribeDataSet",
* "quicksight:DescribeDataSetPermissions",
* "quicksight:PassDataSet",
* "quicksight:DescribeIngestion",
* "quicksight:ListIngestions",
* ],
* principal: exampleAwsQuicksightUser.arn,
* }],
* });
* ```
*
* ### With Row Level Permission Tag Configuration
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.quicksight.DataSet("example", {
* dataSetId: "example-id",
* name: "example-name",
* importMode: "SPICE",
* physicalTableMaps: [{
* physicalTableMapId: "example-id",
* s3Source: {
* dataSourceArn: exampleAwsQuicksightDataSource.arn,
* inputColumns: [{
* name: "Column1",
* type: "STRING",
* }],
* uploadSettings: {
* format: "JSON",
* },
* },
* }],
* rowLevelPermissionTagConfiguration: {
* status: "ENABLED",
* tagRules: [{
* columnName: "Column1",
* tagKey: "tagkey",
* matchAllValue: "*",
* tagMultiValueDelimiter: ",",
* }],
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import a QuickSight Data Set using the AWS account ID and data set ID separated by a comma (`,`). For example:
*
* ```sh
* $ pulumi import aws:quicksight/dataSet:DataSet example 123456789012,example-id
* ```
*/
class DataSet extends pulumi.CustomResource {
/**
* Get an existing DataSet 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 DataSet(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of DataSet. 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'] === DataSet.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["awsAccountId"] = state ? state.awsAccountId : undefined;
resourceInputs["columnGroups"] = state ? state.columnGroups : undefined;
resourceInputs["columnLevelPermissionRules"] = state ? state.columnLevelPermissionRules : undefined;
resourceInputs["dataSetId"] = state ? state.dataSetId : undefined;
resourceInputs["dataSetUsageConfiguration"] = state ? state.dataSetUsageConfiguration : undefined;
resourceInputs["fieldFolders"] = state ? state.fieldFolders : undefined;
resourceInputs["importMode"] = state ? state.importMode : undefined;
resourceInputs["logicalTableMaps"] = state ? state.logicalTableMaps : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["outputColumns"] = state ? state.outputColumns : undefined;
resourceInputs["permissions"] = state ? state.permissions : undefined;
resourceInputs["physicalTableMaps"] = state ? state.physicalTableMaps : undefined;
resourceInputs["refreshProperties"] = state ? state.refreshProperties : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["rowLevelPermissionDataSet"] = state ? state.rowLevelPermissionDataSet : undefined;
resourceInputs["rowLevelPermissionTagConfiguration"] = state ? state.rowLevelPermissionTagConfiguration : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
}
else {
const args = argsOrState;
if ((!args || args.dataSetId === undefined) && !opts.urn) {
throw new Error("Missing required property 'dataSetId'");
}
if ((!args || args.importMode === undefined) && !opts.urn) {
throw new Error("Missing required property 'importMode'");
}
resourceInputs["awsAccountId"] = args ? args.awsAccountId : undefined;
resourceInputs["columnGroups"] = args ? args.columnGroups : undefined;
resourceInputs["columnLevelPermissionRules"] = args ? args.columnLevelPermissionRules : undefined;
resourceInputs["dataSetId"] = args ? args.dataSetId : undefined;
resourceInputs["dataSetUsageConfiguration"] = args ? args.dataSetUsageConfiguration : undefined;
resourceInputs["fieldFolders"] = args ? args.fieldFolders : undefined;
resourceInputs["importMode"] = args ? args.importMode : undefined;
resourceInputs["logicalTableMaps"] = args ? args.logicalTableMaps : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["permissions"] = args ? args.permissions : undefined;
resourceInputs["physicalTableMaps"] = args ? args.physicalTableMaps : undefined;
resourceInputs["refreshProperties"] = args ? args.refreshProperties : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["rowLevelPermissionDataSet"] = args ? args.rowLevelPermissionDataSet : undefined;
resourceInputs["rowLevelPermissionTagConfiguration"] = args ? args.rowLevelPermissionTagConfiguration : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["outputColumns"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DataSet.__pulumiType, name, resourceInputs, opts);
}
}
exports.DataSet = DataSet;
/** @internal */
DataSet.__pulumiType = 'aws:quicksight/dataSet:DataSet';
//# sourceMappingURL=dataSet.js.map