@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
106 lines • 5.55 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.ScheduledQuery = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Creates a new Scheduled Query that allows you to define a Logs Insights query that will run on a schedule and configure actions to take with the query results.
*/
class ScheduledQuery extends pulumi.CustomResource {
/**
* Get an existing ScheduledQuery 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 opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, opts) {
return new ScheduledQuery(name, undefined, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ScheduledQuery. 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'] === ScheduledQuery.__pulumiType;
}
/**
* Create a ScheduledQuery resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name, args, opts) {
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
if (args?.executionRoleArn === undefined && !opts.urn) {
throw new Error("Missing required property 'executionRoleArn'");
}
if (args?.queryLanguage === undefined && !opts.urn) {
throw new Error("Missing required property 'queryLanguage'");
}
if (args?.queryString === undefined && !opts.urn) {
throw new Error("Missing required property 'queryString'");
}
if (args?.scheduleExpression === undefined && !opts.urn) {
throw new Error("Missing required property 'scheduleExpression'");
}
resourceInputs["description"] = args?.description;
resourceInputs["destinationConfiguration"] = args?.destinationConfiguration;
resourceInputs["executionRoleArn"] = args?.executionRoleArn;
resourceInputs["logGroupIdentifiers"] = args?.logGroupIdentifiers;
resourceInputs["name"] = args?.name;
resourceInputs["queryLanguage"] = args?.queryLanguage;
resourceInputs["queryString"] = args?.queryString;
resourceInputs["scheduleEndTime"] = args?.scheduleEndTime;
resourceInputs["scheduleExpression"] = args?.scheduleExpression;
resourceInputs["scheduleStartTime"] = args?.scheduleStartTime;
resourceInputs["startTimeOffset"] = args?.startTimeOffset;
resourceInputs["state"] = args?.state;
resourceInputs["tags"] = args?.tags;
resourceInputs["timezone"] = args?.timezone;
resourceInputs["creationTime"] = undefined /*out*/;
resourceInputs["lastExecutionStatus"] = undefined /*out*/;
resourceInputs["lastTriggeredTime"] = undefined /*out*/;
resourceInputs["lastUpdatedTime"] = undefined /*out*/;
resourceInputs["scheduledQueryArn"] = undefined /*out*/;
}
else {
resourceInputs["creationTime"] = undefined /*out*/;
resourceInputs["description"] = undefined /*out*/;
resourceInputs["destinationConfiguration"] = undefined /*out*/;
resourceInputs["executionRoleArn"] = undefined /*out*/;
resourceInputs["lastExecutionStatus"] = undefined /*out*/;
resourceInputs["lastTriggeredTime"] = undefined /*out*/;
resourceInputs["lastUpdatedTime"] = undefined /*out*/;
resourceInputs["logGroupIdentifiers"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["queryLanguage"] = undefined /*out*/;
resourceInputs["queryString"] = undefined /*out*/;
resourceInputs["scheduleEndTime"] = undefined /*out*/;
resourceInputs["scheduleExpression"] = undefined /*out*/;
resourceInputs["scheduleStartTime"] = undefined /*out*/;
resourceInputs["scheduledQueryArn"] = undefined /*out*/;
resourceInputs["startTimeOffset"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["tags"] = undefined /*out*/;
resourceInputs["timezone"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["name"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(ScheduledQuery.__pulumiType, name, resourceInputs, opts);
}
}
exports.ScheduledQuery = ScheduledQuery;
/** @internal */
ScheduledQuery.__pulumiType = 'aws-native:logs:ScheduledQuery';
//# sourceMappingURL=scheduledQuery.js.map