@pulumi/yandex
Version:
A Pulumi package for creating and managing yandex cloud resources.
96 lines • 4.56 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.FunctionTrigger = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Allows management of [Yandex Cloud Functions Trigger](https://cloud.yandex.com/docs/functions/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as yandex from "@pulumi/yandex";
*
* const myTrigger = new yandex.FunctionTrigger("my_trigger", {
* description: "any description",
* function: {
* id: "tf-test",
* },
* timer: {
* cronExpression: "* * * * ? *",
* },
* });
* ```
*/
class FunctionTrigger extends pulumi.CustomResource {
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["dlq"] = state ? state.dlq : undefined;
resourceInputs["folderId"] = state ? state.folderId : undefined;
resourceInputs["function"] = state ? state.function : undefined;
resourceInputs["iot"] = state ? state.iot : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["logGroup"] = state ? state.logGroup : undefined;
resourceInputs["logging"] = state ? state.logging : undefined;
resourceInputs["messageQueue"] = state ? state.messageQueue : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["objectStorage"] = state ? state.objectStorage : undefined;
resourceInputs["timer"] = state ? state.timer : undefined;
}
else {
const args = argsOrState;
if ((!args || args.function === undefined) && !opts.urn) {
throw new Error("Missing required property 'function'");
}
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["dlq"] = args ? args.dlq : undefined;
resourceInputs["folderId"] = args ? args.folderId : undefined;
resourceInputs["function"] = args ? args.function : undefined;
resourceInputs["iot"] = args ? args.iot : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["logGroup"] = args ? args.logGroup : undefined;
resourceInputs["logging"] = args ? args.logging : undefined;
resourceInputs["messageQueue"] = args ? args.messageQueue : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["objectStorage"] = args ? args.objectStorage : undefined;
resourceInputs["timer"] = args ? args.timer : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(FunctionTrigger.__pulumiType, name, resourceInputs, opts);
}
/**
* Get an existing FunctionTrigger 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 FunctionTrigger(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of FunctionTrigger. 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'] === FunctionTrigger.__pulumiType;
}
}
exports.FunctionTrigger = FunctionTrigger;
/** @internal */
FunctionTrigger.__pulumiType = 'yandex:index/functionTrigger:FunctionTrigger';
//# sourceMappingURL=functionTrigger.js.map