import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A named resource to which messages are sent by publishers. * * ## Example Usage * * ### Queue Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.cloudtasks.Queue("default", { * name: "cloud-tasks-queue-test", * location: "us-central1", * }); * ``` * ### Cloud Tasks Queue Advanced * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const advancedConfiguration = new gcp.cloudtasks.Queue("advanced_configuration", { * name: "instance-name", * location: "us-central1", * appEngineRoutingOverride: { * service: "worker", * version: "1.0", * instance: "test", * }, * rateLimits: { * maxConcurrentDispatches: 3, * maxDispatchesPerSecond: 2, * }, * retryConfig: { * maxAttempts: 5, * maxRetryDuration: "4s", * maxBackoff: "3s", * minBackoff: "2s", * maxDoublings: 1, * }, * stackdriverLoggingConfig: { * samplingRatio: 0.9, * }, * }); * ``` * ### Cloud Tasks Queue Http Target Oidc * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const oidcServiceAccount = new gcp.serviceaccount.Account("oidc_service_account", { * accountId: "example-oidc", * displayName: "Tasks Queue OIDC Service Account", * }); * const httpTargetOidc = new gcp.cloudtasks.Queue("http_target_oidc", { * name: "cloud-tasks-queue-http-target-oidc", * location: "us-central1", * httpTarget: { * httpMethod: "POST", * uriOverride: { * scheme: "HTTPS", * host: "oidc.example.com", * port: "8443", * pathOverride: { * path: "/users/1234", * }, * queryOverride: { * queryParams: "qparam1=123&qparam2=456", * }, * uriOverrideEnforceMode: "IF_NOT_EXISTS", * }, * headerOverrides: [ * { * header: { * key: "AddSomethingElse", * value: "MyOtherValue", * }, * }, * { * header: { * key: "AddMe", * value: "MyValue", * }, * }, * ], * oidcToken: { * serviceAccountEmail: oidcServiceAccount.email, * audience: "https://oidc.example.com", * }, * }, * }); * ``` * ### Cloud Tasks Queue Http Target Oauth * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const oauthServiceAccount = new gcp.serviceaccount.Account("oauth_service_account", { * accountId: "example-oauth", * displayName: "Tasks Queue OAuth Service Account", * }); * const httpTargetOauth = new gcp.cloudtasks.Queue("http_target_oauth", { * name: "cloud-tasks-queue-http-target-oauth", * location: "us-central1", * httpTarget: { * httpMethod: "POST", * uriOverride: { * scheme: "HTTPS", * host: "oauth.example.com", * port: "8443", * pathOverride: { * path: "/users/1234", * }, * queryOverride: { * queryParams: "qparam1=123&qparam2=456", * }, * uriOverrideEnforceMode: "IF_NOT_EXISTS", * }, * headerOverrides: [ * { * header: { * key: "AddSomethingElse", * value: "MyOtherValue", * }, * }, * { * header: { * key: "AddMe", * value: "MyValue", * }, * }, * ], * oauthToken: { * serviceAccountEmail: oauthServiceAccount.email, * scope: "openid https://www.googleapis.com/auth/userinfo.email", * }, * }, * }); * ``` * * ## Import * * Queue can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/queues/{{name}}` * * `{{project}}/{{location}}/{{name}}` * * `{{location}}/{{name}}` * * When using the `pulumi import` command, Queue can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:cloudtasks/queue:Queue default projects/{{project}}/locations/{{location}}/queues/{{name}} * $ pulumi import gcp:cloudtasks/queue:Queue default {{project}}/{{location}}/{{name}} * $ pulumi import gcp:cloudtasks/queue:Queue default {{location}}/{{name}} * ``` */ export declare class Queue extends pulumi.CustomResource { /** * Get an existing Queue 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?: QueueState, opts?: pulumi.CustomResourceOptions): Queue; /** * Returns true if the given object is an instance of Queue. 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 Queue; /** * Overrides for task-level appEngineRouting. These settings apply only * to App Engine tasks in this queue * Structure is documented below. */ readonly appEngineRoutingOverride: pulumi.Output; /** * The desired state of the queue. Use this to pause and resume the queue. * * * RUNNING: The queue is running. Tasks can be dispatched. * * PAUSED: The queue is paused. Tasks are not dispatched but can be added to the queue. */ readonly desiredState: pulumi.Output; /** * Modifies HTTP target for HTTP tasks. * Structure is documented below. */ readonly httpTarget: pulumi.Output; /** * The location of the queue */ readonly location: pulumi.Output; /** * The queue name. */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * Rate limits for task dispatches. * The queue's actual dispatch rate is the result of: * * Number of tasks in the queue * * User-specified throttling: rateLimits, retryConfig, and the queue's state. * * System throttling due to 429 (Too Many Requests) or 503 (Service * Unavailable) responses from the worker, high error rates, or to * smooth sudden large traffic spikes. * Structure is documented below. */ readonly rateLimits: pulumi.Output; /** * Settings that determine the retry behavior. * Structure is documented below. */ readonly retryConfig: pulumi.Output; /** * Configuration options for writing logs to Stackdriver Logging. * Structure is documented below. */ readonly stackdriverLoggingConfig: pulumi.Output; /** * The current state of the queue. */ readonly state: pulumi.Output; /** * Create a Queue 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: QueueArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Queue resources. */ export interface QueueState { /** * Overrides for task-level appEngineRouting. These settings apply only * to App Engine tasks in this queue * Structure is documented below. */ appEngineRoutingOverride?: pulumi.Input; /** * The desired state of the queue. Use this to pause and resume the queue. * * * RUNNING: The queue is running. Tasks can be dispatched. * * PAUSED: The queue is paused. Tasks are not dispatched but can be added to the queue. */ desiredState?: pulumi.Input; /** * Modifies HTTP target for HTTP tasks. * Structure is documented below. */ httpTarget?: pulumi.Input; /** * The location of the queue */ location?: pulumi.Input; /** * The queue name. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Rate limits for task dispatches. * The queue's actual dispatch rate is the result of: * * Number of tasks in the queue * * User-specified throttling: rateLimits, retryConfig, and the queue's state. * * System throttling due to 429 (Too Many Requests) or 503 (Service * Unavailable) responses from the worker, high error rates, or to * smooth sudden large traffic spikes. * Structure is documented below. */ rateLimits?: pulumi.Input; /** * Settings that determine the retry behavior. * Structure is documented below. */ retryConfig?: pulumi.Input; /** * Configuration options for writing logs to Stackdriver Logging. * Structure is documented below. */ stackdriverLoggingConfig?: pulumi.Input; /** * The current state of the queue. */ state?: pulumi.Input; } /** * The set of arguments for constructing a Queue resource. */ export interface QueueArgs { /** * Overrides for task-level appEngineRouting. These settings apply only * to App Engine tasks in this queue * Structure is documented below. */ appEngineRoutingOverride?: pulumi.Input; /** * The desired state of the queue. Use this to pause and resume the queue. * * * RUNNING: The queue is running. Tasks can be dispatched. * * PAUSED: The queue is paused. Tasks are not dispatched but can be added to the queue. */ desiredState?: pulumi.Input; /** * Modifies HTTP target for HTTP tasks. * Structure is documented below. */ httpTarget?: pulumi.Input; /** * The location of the queue */ location: pulumi.Input; /** * The queue name. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Rate limits for task dispatches. * The queue's actual dispatch rate is the result of: * * Number of tasks in the queue * * User-specified throttling: rateLimits, retryConfig, and the queue's state. * * System throttling due to 429 (Too Many Requests) or 503 (Service * Unavailable) responses from the worker, high error rates, or to * smooth sudden large traffic spikes. * Structure is documented below. */ rateLimits?: pulumi.Input; /** * Settings that determine the retry behavior. * Structure is documented below. */ retryConfig?: pulumi.Input; /** * Configuration options for writing logs to Stackdriver Logging. * Structure is documented below. */ stackdriverLoggingConfig?: pulumi.Input; }