D4C Registration
The D4C Registration service collection provides operations for registering AWS, Azure, and GCP cloud accounts. This service collection has been superseded by the CSPM Registration service collection and is now deprecated. Developers should move code over to use the new operations available within the updated collection.
| Language | Last Update |
|---|---|
| Python | v1.5.0 |
| PowerShell | v2.2.9 |
| Go | v0.20.0 |
| TypeScript | v0.6.0 |
| Rust | v0.7.0 |
| Ruby | v1.2.0 |
This service collection has been superseded by the CSPMRegistration service collection and is now deprecated. Developers should move code over to use the new operations available within the updated collection.
Table of Contents
Section titled “Table of Contents”| Operation | Description |
|---|---|
GetD4CAwsAccountget_aws_account | Returns information about the current status of an AWS account. deprecated |
CreateD4CAwsAccountcreate_aws_account | Creates a new account in our system for a customer and generates a script for them to run in their AWS cloud environment to grant us access. deprecated |
DeleteD4CAwsAccountdelete_aws_account | Deletes an existing AWS account or organization in our system. deprecated |
GetD4CAwsConsoleSetupURLsget_aws_console_setup | Return a URL for customer to visit in their cloud environment to grant us access to their AWS environment. deprecated |
GetD4CAWSAccountScriptsAttachmentget_aws_account_scripts | Return a script for customer to run in their cloud environment to grant us access to their AWS environment as a downloadable attachment. deprecated |
GetDiscoverCloudAzureAccountget_azure_account | Return information about Azure account registration. deprecated |
CreateDiscoverCloudAzureAccountcreate_azure_account | Creates a new account in our system for a customer and generates a script for them to run in their cloud environment to grant us access. deprecated |
UpdateDiscoverCloudAzureAccountClientIDupdate_azure_account_client_id | Update an Azure service account in our system by with the user-created client_id created with the public key we’ve provided. deprecated |
GetDiscoverCloudAzureUserScriptsAttachmentget_azure_user_scripts_attachment | Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment. deprecated |
GetDiscoverCloudAzureUserScriptsget_azure_user_scripts | Return a script for customer to run in their cloud environment to grant us access to their Azure environment. |
DiscoverCloudAzureDownloadCertificateazure_download_certificate | Returns JSON object(s) that contain the base64 encoded certificate for a service principal. deprecated |
GetDiscoverCloudAzureTenantIDsget_azure_tenant_ids | Return all available Azure tenant IDs. deprecated |
GetHorizonD4CScriptsget_aws_horizon_scripts | Returns static install scripts for Horizon. deprecated |
DeleteD4CGCPAccountdelete_gcp_account | Deletes a GCP account from the system. deprecated |
ConnectD4CGCPAccountconnect_gcp_account | Creates a new GCP account with newly-uploaded service account or connects with existing service account. deprecated |
GetD4CGCPServiceAccountsExtget_gcp_service_account | Returns the service account id and client email for external clients. deprecated |
UpdateD4CGCPServiceAccountsExtupdate_gcp_service_account | Updates an existing GCP service account. |
GetD4CGCPUserScriptsAttachmentget_gcp_user_scripts_attachment | Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment. deprecated |
CreateD4CGCPAccountcreate_gcp_account | Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access. |
GetCSPMGCPUserScriptsAttachmentget_gcp_user_scripts_attachment | Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment. |
GetD4CCGPAccountget_gcp_account | Returns information about the current status of an GCP account. |
GetD4CGCPUserScriptsget_gcp_user_scripts | Return a script for customer to run in their cloud environment to grant us access to their GCP environment. |
GetD4CAwsAccount
Section titled “GetD4CAwsAccount”Returns information about the current status of an AWS account.
This operation has been superseded by the GetCSPMAwsAccount operation and is now deprecated.
get_aws_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | AWS account ID(s). When empty, all accounts are returned. |
| organization_ids | query | string or list of strings | AWS organization ID(s). |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| scan_type | query | string | Type of scan to perform, dry or full. |
| status | query | string | Account status to filter results by. |
| limit | query | integer | The maximum number of records to return. Defaults to 100. |
| offset | query | integer | The offset to start retrieving records from. |
| migrated | query | boolean | Only return migrated accounts. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(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_aws_account(ids=id_list, limit=integer, migrated=boolean, offset=integer, organization_ids=id_list, scan_type="string", status="string")print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.GetD4CAwsAccount(ids=id_list, limit=integer, migrated=boolean, offset=integer, organization_ids=id_list, scan_type="string", status="string")print(response)from falconpy import APIHarnessV2
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("GetD4CAwsAccount", scan_type="string", ids=id_list, organization_ids=id_list, status="string", limit=integer, offset=integer, migrated="string")print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
status := "string" limit := int64(0) offset := int64(0) migrated := "string"
response, err := client.D4cRegistration.GetD4CAwsAccount( &d4c_registration.GetD4CAwsAccountParams{ ScanType: "string", Ids: []string{"ID1", "ID2", "ID3"}, OrganizationIds: []string{"ID1", "ID2", "ID3"}, Status: &status, Limit: &limit, Offset: &offset, Migrated: &migrated, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getD4CAwsAccount( "string", // scanType ["ID1", "ID2", "ID3"], // ids ["ID1", "ID2", "ID3"], // organizationIds "string", // status integer, // limit integer, // offset "string" // migrated);
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_d4_c_aws_account;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_d4_c_aws_account( &falcon.cfg, // configuration Some("string"), // scan_type Some(vec!["string".to_string()]), // ids Some(vec!["string".to_string()]), // organization_ids Some("string"), // status Some(integer), // limit Some(integer), // offset Some("string"), // migrated ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_d4_c_aws_account(scan_type: 'string', ids: ['ID1', 'ID2', 'ID3'], organization_ids: ['ID1', 'ID2', 'ID3'], status: 'string', limit: integer, offset: integer, migrated: 'string')
puts responseCreateD4CAwsAccount
Section titled “CreateD4CAwsAccount”Creates a new account in our system for a customer and generates a script for them to run in their AWS cloud environment to grant us access.
This operation has been superseded by the CreateCSPMAwsAccount operation and is now deprecated.
create_aws_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| account_id | body | string | AWS account ID. |
| account_type | body | string | AWS account type. |
| body | body | dictionary | Full body payload in JSON format. |
| cloudtrail_region | body | string | AWS region for CloudTrail access. |
| iam_role_arn | body | string | AWS IAM Role ARN. |
| is_master | body | boolean | Flag indicating if this is the master account. |
| organization_id | body | string | AWS organization ID. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.create_aws_account(account_id="string", account_type="string", cloudtrail_region="string", iam_role_arn="string", is_master=boolean, organization_id="string")print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.CreateD4CAwsAccount(account_id="string", account_type="string", cloudtrail_region="string", iam_role_arn="string", is_master=boolean, organization_id="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "resources": [ { "account_id": "string", "account_type": "string", "cloudtrail_region": "string", "iam_role_arn": "string", "is_master": boolean, "organization_id": "string" } ]}
response = falcon.command("CreateD4CAwsAccount", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
account_id := "string" account_type := "string" cloudtrail_region := "string" iam_role_arn := "string" is_master := boolean organization_id := "string"
response, err := client.D4cRegistration.CreateD4CAwsAccount( &d4c_registration.CreateD4CAwsAccountParams{ Body: &models.RegistrationAWSAccountCreateRequestD4CExtV2{ Resources: []interface{}{ { AccountID: &account_id, AccountType: &account_type, CloudtrailRegion: &cloudtrail_region, IamRoleArn: &iam_role_arn, IsMaster: &is_master, OrganizationID: &organization_id, }, }, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.createD4CAwsAccount( { resources: [{ accountId: "string", accountType: "string", cloudtrailRegion: "string", iamRoleArn: "string", isMaster: boolean, organizationId: "string" }]} // body);
console.log(response);use rusty_falcon::apis::d4c_registration_api::create_d4_c_aws_account;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::RegistrationAwsAccountCreateRequestD4CExtV2;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = RegistrationAwsAccountCreateRequestD4CExtV2 { resources: vec![AWSAccountD4CExtV2 { account_id: Some("string".to_string()), cloudtrail_region: Some("string".to_string()), iam_role_arn: Some("string".to_string()), organization_id: Some("string".to_string()), ..Default::default() }], ..Default::default() };
let response = create_d4_c_aws_account( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
body = Falcon::RegistrationAWSAccountCreateRequestD4CExtV2.new( resources: [{ account_id: 'string', account_type: 'string', cloudtrail_region: 'string', iam_role_arn: 'string', is_master: boolean, organization_id: 'string' }])
response = api.create_d4_c_aws_account(body)
puts responseDeleteD4CAwsAccount
Section titled “DeleteD4CAwsAccount”Deletes an existing AWS account or organization in our system.
This operation has been superseded by the DeleteCSPMAwsAccount operation and is now deprecated.
delete_aws_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | AWS account ID(s). |
| organization_ids | query | string or list of strings | AWS organization ID(s). |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required when using other keywords. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(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_aws_account(ids=id_list, organization_ids=id_list)print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.DeleteD4CAwsAccount(ids=id_list, organization_ids=id_list)print(response)from falconpy import APIHarnessV2
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("DeleteD4CAwsAccount", ids=id_list, organization_ids=id_list)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.D4cRegistration.DeleteD4CAwsAccount( &d4c_registration.DeleteD4CAwsAccountParams{ Ids: []string{"ID1", "ID2", "ID3"}, OrganizationIds: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.deleteD4CAwsAccount( ["ID1", "ID2", "ID3"], // ids ["ID1", "ID2", "ID3"] // organizationIds);
console.log(response);use rusty_falcon::apis::d4c_registration_api::delete_d4_c_aws_account;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = delete_d4_c_aws_account( &falcon.cfg, // configuration Some(vec!["string".to_string()]), // ids Some(vec!["string".to_string()]), // organization_ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.delete_d4_c_aws_account(ids: ['ID1', 'ID2', 'ID3'], organization_ids: ['ID1', 'ID2', 'ID3'])
puts responseGetD4CAwsConsoleSetupURLs
Section titled “GetD4CAwsConsoleSetupURLs”Return a URL for customer to visit in their cloud environment to grant us access to their AWS environment.
This operation has been superseded by the GetCSPMAwsConsoleSetupURLs operation and is now deprecated.
get_aws_console_setupParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| region | query | string | AWS region to generate URL for. |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required when using other keywords. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.get_aws_console_setup(region="string")print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.GetD4CAwsConsoleSetupURLs(region="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("GetD4CAwsConsoleSetupURLs", region="string")print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
region := "string"
response, err := client.D4cRegistration.GetD4CAwsConsoleSetupURLs( &d4c_registration.GetD4CAwsConsoleSetupURLsParams{ Region: ®ion, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getD4CAwsConsoleSetupURLs("string"); // region
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_d4_c_aws_console_setup_urls;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_d4_c_aws_console_setup_urls( &falcon.cfg, // configuration Some("string"), // region ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_d4_c_aws_console_setup_urls(region: 'string')
puts responseGetD4CAWSAccountScriptsAttachment
Section titled “GetD4CAWSAccountScriptsAttachment”Return a script for customer to run in their cloud environment to grant us access to their AWS environment as a downloadable attachment.
This operation has been superseded by the GetCSPMAwsAccountScriptsAttachment operation and is now deprecated.
get_aws_account_scriptsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| accounts | query | string or list of strings | List of accounts to register. |
| aws_profile | query | string | The AWS profile to be used during registration. |
| aws_region | query | string | The AWS region to be used during registration. |
| behavior_assessment_enabled | query | string | Enable behavior assessment. Allowed values: true or false. |
| dspm_enabled | query | string | Enable DSPM. Allowed values: true or false. |
| dspm_host_account_id | query | string | DSPM host account ID. |
| dspm_host_integration_role_name | query | string | DSPM host integration role name. |
| dspm_host_scanner_role_name | query | string | DSPM host scanner role name. |
| dspm_regions | query | string or list of strings | DSPM regions. |
| dspm_role | query | string | DSPM role. |
| falcon_client_id | query | string | The Falcon client ID used during registration. |
| iam_role_arn | query | string | The custom IAM role to be used during registration. |
| ids | query | string or list of strings | The AWS account ID(s) to retrieve script attachments. |
| organization_id | query | string or list of strings | The AWS organization ID to be registered. |
| organization_unit_ids | query | string or list of strings | The AWS organization ID to be registered. |
| parameters | query | dictionary | Full query string parameters payload as a dictionary. |
| sensor_management_enabled | query | string | Enable sensor management. Allowed values: true or false. |
| tags | query | string | Base64 encoded JSON string to be used as AWS tags. |
| template | query | string | Template to be rendered. Allowed values: aws-bash or aws-terraform. |
| use_existing_cloudtrail | query | string | Use the existing cloudtrail log. Allowed values: true or false. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.get_aws_account_scripts(ids=id_list, template="string", accounts=id_list, behavior_assessment_enabled=boolean, sensor_management_enabled=boolean, dspm_enabled=boolean, dspm_regions="string", dspm_host_account_id="string", dspm_host_integration_role_name="string", dspm_host_scanner_role_name="string", dspm_role="string", vulnerability_scanning_enabled=boolean, vulnerability_scanning_regions=id_list, vulnerability_scanning_host_account_id="string", vulnerability_scanning_host_integration_role_name="string", vulnerability_scanning_host_scanner_role_name="string", vulnerability_scanning_role="string", use_existing_cloudtrail=boolean, organization_id="string", organizational_unit_ids=id_list, aws_profile="string", aws_region="string", iam_role_arn="string", falcon_client_id="string", idp_enabled="string", tags="string", stream=boolean) save_file.write(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.GetD4CAWSAccountScriptsAttachment(ids=id_list, template="string", accounts=id_list, behavior_assessment_enabled=boolean, sensor_management_enabled=boolean, dspm_enabled=boolean, dspm_regions="string", dspm_host_account_id="string", dspm_host_integration_role_name="string", dspm_host_scanner_role_name="string", dspm_role="string", vulnerability_scanning_enabled=boolean, vulnerability_scanning_regions=id_list, vulnerability_scanning_host_account_id="string", vulnerability_scanning_host_integration_role_name="string", vulnerability_scanning_host_scanner_role_name="string", vulnerability_scanning_role="string", use_existing_cloudtrail=boolean, organization_id="string", organizational_unit_ids=id_list, aws_profile="string", aws_region="string", iam_role_arn="string", falcon_client_id="string", idp_enabled="string", tags="string", stream=boolean) save_file.write(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.command("GetD4CAWSAccountScriptsAttachment", ids=id_list, template="string", accounts=id_list, behavior_assessment_enabled="string", sensor_management_enabled="string", dspm_enabled="string", dspm_regions=id_list, dspm_host_account_id="string", dspm_host_integration_role_name="string", dspm_host_scanner_role_name="string", dspm_role="string", vulnerability_scanning_enabled="string", vulnerability_scanning_regions=id_list, vulnerability_scanning_host_account_id="string", vulnerability_scanning_host_integration_role_name="string", vulnerability_scanning_host_scanner_role_name="string", vulnerability_scanning_role="string", use_existing_cloudtrail="string", organization_id="string", organizational_unit_ids=id_list, aws_profile="string", aws_region="string", iam_role_arn="string", falcon_client_id="string", idp_enabled="string", tags="string") save_file.write(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
template := "string" behaviorAssessmentEnabled := "string" sensorManagementEnabled := "string" dspmEnabled := "string" dspmHostAccountID := "string" dspmHostIntegrationRoleName := "string" dspmHostScannerRoleName := "string" dspmRole := "string" vulnerabilityScanningEnabled := "string" vulnerabilityScanningHostAccountID := "string" vulnerabilityScanningHostIntegrationRoleName := "string" vulnerabilityScanningHostScannerRoleName := "string" vulnerabilityScanningRole := "string" useExistingCloudtrail := "string" organizationID := "string" awsProfile := "string" awsRegion := "string" iamRoleArn := "string" falconClientID := "string" idpEnabled := "string" tags := "string"
response, err := client.D4cRegistration.GetD4CAWSAccountScriptsAttachment( &d4c_registration.GetD4CAWSAccountScriptsAttachmentParams{ Ids: []string{"ID1", "ID2", "ID3"}, Template: &template, Accounts: []string{"ID1", "ID2", "ID3"}, BehaviorAssessmentEnabled: &behaviorAssessmentEnabled, SensorManagementEnabled: &sensorManagementEnabled, DspmEnabled: &dspmEnabled, DspmRegions: []string{"ID1", "ID2", "ID3"}, DspmHostAccountID: &dspmHostAccountID, DspmHostIntegrationRoleName: &dspmHostIntegrationRoleName, DspmHostScannerRoleName: &dspmHostScannerRoleName, DspmRole: &dspmRole, VulnerabilityScanningEnabled: &vulnerabilityScanningEnabled, VulnerabilityScanningRegions: []string{"ID1", "ID2", "ID3"}, VulnerabilityScanningHostAccountID: &vulnerabilityScanningHostAccountID, VulnerabilityScanningHostIntegrationRoleName: &vulnerabilityScanningHostIntegrationRoleName, VulnerabilityScanningHostScannerRoleName: &vulnerabilityScanningHostScannerRoleName, VulnerabilityScanningRole: &vulnerabilityScanningRole, UseExistingCloudtrail: &useExistingCloudtrail, OrganizationID: &organizationID, OrganizationalUnitIds: []string{"ID1", "ID2", "ID3"}, AwsProfile: &awsProfile, AwsRegion: &awsRegion, IamRoleArn: &iamRoleArn, FalconClientID: &falconClientID, IdpEnabled: &idpEnabled, Tags: &tags, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getD4CAWSAccountScriptsAttachment( ["ID1", "ID2", "ID3"], // ids "string", // template ["ID1", "ID2", "ID3"], // accounts "string", // behaviorAssessmentEnabled "string", // sensorManagementEnabled "string", // dspmEnabled ["ID1", "ID2", "ID3"], // dspmRegions "string", // dspmHostAccountId "string", // dspmHostIntegrationRoleName "string", // dspmHostScannerRoleName "string", // dspmRole "string", // vulnerabilityScanningEnabled ["ID1", "ID2", "ID3"], // vulnerabilityScanningRegions "string", // vulnerabilityScanningHostAccountId "string", // vulnerabilityScanningHostIntegrationRoleName "string", // vulnerabilityScanningHostScannerRoleName "string", // vulnerabilityScanningRole "string", // useExistingCloudtrail "string", // organizationId ["ID1", "ID2", "ID3"], // organizationalUnitIds "string", // awsProfile "string", // awsRegion "string", // iamRoleArn "string", // falconClientId "string", // idpEnabled "string" // tags);
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_d4_caws_account_scripts_attachment;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_d4_caws_account_scripts_attachment( &falcon.cfg, // configuration Some(vec!["string".to_string()]), // ids Some("string"), // template Some(vec!["string".to_string()]), // accounts Some("string"), // behavior_assessment_enabled Some("string"), // sensor_management_enabled Some("string"), // dspm_enabled Some(vec!["string".to_string()]), // dspm_regions Some("string"), // dspm_role Some("string"), // use_existing_cloudtrail Some("string"), // organization_id Some(vec!["string".to_string()]), // organizational_unit_ids Some("string"), // aws_profile Some("string"), // aws_region Some("string"), // iam_role_arn Some("string"), // falcon_client_id Some("string"), // idp_enabled Some("string"), // tags ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_d4_caws_account_scripts_attachment(ids: ['ID1', 'ID2', 'ID3'], template: 'string', accounts: ['ID1', 'ID2', 'ID3'], behavior_assessment_enabled: 'string', sensor_management_enabled: 'string', dspm_enabled: 'string', dspm_regions: ['ID1', 'ID2', 'ID3'], dspm_host_account_id: 'string', dspm_host_integration_role_name: 'string', dspm_host_scanner_role_name: 'string', dspm_role: 'string', vulnerability_scanning_enabled: 'string', vulnerability_scanning_regions: ['ID1', 'ID2', 'ID3'], vulnerability_scanning_host_account_id: 'string', vulnerability_scanning_host_integration_role_name: 'string', vulnerability_scanning_host_scanner_role_name: 'string', vulnerability_scanning_role: 'string', use_existing_cloudtrail: 'string', organization_id: 'string', organizational_unit_ids: ['ID1', 'ID2', 'ID3'], aws_profile: 'string', aws_region: 'string', iam_role_arn: 'string', falcon_client_id: 'string', idp_enabled: 'string', tags: 'string')
puts responseGetDiscoverCloudAzureAccount
Section titled “GetDiscoverCloudAzureAccount”Return information about Azure account registration.
This operation has been superseded by the GetCSPMAzureAccount operation and is now deprecated. Legacy Operation ID: GetCSPMAzureAccount.
get_azure_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | Subscription ID(s). When empty, all accounts are returned. |
| tenant_ids | query | string or list of strings | Tenant IDs to use to filter Azure accounts returned. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| scan_type | query | string | Type of scan to perform, dry or full. |
| status | query | string | Account status to filter results by. |
| limit | query | integer | The maximum number of records to return. Defaults to 100. |
| offset | query | integer | The offset to start retrieving records from. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(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_azure_account(ids=id_list, limit=integer, offset=integer, scan_type="string", status="string", tenant_ids=id_list)print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.GetDiscoverCloudAzureAccount(ids=id_list, limit=integer, offset=integer, scan_type="string", status="string", tenant_ids=id_list)print(response)from falconpy import APIHarnessV2
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("GetDiscoverCloudAzureAccount", ids=id_list, tenant_ids=id_list, scan_type="string", status="string", limit=integer, offset=integer)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
status := "string" limit := int64(0) offset := int64(0)
response, err := client.D4cRegistration.GetDiscoverCloudAzureAccount( &d4c_registration.GetDiscoverCloudAzureAccountParams{ Ids: []string{"ID1", "ID2", "ID3"}, TenantIds: []string{"ID1", "ID2", "ID3"}, ScanType: "string", Status: &status, Limit: &limit, Offset: &offset, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getDiscoverCloudAzureAccount( ["ID1", "ID2", "ID3"], // ids ["ID1", "ID2", "ID3"], // tenantIds "string", // scanType "string", // status integer, // limit integer // offset);
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_discover_cloud_azure_account;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_discover_cloud_azure_account( &falcon.cfg, // configuration Some(vec!["string".to_string()]), // ids Some(vec!["string".to_string()]), // tenant_ids Some("string"), // scan_type Some("string"), // status Some(integer), // limit Some(integer), // offset ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_discover_cloud_azure_account(ids: ['ID1', 'ID2', 'ID3'], tenant_ids: ['ID1', 'ID2', 'ID3'], scan_type: 'string', status: 'string', limit: integer, offset: integer)
puts responseCreateDiscoverCloudAzureAccount
Section titled “CreateDiscoverCloudAzureAccount”Creates a new account in our system for a customer and generates a script for them to run in their cloud environment to grant us access.
This operation has been superseded by the CreateCSPMAzureAccount operation and is now deprecated. Legacy Operation ID: CreateCSPMAzureAccount.
create_azure_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| account_type | body | string | Azure account type. |
| body | body | dictionary | Full body payload in JSON format. |
| client_id | body | string | Client ID. |
| default_subscription | body | boolean | Flag indicating if this is the default Azure subscription. |
| subscription_id | body | string | Azure Subscription ID. |
| tenant_id | body | string | Azure tenant ID. |
| years_valid | body | integer | Years valid. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.create_azure_account(account_type="string", client_id="string", default_subscription=boolean, subscription_id="string", tenant_id="string", years_valid=integer)print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.CreateDiscoverCloudAzureAccount(account_type="string", client_id="string", default_subscription=boolean, subscription_id="string", tenant_id="string", years_valid=integer)print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "resources": [ { "account_type": "string", "client_id": "string", "default_subscription": boolean, "subscription_id": "string", "tenant_id": "string", "years_valid": integer } ]}
response = falcon.command("CreateDiscoverCloudAzureAccount", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
account_type := "string" client_id := "string" default_subscription := boolean subscription_id := "string" tenant_id := "string" years_valid := integer
response, err := client.D4cRegistration.CreateDiscoverCloudAzureAccount( &d4c_registration.CreateDiscoverCloudAzureAccountParams{ Body: &models.RegistrationAzureAccountCreateRequestExternalV1{ Resources: []interface{}{ { AccountType: &account_type, ClientID: &client_id, DefaultSubscription: &default_subscription, SubscriptionID: &subscription_id, TenantID: &tenant_id, YearsValid: &years_valid, }, }, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.createDiscoverCloudAzureAccount( { resources: [{ accountType: "string", clientId: "string", defaultSubscription: boolean, subscriptionId: "string", tenantId: "string", yearsValid: integer }]} // body);
console.log(response);use rusty_falcon::apis::d4c_registration_api::create_discover_cloud_azure_account;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::RegistrationAzureAccountCreateRequestExternalV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = RegistrationAzureAccountCreateRequestExternalV1 { resources: vec![], ..Default::default() };
let response = create_discover_cloud_azure_account( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
body = Falcon::RegistrationAzureAccountCreateRequestExternalV1.new( resources: [{ account_type: 'string', client_id: 'string', default_subscription: boolean, subscription_id: 'string', tenant_id: 'string', years_valid: integer }])
response = api.create_discover_cloud_azure_account(body)
puts responseUpdateDiscoverCloudAzureAccountClientID
Section titled “UpdateDiscoverCloudAzureAccountClientID”Update an Azure service account in our system by with the user-created client_id created with the public key we’ve provided.
This operation has been superseded by the UpdateCSPMAzureAccountClientID operation and is now deprecated. Legacy Operation ID: UpdateCSPMAzureAccountClientID.
update_azure_account_client_idParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| id | query | string | Client ID to use for the Service Principal associated with the registered Azure account. |
| object_id | query | string | Object ID to use for the Service Principal associated with the registered Azure account. |
| tenant_id | query | string | Tenant ID to update Client ID for. Required if multiple tenants are registered. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.update_azure_account_client_id(id="string", object_id="string", tenant_id="string")print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.UpdateDiscoverCloudAzureAccountClientID(id="string", object_id="string", tenant_id="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("UpdateDiscoverCloudAzureAccountClientID", id="string", object_id="string", tenant_id="string")print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
objectID := "string"
response, err := client.D4cRegistration.UpdateDiscoverCloudAzureAccountClientID( &d4c_registration.UpdateDiscoverCloudAzureAccountClientIDParams{ ID: "string", ObjectID: &objectID, TenantID: "string", Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.updateDiscoverCloudAzureAccountClientID( "string", // id "string", // objectId "string" // tenantId);
console.log(response);use rusty_falcon::apis::d4c_registration_api::update_discover_cloud_azure_account_client_id;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = update_discover_cloud_azure_account_client_id( &falcon.cfg, // configuration "string", // id Some("string"), // object_id Some("string"), // tenant_id ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.update_discover_cloud_azure_account_client_id('string')
puts responseGetDiscoverCloudAzureUserScriptsAttachment
Section titled “GetDiscoverCloudAzureUserScriptsAttachment”Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment.
This operation has been superseded by the GetCSPMAzureUserScriptsAttachment operation and is now deprecated. Legacy Operation ID: GetCSPMAzureUserScriptsAttachment.
get_azure_user_scripts_attachmentParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| azure_management_group | query | boolean | Use Azure Management Group. |
| subscription_ids | query | string or list of strings | Azure Subscription IDs. |
| template | query | string or list of strings | Template to be rendered. |
| tenant_id | query | string | Azure Tenant IDs. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.get_azure_user_scripts_attachment(subscription_ids=id_list, template="string", tenant_id="string", stream=boolean) save_file.write(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.GetDiscoverCloudAzureUserScriptsAttachment(subscription_ids=id_list, template="string", tenant_id="string", stream=boolean) save_file.write(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.command("GetDiscoverCloudAzureUserScriptsAttachment", tenant_id=id_list, subscription_ids=id_list, template="string", azure_management_group=boolean) save_file.write(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
template := "string" azureManagementGroup := boolean
response, err := client.D4cRegistration.GetDiscoverCloudAzureUserScriptsAttachment( &d4c_registration.GetDiscoverCloudAzureUserScriptsAttachmentParams{ TenantID: []string{"ID1", "ID2", "ID3"}, SubscriptionIds: []string{"ID1", "ID2", "ID3"}, Template: &template, AzureManagementGroup: &azureManagementGroup, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getDiscoverCloudAzureUserScriptsAttachment( ["ID1", "ID2", "ID3"], // tenantId ["ID1", "ID2", "ID3"], // subscriptionIds "string", // template boolean // azureManagementGroup);
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_discover_cloud_azure_user_scripts_attachment;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_discover_cloud_azure_user_scripts_attachment( &falcon.cfg, // configuration vec!["string".to_string()], // tenant_id Some(vec!["string".to_string()]), // subscription_ids Some("string"), // template Some(boolean), // azure_management_group ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_discover_cloud_azure_user_scripts_attachment('string')
puts responseGetDiscoverCloudAzureUserScripts
Section titled “GetDiscoverCloudAzureUserScripts”Return a script for customer to run in their cloud environment to grant us access to their Azure environment.
Legacy Operation ID: GetCSPMAzureUserScripts.
get_azure_user_scriptsNo keywords or arguments accepted.
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.get_azure_user_scripts()print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.GetDiscoverCloudAzureUserScripts()print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("GetDiscoverCloudAzureUserScripts")print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.D4cRegistration.GetDiscoverCloudAzureUserScripts( &d4c_registration.GetDiscoverCloudAzureUserScriptsParams{ Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getDiscoverCloudAzureUserScripts();
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_discover_cloud_azure_user_scripts;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_discover_cloud_azure_user_scripts(&falcon.cfg).await.expect("API call failed"); // configuration
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_discover_cloud_azure_user_scripts
puts responseDiscoverCloudAzureDownloadCertificate
Section titled “DiscoverCloudAzureDownloadCertificate”Returns JSON object(s) that contain the base64 encoded certificate for a service principal.
This operation has been superseded by the AzureDownloadCertificate operation and is now deprecated.
azure_download_certificateParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| refresh | query | boolean | Force a refresh of the certificate. Defaults to False. |
| tenant_id | query | string or list of strings | The Azure Client ID to generate script for. Defaults to the most recently registered tenant. |
| years_valid | body | integer | Years the certificate should be valid. Only used when refresh is set to True. |
Code Examples
Section titled “Code Examples”Examples coming soon.
Examples coming soon.
Examples coming soon.
Examples coming soon.
Examples coming soon.
Examples coming soon.
GetDiscoverCloudAzureTenantIDs
Section titled “GetDiscoverCloudAzureTenantIDs”Return available tenant ids for discover for cloud. This operation has been deprecated and will be removed from the SDK when this endpoint is decommissioned.
get_azure_tenant_idsNo keywords or arguments accepted.
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.get_azure_tenant_ids()print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.GetDiscoverCloudAzureTenantIDs()print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("GetDiscoverCloudAzureTenantIDs")print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.D4cRegistration.GetDiscoverCloudAzureTenantIDs( &d4c_registration.GetDiscoverCloudAzureTenantIDsParams{ Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getDiscoverCloudAzureTenantIDs();
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_discover_cloud_azure_tenant_ids;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_discover_cloud_azure_tenant_ids(&falcon.cfg).await.expect("API call failed"); // configuration
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_discover_cloud_azure_tenant_ids
puts responseGetHorizonD4CScripts
Section titled “GetHorizonD4CScripts”Returns static install scripts for Horizon. This operation has been deprecated and will be removed from the SDK when this endpoint is decommissioned.
get_aws_horizon_scriptsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| account_type | query | string | Account type (commercial, gov). Only applicable when registering AWS commercial accounts in a GovCloud environment. |
| delete | query | boolean | Generate a delete script. |
| organization_ids | query | string or list of strings | AWS organization ID(s). |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required when using other keywords. |
| single_account | query | boolean | Generate a static script for a single account. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.get_aws_horizon_scripts(account_type="string", delete=boolean, organization_id="string", single_account=boolean)print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.GetHorizonD4CScripts(account_type="string", delete=boolean, organization_id="string", single_account=boolean)print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("GetHorizonD4CScripts", single_account="string", organization_id="string", delete="string", account_type="string")print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
singleAccount := "string" delete := "string" accountType := "string"
response, err := client.D4cRegistration.GetHorizonD4CScripts( &d4c_registration.GetHorizonD4CScriptsParams{ SingleAccount: &singleAccount, OrganizationID: "string", Delete: &delete, AccountType: &accountType, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getHorizonD4CScripts( "string", // singleAccount "string", // organizationId "string", // _delete "string" // accountType);
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_horizon_d4_c_scripts;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_horizon_d4_c_scripts( &falcon.cfg, // configuration Some("string"), // single_account Some("string"), // organization_id Some("string"), // delete Some("string"), // account_type ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_horizon_d4_c_scripts(single_account: 'string', organization_id: 'string', delete: 'string', account_type: 'string')
puts responseDeleteD4CGCPAccount
Section titled “DeleteD4CGCPAccount”Deletes a GCP account from the system. This operation has been deprecated.
delete_gcp_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | Hierarchical Resource IDs of accounts to delete. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(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_gcp_account(ids=id_list)print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.DeleteD4CGCPAccount(ids=id_list)print(response)from falconpy import APIHarnessV2
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("DeleteD4CGCPAccount", ids=id_list)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.D4cRegistration.DeleteD4CGCPAccount( &d4c_registration.DeleteD4CGCPAccountParams{ Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.deleteD4CGCPAccount(["ID1", "ID2", "ID3"]); // ids
console.log(response);use rusty_falcon::apis::d4c_registration_api::delete_d4_cgcp_account;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = delete_d4_cgcp_account( &falcon.cfg, // configuration Some(vec!["string".to_string()]), // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.delete_d4_cgcp_account(ids: ['ID1', 'ID2', 'ID3'])
puts responseConnectD4CGCPAccount
Section titled “ConnectD4CGCPAccount”Creates a new GCP account with newly-uploaded service account or connects with existing service account with only the following fields: parent_id, parent_type and service_account_id. This operation has been deprecated.
connect_gcp_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| client_email | body | string | GCP client email. |
| client_id | body | string | GCP client ID. |
| parent_id | body | string | Parent ID. |
| parent_type | body | string | Parent type. |
| private_key | body | string | GCP private key. |
| private_key_id | body | string | GCP private key ID. |
| project_id | body | string | GCP project ID. |
| service_account_id | body | integer | GCP service account ID. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.connect_gcp_account(client_email="string", client_id="string", parent_id="string", parent_type="string", private_key="string", private_key_id="string", project_id="string", service_account_id=integer)print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.ConnectD4CGCPAccount(client_email="string", client_id="string", parent_id="string", parent_type="string", private_key="string", private_key_id="string", project_id="string", service_account_id=integer)print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "resources": [ { "client_email": "string", "client_id": "string", "parent_id": "string", "parent_type": "string", "private_key": "string", "private_key_id": "string", "project_id": "string", "service_account_conditions": [ { "feature": "string", "is_visible": boolean, "last_transition": "string", "message": "string", "reason": "string", "status": "string", "type": "string" } ], "service_account_id": integer } ]}
response = falcon.command("ConnectD4CGCPAccount", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
client_email := "string" client_id := "string" parent_id := "string" parent_type := "string" private_key := "string" private_key_id := "string" project_id := "string" feature := "string" is_visible := boolean last_transition := "string" message := "string" reason := "string" status := "string" type := "string" service_account_id := integer
response, err := client.D4cRegistration.ConnectD4CGCPAccount( &d4c_registration.ConnectD4CGCPAccountParams{ Body: &models.RegistrationGCPAccountExtRequestV2{ Resources: []interface{}{ { ClientEmail: &client_email, ClientID: &client_id, ParentID: &parent_id, ParentType: &parent_type, PrivateKey: &private_key, PrivateKeyID: &private_key_id, ProjectID: &project_id, ServiceAccountConditions: []interface{}{ { Feature: &feature, IsVisible: &is_visible, LastTransition: &last_transition, Message: &message, Reason: &reason, Status: &status, Type: &type, }, }, ServiceAccountID: &service_account_id, }, }, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.connectD4CGCPAccount( { resources: [{ clientEmail: "string", clientId: "string", parentId: "string", parentType: "string", privateKey: "string", privateKeyId: "string", projectId: "string", serviceAccountConditions: [{ feature: "string", isVisible: boolean, lastTransition: "string", message: "string", reason: "string", status: "string", type: "string" }], serviceAccountId: integer }]} // body);
console.log(response);use rusty_falcon::apis::d4c_registration_api::connect_d4_cgcp_account;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::RegistrationGcpAccountExtRequestV2;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = RegistrationGcpAccountExtRequestV2 { resources: vec![GCPAccountReqObjV2 { parent_id: Some("string".to_string()), ..Default::default() }], ..Default::default() };
let response = connect_d4_cgcp_account( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
body = Falcon::RegistrationGCPAccountExtRequestV2.new( resources: [{ client_email: 'string', client_id: 'string', parent_id: 'string', parent_type: 'string', private_key: 'string', private_key_id: 'string', project_id: 'string', service_account_conditions: [{ feature: 'string', is_visible: boolean, last_transition: 'string', message: 'string', reason: 'string', status: 'string', type: 'string' }], service_account_id: integer }])
response = api.connect_d4_cgcp_account(body)
puts responseGetD4CGCPServiceAccountsExt
Section titled “GetD4CGCPServiceAccountsExt”Returns the service account id and client email for external clients. This operation has been deprecated.
get_gcp_service_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| id | query | string | Service account ID to retrieve. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.get_gcp_service_account(id="string")print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.GetD4CGCPServiceAccountsExt(id="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("GetD4CGCPServiceAccountsExt", id="string")print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
iD := "string"
response, err := client.D4cRegistration.GetD4CGCPServiceAccountsExt( &d4c_registration.GetD4CGCPServiceAccountsExtParams{ ID: &iD, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getD4CGCPServiceAccountsExt("string"); // id
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_d4_cgcp_service_accounts_ext;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_d4_cgcp_service_accounts_ext( &falcon.cfg, // configuration Some("string"), // id ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_d4_cgcp_service_accounts_ext(id: 'string')
puts responseUpdateD4CGCPServiceAccountsExt
Section titled “UpdateD4CGCPServiceAccountsExt”Updates an existing GCP service account.
update_gcp_service_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| client_email | body | string | Client email associated with the account. |
| client_id | body | string | GCP Client ID. |
| private_key | body | string | GCP private key. |
| private_key_id | body | string | GCP private key ID. |
| project_id | body | string | GCP project ID. |
| service_account_conditions | body | list of dictionaries | GCP service account conditions. |
| service_account_id | body | integer | GCP service account ID. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.update_gcp_service_account(client_email="string", client_id="string", private_key="string", private_key_id="string", project_id="string", resources=[{"key": "value"}], service_account_conditions=[{"key": "value"}], service_account_id=integer)print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.UpdateD4CGCPServiceAccountsExt(client_email="string", client_id="string", private_key="string", private_key_id="string", project_id="string", resources=[{"key": "value"}], service_account_conditions=[{"key": "value"}], service_account_id=integer)print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "resources": [ { "client_email": "string", "client_id": "string", "private_key": "string", "private_key_id": "string", "project_id": "string", "service_account_conditions": [ { "feature": "string", "is_visible": boolean, "last_transition": "string", "message": "string", "reason": "string", "status": "string", "type": "string" } ], "service_account_id": integer } ]}
response = falcon.command("UpdateD4CGCPServiceAccountsExt", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
client_email := "string" client_id := "string" private_key := "string" private_key_id := "string" project_id := "string" feature := "string" is_visible := boolean last_transition := "string" message := "string" reason := "string" status := "string" type := "string" service_account_id := integer
response, err := client.D4cRegistration.UpdateD4CGCPServiceAccountsExt( &d4c_registration.UpdateD4CGCPServiceAccountsExtParams{ Body: &models.RegistrationGCPServiceAccountPatchRequestV1{ Resources: []interface{}{ { ClientEmail: &client_email, ClientID: &client_id, PrivateKey: &private_key, PrivateKeyID: &private_key_id, ProjectID: &project_id, ServiceAccountConditions: []interface{}{ { Feature: &feature, IsVisible: &is_visible, LastTransition: &last_transition, Message: &message, Reason: &reason, Status: &status, Type: &type, }, }, ServiceAccountID: &service_account_id, }, }, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.updateD4CGCPServiceAccountsExt( { resources: [{ clientEmail: "string", clientId: "string", privateKey: "string", privateKeyId: "string", projectId: "string", serviceAccountConditions: [{ feature: "string", isVisible: boolean, lastTransition: "string", message: "string", reason: "string", status: "string", type: "string" }], serviceAccountId: integer }]} // body);
console.log(response);use rusty_falcon::apis::d4c_registration_api::update_d4_cgcp_service_accounts_ext;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::RegistrationGcpServiceAccountPatchRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = RegistrationGcpServiceAccountPatchRequestV1 { resources: vec![], ..Default::default() };
let response = update_d4_cgcp_service_accounts_ext( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
body = Falcon::RegistrationGCPServiceAccountPatchRequestV1.new( resources: [{ client_email: 'string', client_id: 'string', private_key: 'string', private_key_id: 'string', project_id: 'string', service_account_conditions: [{ feature: 'string', is_visible: boolean, last_transition: 'string', message: 'string', reason: 'string', status: 'string', type: 'string' }], service_account_id: integer }])
response = api.update_d4_cgcp_service_accounts_ext(body)
puts responseGetD4CGCPUserScriptsAttachment
Section titled “GetD4CGCPUserScriptsAttachment”Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment. This operation has been deprecated.
get_gcp_user_scripts_attachmentParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | Hierarchical Resource IDs of accounts. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| parent_type | query | string | GCP Hierarchy Parent Type. Allowed values: organization, folder or project. |
| status | query | string | Account status to filter results by. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.get_gcp_user_scripts_attachment_v2(ids=id_list, parent_type="string", status="string", stream=boolean) save_file.write(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.GetD4CGCPUserScriptsAttachment(ids=id_list, parent_type="string", status="string", stream=boolean) save_file.write(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.command("GetD4CGCPUserScriptsAttachment", parent_type="string", ids=id_list, status="string") save_file.write(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
parentType := "string" status := "string"
response, err := client.D4cRegistration.GetD4CGCPUserScriptsAttachment( &d4c_registration.GetD4CGCPUserScriptsAttachmentParams{ ParentType: &parentType, Ids: []string{"ID1", "ID2", "ID3"}, Status: &status, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getD4CGCPUserScriptsAttachment( "string", // parentType ["ID1", "ID2", "ID3"], // ids "string" // status);
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_d4_cgcp_user_scripts_attachment;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_d4_cgcp_user_scripts_attachment( &falcon.cfg, // configuration Some("string"), // parent_type Some(vec!["string".to_string()]), // ids Some("string"), // status ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_d4_cgcp_user_scripts_attachment(parent_type: 'string', ids: ['ID1', 'ID2', 'ID3'], status: 'string')
puts responseCreateD4CGCPAccount
Section titled “CreateD4CGCPAccount”Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access.
create_gcp_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload as a JSON formatted dictionary. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.create_gcp_account(parent_id="string", parent_type="string")print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.CreateD4CGCPAccount(parent_id="string", parent_type="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "resources": [ { "parent_id": "string", "parent_type": "string" } ]}
response = falcon.command("CreateD4CGCPAccount", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
parent_id := "string" parent_type := "string"
response, err := client.D4cRegistration.CreateD4CGcpAccount( &d4c_registration.CreateD4CGcpAccountParams{ Body: &models.RegistrationGCPAccountCreateRequestExtV1{ Resources: []interface{}{ { ParentID: &parent_id, ParentType: &parent_type, }, }, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.createD4CGcpAccount( { resources: [{ parentId: "string", parentType: "string" }]} // body);
console.log(response);use rusty_falcon::apis::d4c_registration_api::create_d4_cgcp_account;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::RegistrationGcpAccountCreateRequestExtV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = RegistrationGcpAccountCreateRequestExtV1 { resources: vec![GCPAccountExtV1 { parent_id: Some("string".to_string()), ..Default::default() }], ..Default::default() };
let response = create_d4_cgcp_account( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
body = Falcon::RegistrationGCPAccountCreateRequestExtV1.new( resources: [{ parent_id: 'string', parent_type: 'string' }])
response = api.create_d4_c_gcp_account(body)
puts responseGetCSPMGCPUserScriptsAttachment
Section titled “GetCSPMGCPUserScriptsAttachment”Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment.
get_gcp_user_scripts_attachmentParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import CSPMRegistration
falcon = CSPMRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.get_gcp_user_scripts_attachment(ids=id_list, parent_type="string", stream=boolean) save_file.write(response)from falconpy import CSPMRegistration
falcon = CSPMRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.GetCSPMGCPUserScriptsAttachment(ids=id_list, parent_type="string", stream=boolean) save_file.write(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
with open("output_file", "wb") as save_file: response = falcon.command("GetCSPMGCPUserScriptsAttachment", parent_type="string", ids=id_list) save_file.write(response)Receive-FalconCloudGcpScript -Path "string"package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/cspm_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
parentType := "string"
response, err := client.CspmRegistration.GetCSPMGCPUserScriptsAttachment( &cspm_registration.GetCSPMGCPUserScriptsAttachmentParams{ ParentType: &parentType, Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.cspmRegistration.getCSPMGCPUserScriptsAttachment( "string", // parentType ["ID1", "ID2", "ID3"] // ids);
console.log(response);use rusty_falcon::apis::cspm_registration_api::get_cspmgcp_user_scripts_attachment;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_cspmgcp_user_scripts_attachment( &falcon.cfg, // configuration Some("string"), // parent_type Some(vec!["string".to_string()]), // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::CspmRegistration.new
response = api.get_cspm_gcp_user_scripts_attachment(parent_type: 'string', ids: ['ID1', 'ID2', 'ID3'])
puts responseGetD4CCGPAccount
Section titled “GetD4CCGPAccount”Returns information about the current status of an GCP account.
get_gcp_accountParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| parent_type | query | string | GCP Hierarchy Parent Type, organization/folder/project. |
| ids | query | list | Hierarchical Resource IDs of accounts. |
| scan_type | query | string | Type of scan, dry or full, to perform on selected accounts. |
| status | query | string | Account status to filter results by. |
| limit | query | integer | The maximum records to return. Defaults to 100. |
| offset | query | integer | The offset to start retrieving records from. |
| sort | query | string | Order fields in ascending or descending order. Ex: parent_type|asc. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(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_gcp_account(ids=id_list, limit=integer, offset=integer, parent_type="string", scan_type="string", sort="string", status="string")print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.GetD4CCGPAccount(ids=id_list, limit=integer, offset=integer, parent_type="string", scan_type="string", sort="string", status="string")print(response)from falconpy import APIHarnessV2
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("GetD4CCGPAccount", parent_type="string", ids=id_list, scan_type="string", status="string", limit=integer, offset=integer, sort="string")print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
parentType := "string" status := "string" limit := int64(0) offset := int64(0) sort := "string"
response, err := client.D4cRegistration.GetD4CGcpAccount( &d4c_registration.GetD4CGcpAccountParams{ ParentType: &parentType, Ids: []string{"ID1", "ID2", "ID3"}, ScanType: "string", Status: &status, Limit: &limit, Offset: &offset, Sort: &sort, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getD4CGcpAccount( "string", // parentType ["ID1", "ID2", "ID3"], // ids "string", // scanType "string", // status integer, // limit integer, // offset "string" // sort);
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_d4_ccgp_account;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_d4_ccgp_account( &falcon.cfg, // configuration Some("string"), // parent_type Some(vec!["string".to_string()]), // ids Some("string"), // scan_type Some("string"), // status Some(integer), // limit Some(integer), // offset Some("string"), // sort ).await.expect("API call failed");
println!("{:?}", response);}Examples coming soon.
GetD4CGCPUserScripts
Section titled “GetD4CGCPUserScripts”Return a script for customer to run in their cloud environment to grant us access to their GCP environment.
get_gcp_user_scriptsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| parent_type | query | string | GCP Hierarchy Parent Type, organization/folder/project. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.get_gcp_user_scripts(parent_type="string")print(response)from falconpy import D4CRegistration
falcon = D4CRegistration(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.GetD4CGCPUserScripts(parent_type="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("GetD4CGCPUserScripts", parent_type="string")print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/d4c_registration")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
parentType := "string"
response, err := client.D4cRegistration.GetD4CGcpUserScripts( &d4c_registration.GetD4CGcpUserScriptsParams{ ParentType: &parentType, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.d4cRegistration.getD4CGcpUserScripts("string"); // parentType
console.log(response);use rusty_falcon::apis::d4c_registration_api::get_d4_cgcp_user_scripts;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_d4_cgcp_user_scripts( &falcon.cfg, // configuration Some("string"), // parent_type ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::D4cRegistration.new
response = api.get_d4_c_gcp_user_scripts(parent_type: 'string')
puts response