Skip to main content

Google Resource Manager

This Integration is part of the Google Resource Manager Pack.#

Configure Google Resource Manager on Cortex XSOAR

  1. Navigate to Settings > Integrations > Servers & Services .
  2. Search for Google Resource Manager.
  3. Click Add instance to create and configure a new integration instance.
    • Name : a textual name for the integration instance.
    • Project ID
    • Private Key ID
    • Private Key
    • Client Email
    • Client ID
    • Client X509 Cert URL
    • Use system proxy settings
  4. Click Test to validate the URLs, token, and connection.

Commands

You 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.

  1. Create a new project: grm-create-project
  2. Get information for a project: grm-get-project
  3. Get a list of all projects: grm-list-projects
  4. Update a project: grm-update-project
  5. Search organization resources: grm-search-organizations
  6. Get information for an organization: grm-get-organization
  7. Delete a project: grm-delete-project
  8. Restore a project: grm-undelete-project

1. Create a new project


Creates a new Project resource with the user-specified values passed as command arguments.

Base Command

grm-create-project

Input
Argument Name Description Required
project_id The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123 Required
parent_id The ID of the parent resource. Organizations' Name output is in the format "organizations/12345" where the numbers after the forward slash are the ID of the organization. To find Organization IDs available to assign as a parent resource try running the grm-search-organization command. Required
label_keys The label keys associated with this Project. Label keys must be between 1 and 63 characters long and conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])? . You can associate a maximum of 256 labels with a given resource. Optional
name The user-assigned display name of the Project. It must be 4 to 30 characters. Supported characters: lowercase and uppercase letters, numbers, hyphens, single-quotes, double-quotes, spaces, and exclamation points. Example: My Project Optional
parent_type Represents the resource type the parent_id is for. Valid resource types: "organization" and "folder". Required
label_values The label values associated with this Project. Label values must be between 0 and 63 characters long and conform to the following regular expression [a-z]([-a-z0-9]*[a-z0-9])? . A label value can be empty. You can associate a maximum of 256 labels with a given resource. Optional

Context Output
Path Type Description
GRM.Project.Name String The user-assigned display name of the Project
GRM.Project.ID String The unique, user-assigned ID of the Project
GRM.Project.Number String The number uniquely identifying the Project
GRM.Project.State String The Project lifecycle state
GRM.Project.CreateTime Date createTime - The time the resource was created
GRM.Project.Label Unknown The labels associated with this Project
GRM.Project.Parent.ID String ID of the parent resource
GRM.Project.Parent.Type String Type of the parent resource

Command Example

grm-create-project project_id=faramir-111 parent_id=690006273490 parent_type=organization name="Faramir"

Context Example
{
    "GRM.Project": {
        "Name": "Faramir",
        "Parent": {
            "Type": "organization",
            "ID": "690006273490"
        },
        "Number": "110336878499",
        "Label": null,
        "State": "ACTIVE",
        "ID": "faramir-111",
        "CreateTime": "2019-01-15T12:30:21.267Z"
    }
}
Human Readable Output

Google Cloud Project Successfully Created

Name Parent Number ID State Label CreateTime
Faramir Type: organization
ID: 690006273490
110336878499 faramir-111 ACTIVE 2019-01-15T12:30:21.267Z

2. Getting information for a project


Retrieves the Project by the specified project_id, e.g., my-project-123.

Base Command

grm-get-project

Input
Argument Name Description Required
project_id The unique ID of the Project to fetch, e.g., tokyo-rain-123. Required

Context Output
Path Type Description
GRM.Project.Number String The number uniquely identifying the Project
GRM.Project.ID String The unique, user-assigned ID of the Project
GRM.Project.State String The Project lifecycle state
GRM.Project.Name String The user-assigned display name of the Project
GRM.Project.CreateTime Date createTime - The time the resource was created
GRM.Project.Label Unknown The labels associated with this Project
GRM.Project.Parent.ID String ID of the parent resource
GRM.Project.Parent.Type String Type of the parent resource

Command Example

grm-get-project project_id=faramir-111

Context Example
{
    "GRM.Project": {
        "Name": "Faramir",
        "Parent": {
            "Type": "organization",
            "ID": "690006273490"
        },
        "Number": "110336878499",
        "Label": null,
        "State": "ACTIVE",
        "ID": "faramir-111",
        "CreateTime": "2019-01-15T12:30:21.267Z"
    }
}
Human Readable Output

Details of Fetched Google Cloud Project

Name Parent Number ID State Label CreateTime
Faramir Type: organization
ID: 690006273490
110336878499 faramir-111 ACTIVE 2019-01-15T12:30:21.267Z

3. Get a list of all projects


Lists projects that are visible to the user and satisfies the specified filter. Projects are returned in an unspecified order.

Base Command

grm-list-projects

Input
Argument Name Description Required
filter An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are:
  • name
  • id
  • labels.key (where key is the name of a label)

