CrowdStrike Falcon CrowdStrike Subreddit

Using the Cloud AWS Registration service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
cloud_registration_aws_create_account
PEP 8create_account
Creates a new account in our system for a customer.
cloud_registration_aws_delete_account
PEP 8delete_account
Deletes an existing AWS account or organization in our system.
cloud_registration_aws_get_accounts
PEP 8get_accounts
Retrieve existing AWS accounts by account IDs.
cloud_registration_aws_query_accounts
PEP 8query_accounts
Retrieve existing AWS accounts by account IDs.
cloud_registration_aws_trigger_health_check
PEP 8trigger_health_check
Trigger health check scan for AWS accounts.
cloud_registration_aws_update_account
PEP 8update_account
Patches a existing account in our system for a customer.
cloud_registration_aws_validate_accounts
PEP 8validate_accounts
Validates the AWS account registration status, and discover organization child accounts if organization is specified.

Passing credentials

WARNING

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

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

cloud_registration_aws_get_accounts

Retrieve existing AWS accounts by account IDs.

PEP8 method name

get_accounts

Endpoint

MethodRoute
GET/cloud-security-registration-aws/entities/account/v1

Required Scope

cloud-aws-registration:read

Content-Type

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

Keyword Arguments

NameServiceUberTypeData typeDescription
idsService Class SupportUber Class Supportquerystring or list of stringsAWS account IDs to filter.
organization_idsService Class SupportUber Class Supportquerystring or list of stringsAWS organization IDs to filter.
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudAWSRegistration

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

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

organization_id_list = 'ORG_ID1,ORG_ID2,ORG_ID3'  # Can also pass a list here: ['ORG_ID1', 'ORG_ID2', 'ORG_ID3']

response = falcon.get_accounts(ids=id_list, organization_ids=organization_id_list)

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

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

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

organization_id_list = 'ORG_ID1,ORG_ID2,ORG_ID3'  # Can also pass a list here: ['ORG_ID1', 'ORG_ID2', 'ORG_ID3']

response = falcon.cloud_registration_aws_get_accounts(ids=id_list, organization_ids=organization_id_list)

print(response)
Uber class example
from falconpy import APIHarnessV2

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

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

organization_id_list = 'ORG_ID1,ORG_ID2,ORG_ID3'  # Can also pass a list here: ['ORG_ID1', 'ORG_ID2', 'ORG_ID3']

response = falcon.command("cloud_registration_aws_get_accounts", ids=id_list, organization_ids=organization_id_list)

print(response)

Back to Table of Contents

cloud_registration_aws_create_account

Creates a new account in our system for a customer.

PEP8 method name

create_account

Endpoint

MethodRoute
POST/cloud-security-registration-aws/entities/account/v1

Required Scope

cloud-aws-registration:write

Content-Type

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

Keyword Arguments

NameServiceUberTypeData typeDescription
account_idService Class SupportUber Class SupportbodystringAWS account ID.
account_typeService Class SupportUber Class SupportbodystringAWS account type.
bodyService Class SupportUber Class SupportbodydictionaryFull body payload in JSON format.
csp_eventsService Class SupportUber Class SupportbodybooleanFlag indicating if CSP events should be included.
is_masterService Class SupportUber Class SupportbodybooleanFlag indicating if this is a master account.
organization_idService Class SupportUber Class SupportbodystringAWS organization ID.
productsService Class SupportUber Class Supportbodylist_of_dictionariesList of included products and features.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudAWSRegistration

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

# Can also pass a list here: ['PRODUCT_ID1', 'PRODUCT_ID2', 'PRODUCT_ID3']
products = [
    {
        "features": [
            "string"
        ],
        "product": "string"
    }
]

response = falcon.create_account(account_id="string",
                                 account_type="string",
                                 csp_events=boolean,
                                 is_master=boolean,
                                 organization_id="string",
                                 products=products
                                 )
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudAWSRegistration

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

products = [
    {
        "features": [
            "string"
        ],
        "product": "string"
    }
]

response = falcon.cloud_registration_aws_create_account(account_id="string",
                                                        account_type="string",
                                                        csp_events=boolean,
                                                        is_master=boolean,
                                                        organization_id="string",
                                                        products=products
                                                        )
print(response)
Uber class example
from falconpy import APIHarnessV2

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

body_payload = {
  "resources": [
    {
      "account_id": "string",
      "account_type": "string",
      "csp_events": boolean,
      "is_master": boolean,
      "organization_id": "string",
      "products": [
        {
          "features": [
            "string"
          ],
          "product": "string"
        }
      ]
    }
  ]
}

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

