Cloud GCP Registration - CrowdStrike/falconpy GitHub Wiki

CrowdStrike Falcon CrowdStrike Subreddit

Using the Cloud GCP Registration service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation ID Description
cloud_registration_gcp_get_entities
PEP 8 get_entities
Retrieve all GCP entities (organizations, folders, projects) grouped by type with support for FQL filtering, sorting, and pagination.
cloud_registration_gcp_trigger_health_check
PEP 8 trigger_health_check
Trigger health check scan for GCP registrations
cloud_registration_gcp_get_registration
PEP 8 get_registration
Retrieve a Google Cloud Registration.
cloud_registration_gcp_put_registration
PEP 8 update_registration
Creates/Updates a Google Cloud Registration.
cloud_registration_gcp_create_registration
PEP 8 create_registration
Create a Google Cloud Registration.
cloud_registration_gcp_update_registration
PEP 8 cloud_registration_gcp_update_registration
Update a Google Cloud Registration.
cloud_registration_gcp_delete_registration
PEP 8 delete_registration
Deletes a Google Cloud Registration and returns the deleted registration in the response body.

Passing credentials

WARNING

client_id and client_secret are keyword arguments that contain your CrowdStrike API credentials. Please note that all examples below do not hard code these values. (These values are ingested as strings.)

CrowdStrike does not recommend hard coding API credentials or customer identifiers within source code.

cloud_registration_gcp_get_entities

Retrieve all GCP entities (organizations, folders, projects) grouped by type with support for FQL filtering, sorting, and pagination.

PEP8 method name

get_entities

Endpoint

Method Route
GET /cloud-security-registration-google-cloud/entities/accounts/v1

Required Scope

cloud-google-cloud-registration:read

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
ids Service Class Support Uber Class Support query array (string) Google Cloud Registration IDs to filter by.
filter Service Class Support Uber Class Support query string FQL (Falcon Query Language) string for filtering results. Allowed filters: entity_type, entity_id, entity_name, registration_id, registration_name, registration_scope, parent_id, ioa_status, iom_status, created, updated
sort Service Class Support Uber Class Support query string Field and direction for sorting results (e.g., created|desc). Sorting applies across all entity types before grouping.
limit Service Class Support Uber Class Support query integer Maximum number of records to return. Default: 100, Max: 500.
offset Service Class Support Uber Class Support query integer Starting index of result.
parameters Service Class Support Uber Class Support query dictionary Full query string parameters payload in JSON format. Not required when using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.get_entities(ids=id_list,
                               filter="string",
                               sort="string",
                               limit=integer,
                               offset=integer
                               )

