Package com.pulumi.gcp.cloudtasks
Class Queue
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.gcp.cloudtasks.Queue
-
public class Queue extends com.pulumi.resources.CustomResource
A named resource to which messages are sent by publishers. > **Warning:** This resource requires an App Engine application to be created on the project you're provisioning it on. If you haven't already enabled it, you can create a `gcp.appengine.Application` resource to do so. This resource's location will be the same as the App Engine location specified. ## Example Usage ### Queue Basic ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.cloudtasks.Queue; import com.pulumi.gcp.cloudtasks.QueueArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var default_ = new Queue("default", QueueArgs.builder() .location("us-central1") .build()); } } ``` ### Cloud Tasks Queue Advanced ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.cloudtasks.Queue; import com.pulumi.gcp.cloudtasks.QueueArgs; import com.pulumi.gcp.cloudtasks.inputs.QueueAppEngineRoutingOverrideArgs; import com.pulumi.gcp.cloudtasks.inputs.QueueRateLimitsArgs; import com.pulumi.gcp.cloudtasks.inputs.QueueRetryConfigArgs; import com.pulumi.gcp.cloudtasks.inputs.QueueStackdriverLoggingConfigArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var advancedConfiguration = new Queue("advancedConfiguration", QueueArgs.builder() .appEngineRoutingOverride(QueueAppEngineRoutingOverrideArgs.builder() .instance("test") .service("worker") .version("1.0") .build()) .location("us-central1") .rateLimits(QueueRateLimitsArgs.builder() .maxConcurrentDispatches(3) .maxDispatchesPerSecond(2) .build()) .retryConfig(QueueRetryConfigArgs.builder() .maxAttempts(5) .maxBackoff("3s") .maxDoublings(1) .maxRetryDuration("4s") .minBackoff("2s") .build()) .stackdriverLoggingConfig(QueueStackdriverLoggingConfigArgs.builder() .samplingRatio(0.9) .build()) .build()); } } ``` ## Import Queue can be imported using any of these accepted formats* `projects/{{project}}/locations/{{location}}/queues/{{name}}` * `{{project}}/{{location}}/{{name}}` * `{{location}}/{{name}}` In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Queue using one of the formats above. For exampletf import { id = "projects/{{project}}/locations/{{location}}/queues/{{name}}" to = google_cloud_tasks_queue.default } ```sh $ pulumi import gcp:cloudtasks/queue:Queue When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), 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}} ``` ```sh $ pulumi import gcp:cloudtasks/queue:Queue default {{project}}/{{location}}/{{name}} ``` ```sh $ pulumi import gcp:cloudtasks/queue:Queue default {{location}}/{{name}} ```
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<QueueAppEngineRoutingOverride>>
appEngineRoutingOverride()
static Queue
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, QueueState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
location()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.lang.String>
project()
com.pulumi.core.Output<QueueRateLimits>
rateLimits()
com.pulumi.core.Output<QueueRetryConfig>
retryConfig()
com.pulumi.core.Output<java.util.Optional<QueueStackdriverLoggingConfig>>
stackdriverLoggingConfig()
-
-
-
Constructor Detail
-
Queue
public Queue(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
Queue
public Queue(java.lang.String name, QueueArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
Queue
public Queue(java.lang.String name, QueueArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
appEngineRoutingOverride
public com.pulumi.core.Output<java.util.Optional<QueueAppEngineRoutingOverride>> appEngineRoutingOverride()
- Returns:
- Overrides for task-level appEngineRouting. These settings apply only to App Engine tasks in this queue Structure is documented below.
-
location
public com.pulumi.core.Output<java.lang.String> location()
- Returns:
- The location of the queue ***
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The queue name.
-
project
public com.pulumi.core.Output<java.lang.String> project()
- Returns:
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
-
rateLimits
public com.pulumi.core.Output<QueueRateLimits> rateLimits()
- Returns:
- 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.
-
retryConfig
public com.pulumi.core.Output<QueueRetryConfig> retryConfig()
- Returns:
- Settings that determine the retry behavior. Structure is documented below.
-
stackdriverLoggingConfig
public com.pulumi.core.Output<java.util.Optional<QueueStackdriverLoggingConfig>> stackdriverLoggingConfig()
- Returns:
- Configuration options for writing logs to Stackdriver Logging. Structure is documented below.
-
get
public static Queue get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable QueueState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-