print(response)

Back to Table of Contents

cloud_registration_aws_delete_account

Deletes an existing AWS account or organization in our system.

PEP8 method name

delete_account

Endpoint

MethodRoute
DELETE/cloud-security-registration-aws/entities/account/v1

Required Scope

cloud-aws-registration:write

Content-Type

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

Keyword Arguments

NameServiceUberTypeData typeDescription
idsService Class SupportUber Class Supportquerystring or list of stringsAWS account IDs to filter.
organization_idsService Class SupportUber Class Supportquerystring or list of stringsAWS organization IDs to remove
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudAWSRegistration

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

organization_id_list = 'ORG_ID1,ORG_ID2,ORG_ID3'  # Can also pass a list here: ['ORG_ID1', 'ORG_ID2', 'ORG_ID3']

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

response = falcon.delete_account(organization_ids=organization_id_list, ids=id_list)

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

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

organization_id_list = 'ORG_ID1,ORG_ID2,ORG_ID3'  # Can also pass a list here: ['ORG_ID1', 'ORG_ID2', 'ORG_ID3']

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

response = falcon.cloud_registration_aws_delete_account(organization_ids=organization_id_list, ids=id_list)

print(response)
Uber class example
from falconpy import APIHarnessV2

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

organization_id_list = 'ORG_ID1,ORG_ID2,ORG_ID3'  # Can also pass a list here: ['ORG_ID1', 'ORG_ID2', 'ORG_ID3']

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

response = falcon.command("cloud_registration_aws_delete_account", organization_ids=organization_id_list, ids=id_list)

print(response)

Back to Table of Contents

cloud_registration_aws_trigger_health_check

Trigger health check scan for AWS accounts.

PEP8 method name

trigger_health_check

Endpoint

MethodRoute
POST/cloud-security-registration-aws/entities/account-scans/v1

Required Scope

cloud-aws-registration:write

Content-Type

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

Keyword Arguments

NameServiceUberTypeData typeDescription
account_idsService Class SupportUber Class Supportquerystring or list of stringsAWS Account IDs.
organization_idsService Class SupportUber Class Supportquerystring or list of stringsOrganization IDs.
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudAWSRegistration

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

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

organization_id_list = 'ORG_ID1,ORG_ID2,ORG_ID3'  # Can also pass a list here: ['ORG_ID1', 'ORG_ID2', 'ORG_ID3']

response = falcon.trigger_health_check(account_ids=account_id_list,
                                       organization_ids=organization_id_list
                                       )

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

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

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

organization_id_list = 'ORG_ID1,ORG_ID2,ORG_ID3'  # Can also pass a list here: ['ORG_ID1', 'ORG_ID2', 'ORG_ID3']

response = falcon.cloud_registration_aws_trigger_health_check(account_ids=account_id_list,
                                                             organization_ids=organization_id_list
                                                             )

print(response)
Uber class example
from falconpy import APIHarnessV2

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

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

organization_id_list = 'ORG_ID1,ORG_ID2,ORG_ID3'  # Can also pass a list here: ['ORG_ID1', 'ORG_ID2', 'ORG_ID3']

response = falcon.command("cloud_registration_aws_trigger_health_check",
                          account_ids=account_id_list,
                          organization_ids=organization_id_list
                          )

print(response)

Back to Table of Contents

cloud_registration_aws_update_account

Patches a existing account in our system for a customer.

PEP8 method name

update_account

Endpoint

MethodRoute
PATCH/cloud-security-registration-aws/entities/account/v1

Required Scope

cloud-security-aws-registration:write

Content-Type

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

Keyword Arguments

NameServiceUberTypeData typeDescription
account_idService Class SupportUber Class SupportbodystringAWS account ID.
account_typeService Class SupportUber Class SupportbodystringAWS account type.
bodyService Class SupportUber Class SupportbodydictionaryFull body payload in JSON format.
csp_eventsService Class SupportUber Class SupportbodybooleanFlag indicating if CSP events should be included.
is_masterService Class SupportUber Class SupportbodybooleanFlag indicating if this is a master account.
organization_idService Class SupportUber Class SupportbodystringAWS organization ID.
productsService Class SupportUber Class Supportbodylist_of_dictionariesList of included products and features.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudAWSRegistration

# Do not hardcode API credentials!
falcon = CloudAWSRegistration(client_id=CLIENT_ID,
                              client_secret=CLIENT_SECRET
                              )
