CrowdStrike Falcon CrowdStrike Subreddit

Using the Admission Control Policies service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
admission_control_get_policies
PEP 8get_policies
Get admission control policies.
admission_control_create_policy
PEP 8create_policy
Create an admission control policy.
admission_control_update_policy
PEP 8update_policy
Update an admission control policy.
admission_control_delete_policies
PEP 8delete_policies
Delete an admission control policy.
admission_control_add_host_groups
PEP 8add_host_groups
Add one or more host groups to an admission control policy.
admission_control_remove_host_groups
PEP 8remove_host_groups
Remove one or more host groups from an admission control policy.
admission_control_update_policy_precedence
PEP 8update_policy_precedence
Update admission control policy precedence.
admission_control_add_rule_group_custom_rule
PEP 8add_custom_rules
Add one or more custom Rego rules to a rule group in an admission control policy.
admission_control_remove_rule_group_custom_rule
PEP 8delete_custom_rules
Delete one or more custom Rego rules from all rule groups in an admission control policy.
admission_control_set_rule_group_precedence
PEP 8set_rule_group_precedence
Change precedence of rule groups within an admission control policy.
admission_control_replace_rule_group_selectors
PEP 8replace_rule_group_selectors
Replace labels and/or namespaces of a rule group within an admission control policy.
admission_control_create_rule_groups
PEP 8create_rule_groups
Create one or more rule groups and add them to an existing admission control policy.
admission_control_update_rule_groups
PEP 8update_rule_groups
Update a rule group.
admission_control_delete_rule_groups
PEP 8delete_rule_groups
Delete rule groups.
admission_control_query_policies
PEP 8query_policies
Search admission control policies.

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.

admission_control_get_policies

Get admission control policies.

PEP8 method name

get_policies

Endpoint

MethodRoute
GET/admission-control-policies/entities/policies/v1

Required Scope

falcon-container-policies:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
idsService Class SupportUber Class Supportquerystring or list of stringsThe list of policies to return (maximum 100 IDs allowed).
parametersService Class SupportUber Class SupportquerydictionaryFull set of query string parameters in a JSON formatted dictionary.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

