import * as pulumi from "@pulumi/pulumi"; /** * Allows management of [Yandex.Cloud Message Queue](https://cloud.yandex.com/docs/message-queue). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as yandex from "@pulumi/yandex"; * * const exampleDeadletterQueue = new yandex.MessageQueue("exampleDeadletterQueue", {}); * const exampleQueue = new yandex.MessageQueue("exampleQueue", { * visibilityTimeoutSeconds: 600, * receiveWaitTimeSeconds: 20, * messageRetentionSeconds: 1209600, * redrivePolicy: exampleDeadletterQueue.arn.apply(arn => JSON.stringify({ * deadLetterTargetArn: arn, * maxReceiveCount: 3, * })), * }); * ``` * ## FIFO queue * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as yandex from "@pulumi/yandex"; * * const exampleFifoQueue = new yandex.MessageQueue("example_fifo_queue", { * contentBasedDeduplication: true, * fifoQueue: true, * }); * ``` * * ## Import * * Yandex Message Queues can be imported using its `queue url`, e.g. * * ```sh * $ pulumi import yandex:index/messageQueue:MessageQueue example_import_queue https://message-queue.api.cloud.yandex.net/abcdefghijklmn123456/opqrstuvwxyz87654321/ymq_terraform_import_example * ``` */ export declare class MessageQueue extends pulumi.CustomResource { /** * Get an existing MessageQueue 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, state?: MessageQueueState, opts?: pulumi.CustomResourceOptions): MessageQueue; /** * Returns true if the given object is an instance of MessageQueue. 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 MessageQueue; /** * The [access key](https://cloud.yandex.com/docs/iam/operations/sa/create-access-key) to use when applying changes. If omitted, `ymqAccessKey` specified in provider config is used. For more information see [documentation](https://cloud.yandex.com/docs/message-queue/quickstart). */ readonly accessKey: pulumi.Output; /** * ARN of the Yandex Message Queue. It is used for setting up a [redrive policy](https://cloud.yandex.com/docs/message-queue/concepts/dlq). See [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/SetQueueAttributes). */ readonly arn: pulumi.Output; /** * Enables [content-based deduplication](https://cloud.yandex.com/docs/message-queue/concepts/deduplication#content-based-deduplication). Can be used only if queue is [FIFO](https://cloud.yandex.com/docs/message-queue/concepts/queue#fifo-queues). */ readonly contentBasedDeduplication: pulumi.Output; /** * Number of seconds to [delay the message from being available for processing](https://cloud.yandex.com/docs/message-queue/concepts/delay-queues#delay-queues). Valid values: from 0 to 900 seconds (15 minutes). Default: 0. */ readonly delaySeconds: pulumi.Output; /** * Is this queue [FIFO](https://cloud.yandex.com/docs/message-queue/concepts/queue#fifo-queues). If this parameter is not used, a standard queue is created. You cannot change the parameter value for a created queue. */ readonly fifoQueue: pulumi.Output; /** * Maximum message size in bytes. Valid values: from 1024 bytes (1 KB) to 262144 bytes (256 KB). Default: 262144 (256 KB). For more information see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). */ readonly maxMessageSize: pulumi.Output; /** * The length of time in seconds to retain a message. Valid values: from 60 seconds (1 minute) to 1209600 seconds (14 days). Default: 345600 (4 days). For more information see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). */ readonly messageRetentionSeconds: pulumi.Output; /** * Queue name. The maximum length is 80 characters. You can use numbers, letters, underscores, and hyphens in the name. The name of a FIFO queue must end with the `.fifo` suffix. If not specified, random name will be generated. Conflicts with `namePrefix`. For more information see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). */ readonly name: pulumi.Output; /** * Generates random name with the specified prefix. Conflicts with `name`. */ readonly namePrefix: pulumi.Output; /** * Wait time for the [ReceiveMessage](https://cloud.yandex.com/docs/message-queue/api-ref/message/ReceiveMessage) method (for long polling), in seconds. Valid values: from 0 to 20 seconds. Default: 0. For more information about long polling see [documentation](https://cloud.yandex.com/docs/message-queue/concepts/long-polling). */ readonly receiveWaitTimeSeconds: pulumi.Output; /** * Message redrive policy in [Dead Letter Queue](https://cloud.yandex.com/docs/message-queue/concepts/dlq). The source queue and DLQ must be the same type: for FIFO queues, the DLQ must also be a FIFO queue. For more information about redrive policy see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). Also you can use example in this page. */ readonly redrivePolicy: pulumi.Output; /** * The [secret key](https://cloud.yandex.com/docs/iam/operations/sa/create-access-key) to use when applying changes. If omitted, `ymqSecretKey` specified in provider config is used. For more information see [documentation](https://cloud.yandex.com/docs/message-queue/quickstart). */ readonly secretKey: pulumi.Output; /** * [Visibility timeout](https://cloud.yandex.com/docs/message-queue/concepts/visibility-timeout) for messages in a queue, specified in seconds. Valid values: from 0 to 43200 seconds (12 hours). Default: 30. */ readonly visibilityTimeoutSeconds: pulumi.Output; /** * Create a MessageQueue 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?: MessageQueueArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MessageQueue resources. */ export interface MessageQueueState { /** * The [access key](https://cloud.yandex.com/docs/iam/operations/sa/create-access-key) to use when applying changes. If omitted, `ymqAccessKey` specified in provider config is used. For more information see [documentation](https://cloud.yandex.com/docs/message-queue/quickstart). */ accessKey?: pulumi.Input; /** * ARN of the Yandex Message Queue. It is used for setting up a [redrive policy](https://cloud.yandex.com/docs/message-queue/concepts/dlq). See [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/SetQueueAttributes). */ arn?: pulumi.Input; /** * Enables [content-based deduplication](https://cloud.yandex.com/docs/message-queue/concepts/deduplication#content-based-deduplication). Can be used only if queue is [FIFO](https://cloud.yandex.com/docs/message-queue/concepts/queue#fifo-queues). */ contentBasedDeduplication?: pulumi.Input; /** * Number of seconds to [delay the message from being available for processing](https://cloud.yandex.com/docs/message-queue/concepts/delay-queues#delay-queues). Valid values: from 0 to 900 seconds (15 minutes). Default: 0. */ delaySeconds?: pulumi.Input; /** * Is this queue [FIFO](https://cloud.yandex.com/docs/message-queue/concepts/queue#fifo-queues). If this parameter is not used, a standard queue is created. You cannot change the parameter value for a created queue. */ fifoQueue?: pulumi.Input; /** * Maximum message size in bytes. Valid values: from 1024 bytes (1 KB) to 262144 bytes (256 KB). Default: 262144 (256 KB). For more information see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). */ maxMessageSize?: pulumi.Input; /** * The length of time in seconds to retain a message. Valid values: from 60 seconds (1 minute) to 1209600 seconds (14 days). Default: 345600 (4 days). For more information see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). */ messageRetentionSeconds?: pulumi.Input; /** * Queue name. The maximum length is 80 characters. You can use numbers, letters, underscores, and hyphens in the name. The name of a FIFO queue must end with the `.fifo` suffix. If not specified, random name will be generated. Conflicts with `namePrefix`. For more information see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). */ name?: pulumi.Input; /** * Generates random name with the specified prefix. Conflicts with `name`. */ namePrefix?: pulumi.Input; /** * Wait time for the [ReceiveMessage](https://cloud.yandex.com/docs/message-queue/api-ref/message/ReceiveMessage) method (for long polling), in seconds. Valid values: from 0 to 20 seconds. Default: 0. For more information about long polling see [documentation](https://cloud.yandex.com/docs/message-queue/concepts/long-polling). */ receiveWaitTimeSeconds?: pulumi.Input; /** * Message redrive policy in [Dead Letter Queue](https://cloud.yandex.com/docs/message-queue/concepts/dlq). The source queue and DLQ must be the same type: for FIFO queues, the DLQ must also be a FIFO queue. For more information about redrive policy see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). Also you can use example in this page. */ redrivePolicy?: pulumi.Input; /** * The [secret key](https://cloud.yandex.com/docs/iam/operations/sa/create-access-key) to use when applying changes. If omitted, `ymqSecretKey` specified in provider config is used. For more information see [documentation](https://cloud.yandex.com/docs/message-queue/quickstart). */ secretKey?: pulumi.Input; /** * [Visibility timeout](https://cloud.yandex.com/docs/message-queue/concepts/visibility-timeout) for messages in a queue, specified in seconds. Valid values: from 0 to 43200 seconds (12 hours). Default: 30. */ visibilityTimeoutSeconds?: pulumi.Input; } /** * The set of arguments for constructing a MessageQueue resource. */ export interface MessageQueueArgs { /** * The [access key](https://cloud.yandex.com/docs/iam/operations/sa/create-access-key) to use when applying changes. If omitted, `ymqAccessKey` specified in provider config is used. For more information see [documentation](https://cloud.yandex.com/docs/message-queue/quickstart). */ accessKey?: pulumi.Input; /** * Enables [content-based deduplication](https://cloud.yandex.com/docs/message-queue/concepts/deduplication#content-based-deduplication). Can be used only if queue is [FIFO](https://cloud.yandex.com/docs/message-queue/concepts/queue#fifo-queues). */ contentBasedDeduplication?: pulumi.Input; /** * Number of seconds to [delay the message from being available for processing](https://cloud.yandex.com/docs/message-queue/concepts/delay-queues#delay-queues). Valid values: from 0 to 900 seconds (15 minutes). Default: 0. */ delaySeconds?: pulumi.Input; /** * Is this queue [FIFO](https://cloud.yandex.com/docs/message-queue/concepts/queue#fifo-queues). If this parameter is not used, a standard queue is created. You cannot change the parameter value for a created queue. */ fifoQueue?: pulumi.Input; /** * Maximum message size in bytes. Valid values: from 1024 bytes (1 KB) to 262144 bytes (256 KB). Default: 262144 (256 KB). For more information see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). */ maxMessageSize?: pulumi.Input; /** * The length of time in seconds to retain a message. Valid values: from 60 seconds (1 minute) to 1209600 seconds (14 days). Default: 345600 (4 days). For more information see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). */ messageRetentionSeconds?: pulumi.Input; /** * Queue name. The maximum length is 80 characters. You can use numbers, letters, underscores, and hyphens in the name. The name of a FIFO queue must end with the `.fifo` suffix. If not specified, random name will be generated. Conflicts with `namePrefix`. For more information see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). */ name?: pulumi.Input; /** * Generates random name with the specified prefix. Conflicts with `name`. */ namePrefix?: pulumi.Input; /** * Wait time for the [ReceiveMessage](https://cloud.yandex.com/docs/message-queue/api-ref/message/ReceiveMessage) method (for long polling), in seconds. Valid values: from 0 to 20 seconds. Default: 0. For more information about long polling see [documentation](https://cloud.yandex.com/docs/message-queue/concepts/long-polling). */ receiveWaitTimeSeconds?: pulumi.Input; /** * Message redrive policy in [Dead Letter Queue](https://cloud.yandex.com/docs/message-queue/concepts/dlq). The source queue and DLQ must be the same type: for FIFO queues, the DLQ must also be a FIFO queue. For more information about redrive policy see [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/CreateQueue). Also you can use example in this page. */ redrivePolicy?: pulumi.Input; /** * The [secret key](https://cloud.yandex.com/docs/iam/operations/sa/create-access-key) to use when applying changes. If omitted, `ymqSecretKey` specified in provider config is used. For more information see [documentation](https://cloud.yandex.com/docs/message-queue/quickstart). */ secretKey?: pulumi.Input; /** * [Visibility timeout](https://cloud.yandex.com/docs/message-queue/concepts/visibility-timeout) for messages in a queue, specified in seconds. Valid values: from 0 to 43200 seconds (12 hours). Default: 30. */ visibilityTimeoutSeconds?: pulumi.Input; }