Google Cloud Functions
Google Cloud Functions Pack.#
This Integration is part of theGoogle Cloud Functions is an event-driven serverless compute platform that enables you to run your code locally or in the cloud without having to provision servers. This integration was integrated and tested with API version 1 of Google Cloud Functions
#
Configure Google Cloud Functions on Cortex XSOAR- Navigate to Settings > Integrations > Servers & Services.
- Search for Google Cloud Functions.
- Click Add instance to create and configure a new integration instance.
Parameter | Description | Required |
---|---|---|
credentials_json | Service account private key file contents (JSON) | True |
project_id | Default project ID | False |
region | Default region | False |
proxy | Use system proxy settings | False |
insecure | Trust any certificate (not secure) | False |
- Click Test to validate the URLs, token, and connection.
#
CommandsYou can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.
#
google-cloud-functions-listLists all Google Cloud functions.
#
Base Commandgoogle-cloud-functions-list
#
InputArgument Name | Description | Required |
---|---|---|
project_id | The project ID the Google Cloud function is in. Default is the instance's project. | Optional |
region | The region of the Google Cloud function. Default is all regions. You can get a full list of regions using the google-cloud-function-regions-list command. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
GoogleCloudFunctions.Function.name | String | A user-defined name of the Google Cloud function. |
GoogleCloudFunctions.Function.status | String | Status of the Google Cloud function deployment. The status can be: ACTIVE, OFFLINE, DEPLOY_IN_PROGRESS, DELETE_IN_PROGRESS, UNKNOWN. |
GoogleCloudFunctions.Function.labels | String | Labels associated with this Google Cloud function. |
GoogleCloudFunctions.Function.runtime | String | The time in which to run the Google Cloud function. |
#
Command Example!google-cloud-functions-list
#
Context Example#
Human Readable Output#
Functions in project "gcp-integrations" and region "us-central1"name | httpsTrigger | status | entryPoint | timeout | availableMemoryMb | serviceAccountEmail | updateTime | versionId | labels | sourceUploadUrl | runtime | ingressSettings |
---|---|---|---|---|---|---|---|---|---|---|---|---|
projects/project/locations/us-central1/functions/demisto-func | url: www.example.com | ACTIVE | hello_world | 60s | 128 | 2020-04-05T12:43:29.610Z | 1 | deployment-tool: console-cloud | python37 | ALLOW_ALL |
#
google-cloud-function-regions-listLists all regions in the project.
#
Base Commandgoogle-cloud-function-regions-list
#
InputArgument Name | Description | Required |
---|---|---|
project_id | The project ID the Google Cloud function is in. Default is the instance's project. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
GoogleCloudFunctions.Region.locationId | String | The location ID of the region. |
GoogleCloudFunctions.Region.name | String | The full name of the region. |
GoogleCloudFunctions.Region.labels | String | The labels for the region. |
#
Command Example!google-cloud-function-regions-list
#
Context Example#
Human Readable Output#
Regions in project "gcp-integrations"locationId | name | labels |
---|---|---|
europe-west1 | projects/gcp-integrations/locations/europe-west1 | cloud.googleapis.com/region: europe-west1 |
europe-west3 | projects/gcp-integrations/locations/europe-west3 | cloud.googleapis.com/region: europe-west3 |
europe-west2 | projects/gcp-integrations/locations/europe-west2 | cloud.googleapis.com/region: europe-west2 |
us-central1 | projects/gcp-integrations/locations/us-central1 | cloud.googleapis.com/region: us-central1 |
us-east1 | projects/gcp-integrations/locations/us-east1 | cloud.googleapis.com/region: us-east1 |
us-east4 | projects/gcp-integrations/locations/us-east4 | cloud.googleapis.com/region: us-east4 |
asia-northeast1 | projects/gcp-integrations/locations/asia-northeast1 | cloud.googleapis.com/region: asia-northeast1 |
asia-east2 | projects/gcp-integrations/locations/asia-east2 | cloud.googleapis.com/region: asia-east2 |
#
google-cloud-function-get-by-nameGets the details of a specific Google Cloud function.
#
Base Commandgoogle-cloud-function-get-by-name
#
InputArgument Name | Description | Required |
---|---|---|
project_id | The project ID the Google Cloud function is in. Default is the instance's project. | Optional |
region | The region of the Google Cloud function. You can get a full list of regions using the google-cloud-function-regions-list command. Default is all regions. | Optional |
function_name | The name of the function. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
GoogleCloudFunctions.Function.name | String | A user-defined name of the Google Cloud function. |
GoogleCloudFunctions.Function.status | String | Status of the Google Cloud function deployment. The status can be ACTIVE, OFFLINE, DEPLOY_IN_PROGRESS, DELETE_IN_PROGRESS, UNKNOWN. |
GoogleCloudFunctions.Function.labels | String | The labels associated with this Google Cloud Function. |
GoogleCloudFunctions.Function.runtime | String | The time in which to run the Google Cloud function. |
#
Command Example!google-cloud-function-get-by-name function_name="demisto-func"
#
Context Example#
Human Readable Output#
Here are the details for demisto-func:name | httpsTrigger | status | entryPoint | timeout | availableMemoryMb | serviceAccountEmail | updateTime | versionId | labels | sourceUploadUrl | runtime | ingressSettings |
---|---|---|---|---|---|---|---|---|---|---|---|---|
projects/project/locations/us-central1/functions/demisto-func | url: www.example.com | ACTIVE | hello_world | 60s | 128 | 2020-04-05T12:43:29.610Z | 1 | deployment-tool: console-cloud | python37 | ALLOW_ALL |
#
google-cloud-function-executeExecutes a Google Cloud function.
#
Base Commandgoogle-cloud-function-execute
#
InputArgument Name | Description | Required |
---|---|---|
function_name | The name of the Google Cloud function to execute. | Required |
region | The region of the Google Cloud function. Default is all regions. You can get a full list of regions using the google-cloud-function-regions-list command. | Optional |
parameters | The Google Cloud function parameters in a key:value format. Multiple parameters should be comma-separated (i.e., key1:value1,key2:value2). | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
GoogleCloudFunctions.Execution.executionId | String | Execution ID of the Google Cloud function invocated. |
GoogleCloudFunctions.Execution.result | String | Result populated for successful execution of a synchronous Google Cloud function. It will not be populated if the Google Cloud function does not return a result through context. |
GoogleCloudFunctions.Execution.error | String | Either a system or user-function generated error. Set if the execution was not successful. |
#
Command Example!google-cloud-function-execute function_name=demisto-func parameters=message:hell\"oThere
#
Context Example#
Human Readable Output#
Execution details for demisto-func:executionId | result |
---|---|
xp9hifb4y996 | hell"oThere |