CrowdStrike Falcon CrowdStrike Subreddit

Using the Cloud Security service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
combined_cloud_risks
PEP 8combined_cloud_risks
Get cloud risks with full details based on filters and sort criteria.
ListCloudGroupsExternal
PEP 8list_cloud_groups
Query Cloud Groups and return entities with full details.
ListCloudGroupsByIDExternal
PEP 8list_cloud_groups_by_id
Retrieve Cloud Groups by their UUIDs.
CreateCloudGroupExternal
PEP 8create_cloud_group
Create a new Cloud Group with specified properties and selectors.
UpdateCloudGroupExternal
PEP 8update_cloud_group
Update an existing Cloud Group's properties.
DeleteCloudGroupsExternal
PEP 8delete_cloud_groups
Delete Cloud Groups in batch by their UUIDs.
ListCloudGroupIDsExternal
PEP 8list_group_ids
Query Cloud Groups and return only their IDs.

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.

combined_cloud_risks

Get cloud risks with full details based on filters and sort criteria.

PEP8 method name

combined_cloud_risks

Endpoint

MethodRoute
GET/cloud-security-risks/combined/cloud-risks/v1

Required Scope

cloud-security-risks:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filterService Class SupportUber Class SupportquerystringFQL string to filter results in Falcon Query Language (FQL). Supported fields: account_id, account_name, asset_gcrn, asset_id, asset_name, asset_region, asset_type, cloud_group, cloud_provider, first_seen, last_seen, resolved_at, risk_factor, rule_id, rule_name, service_category, severity, status, suppressed_by, suppressed_reason, tags
sortService Class SupportUber Class SupportquerystringThe field to sort on. Use |asc or |desc suffix to specify sort direction. Supported fields: account_id, account_name, asset_id, asset_name, asset_region, asset_type, cloud_provider, first_seen, last_seen, resolved_at, rule_name, service_category, severity, status
limitService Class SupportUber Class SupportqueryintegerThe maximum number of items to return. When not specified or 0, 500 is used. When larger than 1000, 1000 is used.
offsetService Class SupportUber Class SupportqueryintegerOffset returned risks
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudSecurity

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

response = falcon.combined_cloud_risks(filter="string",
                                       sort="string",
                                       limit=integer,
                                       offset=integer
                                       )
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudSecurity

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

response = falcon.combined_cloud_risks(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
                      )

response = falcon.command("combined_cloud_risks",
                          filter="string",
                          sort="string",
                          limit=integer,
                          offset=integer
                          )
print(response)

Back to Table of Contents

ListCloudGroupsExternal

Query Cloud Groups and return entities with full details.

PEP8 method name

list_cloud_groups

Endpoint

MethodRoute
GET/cloud-security/combined/cloud-groups/v1

Required Scope

asset-groups:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filterService Class SupportUber Class SupportquerystringA valid FQL filter. Supports filtering groups by: Group properties: name, description, created_at, updated_at. Selector properties: cloud_provider, account_id, region, cloud_provider_tag, image_registry, image_repository, image_tag. Group tags: business_unit, business_impact, environment
sortService Class SupportUber Class SupportquerystringA valid sort string.
offsetService Class SupportUber Class SupportquerystringThe starting position of the list operation.
limitService Class SupportUber Class SupportquerystringThe maximum number of cloud groups to retrieve.
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudSecurity

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

response = falcon.list_cloud_groups(filter="string",
                                    sort="string",
                                    offset="string",
                                    limit="string"
                                    )
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudSecurity

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

response = falcon.ListCloudGroupsExternal(filter="string",
                                          sort="string",
                                          offset="string",
                                          limit="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("ListCloudGroupsExternal",
                          filter="string",
                          sort="string",
                          offset="string",
                          limit="string"
                          )
print(response)

Back to Table of Contents

ListCloudGroupsByIDExternal

Retrieve Cloud Groups by their UUIDs.

PEP8 method name

list_cloud_groups_by_id

Endpoint

MethodRoute
GET/cloud-security/entities/cloud-groups/v1

Required Scope

