Cloud OCI Registration - CrowdStrike/falconpy GitHub Wiki
| 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 | ||||
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.
Retrieve a list of OCI tenancies with support for FQL filtering, sorting, and pagination.
get_account
| Method | Route |
|---|---|
/cloud-security-registration-oci/combined/accounts/v1 |
- Consumes: application/json
- Produces: application/json
| 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. |
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)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)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
Refresh key for the OCI tenancy.
rotate_key
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/account-rotate-keys/v1 |
- Produces: application/json
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. | ||
| tenancy_ocid | body | string | OCI tenancy ID. |
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)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)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
Validate the OCI account in CSPM for a provided CID. For internal clients only.
validate_tenancy
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/account-validate/v1 |
- Consumes: application/json
- Produces: application/json
| 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. |
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)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)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
Create OCI tenancy account in CSPM
create_account
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/accounts/v1 |
- Consumes: application/json
- Produces: application/json
| 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. |
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)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)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
Delete an existing OCI tenancy in CSPM.
delete_account
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/accounts/v1 |
- Consumes: application/json
- Produces: application/json
| 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. |
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)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)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
Update an existing OCI account.
update_account
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/accounts/v1 |
- Consumes: application/json
- Produces: application/json
| 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. |
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)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)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
Retrieve script to create resources in tenancy OCID.
download_script
| Method | Route |
|---|---|
/cloud-security-registration-oci/entities/scripts/v1 |
- Consumes: application/json
- Produces: application/json
| 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. |
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)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)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