print(response)
Service class example (Operation ID syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.cloud_registration_gcp_get_entities(ids=id_list,
                                                      filter="string",
                                                      sort="string",
                                                      limit=integer,
                                                      offset=integer
                                                      )

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.command("cloud_registration_gcp_get_entities",
                          ids=id_list,
                          filter="string",
                          sort="string",
                          limit=integer,
                          offset=integer
                          )

print(response)

Back to Table of Contents

cloud_registration_gcp_trigger_health_check

Trigger health check scan for GCP registrations

PEP8 method name

trigger_health_check

Endpoint

Method Route
POST /cloud-security-registration-google-cloud/entities/registration-scans/v1

Required Scope

cloud-google-cloud-registration:write

Content-Type

  • Consumes: application/json
  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
ids Service Class Support Uber Class Support query array (string) GCP Registration IDs
parameters Service Class Support Uber Class Support query dictionary Full query string parameters payload in JSON format. Not required when using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.trigger_health_check(ids=id_list)

print(response)
Service class example (Operation ID syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.cloud_registration_gcp_trigger_health_check(ids=id_list)

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.command("cloud_registration_gcp_trigger_health_check", ids=id_list)

print(response)

Back to Table of Contents

cloud_registration_gcp_get_registration

Retrieve a Google Cloud Registration.

PEP8 method name

get_registration

Endpoint

Method Route
GET /cloud-security-registration-google-cloud/entities/registrations/v1

Required Scope

cloud-google-cloud-registration:read

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
ids Service Class Support Uber Class Support query string Google Cloud Registration ID
parameters Service Class Support Uber Class Support query dictionary Full query string parameters payload in JSON format. Not required when using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

response = falcon.get_registration(ids="string")

print(response)
Service class example (Operation ID syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

response = falcon.cloud_registration_gcp_get_registration(ids="string")

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.command("cloud_registration_gcp_get_registration", ids="string")

print(response)

Back to Table of Contents

cloud_registration_gcp_put_registration

Creates/Updates a Google Cloud Registration.

PEP8 method name

update_registration

Endpoint

Method Route
PUT /cloud-security-registration-google-cloud/entities/registrations/v1

Required Scope

cloud-google-cloud-registration:write

Content-Type

  • Consumes: application/json
  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload in JSON format. Not required if using other keywords.
deployment_method Service Class Support No Uber Class Support body string The method of deployment.
entity_id Service Class Support No Uber Class Support body array (string) The ID of the entity.
excluded_project_patterns Service Class Support No Uber Class Support body array (string) Project patterns that should be excluded.
falcon_client_key_id Service Class Support No Uber Class Support body string API client key ID.
falcon_client_key_type Service Class Support No Uber Class Support body string API client key type.
infra_manager_region Service Class Support No Uber Class Support body string Infrastructure manager region.
infra_project_id Service Class Support No Uber Class Support body string Infrastructure project ID.
labels Service Class Support No Uber Class Support body dictionary Prop labels.
products Service Class Support No Uber Class Support body array (dictionary) Products.
registration_name Service Class Support No Uber Class Support body string Registration name.
registration_scope Service Class Support No Uber Class Support body string Registration scope.
resource_name_prefix Service Class Support No Uber Class Support body string Resource name prefix.
resource_name_suffix Service Class Support No Uber Class Support body string Resource name suffix.
tags Service Class Support No Uber Class Support body dictionary Tags.
wif_project_id Service Class Support No Uber Class Support body string WIF project ID.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

response = falcon.update_registration(deployment_method="string",
                                      entity_id=["string"],
                                      excluded_project_patterns=["string"],
                                      falcon_client_key_id="string",
                                      falcon_client_key_type="string",
                                      infra_manager_region="string",
                                      infra_project_id="string",
                                      labels={
                                          "additionalProp1": "string",
                                          "additionalProp2": "string",
                                          "additionalProp3": "string"
                                      },
                                      products=[{
                                          "features": ["string"],
                                          "product": "string"
                                      }],
                                      registration_name="string",
                                      registration_scope="string",
                                      resource_name_prefix="string",
                                      resource_name_suffix="string",
                                      tags={
                                          "additionalProp1": "string",
                                          "additionalProp2": "string",
                                          "additionalProp3": "string"
                                      },
                                      wif_project_id="string"
                                      )

print(response)
Service class example (Operation ID syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

response = falcon.cloud_registration_gcp_put_registration(deployment_method="string",
                                                          entity_id=["string"],
                                                          excluded_project_patterns=["string"],
                                                          falcon_client_key_id="string",
                                                          falcon_client_key_type="string",
                                                          infra_manager_region="string",
                                                          infra_project_id="string",
                                                          labels={
                                                              "additionalProp1": "string",
                                                              "additionalProp2": "string",
                                                              "additionalProp3": "string"
                                                          },
                                                          products=[{
                                                              "features": ["string"],
                                                              "product": "string"
                                                          }],
                                                          registration_name="string",
                                                          registration_scope="string",
                                                          resource_name_prefix="string",
                                                          resource_name_suffix="string",
                                                          tags={
                                                              "additionalProp1": "string",
                                                              "additionalProp2": "string",
                                                              "additionalProp3": "string"
                                                          },
                                                          wif_project_id="string"
                                                          )

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

body_payload = {
    "resources": [
        {
            "deployment_method": "string",
            "entity_id": [
                "string"
            ],
            "excluded_project_patterns": [
                "string"
            ],
            "falcon_client_key_id": "string",
            "falcon_client_key_type": "string",
            "infra_manager_region": "string",
            "infra_project_id": "string",
            "labels": {
                "additionalProp1": "string",
                "additionalProp2": "string",
                "additionalProp3": "string"
            },
            "products": [
                {
                "features": [
                    "string"
                ],
                "product": "string"
                }
            ],
            "registration_name": "string",
            "registration_scope": "string",
            "resource_name_prefix": "string",
            "resource_name_suffix": "string",
            "tags": {
                "additionalProp1": "string",
                "additionalProp2": "string",
                "additionalProp3": "string"
            },
            "wif_project_id": "string"
        }
    ]
}

response = falcon.command("cloud_registration_gcp_put_registration", body=body_payload)

print(response)

Back to Table of Contents

cloud_registration_gcp_create_registration

Create a Google Cloud Registration.

PEP8 method name

create_registration

Endpoint

Method Route
POST /cloud-security-registration-google-cloud/entities/registrations/v1

Required Scope

cloud-google-cloud-registration:write

Content-Type

  • Consumes: application/json
  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload in JSON format.
deployment_method Service Class Support No Uber Class Support body string The method of deployment.
entity_id Service Class Support No Uber Class Support body array (string) The ID of the entity.
excluded_project_patterns Service Class Support No Uber Class Support body array (string) Project patterns that should be excluded.
falcon_client_key_id Service Class Support No Uber Class Support body string API client key ID.
falcon_client_key_type Service Class Support No Uber Class Support body string API client key type.
infra_manager_region Service Class Support No Uber Class Support body string Infrastructure manager region.
infra_project_id Service Class Support No Uber Class Support body string Infrastructure project ID.
labels Service Class Support No Uber Class Support body dictionary Prop labels.
products Service Class Support No Uber Class Support body array (dictionary) Products.
registration_name Service Class Support No Uber Class Support body string Registration name.
registration_scope Service Class Support No Uber Class Support body string Registration scope.
resource_name_prefix Service Class Support No Uber Class Support body string Resource name prefix.
resource_name_suffix Service Class Support No Uber Class Support body string Resource name suffix.
tags Service Class Support No Uber Class Support body dictionary Tags.
wif_project_id Service Class Support No Uber Class Support body string WIF project ID.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

response = falcon.create_registration(deployment_method="string",
                                      entity_id=["string"],
                                      excluded_project_patterns=["string"],
                                      falcon_client_key_id="string",
                                      falcon_client_key_type="string",
                                      infra_manager_region="string",
                                      infra_project_id="string",
                                      labels={
                                          "additionalProp1": "string",
                                          "additionalProp2": "string",
                                          "additionalProp3": "string"
                                      },
                                      products=[{
                                          "features": ["string"],
                                          "product": "string"
                                      }],
                                      registration_name="string",
                                      registration_scope="string",
                                      resource_name_prefix="string",
                                      resource_name_suffix="string",
                                      tags={
                                          "additionalProp1": "string",
                                          "additionalProp2": "string",
                                          "additionalProp3": "string"
                                      },
                                      wif_project_id="string"
                                      )

print(response)
Service class example (Operation ID syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

response = falcon.cloud_registration_gcp_create_registration(deployment_method="string",
                                                             entity_id=["string"],
                                                             excluded_project_patterns=["string"],
                                                             falcon_client_key_id="string",
                                                             falcon_client_key_type="string",
                                                             infra_manager_region="string",
                                                             infra_project_id="string",
                                                             labels={
                                                                 "additionalProp1": "string",
                                                                 "additionalProp2": "string",
                                                                 "additionalProp3": "string"
                                                             },
                                                             products=[{
                                                                 "features": ["string"],
                                                                 "product": "string"
                                                             }],
                                                             registration_name="string",
                                                             registration_scope="string",
                                                             resource_name_prefix="string",
                                                             resource_name_suffix="string",
                                                             tags={
                                                                 "additionalProp1": "string",
                                                                 "additionalProp2": "string",
                                                                 "additionalProp3": "string"
                                                             },
                                                             wif_project_id="string"
                                                             )

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

body_payload = {
    "resources": [
        {
            "deployment_method": "string",
            "entity_id": [
                "string"
            ],
            "excluded_project_patterns": [
                "string"
            ],
            "falcon_client_key_id": "string",
            "falcon_client_key_type": "string",
            "infra_manager_region": "string",
            "infra_project_id": "string",
            "labels": {
                "additionalProp1": "string",
                "additionalProp2": "string",
                "additionalProp3": "string"
            },
            "products": [
                {
                "features": [
                    "string"
                ],
                "product": "string"
                }
            ],
            "registration_name": "string",
            "registration_scope": "string",
            "resource_name_prefix": "string",
            "resource_name_suffix": "string",
            "tags": {
                "additionalProp1": "string",
                "additionalProp2": "string",
                "additionalProp3": "string"
            },
            "wif_project_id": "string"
        }
    ]
}

response = falcon.command("cloud_registration_gcp_create_registration", body=body_payload)

print(response)

Back to Table of Contents

cloud_registration_gcp_update_registration

Update a Google Cloud Registration.

PEP8 method name

cloud_registration_gcp_update_registration

Endpoint

Method Route
PATCH /cloud-security-registration-google-cloud/entities/registrations/v1

Required Scope

cloud-google-cloud-registration:write

Content-Type

  • Consumes: application/json
  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload in JSON format.
ids Service Class Support Uber Class Support query string Google Cloud Registration ID.
deployment_method Service Class Support No Uber Class Support body string The method of deployment.
entity_id Service Class Support No Uber Class Support body array (string) The ID of the entity.
excluded_project_patterns Service Class Support No Uber Class Support body array (string) Project patterns that should be excluded.
falcon_client_key_id Service Class Support No Uber Class Support body string API client key ID.
falcon_client_key_type Service Class Support No Uber Class Support body string API client key type.
infra_manager_region Service Class Support No Uber Class Support body string Infrastructure manager region.
infra_project_id Service Class Support No Uber Class Support body string Infrastructure project ID.
labels Service Class Support No Uber Class Support body dictionary Prop labels.
products Service Class Support No Uber Class Support body array (dictionary) Products.
registration_name Service Class Support No Uber Class Support body string Registration name.
registration_scope Service Class Support No Uber Class Support body string Registration scope.
resource_name_prefix Service Class Support No Uber Class Support body string Resource name prefix.
resource_name_suffix Service Class Support No Uber Class Support body string Resource name suffix.
tags Service Class Support No Uber Class Support body dictionary Tags.
wif_project_id Service Class Support No Uber Class Support body string WIF project ID.
parameters Service Class Support Uber Class Support query dictionary Full query string parameters payload in JSON format. Not required when using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

response = falcon.cloud_registration_gcp_update_registration(ids="string",
                                                             deployment_method="string",
                                                             entity_id=["string"],
                                                             excluded_project_patterns=["string"],
                                                             falcon_client_key_id="string",
                                                             falcon_client_key_type="string",
                                                             infra_manager_region="string",
                                                             infra_project_id="string",
                                                             labels={
                                                                 "additionalProp1": "string",
                                                                 "additionalProp2": "string",
                                                                 "additionalProp3": "string"
                                                             },
                                                             products=[{
                                                                 "features": ["string"],
                                                                 "product": "string"
                                                             }],
                                                             registration_name="string",
                                                             registration_scope="string",
                                                             resource_name_prefix="string",
                                                             resource_name_suffix="string",
                                                             tags={
                                                                 "additionalProp1": "string",
                                                                 "additionalProp2": "string",
                                                                 "additionalProp3": "string"
                                                             },
                                                             wif_project_id="string"
                                                             )

print(response)
Service class example (Operation ID syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

response = falcon.cloud_registration_gcp_update_registration(ids="string",
                                                             deployment_method="string",
                                                             entity_id=["string"],
                                                             excluded_project_patterns=["string"],
                                                             falcon_client_key_id="string",
                                                             falcon_client_key_type="string",
                                                             infra_manager_region="string",
                                                             infra_project_id="string",
                                                             labels={
                                                                 "additionalProp1": "string",
                                                                 "additionalProp2": "string",
                                                                 "additionalProp3": "string"
                                                             },
                                                             products=[{
                                                                 "features": ["string"],
                                                                 "product": "string"
                                                             }],
                                                             registration_name="string",
                                                             registration_scope="string",
                                                             resource_name_prefix="string",
                                                             resource_name_suffix="string",
                                                             tags={
                                                                 "additionalProp1": "string",
                                                                 "additionalProp2": "string",
                                                                 "additionalProp3": "string"
                                                             },
                                                             wif_project_id="string"
                                                             )

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

body_payload = {
    "resources": [
        {
            "deployment_method": "string",
            "entity_id": [
                "string"
            ],
            "excluded_project_patterns": [
                "string"
            ],
            "falcon_client_key_id": "string",
            "falcon_client_key_type": "string",
            "infra_manager_region": "string",
            "infra_project_id": "string",
            "labels": {
                "additionalProp1": "string",
                "additionalProp2": "string",
                "additionalProp3": "string"
            },
            "products": [
                {
                "features": [
                    "string"
                ],
                "product": "string"
                }
            ],
            "registration_name": "string",
            "registration_scope": "string",
            "resource_name_prefix": "string",
            "resource_name_suffix": "string",
            "tags": {
                "additionalProp1": "string",
                "additionalProp2": "string",
                "additionalProp3": "string"
            },
            "wif_project_id": "string"
        }
    ]
}

response = falcon.command("cloud_registration_gcp_update_registration",
                          body=body_payload,
                          ids="string"
                          )

print(response)

Back to Table of Contents

cloud_registration_gcp_delete_registration

Deletes a Google Cloud Registration and returns the deleted registration in the response body.

PEP8 method name

delete_registration

Endpoint

Method Route
DELETE /cloud-security-registration-google-cloud/entities/registrations/v1

Required Scope

cloud-google-cloud-registration:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
ids Service Class Support Uber Class Support query string Google Cloud Registration ID
parameters Service Class Support Uber Class Support query dictionary Full query string parameters payload in JSON format. Not required when using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

response = falcon.delete_registration(ids="string")

print(response)
Service class example (Operation ID syntax)
from falconpy import CloudGoogleCloudRegistration

# Do not hardcode API credentials!
falcon = CloudGoogleCloudRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )

response = falcon.cloud_registration_gcp_delete_registration(ids="string")

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.command("cloud_registration_gcp_delete_registration", ids="string")

print(response)

Back to Table of Contents

⚠️ **GitHub.com Fallback** ⚠️