asset-groups:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
idsService Class SupportUber Class Supportquerystring or list of stringsCloud Groups UUIDs to retrieve
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudSecurity

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

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

response = falcon.list_cloud_groups_by_id(ids=id_list)

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

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

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

response = falcon.ListCloudGroupsByIDExternal(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("ListCloudGroupsByIDExternal", ids=id_list)

print(response)

Back to Table of Contents

CreateCloudGroupExternal

Create a new Cloud Group with specified properties and selectors.

PEP8 method name

create_cloud_group

Endpoint

MethodRoute
POST/cloud-security/entities/cloud-groups/v1

Required Scope

asset-groups:write

Content-Type

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

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class Support
bodydictionaryFull body payload in JSON format. Not required if using other keywords.
business_impactService Class SupportNo Uber Class Support
bodystringBusiness impact.
business_unitService Class SupportNo Uber Class Support
bodystringBusiness unit.
descriptionService Class SupportNo Uber Class Support
bodystringDescription.
environmentService Class SupportNo Uber Class Support
bodystringEnvironment.
nameService Class SupportNo Uber Class Support
bodystringName.
ownersService Class SupportNo Uber Class Support
bodylist of stringsOwners.
selectorsService Class SupportNo Uber Class Support
bodydictionarySelectors.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudSecurity

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

selectors = {
    "cloud_resources": [
        {
            "account_ids": ["string"],
            "cloud_provider": "aws",
            "filters": {
                "region": ["string"],
                "tags": ["string"]
            }
        }
    ],
    "images": [
        {
            "filters": {
                "repository": ["string"],
                "tag": ["string"]
            },
            "registry": "string"
        }
    ]
}

response = falcon.create_cloud_group(business_impact="high",
                                     business_unit="string",
                                     description="string",
                                     environment="dev",
                                     name="string",
                                     owners=["string"],
                                     selectors=selectors
                                     )

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

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

selectors = {
    "cloud_resources": [
        {
            "account_ids": ["string"],
            "cloud_provider": "aws",
            "filters": {
                "region": ["string"],
                "tags": ["string"]
            }
        }
    ],
    "images": [
        {
            "filters": {
                "repository": ["string"],
                "tag": ["string"]
            },
            "registry": "string"
        }
    ]
}

response = falcon.CreateCloudGroupExternal(business_impact="high",
                                           business_unit="string",
                                           description="string",
                                           environment="dev",
                                           name="string",
                                           owners=["string"],
                                           selectors=selectors
                                           )

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 = {
    "business_impact": "high",
    "business_unit": "string",
    "description": "string",
    "environment": "dev",
    "name": "string",
    "owners": [
        "string"
    ],
    "selectors": {
        "cloud_resources": [
        {
            "account_ids": [
            "string"
            ],
            "cloud_provider": "aws",
            "filters": {
                "region": [
                    "string"
                ],
                "tags": [
                    "string"
                ]
            }
        }
        ],
        "images": [
        {
            "filters": {
                "repository": [
                    "string"
                ],
                "tag": [
                    "string"
                ]
            },
            "registry": "string"
        }
        ]
    }
}

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

print(response)

Back to Table of Contents

UpdateCloudGroupExternal

Update an existing Cloud Group's properties.

PEP8 method name

update_cloud_group

Endpoint

MethodRoute
PATCH/cloud-security/entities/cloud-groups/v1

Required Scope

asset-groups:write

Content-Type

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

Keyword Arguments

NameServiceUberTypeData typeDescription
groupService Class SupportUber Class Support
bodydictionaryComplete group payload to update.
business_impactService Class SupportNo Uber Class Support
bodystringBusiness impact.
business_unitService Class SupportNo Uber Class Support
bodystringBusiness unit.
descriptionService Class SupportNo Uber Class Support
bodystringDescription.
environmentService Class SupportNo Uber Class Support
bodystringEnvironment.
nameService Class SupportNo Uber Class Support
bodystringName.
ownersService Class SupportNo Uber Class Support
bodylist of stringsOwners.
selectorsService Class SupportNo Uber Class Support
bodydictionarySelectors.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudSecurity

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

group_payload = {
    "business_impact": "high",
    "business_unit": "string",
    "description": "string",
    "environment": "dev",
    "name": "string",
    "owners": [
        "string"
    ],
    "selectors": {
        "cloud_resources": [
        {
            "account_ids": [
            "string"
            ],
            "cloud_provider": "aws",
            "filters": {
                "region": [
                    "string"
                ],
                "tags": [
                    "string"
                ]
            }
        }
        ],
        "images": [
        {
            "filters": {
                "repository": [
                    "string"
                ],
                "tag": [
                    "string"
                ]
            },
            "registry": "string"
        }
        ]
    }
}

response = falcon.update_cloud_group(group=group_payload)

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

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

group_payload = {
    "business_impact": "high",
    "business_unit": "string",
    "description": "string",
    "environment": "dev",
    "name": "string",
    "owners": [
        "string"
    ],
    "selectors": {
        "cloud_resources": [
        {
            "account_ids": [
            "string"
            ],
            "cloud_provider": "aws",
            "filters": {
                "region": [
                    "string"
                ],
                "tags": [
                    "string"
                ]
            }
        }
        ],
        "images": [
        {
            "filters": {
                "repository": [
                    "string"
                ],
                "tag": [
                    "string"
                ]
            },
            "registry": "string"
        }
        ]
    }
}

response = falcon.UpdateCloudGroupExternal(group=group_payload)

print(response)
Uber class example
from falconpy import APIHarnessV2

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

group_payload = {
    "business_impact": "high",
    "business_unit": "string",
    "description": "string",
    "environment": "dev",
    "name": "string",
    "owners": [
        "string"
    ],
    "selectors": {
        "cloud_resources": [
        {
            "account_ids": [
            "string"
            ],
            "cloud_provider": "aws",
            "filters": {
                "region": [
                    "string"
                ],
                "tags": [
                    "string"
                ]
            }
        }
        ],
        "images": [
        {
            "filters": {
                "repository": [
                    "string"
                ],
                "tag": [
                    "string"
                ]
            },
            "registry": "string"
        }
        ]
    }
}

response = falcon.command("UpdateCloudGroupExternal", group=group_payload)

print(response)

Back to Table of Contents

DeleteCloudGroupsExternal

Delete Cloud Groups in batch by their UUIDs.

PEP8 method name

delete_cloud_groups

Endpoint

MethodRoute
DELETE/cloud-security/entities/cloud-groups/v1

Required Scope

asset-groups:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
idsService Class SupportUber Class Supportquerystring or list of stringsCloud Groups UUIDs to delete
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudSecurity

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

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

response = falcon.delete_cloud_groups(ids=id_list)

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

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

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

response = falcon.DeleteCloudGroupsExternal(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("DeleteCloudGroupsExternal", ids=id_list)

print(response)

Back to Table of Contents

ListCloudGroupIDsExternal

Query Cloud Groups and return only their IDs.

PEP8 method name

list_group_ids

Endpoint

MethodRoute
GET/cloud-security/queries/cloud-groups/v1

Required Scope

asset-groups:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filterService Class SupportUber Class SupportquerystringA valid FQL filter. Supports filtering groups by: Group properties: name, description, created_at, updated_at. Selector properties: cloud_provider, account_id, region, cloud_provider_tag, image_registry, image_repository, image_tag. Group tags: business_unit, business_impact, environment
sortService Class SupportUber Class SupportquerystringA valid sort string.
offsetService Class SupportUber Class SupportquerystringThe starting position of the list operation.
limitService Class SupportUber Class SupportquerystringThe maximum number of cloud groups to retrieve.
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudSecurity

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

response = falcon.list_group_ids(filter="string",
                                 sort="string",
                                 offset="string",
                                 limit="string"
                                 )
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudSecurity

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

response = falcon.ListCloudGroupIDsExternal(filter="string",
                                            sort="string",
                                            offset="string",
                                            limit="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("ListCloudGroupIDsExternal",
                          filter="string",
                          sort="string",
                          offset="string",
                          limit="string"
                          )
print(response)

Back to Table of Contents