### Install Go Cloud Tasks Client Library Source: https://docs.cloud.google.com/tasks/docs/reference/libraries Use this command to install the Go client library for Cloud Tasks. ```go go get cloud.google.com/go/cloudtasks ``` -------------------------------- ### Install Ruby Cloud Tasks Client Library Source: https://docs.cloud.google.com/tasks/docs/reference/libraries Use this command to install the Ruby client library for Cloud Tasks. ```ruby gem install google-cloud-tasks ``` -------------------------------- ### Example queue.yaml configuration Source: https://docs.cloud.google.com/tasks/docs/queue-yaml This is an example of a queue.yaml file that defines a single queue named 'queue-yaml-queue'. Uploading this file can disable queues not explicitly listed. ```yaml queue: - name: queue-yaml-queue ``` -------------------------------- ### Example App Engine URL Source: https://docs.cloud.google.com/tasks/docs/add-task-queue-app-eng This is an example URL format for accessing your deployed App Engine application. Replace `PROJECT_ID` with your actual Google Cloud project ID. ```bash https://PROJECT_ID.uc.r.appspot.com/ ``` -------------------------------- ### Install Node.js Cloud Tasks Client Library Source: https://docs.cloud.google.com/tasks/docs/reference/libraries Use this command to install the Node.js client library for Cloud Tasks. ```javascript npm install @google-cloud/tasks ``` -------------------------------- ### Example Output for Listing Cloud Tasks Queues Source: https://docs.cloud.google.com/tasks/docs/deleting-appengine-queues-and-tasks This is an example of the output when listing Cloud Tasks queues using the gcloud CLI. It shows key parameters for each queue. ```text QUEUE_NAME: my-queue STATE: PAUSED MAX_NUM_OF_TASKS: 1000 MAX_RATE (/sec): 500.0 MAX_ATTEMPTS: 100 ... ``` -------------------------------- ### Install C# Cloud Tasks Client Library Source: https://docs.cloud.google.com/tasks/docs/reference/libraries Use this command to install the C# client library for Cloud Tasks. Ensure you are using version 1.0.0 or later. ```csharp Install-Package Google.Cloud.Tasks.V2 -Version 1.0.0 ``` -------------------------------- ### Install PHP Cloud Tasks Client Library Source: https://docs.cloud.google.com/tasks/docs/reference/libraries Use this command to install the PHP client library for Cloud Tasks via Composer. ```php composer require google/cloud-tasks ``` -------------------------------- ### Install Node.js dependencies with Yarn Source: https://docs.cloud.google.com/tasks/docs/add-task-queue-app-eng Alternatively, install all project dependencies using Yarn. ```bash yarn install ``` -------------------------------- ### Install Python Cloud Tasks Client Library Source: https://docs.cloud.google.com/tasks/docs/reference/libraries Use this command to install or upgrade the Python client library for Cloud Tasks. ```python pip install --upgrade google-cloud-tasks ``` -------------------------------- ### Install Node.js dependencies with NPM Source: https://docs.cloud.google.com/tasks/docs/add-task-queue-app-eng Install all project dependencies using the Node Package Manager (NPM). ```bash npm install ``` -------------------------------- ### get Source: https://docs.cloud.google.com/tasks/docs/reference/rest Gets a task. ```APIDOC ## GET /v2/{name=projects/*/locations/*/queues/*/tasks/*} ### Description Gets a task. ### Method GET ### Endpoint /v2/{name=projects/*/locations/*/queues/*/tasks/*} ``` -------------------------------- ### Example Queue Description Output Source: https://docs.cloud.google.com/tasks/docs/configuring-queues This is an example of the output you can expect when describing a Cloud Tasks queue, showing its rate limits, retry configuration, and state. ```yaml name: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID rateLimits: maxBurstSize: 100 maxConcurrentDispatches: MAX_CONCURRENT_DISPATCHES maxDispatchesPerSecond: 500.0 retryConfig: maxAttempts: 100 maxBackoff: 3600s maxDoublings: 16 minBackoff: 0.100s state: RUNNING ``` -------------------------------- ### Create Compute Engine Instance with Service Account Source: https://docs.cloud.google.com/tasks/docs/authentication Example of creating a Compute Engine instance and attaching a service account. Replace INSTANCE_NAME, ZONE, and SERVICE_ACCOUNT_EMAIL with your details. ```bash gcloud compute instances create INSTANCE_NAME --zone=ZONE --service-account=SERVICE_ACCOUNT_EMAIL ``` -------------------------------- ### IAM Policy YAML Example Source: https://docs.cloud.google.com/tasks/docs/reference/rest/Shared.Types/Policy Demonstrates the equivalent IAM policy structure in YAML format, useful for configuration files. ```yaml bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` -------------------------------- ### Example Response for Listing Cloud Tasks Queues (APIs Explorer) Source: https://docs.cloud.google.com/tasks/docs/deleting-appengine-queues-and-tasks This is an example of the response body when listing Cloud Tasks queues using the APIs Explorer. It includes a list of queue resources and a pagination token. ```json { "queues": [ { "name": "projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID", "rateLimits": { "maxDispatchesPerSecond": 500, "maxBurstSize": 100, "maxConcurrentDispatches": 1000 }, "retryConfig": { "maxAttempts": 100, "minBackoff": "0.100s", "maxBackoff": "3600s", "maxDoublings": 16 }, "state": "PAUSED", "purgeTime": "2025-03-28T13:37:32.292552Z" }, ... ], "nextPageToken": "CjQKCHppcHBlcjIAEgwI9-GExAYQ_oDc1AMaGioLeWlrZXMtYWdhaW4yC3VzLWNlbnRyYWwx" } ``` -------------------------------- ### v2beta3.projects.locations.queues.get Source: https://docs.cloud.google.com/tasks/docs/reference/rest Gets a queue. ```APIDOC ## GET /v2beta3/{name=projects/*/locations/*/queues/*} ### Description Gets a queue. ### Method GET ### Endpoint /v2beta3/{name=projects/*/locations/*/queues/*} ``` -------------------------------- ### v2.projects.locations.queues.get Source: https://docs.cloud.google.com/tasks/docs/reference/rest Gets a queue. ```APIDOC ## GET /v2/{name=projects/*/locations/*/queues/*} ### Description Gets a queue. ### Method GET ### Endpoint /v2/{name=projects/*/locations/*/queues/*} ``` -------------------------------- ### v2beta3.projects.locations.queues.tasks.get Source: https://docs.cloud.google.com/tasks/docs/reference/rest Gets a task. ```APIDOC ## GET /v2beta3/{name=projects/*/locations/*/queues/*/tasks/*} ### Description Gets a task. ### Method GET ### Endpoint /v2beta3/{name=projects/*/locations/*/queues/*/tasks/*} ``` -------------------------------- ### Example Output of gcloud KMS Keys List Source: https://docs.cloud.google.com/tasks/docs/use-cmek The output from the 'gcloud kms keys list' command displays the full resource name for each key, which includes the key ID. ```text NAME: projects/PROJECT_NAME/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY_NAME ``` -------------------------------- ### Successful Queue Creation Response Source: https://docs.cloud.google.com/tasks/docs/creating-queues This is an example of a successful response when creating a queue. It includes default configurations for rate limits and retry settings. ```json { "name": "projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID", "rateLimits": { "maxDispatchesPerSecond": 500, "maxBurstSize": 100, "maxConcurrentDispatches": 1000 }, "retryConfig": { "maxAttempts": 100, "minBackoff": "0.100s", "maxBackoff": "3600s", "maxDoublings": 16 }, "state": "RUNNING" } ``` -------------------------------- ### Node.js Package JSON Configuration Source: https://docs.cloud.google.com/tasks/docs/creating-appengine-tasks This is an example `package.json` file for a Node.js project using Google Cloud Tasks. It specifies the necessary dependencies, including `@google-cloud/tasks` and `express`. ```json { "name": "appengine-cloudtasks", "description": "Google App Engine Cloud Tasks example.", "license": "Apache-2.0", "author": "Google Inc.", "private": true, "engines": { "node": ">=16.0.0" }, "files": [ "*.js" ], "scripts": { "test": "c8 mocha -p -j 2 --timeout 30000", "start": "node server.js" }, "dependencies": { "@google-cloud/tasks": "^5.0.0", "express": "^4.16.3" }, "devDependencies": { "c8": "^10.0.0", "chai": "^4.5.0", "mocha": "^10.0.0", "uuid": "^10.0.0" } } ``` -------------------------------- ### get Source: https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues Gets a queue. This method retrieves the details of a specific queue. ```APIDOC ## GET /v2/projects/{projectId}/locations/{locationId}/queues/{queueId} ### Description Gets a queue. ### Method GET ### Endpoint /v2/projects/{projectId}/locations/{locationId}/queues/{queueId} ### Parameters #### Path Parameters - **projectId** (string) - Required - The ID of the project in which the queue exists. - **locationId** (string) - Required - The location of the queue. - **queueId** (string) - Required - The ID of the queue to retrieve. ### Response #### Success Response (200) - **name** (string) - The name of the queue. - **state** (State) - The state of the queue. - **stackdriverLoggingConfig** (StackdriverLoggingConfig) - Configuration options for writing logs to Stackdriver Logging. #### Response Example ```json { "name": "projects/your-project-id/locations/your-location/queues/your-queue-id", "state": "RUNNING", "stackdriverLoggingConfig": { "samplingRatio": 0.5 } } ``` ``` -------------------------------- ### Get Task Source: https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues.tasks Gets a task. Retrieves the details of a specific task within a queue. ```APIDOC ## get ### Description Gets a task. ### Method GET ### Endpoint /v2/projects/{project}/locations/{location}/queues/{queue}/tasks/{task} ### Parameters #### Path Parameters - **project** (string) - Required - The name of the project. - **location** (string) - Required - The location of the queue. - **queue** (string) - Required - The name of the queue. - **task** (string) - Required - The name of the task to retrieve. ### Response #### Success Response (200) - **name** (string) - The name of the task. - **scheduleTime** (string) - The time the task is scheduled to execute. - **dispatchDeadline** (string) - The deadline for the task to be dispatched. #### Response Example ```json { "name": "projects/my-project/locations/us-central1/queues/my-queue/tasks/my-task-id", "scheduleTime": "2023-10-27T10:00:00Z", "dispatchDeadline": "2023-10-27T10:05:00Z" } ``` ``` -------------------------------- ### Navigate to the sample code directory Source: https://docs.cloud.google.com/tasks/docs/add-task-queue-app-eng Change your current directory to the location of the sample code within the cloned repository. ```bash cd nodejs-docs-samples/cloud-tasks/snippets ``` -------------------------------- ### Location Labels Example Source: https://docs.cloud.google.com/tasks/docs/reference/rest/Shared.Types/ListLocationsResponse An example of how cross-service attributes for a location can be represented using labels. ```json { "cloud.googleapis.com/region": "us-east1" } ``` -------------------------------- ### Clone the sample application repository Source: https://docs.cloud.google.com/tasks/docs/add-task-queue-app-eng Use this command to clone the Node.js sample application repository from GitHub to your local machine. ```bash git clone https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git ``` -------------------------------- ### Location Metadata Example Source: https://docs.cloud.google.com/tasks/docs/reference/rest/Shared.Types/ListLocationsResponse An example of service-specific metadata for a location, including an arbitrary type identifier. ```json { "id": 1234, "@type": "types.example.com/standard/id" } ``` -------------------------------- ### Describe Queue Configuration Source: https://docs.cloud.google.com/tasks/docs/configuring-queues Verify the queue configuration, including `appEngineRoutingOverride`, by describing the queue. Replace `QUEUE_ID` and `LOCATION` with your specific values. ```bash gcloud tasks queues describe QUEUE_ID --location=LOCATION ``` -------------------------------- ### Initialize gcloud CLI Source: https://docs.cloud.google.com/tasks/docs/add-task-queue Run this command to initialize the gcloud CLI. This is a prerequisite for most gcloud operations. ```bash gcloud init ``` -------------------------------- ### Create a Google Cloud Project Source: https://docs.cloud.google.com/tasks/docs/add-task-queue Use this command to create a new Google Cloud project. Replace PROJECT_ID with your desired project name. ```bash gcloud projects create PROJECT_ID ``` -------------------------------- ### v2beta3.projects.locations.queues.tasks.run Source: https://docs.cloud.google.com/tasks/docs/reference/rest Forces a task to run now. ```APIDOC ## POST /v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run ### Description Forces a task to run now. ### Method POST ### Endpoint /v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run ``` -------------------------------- ### Purge queue response example Source: https://docs.cloud.google.com/tasks/docs/deleting-appengine-queues-and-tasks A successful purge operation returns a `Queue` object, including the `purgeTime` indicating when the operation was initiated. This example shows the structure of the response. ```json { "name": "projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID", "rateLimits": { "maxDispatchesPerSecond": 500, "maxBurstSize": 100, "maxConcurrentDispatches": 1000 }, "retryConfig": { "maxAttempts": 100, "minBackoff": "0.100s", "maxBackoff": "3600s", "maxDoublings": 16 }, "state": "RUNNING", "purgeTime": "2025-03-28T13:06:30.110255Z" } ``` -------------------------------- ### Navigate to App Directory Source: https://docs.cloud.google.com/tasks/docs/tutorial-gcf Change the current directory to the application's app directory to prepare for deployment. ```bash cd ../app/ ``` -------------------------------- ### GetQueue Source: https://docs.cloud.google.com/tasks/docs/reference/rpc/google.cloud.tasks.v2 Gets a queue. ```APIDOC ## GetQueue ### Description Gets a queue. ### RPC Signature `rpc GetQueue(GetQueueRequest) returns (Queue)` ### Authorization Requires one of the following OAuth scopes: * `https://www.googleapis.com/auth/cloud-platform` * `https://www.googleapis.com/auth/cloud-tasks` ``` -------------------------------- ### v2beta3.projects.locations.queues.create Source: https://docs.cloud.google.com/tasks/docs/reference/rest Creates a queue. ```APIDOC ## POST /v2beta3/{parent=projects/*/locations/*}/queues ### Description Creates a queue. ### Method POST ### Endpoint /v2beta3/{parent=projects/*/locations/*}/queues ``` -------------------------------- ### v2.projects.locations.queues.create Source: https://docs.cloud.google.com/tasks/docs/reference/rest Creates a queue. ```APIDOC ## POST /v2/{parent=projects/*/locations/*}/queues ### Description Creates a queue. ### Method POST ### Endpoint /v2/{parent=projects/*/locations/*}/queues ``` -------------------------------- ### Enable Logging for a New Queue Source: https://docs.cloud.google.com/tasks/docs/monitor Use this command to create a new queue and enable logging by specifying a log sampling ratio. ```bash gcloud tasks queues create QUEUE_ID \ --log-sampling-ratio=LOG_SAMPLING_RATION ``` -------------------------------- ### Create a Service Account Source: https://docs.cloud.google.com/tasks/docs/authentication Use this command to create a new service account. Replace SERVICE_ACCOUNT_NAME with your desired name. ```bash gcloud iam service-accounts create SERVICE_ACCOUNT_NAME ``` -------------------------------- ### v2.projects.locations.getCmekConfig Source: https://docs.cloud.google.com/tasks/docs/reference/rest Gets the CMEK config. ```APIDOC ## GET /v2/{name=projects/*/locations/*/cmekConfig} ### Description Gets the CMEK config. ### Method GET ### Endpoint /v2/{name=projects/*/locations/*/cmekConfig} ``` -------------------------------- ### v2.projects.locations.get Source: https://docs.cloud.google.com/tasks/docs/reference/rest Gets information about a location. ```APIDOC ## GET /v2/{name=projects/*/locations/*} ### Description Gets information about a location. ### Method GET ### Endpoint /v2/{name=projects/*/locations/*} ``` -------------------------------- ### v2beta3.projects.locations.queues.resume Source: https://docs.cloud.google.com/tasks/docs/reference/rest Resume a queue. ```APIDOC ## POST /v2beta3/{name=projects/*/locations/*/queues/*}:resume ### Description Resume a queue. ### Method POST ### Endpoint /v2beta3/{name=projects/*/locations/*/queues/*}:resume ``` -------------------------------- ### v2beta3.projects.locations.getCmekConfig Source: https://docs.cloud.google.com/tasks/docs/reference/rest Gets the CMEK config. ```APIDOC ## GET /v2beta3/{name=projects/*/locations/*/cmekConfig} ### Description Gets the CMEK config. ### Method GET ### Endpoint /v2beta3/{name=projects/*/locations/*/cmekConfig} ``` -------------------------------- ### v2beta3.projects.locations.get Source: https://docs.cloud.google.com/tasks/docs/reference/rest Gets information about a location. ```APIDOC ## GET /v2beta3/{name=projects/*/locations/*} ### Description Gets information about a location. ### Method GET ### Endpoint /v2beta3/{name=projects/*/locations/*} ``` -------------------------------- ### v2beta3.projects.locations.queues.tasks.create Source: https://docs.cloud.google.com/tasks/docs/reference/rest Creates a task and adds it to a queue. ```APIDOC ## POST /v2beta3/{parent=projects/*/locations/*/queues/*}/tasks ### Description Creates a task and adds it to a queue. ### Method POST ### Endpoint /v2beta3/{parent=projects/*/locations/*/queues/*}/tasks ``` -------------------------------- ### Get Task Source: https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues.tasks Retrieves a task from a queue. ```APIDOC ## GET projects.locations.queues.tasks.{task} ### Description Retrieves a task from a queue. ### Method GET ### Endpoint `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}` ### Response #### Success Response (200) - **task** (object) - The task that was retrieved. - **name** (string) - The name of the task. - **dispatchTime** (object) - The time when the task was dispatched. - **seconds** (integer) - Number of seconds of the overall amount of time. - **nanos** (integer) - Non-negative fractions of seconds at nanosecond resolution. - ** தாக்கTime** (object) - The time when the task was executed. - **seconds** (integer) - Number of seconds of the overall amount of time. - **nanos** (integer) - Non-negative fractions of seconds at nanosecond resolution. - **responseStatus** (object) - The status of the task's execution. - **statusCode** (integer) - The HTTP status code of the response. - **message** (string) - The status message of the response. - **appEngineHttpRequest** (object) - If specified, the task will be sent to the App Engine service. - **httpMethod** (string) - The HTTP method to use for the request. - **relativeUri** (string) - The relative URI to send the request to. - **headers** (object) - HTTP request headers. - **body** (string) - HTTP request body as a raw byte string. - **httpRequest** (object) - If specified, the task will be sent to the specified HTTP endpoint. - **httpMethod** (string) - The HTTP method to use for the request. - **url** (string) - The full URL that the request should be sent to. - **headers** (object) - HTTP request headers. - **body** (string) - HTTP request body as a raw byte string. - **scheduleTime** (object) - The time when the task is scheduled to be executed. - **seconds** (integer) - Number of seconds of the overall amount of time. - **nanos** (integer) - Non-negative fractions of seconds at nanosecond resolution. - **dispatchDeadline** (object) - The deadline for the task to be dispatched. - **seconds** (integer) - Number of seconds of the overall amount of time. - **nanos** (integer) - Non-negative fractions of seconds at nanosecond resolution. ``` -------------------------------- ### v2.projects.locations.queues.getIamPolicy Source: https://docs.cloud.google.com/tasks/docs/reference/rest Gets the access control policy for a `Queue`. ```APIDOC ## POST /v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy ### Description Gets the access control policy for a `Queue`. ### Method POST ### Endpoint /v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy ``` -------------------------------- ### Log in with Application Default Credentials Source: https://docs.cloud.google.com/tasks/docs/add-task-queue Create local authentication credentials for your user account. This is necessary for local development and testing. Skip if using Cloud Shell. ```bash gcloud auth application-default login ``` -------------------------------- ### v2beta3.projects.locations.queues.getIamPolicy Source: https://docs.cloud.google.com/tasks/docs/reference/rest Gets the access control policy for a `Queue`. ```APIDOC ## POST /v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy ### Description Gets the access control policy for a `Queue`. ### Method POST ### Endpoint /v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy ``` -------------------------------- ### Get Location Source: https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations Retrieves information about a specific Google Cloud location for Cloud Tasks. ```APIDOC ## GET /v2/projects/{projectsId}/locations/{locationsId} ### Description Gets information about a location. ### Method GET ### Endpoint /v2/projects/{projectsId}/locations/{locationsId} ### Parameters #### Path Parameters - **projectsId** (string) - Required - The project ID. - **locationsId** (string) - Required - The location ID. ### Response #### Success Response (200) - **name** (string) - Resource name for the location. - **locationId** (string) - The canonical id for this location. - **displayName** (string) - The friendly name for this location. - **labels** (map) - Cross-service attributes for the location. - **metadata** (object) - Service-specific metadata. ``` -------------------------------- ### Create a Cloud Tasks queue with logging Source: https://docs.cloud.google.com/tasks/docs/add-task-queue Use this command to create a new Cloud Tasks queue. Set `--log-sampling-ratio=1.0` to log all operations for debugging. Ensure you replace `QUEUE_NAME` and `REGION` with your specific values. ```bash gcloud tasks queues create QUEUE_NAME \ --log-sampling-ratio=1.0 \ --location=REGION ``` -------------------------------- ### Describe a Cloud Tasks Queue Source: https://docs.cloud.google.com/tasks/docs/tutorial-gcf Verify the creation of a Cloud Tasks queue and retrieve its details. Replace LOCATION with the queue's location. ```bash gcloud tasks queues describe my-queue --location=LOCATION ``` -------------------------------- ### GetLocation Source: https://docs.cloud.google.com/tasks/docs/reference/rpc/google.cloud.location Gets information about a specific location. This method requires appropriate authorization scopes. ```APIDOC ## GetLocation ### Description Gets information about a location. ### Method rpc GetLocation(GetLocationRequest) returns (Location) ### Authorization Scopes - https://www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/cloud-tasks ``` -------------------------------- ### Get CMEK Config Source: https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations Retrieves the Customer-Managed Encryption Key (CMEK) configuration for a specific location. ```APIDOC ## GET /v2/projects/{projectsId}/locations/{locationsId}:getCmekConfig ### Description Gets the CMEK config for a location. ### Method GET ### Endpoint /v2/projects/{projectsId}/locations/{locationsId}:getCmekConfig ### Parameters #### Path Parameters - **projectsId** (string) - Required - The project ID. - **locationsId** (string) - Required - The location ID. ### Response #### Success Response (200) - (Response details not specified in source) ``` -------------------------------- ### Clone Sample App Repository Source: https://docs.cloud.google.com/tasks/docs/tutorial-gcf Clone the Node.js Google Cloud samples repository to your local machine to access the sample application code. ```bash git clone https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git ``` -------------------------------- ### Get a Queue Source: https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/get Retrieves a queue by its resource name. This operation requires the `cloudtasks.queues.get` IAM permission. ```APIDOC ## GET projects.locations.queues.get ### Description Gets a queue. ### Method GET ### Endpoint `https://cloudtasks.googleapis.com/v2/{name=projects/*/locations/*/queues/*}` ### Parameters #### Path Parameters - **name** (string) - Required. The resource name of the queue. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` ### Request Body The request body must be empty. ### Response #### Success Response (200) Returns an instance of `Queue`. ### Authorization scopes Requires one of the following OAuth scopes: - `https://www.googleapis.com/auth/cloud-platform` - `https://www.googleapis.com/auth/cloud-tasks` ``` -------------------------------- ### v2beta3.projects.locations.queues.list Source: https://docs.cloud.google.com/tasks/docs/reference/rest Lists queues. ```APIDOC ## GET /v2beta3/{parent=projects/*/locations/*}/queues ### Description Lists queues. ### Method GET ### Endpoint /v2beta3/{parent=projects/*/locations/*}/queues ``` -------------------------------- ### GetIamPolicy Source: https://docs.cloud.google.com/tasks/docs/reference/rpc/google.cloud.tasks.v2 Gets the access control policy for a Queue. Returns an empty policy if the resource exists and does not have a policy set. ```APIDOC ## GetIamPolicy ### Description Gets the access control policy for a `Queue`. Returns an empty policy if the resource exists and does not have a policy set. ### RPC Signature `rpc GetIamPolicy(GetIamPolicyRequest) returns (Policy)` ### Authorization Requires the following Google IAM permission on the specified resource parent: * `cloudtasks.queues.getIamPolicy` Requires one of the following OAuth scopes: * `https://www.googleapis.com/auth/cloud-platform` * `https://www.googleapis.com/auth/cloud-tasks` ``` -------------------------------- ### GetCmekConfig Source: https://docs.cloud.google.com/tasks/docs/reference/rpc/google.cloud.tasks.v2 Gets the Customer Managed Encryption Key configured with the Cloud Tasks location. By default, there is no kms_key configured. ```APIDOC ## GetCmekConfig ### Description Gets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks location. By default there is no kms_key configured. ### RPC Signature `rpc GetCmekConfig(GetCmekConfigRequest) returns (CmekConfig)` ### Authorization Requires one of the following OAuth scopes: * `https://www.googleapis.com/auth/cloud-platform` * `https://www.googleapis.com/auth/cloud-tasks` ``` -------------------------------- ### Create Task Source: https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues.tasks Creates a task and adds it to a queue. ```APIDOC ## POST projects.locations.queues.tasks ### Description Creates a task and adds it to a queue. ### Method POST ### Endpoint `projects/{project}/locations/{location}/queues/{queue}/tasks` ### Request Body - **task** (object) - Required - The task to add. - **appEngineHttpRequest** (object) - If specified, the task will be sent to the App Engine service. - **httpMethod** (string) - Required - The HTTP method to use for the request. - **relativeUri** (string) - Required - The relative URI to send the request to. - **headers** (object) - HTTP request headers. - **body** (string) - HTTP request body as a raw byte string. If the HTTP method is POST or PUT, this field is optional. If the HTTP method is other than POST or PUT, this field must not be set. - **httpRequest** (object) - If specified, the task will be sent to the specified HTTP endpoint. - **httpMethod** (string) - Required - The HTTP method to use for the request. - **url** (string) - Required - The full URL that the request should be sent to. - **headers** (object) - HTTP request headers. - **body** (string) - HTTP request body as a raw byte string. If the HTTP method is POST or PUT, this field is optional. If the HTTP method is other than POST or PUT, this field must not be set. - **scheduleTime** (object) - The time when the task is scheduled to be executed. - **seconds** (integer) - Number of seconds of the overall amount of time. - **nanos** (integer) - Non-negative fractions of seconds at nanosecond resolution. - **dispatchDeadline** (object) - The deadline for the task to be dispatched. - **seconds** (integer) - Number of seconds of the overall amount of time. - **nanos** (integer) - Non-negative fractions of seconds at nanosecond resolution. ### Response #### Success Response (200) - **name** (string) - The name of the task that was created. - **dispatchTime** (object) - The time when the task was dispatched. - **seconds** (integer) - Number of seconds of the overall amount of time. - **nanos** (integer) - Non-negative fractions of seconds at nanosecond resolution. - ** தாக்கTime** (object) - The time when the task was executed. - **seconds** (integer) - Number of seconds of the overall amount of time. - **nanos** (integer) - Non-negative fractions of seconds at nanosecond resolution. - **responseStatus** (object) - The status of the task's execution. - **statusCode** (integer) - The HTTP status code of the response. - **message** (string) - The status message of the response. ```