products = [
    {
        "features": [
            "string"
        ],
        "product": "string"
    }
]

response = falcon.update_account(account_id="string",
                                 account_type="string",
                                 csp_events=boolean,
                                 is_master=boolean,
                                 organization_id="string",
                                 products=products
                                 )
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudAWSRegistration

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

products = [
    {
        "features": [
            "string"
        ],
        "product": "string"
    }
]

response = falcon.cloud_registration_aws_update_account(account_id="string",
                                                        account_type="string",
                                                        csp_events=boolean,
                                                        is_master=boolean,
                                                        organization_id="string",
                                                        products=products
                                                        )
print(response)
Uber class example
from falconpy import APIHarnessV2

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

body_payload = {
    "resources": [
        {
        "account_id": "string",
        "account_type": "string",
        "csp_events": boolean,
        "is_master": boolean,
        "organization_id": "string",
        "products": [
            {
                "features": [
                    "string"
                ],
                "product": "string"
            }
        ]
        }
    ]
}

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

print(response)

Back to Table of Contents

cloud_registration_aws_validate_accounts

Validates the AWS account registration status, and discover organization child accounts if organization is specified.

PEP8 method name

validate_accounts

Endpoint

MethodRoute
POST/cloud-security-registration-aws/entities/account/validate/v1

Required Scope

cloud-aws-registration:write

Content-Type

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

Keyword Arguments

NameServiceUberTypeData typeDescription
account_idService Class SupportUber Class SupportquerystringAWS Account ID. organization-id shouldn't be specified if this is specified.
iam_role_arnService Class SupportUber Class SupportquerystringIAM Role ARN.
organization_idService Class SupportUber Class SupportquerystringAWS organization ID to validate master account. account-id shouldn't be specified if this is specified.
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudAWSRegistration

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

response = falcon.validate_accounts(account_id="string",
                                   iam_role_arn="string",
                                   organization_id="string"
                                   )
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudAWSRegistration

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

response = falcon.cloud_registration_aws_validate_accounts(account_id="string",
                                                          iam_role_arn="string",
                                                          organization_id="string"
                                                          )
print(response)
Uber class example
from falconpy import APIHarnessV2

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

response = falcon.command("cloud_registration_aws_validate_accounts",
                          account_id="string",
                          iam_role_arn="string",
                          organization_id="string"
                          )
print(response)

Back to Table of Contents

cloud_registration_aws_query_accounts

Retrieve existing AWS accounts by account IDs

PEP8 method name

query_accounts

Endpoint

MethodRoute
GET/cloud-security-registration-aws/queries/account/v1

Required Scope

cloud-aws-registration:read

Content-Type

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

Keyword Arguments

NameServiceUberTypeData typeDescription
organization_idsService Class SupportUber Class Supportqueryarray (string)Organization IDs used to filter accounts.
productsService Class SupportUber Class Supportqueryarray (string)Products registered for an account.
featuresService Class SupportUber Class Supportqueryarray (string)Features registered for an account.
account_statusService Class SupportUber Class SupportquerystringAccount status to filter results by.
limitService Class SupportUber Class SupportqueryintegerThe maximum number of items to return. When not specified or 0, 100 is used. When larger than 500, 500 is used.
offsetService Class SupportUber Class SupportqueryintegerThe offset to start retrieving records from.
group_byService Class SupportUber Class SupportquerystringField to group by.
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import CloudAWSRegistration

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

response = falcon.query_accounts(organization_ids="string",  # or ["string", "string"]
                                 products="string",  # or ["string", "string"]
                                 features="string",  # or ["string", "string"]
                                 account_status="string",
                                 limit=integer,
                                 offset=integer,
                                 group_by="string"
                                 )
print(response)
Service class example (Operation ID syntax)
from falconpy import CloudAWSRegistration

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

response = falcon.cloud_registration_aws_query_accounts(organization_ids="string",  # or ["string", "string"]
                                                        products="string",  # or ["string", "string"]
                                                        features="string",  # or ["string", "string"]
                                                        account_status="string",
                                                        limit=integer,
                                                        offset=integer,
                                                        group_by="string"
                                                        )
print(response)
Uber class example
from falconpy import APIHarnessV2

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

response = falcon.command("cloud_registration_aws_query_accounts",
                          organization_ids="string",  # or ["string", "string"]
                          products="string",  # or ["string", "string"]
                          features="string",  # or ["string", "string"]
                          account_status="string",
                          limit=integer,
                          offset=integer,
                          group_by="string"
                          )
print(response)

Back to Table of Contents