# Do not hardcode API credentials!
falcon = AdmissionControlPolicies(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_policies(ids=id_list)
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

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

response = falcon.admission_control_get_policies(ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2

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

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

response = falcon.command("admission_control_get_policies", ids=id_list)
print(response)

Back to Table of Contents

admission_control_create_policy

Create an admission control policy.

PEP8 method name

create_policy

Endpoint

MethodRoute
POST/admission-control-policies/entities/policies/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class SupportbodydictionaryFull body payload as JSON formatted dictionary.
descriptionService Class SupportUber Class SupportbodystringPolicy description.
nameService Class SupportUber Class SupportbodystringPolicy name.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.create_policy(description="string", name="string")
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.admission_control_create_policy(description="string", name="string")
print(response)
Uber class example
from falconpy import APIHarnessV2

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

body_payload = {
    "description": "string",
    "name": "string"
}

response = falcon.command("admission_control_create_policy", body=body_payload)
print(response)

Back to Table of Contents

admission_control_update_policy

Update an admission control policy.

PEP8 method name

update_policy

Endpoint

MethodRoute
PATCH/admission-control-policies/entities/policies/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
idsService Class SupportUber Class SupportquerystringThe id of the admission control policy to update.
bodyService Class SupportUber Class SupportbodydictionaryFull body payload as JSON formatted dictionary.
descriptionService Class SupportUber Class SupportbodystringPolicy description.
is_enabledService Class SupportUber Class SupportbodybooleanFlag indicating if the policy is enabled.
nameService Class SupportUber Class SupportbodystringPolicy name.
parametersService Class SupportUber Class SupportquerydictionaryFull set of query string parameters in a JSON formatted dictionary.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.update_policy(ids="string",
                                description="string",
                                is_enabled=boolean,
                                name="string"
                                )
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.admission_control_update_policy(ids="string",
                                                  description="string",
                                                  is_enabled=boolean,
                                                  name="string"
                                                  )
print(response)
Uber class example
from falconpy import APIHarnessV2

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

body_payload = {
    "description": "string",
    "is_enabled": boolean,
    "name": "string"
}

response = falcon.command("admission_control_update_policy", ids="string", body=body_payload)
print(response)

Back to Table of Contents

admission_control_delete_policies

Delete an admission control policy.

PEP8 method name

delete_policies

Endpoint

MethodRoute
DELETE/admission-control-policies/entities/policies/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
idsService Class SupportUber Class Supportquerystring or list of stringsThe ids of the policies to delete (maximum 100 IDs allowed).
parametersService Class SupportUber Class SupportquerydictionaryFull set of query string parameters in a JSON formatted dictionary.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

# Do not hardcode API credentials!
falcon = AdmissionControlPolicies(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_policies(ids=id_list)
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

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

response = falcon.admission_control_delete_policies(ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2

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

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

response = falcon.command("admission_control_delete_policies", ids=id_list)
print(response)

Back to Table of Contents

admission_control_add_host_groups

Add one or more host groups to an admission control policy.

PEP8 method name

add_host_groups

Endpoint

MethodRoute
POST/admission-control-policies/entities/policy-host-groups/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class SupportbodydictionaryFull body payload as JSON formatted dictionary.
host_groupsService Class SupportUber Class Supportbodystring or list of stringsHost group IDs to add.
idService Class SupportUber Class SupportbodystringThe policy ID to modify.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.add_host_groups(host_groups=["string", "string"],
                                  id="string"
                                  )
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.admission_control_add_host_groups(host_groups=["string", "string"],
                                                    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
                      )

body_payload = {
    "host_groups": [
        "string"
    ],
    "id": "string"
}

response = falcon.command("admission_control_add_host_groups", body=body_payload)
print(response)

Back to Table of Contents

admission_control_remove_host_groups

Remove one or more host groups from an admission control policy.

PEP8 method name

remove_host_groups

Endpoint

MethodRoute
DELETE/admission-control-policies/entities/policy-host-groups/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
policy_idService Class SupportUber Class SupportquerystringThe id of the policy to modify.
host_group_idsService Class SupportUber Class Supportquerystring or list of stringsThe ids of the host groups to remove (maximum 100 IDs allowed).
parametersService Class SupportUber Class SupportquerydictionaryFull set of query string parameters in a JSON formatted dictionary.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.remove_host_groups(policy_id="string",
                                     host_group_ids=["string", "string"]
                                     )
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.admission_control_remove_host_groups(policy_id="string",
                                                       host_group_ids=["string", "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("admission_control_remove_host_groups",
                          policy_id="string",
                          host_group_ids=["string", "string"]
                          )
print(response)

Back to Table of Contents

admission_control_update_policy_precedence

Update admission control policy precedence.

PEP8 method name

update_policy_precedence

Endpoint

MethodRoute
PATCH/admission-control-policies/entities/policy-precedence/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class SupportbodydictionaryFull body payload as JSON formatted dictionary.
idService Class SupportUber Class SupportbodystringPolicy ID.
precedenceService Class SupportUber Class SupportbodyintegerPolicy precedence.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.update_policy_precedence(id="string", precedence=integer)
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.admission_control_update_policy_precedence(id="string",
                                                             precedence=integer
                                                             )
print(response)
Uber class example
from falconpy import APIHarnessV2

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

body_payload = {
    "id": "string",
    "precedence": integer
}

response = falcon.command("admission_control_update_policy_precedence", body=body_payload)
print(response)

Back to Table of Contents

admission_control_add_rule_group_custom_rule

Add one or more custom Rego rules to a rule group in an admission control policy. The requested custom rules are also added to all other unspecified rule groups in the policy with action 'Disabled'.

PEP8 method name

add_custom_rules

Endpoint

MethodRoute
POST/admission-control-policies/entities/policy-rule-group-custom-rules/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class SupportbodydictionaryFull body payload as JSON formatted dictionary.
idService Class SupportUber Class SupportbodystringPolicy ID.
rule_groupsService Class SupportUber Class Supportbodylist of dictionariesRule groups containing custom rules to add.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

rule_groups = [
    {
        "custom_rules": [
            {
                "action": "string",
                "id": "string"
            }
        ],
        "id": "string"
    }
]

response = falcon.add_custom_rules(id="string", rule_groups=rule_groups)
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

rule_groups = [
    {
        "custom_rules": [
            {
                "action": "string",
                "id": "string"
            }
        ],
        "id": "string"
    }
]

response = falcon.admission_control_add_rule_group_custom_rule(id="string",
                                                               rule_groups=rule_groups
                                                               )
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 = {
    "id": "string",
    "rule_groups": [
        {
            "custom_rules": [
                {
                    "action": "string",
                    "id": "string"
                }
            ],
            "id": "string"
        }
    ]
}

response = falcon.command("admission_control_add_rule_group_custom_rule", body=body_payload)
print(response)

Back to Table of Contents

admission_control_remove_rule_group_custom_rule

Delete one or more custom Rego rules from all rule groups in an admission control policy.

PEP8 method name

delete_custom_rules

Endpoint

MethodRoute
DELETE/admission-control-policies/entities/policy-rule-group-custom-rules/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
policy_idService Class SupportUber Class SupportquerystringThe id of the policy to modify.
custom_rule_idsService Class SupportUber Class Supportquerystring or list of stringsThe ids of the custom Rego rules to delete (maximum 100 IDs allowed).
parametersService Class SupportUber Class SupportquerydictionaryFull set of query string parameters in a JSON formatted dictionary.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.delete_custom_rules(policy_id="string",
                                      custom_rule_ids=["string", "string"]
                                      )
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.admission_control_remove_rule_group_custom_rule(policy_id="string",
                                                                  custom_rule_ids=["string", "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("admission_control_remove_rule_group_custom_rule",
                          policy_id="string",
                          custom_rule_ids=["string", "string"]
                          )
print(response)

Back to Table of Contents

admission_control_set_rule_group_precedence

Change precedence of rule groups within an admission control policy.

PEP8 method name

set_rule_group_precedence

Endpoint

MethodRoute
PUT/admission-control-policies/entities/policy-rule-group-precedence/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class SupportbodydictionaryFull body payload as JSON formatted dictionary.
idService Class SupportUber Class SupportbodystringPolicy ID.
rule_groupsService Class SupportUber Class Supportbodylist of dictionariesList of rule groups in precedence order.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

rule_groups = [
    {
        "id": "string"
    }
]

response = falcon.set_rule_group_precedence(id="string", rule_groups=rule_groups)
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

rule_groups = [
    {
        "id": "string"
    }
]

response = falcon.admission_control_set_rule_group_precedence(id="string",
                                                              rule_groups=rule_groups
                                                              )
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 = {
    "id": "string",
    "rule_groups": [
        {
            "id": "string"
        }
    ]
}

response = falcon.command("admission_control_set_rule_group_precedence", body=body_payload)
print(response)

Back to Table of Contents

admission_control_replace_rule_group_selectors

Replace labels and/or namespaces of a rule group within an admission control policy.

PEP8 method name

replace_rule_group_selectors

Endpoint

MethodRoute
PUT/admission-control-policies/entities/policy-rule-group-selectors/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class SupportbodydictionaryFull body payload as JSON formatted dictionary.
idService Class SupportUber Class SupportbodystringPolicy ID.
rule_groupsService Class SupportUber Class Supportbodylist of dictionariesRule groups with labels and/or namespaces to replace.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

rule_groups = [
    {
        "id": "string",
        "labels": [
            {
                "key": "string",
                "operator": "string",
                "value": "string"
            }
        ],
        "namespaces": [
            {
                "value": "string"
            }
        ]
    }
]

response = falcon.replace_rule_group_selectors(id="string", rule_groups=rule_groups)
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

rule_groups = [
    {
        "id": "string",
        "labels": [
            {
                "key": "string",
                "operator": "string",
                "value": "string"
            }
        ],
        "namespaces": [
            {
                "value": "string"
            }
        ]
    }
]

response = falcon.admission_control_replace_rule_group_selectors(id="string",
                                                                 rule_groups=rule_groups
                                                                 )
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 = {
    "id": "string",
    "rule_groups": [
        {
            "id": "string",
            "labels": [
                {
                    "key": "string",
                    "operator": "string",
                    "value": "string"
                }
            ],
            "namespaces": [
                {
                    "value": "string"
                }
            ]
        }
    ]
}

response = falcon.command("admission_control_replace_rule_group_selectors", body=body_payload)
print(response)

Back to Table of Contents

admission_control_create_rule_groups

Create one or more rule groups and add them to an existing admission control policy.

PEP8 method name

create_rule_groups

Endpoint

MethodRoute
POST/admission-control-policies/entities/policy-rule-groups/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class SupportbodydictionaryFull body payload as JSON formatted dictionary.
idService Class SupportUber Class SupportbodystringPolicy ID.
rule_groupsService Class SupportUber Class Supportbodylist of dictionariesRule groups to create.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

rule_groups = [
    {
        "description": "string",
        "name": "string"
    }
]

response = falcon.create_rule_groups(id="string", rule_groups=rule_groups)
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

rule_groups = [
    {
        "description": "string",
        "name": "string"
    }
]

response = falcon.admission_control_create_rule_groups(id="string",
                                                       rule_groups=rule_groups
                                                       )
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 = {
    "id": "string",
    "rule_groups": [
        {
            "description": "string",
            "name": "string"
        }
    ]
}

response = falcon.command("admission_control_create_rule_groups", body=body_payload)
print(response)

Back to Table of Contents

admission_control_update_rule_groups

Update a rule group. Change rule group name, description, deny on error, Image Assessment settings, default rule actions, and custom rule actions.

PEP8 method name

update_rule_groups

Endpoint

MethodRoute
PATCH/admission-control-policies/entities/policy-rule-groups/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class SupportbodydictionaryFull body payload as JSON formatted dictionary. Valid rule action values: Disabled, Prevent, Alert. Valid image assessment unassessed handling values: Prevent, Alert, Allow Without Alert.
idService Class SupportUber Class SupportbodystringPolicy ID.
rule_groupsService Class SupportUber Class Supportbodylist of dictionariesRule groups to update.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

rule_groups = [
    {
        "custom_rules": [
            {
                "action": "string",
                "id": "string"
            }
        ],
        "default_rules": [
            {
                "action": "string",
                "code": "string"
            }
        ],
        "deny_on_error": {
            "deny": boolean
        },
        "description": "string",
        "id": "string",
        "image_assessment": {
            "enabled": boolean,
            "unassessed_handling": "string"
        },
        "name": "string"
    }
]

response = falcon.update_rule_groups(id="string", rule_groups=rule_groups)
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

rule_groups = [
    {
        "custom_rules": [
            {
                "action": "string",
                "id": "string"
            }
        ],
        "default_rules": [
            {
                "action": "string",
                "code": "string"
            }
        ],
        "deny_on_error": {
            "deny": boolean
        },
        "description": "string",
        "id": "string",
        "image_assessment": {
            "enabled": boolean,
            "unassessed_handling": "string"
        },
        "name": "string"
    }
]

response = falcon.admission_control_update_rule_groups(id="string",
                                                       rule_groups=rule_groups
                                                       )
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 = {
    "id": "string",
    "rule_groups": [
        {
            "custom_rules": [
                {
                    "action": "string",
                    "id": "string"
                }
            ],
            "default_rules": [
                {
                    "action": "string",
                    "code": "string"
                }
            ],
            "deny_on_error": {
                "deny": boolean
            },
            "description": "string",
            "id": "string",
            "image_assessment": {
                "enabled": boolean,
                "unassessed_handling": "string"
            },
            "name": "string"
        }
    ]
}

response = falcon.command("admission_control_update_rule_groups", body=body_payload)
print(response)

Back to Table of Contents

admission_control_delete_rule_groups

Delete rule groups.

PEP8 method name

delete_rule_groups

Endpoint

MethodRoute
DELETE/admission-control-policies/entities/policy-rule-groups/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
policy_idService Class SupportUber Class SupportquerystringThe id of the policy to modify.
rule_group_idsService Class SupportUber Class Supportquerystring or list of stringsThe ids of the rule groups to delete (maximum 100 IDs allowed).
parametersService Class SupportUber Class SupportquerydictionaryFull set of query string parameters in a JSON formatted dictionary.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.delete_rule_groups(policy_id="string",
                                     rule_group_ids=["string", "string"]
                                     )
print(response)
Service class example (Operation ID syntax)
from falconpy import AdmissionControlPolicies

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

response = falcon.admission_control_delete_rule_groups(policy_id="string",
                                                       rule_group_ids=["string", "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("admission_control_delete_rule_groups",
                          policy_id="string",
                          rule_group_ids=["string", "string"]
                          )
print(response)

Back to Table of Contents

admission_control_query_policies

Search admission control policies.

PEP8 method name

query_policies

Endpoint

MethodRoute
GET/admission-control-policies/queries/policies/v1

Required Scope

falcon-container-policies:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filterService Class SupportUber Class SupportquerystringFQL filter. Allowed properties: precedence, created_timestamp, modified_timestamp, name, description.
limitService Class SupportUber Class SupportqueryintegerThe maximum number of resources to return. The maximum allowed is 500. [Default: 100]
offsetService Class SupportUber Class SupportqueryintegerThe number of results to skip before starting to return results. [Default: 0]
sortService Class SupportUber Class SupportquerystringField to sort on. Sortable fields: precedence, created_timestamp, modified_timestamp. Use the |asc or |desc suffix to specify sort direction.
parametersService Class SupportUber Class SupportquerydictionaryFull set of query string parameters in a JSON formatted dictionary.

Usage

Service class example (PEP8 syntax)
from falconpy import AdmissionControlPolicies

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

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

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

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

Back to Table of Contents