@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
162 lines (161 loc) • 5.58 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* The `scaleway.functions.Trigger` resource allows you to create and manage triggers for Scaleway [Serverless Functions](https://www.scaleway.com/en/docs/serverless/functions/).
*
* Refer to the Functions triggers [documentation](https://www.scaleway.com/en/docs/serverless/functions/how-to/add-trigger-to-a-function/) and [API documentation](https://www.scaleway.com/en/developers/api/serverless-functions/#path-triggers-list-all-triggers) for more information.
*
* ## Example Usage
*
* ### SQS
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.functions.Trigger("main", {
* functionId: mainScalewayFunction.id,
* name: "my-trigger",
* sqs: {
* projectId: mainScalewayMnqSqs.projectId,
* queue: "MyQueue",
* region: mainScalewayMnqSqs.region,
* },
* });
* ```
*
* ### NATS
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.functions.Trigger("main", {
* functionId: mainScalewayFunction.id,
* name: "my-trigger",
* nats: {
* accountId: mainScalewayMnqNatsAccount.id,
* subject: "MySubject",
* region: mainScalewayMnqNatsAccount.region,
* },
* });
* ```
*
* ## Import
*
* Function Triggers can be imported using `{region}/{id}`, as shown below:
*
* bash
*
* ```sh
* $ pulumi import scaleway:functions/trigger:Trigger main fr-par/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class Trigger extends pulumi.CustomResource {
/**
* Get an existing Trigger 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: string, id: pulumi.Input<pulumi.ID>, state?: TriggerState, opts?: pulumi.CustomResourceOptions): Trigger;
/**
* Returns true if the given object is an instance of Trigger. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Trigger;
/**
* The description of the trigger.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The unique identifier of the function to create a trigger for.
*/
readonly functionId: pulumi.Output<string>;
/**
* The unique name of the trigger. If not provided, a random name is generated.
*/
readonly name: pulumi.Output<string>;
/**
* The configuration for the Scaleway NATS account used by the trigger
*/
readonly nats: pulumi.Output<outputs.functions.TriggerNats | undefined>;
/**
* `region`). The region in which the namespace is created.
*/
readonly region: pulumi.Output<string>;
/**
* The configuration of the Scaleway SQS queue used by the trigger
*/
readonly sqs: pulumi.Output<outputs.functions.TriggerSqs | undefined>;
/**
* Create a Trigger 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: string, args: TriggerArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Trigger resources.
*/
export interface TriggerState {
/**
* The description of the trigger.
*/
description?: pulumi.Input<string>;
/**
* The unique identifier of the function to create a trigger for.
*/
functionId?: pulumi.Input<string>;
/**
* The unique name of the trigger. If not provided, a random name is generated.
*/
name?: pulumi.Input<string>;
/**
* The configuration for the Scaleway NATS account used by the trigger
*/
nats?: pulumi.Input<inputs.functions.TriggerNats>;
/**
* `region`). The region in which the namespace is created.
*/
region?: pulumi.Input<string>;
/**
* The configuration of the Scaleway SQS queue used by the trigger
*/
sqs?: pulumi.Input<inputs.functions.TriggerSqs>;
}
/**
* The set of arguments for constructing a Trigger resource.
*/
export interface TriggerArgs {
/**
* The description of the trigger.
*/
description?: pulumi.Input<string>;
/**
* The unique identifier of the function to create a trigger for.
*/
functionId: pulumi.Input<string>;
/**
* The unique name of the trigger. If not provided, a random name is generated.
*/
name?: pulumi.Input<string>;
/**
* The configuration for the Scaleway NATS account used by the trigger
*/
nats?: pulumi.Input<inputs.functions.TriggerNats>;
/**
* `region`). The region in which the namespace is created.
*/
region?: pulumi.Input<string>;
/**
* The configuration of the Scaleway SQS queue used by the trigger
*/
sqs?: pulumi.Input<inputs.functions.TriggerSqs>;
}