Using the Cloud OCI Registration service collection
Table of Contents
| Operation ID | Description | ||||
|---|---|---|---|---|---|
| Retrieve a list of OCI tenancies with support for FQL filtering, sorting, and pagination | ||||
| Refresh key for the OCI Tenancy | ||||
| Validate the OCI account in CSPM for a provided CID. For internal clients only. | ||||
| Create OCI tenancy account in CSPM | ||||
| Delete an existing OCI tenancy in CSPM. | ||||
| Update an existing OCI account. | ||||
| Retrieve script to create resources in tenancy OCID | ||||
Passing credentials
WARNING
client_idandclient_secretare 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_security_registration_oci_get_account
Retrieve a list of OCI tenancies with support for FQL filtering, sorting, and pagination.
PEP8 method name
get_account
Endpoint
| Method | Route |
|---|---|
/cloud-security-registration-oci/combined/accounts/v1 |
Required Scope
Content-Type
- Consumes: application/json
- Produces: application/json
Keyword Arguments
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| filter | query | string | FQL (Falcon Query Language) string for filtering results. Allowed filters: home_region, key_age, overall_status, created_at, updated_at, tenancy_ocid, and tenancy_name. | ||
| sort | query | string | Field and direction for sorting results - allowed sort fields: home_region, key_age, overall_status, created_at, updated_at, tenancy_ocid, and tenancy_name. | ||
| next_token | query | string | Token for cursor-based pagination. Currently unsupported. | ||
| limit | query | integer | Maximum number of records to return (default: 100, max: 10000). | ||
| offset | query | integer | Starting index of result. | ||
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.get_account(filter="string",
sort="string",
next_token="string",
limit=integer,
offset=integer
)
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.cloud_security_registration_oci_get_account(filter="string",
sort="string",
next_token="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("cloud_security_registration_oci_get_account",
filter="string",
sort="string",
next_token="string",
limit=integer,
offset=integer
)
print(response)
Back to Table of Contents
cloud_security_registration_oci_rotate_key
Refresh key for the OCI tenancy.
PEP8 method name
rotate_key
Endpoint
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/account-rotate-keys/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. | ||
| tenancy_ocid | body | string | OCI tenancy ID. |
Usage
Service class example (PEP8 syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.rotate_key(tenancy_ocid="string")
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.cloud_security_registration_oci_rotate_key(tenancy_ocid="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": [
{
"tenancy_ocid": "string"
}
]
}
response = falcon.command("cloud_security_registration_oci_rotate_key", body=body_payload)
print(response)
Back to Table of Contents
cloud_security_registration_oci_validate_tenancy
Validate the OCI account in CSPM for a provided CID. For internal clients only.
PEP8 method name
validate_tenancy
Endpoint
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/account-validate/v1 |
Required Scope
Content-Type
- Consumes: application/json
- Produces: application/json
Keyword Arguments
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. | ||
| products | body | list of dictionaries | OCI products to validate. | ||
| tenancy_ocid | body | string | OCI tenancy ID. |
Usage
Service class example (PEP8 syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
product_list = [
{
"features": [
"string"
],
"product": "string"
}
]
response = falcon.validate_tenancy(tenancy_ocid="string", products=product_list)
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
product_list = [
{
"features": [
"string"
],
"product": "string"
}
]
response = falcon.cloud_security_registration_oci_validate_tenancy(tenancy_ocid="string", products=product_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
)
body_payload = {
"resources": [
{
"products": [
{
"features": [
"string"
],
"product": "string"
}
],
"tenancy_ocid": "string"
}
]
}
response = falcon.command("cloud_security_registration_oci_validate_tenancy", body=body_payload)
print(response)
Back to Table of Contents
cloud_security_registration_oci_create_account
Create OCI tenancy account in CSPM
PEP8 method name
create_account
Endpoint
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/accounts/v1 |
Required Scope
Content-Type
- Consumes: application/json
- Produces: application/json
Keyword Arguments
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. | ||
| group_name | body | string | OCI group name. | ||
| home_region | body | string | OCI home region. | ||
| policy_name | body | string | OCI policy name. | ||
| products | body | list of dictionaries | OCI products to validate. | ||
| tenancy_ocid | body | string | OCI tenancy ID. | ||
| user_email | body | string | User email address. | ||
| user_name | body | string | OCI user name. |
Usage
Service class example (PEP8 syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
product_list = [
{
"features": [
"string"
],
"product": "string"
}
]
response = falcon.create_account(group_name="string",
home_region="string",
policy_name="string",
products=product_list,
tenancy_ocid="string",
user_email="string",
user_name="string"
)
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
product_list = [
{
"features": [
"string"
],
"product": "string"
}
]
response = falcon.cloud_security_registration_oci_create_account(group_name="string",
home_region="string",
policy_name="string",
products=product_list,
tenancy_ocid="string",
user_email="string",
user_name="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": [
{
"group_name": "string",
"home_region": "string",
"policy_name": "string",
"products": [
{
"features": [
{
"deployment_method": "string",
"feature": "string",
"is_enabled": boolean,
"persona": "string",
"registration_detailed_status": "string"
}
],
"product": "string"
}
],
"tenancy_ocid": "string",
"user_email": "string",
"user_name": "string"
}
]
}
response = falcon.command("cloud_security_registration_oci_create_account", body=body_payload)
print(response)
Back to Table of Contents
cloud_security_registration_oci_delete_account
Delete an existing OCI tenancy in CSPM.
PEP8 method name
delete_account
Endpoint
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/accounts/v1 |
Required Scope
Content-Type
- Consumes: application/json
- Produces: application/json
Keyword Arguments
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| ids | query | array (string) | OCI tenancy ocids to remove. | ||
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(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_account(ids=id_list)
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(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_security_registration_oci_delete_account(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_security_registration_oci_delete_account", ids=id_list)
print(response)
Back to Table of Contents
cloud_security_registration_oci_update_account
Update an existing OCI account.
PEP8 method name
update_account
Endpoint
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/accounts/v1 |
Required Scope
Content-Type
- Consumes: application/json
- Produces: application/json
Keyword Arguments
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. | ||
| group_name | body | string | OCI group name. | ||
| home_region | body | string | OCI home region. | ||
| policy_name | body | string | OCI policy name. | ||
| products | body | list of dictionaries | OCI products to validate. | ||
| stack_ocid | body | string | OCI stack ID. | ||
| tenancy_ocid | body | string | OCI tenancy ID. | ||
| user_email | body | string | User email address. | ||
| user_name | body | string | OCI user name. | ||
| user_ocid | body | string | OCI user ID. |
Usage
Service class example (PEP8 syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
product_list = [
{
"features": [
"string"
],
"product": "string"
}
]
response = falcon.update_account(group_name="string",
home_region="string",
policy_name="string",
products=product_list,
stack_ocid="string",
tenancy_ocid="string",
user_email="string",
user_name="string",
user_ocid="string"
)
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
product_list = [
{
"features": [
"string"
],
"product": "string"
}
]
response = falcon.cloud_security_registration_oci_update_account(group_name="string",
home_region="string",
policy_name="string",
products=product_list,
stack_ocid="string",
tenancy_ocid="string",
user_email="string",
user_name="string",
user_ocid="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": [
{
"group_name": "string",
"home_region": "string",
"policy_name": "string",
"products": [
{
"features": [
{
"deployment_method": "string",
"feature": "string",
"is_enabled": boolean,
"persona": "string",
"registration_detailed_status": "string"
}
],
"product": "string"
}
],
"stack_ocid": "string",
"tenancy_ocid": "string",
"user_email": "string",
"user_name": "string",
"user_ocid": "string"
}
]
}
response = falcon.command("cloud_security_registration_oci_update_account", body=body_payload)
print(response)
Back to Table of Contents
cloud_security_registration_oci_download_script
Retrieve script to create resources in tenancy OCID.
PEP8 method name
download_script
Endpoint
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/scripts/v1 |
Required Scope
Content-Type
- Consumes: application/json
- Produces: application/json
Keyword Arguments
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. | ||
| deployment_method | body | string | Deployment method. | ||
| is_download | body | boolean | Flag indicating if the script is intended for download. | ||
| tenancy_ocid | body | string | OCI tenancy ID. |
Usage
Service class example (PEP8 syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.download_script(deployment_method="string",
is_download=boolean,
tenancy_ocid="string"
)
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudOCIRegistration
# Do not hardcode API credentials!
falcon = CloudOCIRegistration(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.cloud_security_registration_oci_download_script(deployment_method="string",
is_download=boolean,
tenancy_ocid="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",
"is_download": boolean,
"tenancy_ocid": "string"
}
]
}
response = falcon.command("cloud_security_registration_oci_download_script", body=body_payload)
print(response)
Back to Table of Contents