UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

142 lines 4.98 kB
"use strict"; // *** 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.RefreshSchedule = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing a QuickSight Refresh Schedule. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.quicksight.RefreshSchedule("example", { * dataSetId: "dataset-id", * scheduleId: "schedule-id", * schedule: { * refreshType: "FULL_REFRESH", * scheduleFrequency: { * interval: "HOURLY", * }, * }, * }); * ``` * * ### With Weekly Refresh * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.quicksight.RefreshSchedule("example", { * dataSetId: "dataset-id", * scheduleId: "schedule-id", * schedule: { * refreshType: "INCREMENTAL_REFRESH", * scheduleFrequency: { * interval: "WEEKLY", * timeOfTheDay: "01:00", * timezone: "Europe/London", * refreshOnDay: { * dayOfWeek: "MONDAY", * }, * }, * }, * }); * ``` * * ### With Monthly Refresh * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.quicksight.RefreshSchedule("example", { * dataSetId: "dataset-id", * scheduleId: "schedule-id", * schedule: { * refreshType: "INCREMENTAL_REFRESH", * scheduleFrequency: { * interval: "MONTHLY", * timeOfTheDay: "01:00", * timezone: "Europe/London", * refreshOnDay: { * dayOfMonth: "1", * }, * }, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import a QuickSight Refresh Schedule using the AWS account ID, data set ID and schedule ID separated by commas (`,`). For example: * * ```sh * $ pulumi import aws:quicksight/refreshSchedule:RefreshSchedule example 123456789012,dataset-id,schedule-id * ``` */ class RefreshSchedule extends pulumi.CustomResource { /** * Get an existing RefreshSchedule 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 RefreshSchedule(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of RefreshSchedule. 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'] === RefreshSchedule.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["awsAccountId"] = state?.awsAccountId; resourceInputs["dataSetId"] = state?.dataSetId; resourceInputs["region"] = state?.region; resourceInputs["schedule"] = state?.schedule; resourceInputs["scheduleId"] = state?.scheduleId; } else { const args = argsOrState; if (args?.dataSetId === undefined && !opts.urn) { throw new Error("Missing required property 'dataSetId'"); } if (args?.scheduleId === undefined && !opts.urn) { throw new Error("Missing required property 'scheduleId'"); } resourceInputs["awsAccountId"] = args?.awsAccountId; resourceInputs["dataSetId"] = args?.dataSetId; resourceInputs["region"] = args?.region; resourceInputs["schedule"] = args?.schedule; resourceInputs["scheduleId"] = args?.scheduleId; resourceInputs["arn"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(RefreshSchedule.__pulumiType, name, resourceInputs, opts); } } exports.RefreshSchedule = RefreshSchedule; /** @internal */ RefreshSchedule.__pulumiType = 'aws:quicksight/refreshSchedule:RefreshSchedule'; //# sourceMappingURL=refreshSchedule.js.map