Examples:

  • name:how* : The project's name starts with "how".
  • name:Howl : The project's name is Howl or howl.
  • name:HOWL : Equivalent to above.
  • NAME:howl : Equivalent to above.
  • labels.color:* : The project has the label color.
  • labels.color:red : The project's label color has the value red.
Optional

Context Output
Path Type Description
GRM.Project.Name String The user-assigned display name of the Project
GRM.Project.ID String The unique, user-assigned ID of the Project
GRM.Project.Number String The number uniquely identifying the Project
GRM.Project.State String The Project lifecycle state.
GRM.Project.CreateTime Date The time the resource was created
GRM.Project.Label Unknown The labels associated with this Project
GRM.Project.Parent.ID String ID of the parent resource
GRM.Project.Parent.Type String Type of the parent resource

Command Example

grm-list-projects filter="id:faramir*"

Context Example
{
    "GRM.Project": [
        {
            "Name": "Faramir 2",
            "Parent": {
                "Type": "organization",
                "ID": "690006273490"
            },
            "Number": "877118493152",
            "Label": null,
            "State": "ACTIVE",
            "ID": "faramir-222",
            "CreateTime": "2019-01-20T07:42:58.155Z"
        },
        {
            "Name": "Faramir",
            "Parent": {
                "Type": "organization",
                "ID": "690006273490"
            },
            "Number": "110336878499",
            "Label": null,
            "State": "ACTIVE",
            "ID": "faramir-111",
            "CreateTime": "2019-01-15T12:30:21.267Z"
        }
    ]
}
Human Readable Output

Projects Filtered by 'id:faramir*'

Name Parent Number ID State Label CreateTime
Faramir 2 Type: organization
ID: 690006273490
877118493152 faramir-222 ACTIVE 2019-01-20T07:42:58.155Z
Faramir Type: organization
ID: 690006273490
110336878499 faramir-111 ACTIVE 2019-01-15T12:30:21.267Z

4. Update a project


Updates the attributes of the Project identified by the specified project_id. Currently the only fields that can be updated are the project name and labels.

Base Command

grm-update-project

Input
Argument Name Description Required
project_id The unique ID of the Project to update.
Example: tokyo-rain-123
Required
name The string to update the Project name with. It must be 4 to 30 characters. Supported characters are: lowercase and uppercase letters, numbers, hyphens, single-quotes, double-quotes, spaces, and exclamation points.
Example: My Project
Optional
parent_id The ID of the parent resource. Organizations' Name output is in the format organizations/12345 where the numbers after the forward slash are the ID of the organization. To find Organization IDs available to assign as a parent resource try running the grm-search-organization command. Required
parent_type The resource type the parent_id is for. Valid resource types: "organization" and "folder". Required
label_keys The label keys to associate with this Project. Label keys must be between 1 and 63 characters long and conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])? You can associate a maximum of 256 labels with a given resource. Optional
label_values The label values to associate with this Project. Label values must be between 0 and 63 characters long and conform to the following regular expression [a-z]([-a-z0-9]*[a-z0-9])? . A label value can be empty. You can associate a maximum of 256 labels with a given resource. Optional

Context Output
Path Type Description
GRM.Project.Name String The user-assigned display name of the Project
GRM.Project.ID String The unique, user-assigned ID of the Project
GRM.Project.Number String The number uniquely identifying the Project
GRM.Project.State String The Project lifecycle state.
GRM.Project.CreateTime Date The time the resource was created
GRM.Project.Label Unknown The labels associated with this Project
GRM.Project.Parent.ID String ID of the parent resource
GRM.Project.Parent.Type String Type of the parent resource

Command Example

grm-update-project project_id=faramir-111 parent_id=690006273490 parent_type=organization name="Faramir-Updated"

Context Example
{
    "GRM.Project": {
        "Name": "Faramir-Updated",
        "Parent": {
            "Type": "organization",
            "ID": "690006273490"
        },
        "Number": "110336878499",
        "Label": null,
        "State": "ACTIVE",
        "ID": "faramir-111",
        "CreateTime": "2019-01-15T12:30:21.267Z"
    }
}
Human Readable Output

Details of Updated Google Cloud Project

Name Parent Number ID State Label CreateTime
Faramir-Updated Type: organization
ID: 690006273490
110336878499 faramir-111 ACTIVE 2019-01-15T12:30:21.267Z

5. Search organization resources


Searches Organization resources that are visible to the user and satisfies the specified filter. Organizations are returned in an unspecified order. New Organizations do not necessarily appear at the end of the results.

Base Command

grm-search-organizations

Input
Argument Name Description Required
page_size The maximum number of Organizations to return in the response. Optional
page_token A pagination token returned from a previous call to "organizations.search" that indicates from where the listing should continue Optional
filter An expression for filtering the Organizations returned in the results. Filter rules are case-insensitive. Organizations can be filtered by 'owner.directoryCustomerId' or by 'domain', where the domain is a G Suite domain, e.g., owner.directorycustomerid:123456789 Organizations with owner.directory_customer_id equal to 123456789. domain:google.com Organizations corresponding to the domain google.com. Optional

Context Output
Path Type Description
GRM.Organization.Name String The resource name of the organization. This is the organization's relative path in the API. Its format is "organizations/[organization_id]" e.g. "organizations/1234".
GRM.Organization.State String The organization's current lifecycle state
GRM.Organization.CreateTime Date The time the organization resource was created
GRM.Organization.Owner.CustomerID String The G Suite customer ID used in the Directory API

Command Example

grm-search-organizations

Context Example
{
    "GRM.Organization": [
        {
            "Owner": {
                "CustomerID": "C02f0zfqw"
            },
            "State": "ACTIVE",
            "CreateTime": "2017-04-25T13:41:05.196Z",
            "Name": "organizations/690006273490"
        }
    ]
}
Human Readable Output

Organizations

Owner State Name CreateTime
CustomerID: C02f0zfqw ACTIVE organizations/690006273490 2017-04-25T13:41:05.196Z

6. Get information for an organization


Returns an Organization resource identified by the specified resource name.

Base Command

grm-get-organization

Input
Argument Name Description Required
name The resource name of the Organization to fetch, e.g., "organizations/1234". Required

Context Output
Path Type Description
GRM.Organization.Name String The resource name of the organization. This is the organization's relative path in the API. Its format is "organizations/[organization_id]" e.g., "organizations/1234"
GRM.Organization.State String The organization's current lifecycle state
GRM.Organization.CreateTime Date The time the organization resource was created
GRM.Organization.Owner.CustomerID String The G Suite customer ID used in the Directory API

Command Example

grm-get-organization name=organizations/690006273490

Context Example
{
    "GRM.Organization": {
        "Owner": {
            "CustomerID": "C02f0zfqw"
        },
        "State": "ACTIVE",
        "CreateTime": "2017-04-25T13:41:05.196Z",
        "Name": "organizations/690006273490"
    }
}
Human Readable Output

Details of Fetched Organization

Owner State Name CreateTime
CustomerID: C02f0zfqw ACTIVE organizations/690006273490 2017-04-25T13:41:05.196Z

7. Delete an organization


Marks the Project identified by the specified project_id to be deleted, e.g., my-project-123.

Base Command

grm-delete-project

Input
Argument Name Description Required
project_id The unique ID of the Project to delete. Example: tokyo-rain-123 Required

Context Output
Path Type Description
GRM.Project.State String The Project lifecycle state
GRM.Project.Number String The number uniquely identifying the Project
GRM.Project.ID String The unique, user-assigned ID of the Project
GRM.Project.Name String The user-assigned display name of the Project
GRM.Project.CreateTime Date createTime - The time the resource was created
GRM.Project.Label Unknown The labels associated with this Project
GRM.Project.Parent.ID String ID of the parent resource
GRM.Project.Parent.Type String Type of the parent resource

Command Example

grm-delete-project project_id=faramir-111

Context Example
{
    "GRM.Project": {
        "Name": "Faramir-Updated",
        "Parent": {
            "Type": "organization",
            "ID": "690006273490"
        },
        "Number": "110336878499",
        "Label": null,
        "State": "DELETE_REQUESTED",
        "ID": "faramir-111",
        "CreateTime": "2019-01-15T12:30:21.267Z"
    }
}
Human Readable Output

Project State Successfully Set To DELETE_REQUESTED

Name Parent Number ID State Label CreateTime
Faramir-Updated Type: organization
ID: 690006273490
110336878499 faramir-111 DELETE_REQUESTED 2019-01-15T12:30:21.267Z

8. Restore a project


Restores the Project identified by the specified project_id, e.g., my-project-123.

Base Command

grm-undelete-project

Input
Argument Name Description Required
project_id The unique ID of the Project to restore. Example: tokyo-rain-123 Required

Context Output
Path Type Description
GRM.Project.State String The Project lifecycle state
GRM.Project.Number String The number uniquely identifying the Project
GRM.Project.ID String The unique, user-assigned ID of the Project
GRM.Project.Name String The user-assigned display name of the Project
GRM.Project.CreateTime Date The time the resource was created
GRM.Project.Label Unknown The labels associated with this Project
GRM.Project.Parent.ID String ID of the parent resource
GRM.Project.Parent.Type String Type of the parent resource

Command Example

grm-undelete-project project_id=faramir-111

Context Example
{
    "GRM.Project": {
        "Name": "Faramir-Updated",
        "Parent": {
            "Type": "organization",
            "ID": "690006273490"
        },
        "Number": "110336878499",
        "Label": null,
        "State": "ACTIVE",
        "ID": "faramir-111",
        "CreateTime": "2019-01-15T12:30:21.267Z"
    }
}
Human Readable Output

Project State Successfully Set To ACTIVE

Name Parent Number ID State Label CreateTime
Faramir-Updated Type: organization
ID: 690006273490
110336878499 faramir-111 ACTIVE 2019-01-15T12:30:21.267Z