Admission Control Policies - CrowdStrike/falconpy GitHub Wiki

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 ID Description
admission_control_get_policies
PEP 8 get_policies
Get admission control policies.
admission_control_create_policy
PEP 8 create_policy
Create an admission control policy.
admission_control_update_policy
PEP 8 update_policy
Update an admission control policy.
admission_control_delete_policies
PEP 8 delete_policies
Delete an admission control policy.
admission_control_add_host_groups
PEP 8 add_host_groups
Add one or more host groups to an admission control policy.
admission_control_remove_host_groups
PEP 8 remove_host_groups
Remove one or more host groups from an admission control policy.
admission_control_update_policy_precedence
PEP 8 update_policy_precedence
Update admission control policy precedence.
admission_control_add_rule_group_custom_rule
PEP 8 add_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 8 delete_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 8 set_rule_group_precedence
Change precedence of rule groups within an admission control policy.
admission_control_replace_rule_group_selectors
PEP 8 replace_rule_group_selectors
Replace labels and/or namespaces of a rule group within an admission control policy.
admission_control_create_rule_groups
PEP 8 create_rule_groups
Create one or more rule groups and add them to an existing admission control policy.
admission_control_update_rule_groups
PEP 8 update_rule_groups
Update a rule group.
admission_control_delete_rule_groups
PEP 8 delete_rule_groups
Delete rule groups.
admission_control_query_policies
PEP 8 query_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

Method Route
GET /admission-control-policies/entities/policies/v1

Required Scope

falcon-container-policies:read

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
ids Service Class Support Uber Class Support query string or list of strings The list of policies to return (maximum 100 IDs allowed).
parameters Service Class Support Uber Class Support query dictionary Full 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

Method Route
POST /admission-control-policies/entities/policies/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload as JSON formatted dictionary.
description Service Class Support Uber Class Support body string Policy description.
name Service Class Support Uber Class Support body string Policy 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

Method Route
PATCH /admission-control-policies/entities/policies/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
ids Service Class Support Uber Class Support query string The id of the admission control policy to update.
body Service Class Support Uber Class Support body dictionary Full body payload as JSON formatted dictionary.
description Service Class Support Uber Class Support body string Policy description.
is_enabled Service Class Support Uber Class Support body boolean Flag indicating if the policy is enabled.
name Service Class Support Uber Class Support body string Policy name.
parameters Service Class Support Uber Class Support query dictionary Full 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

Method Route
DELETE /admission-control-policies/entities/policies/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
ids Service Class Support Uber Class Support query string or list of strings The ids of the policies to delete (maximum 100 IDs allowed).
parameters Service Class Support Uber Class Support query dictionary Full 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

Method Route
POST /admission-control-policies/entities/policy-host-groups/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload as JSON formatted dictionary.
host_groups Service Class Support Uber Class Support body string or list of strings Host group IDs to add.
id Service Class Support Uber Class Support body string The 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

Method Route
DELETE /admission-control-policies/entities/policy-host-groups/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
policy_id Service Class Support Uber Class Support query string The id of the policy to modify.
host_group_ids Service Class Support Uber Class Support query string or list of strings The ids of the host groups to remove (maximum 100 IDs allowed).
parameters Service Class Support Uber Class Support query dictionary Full 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

Method Route
PATCH /admission-control-policies/entities/policy-precedence/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload as JSON formatted dictionary.
id Service Class Support Uber Class Support body string Policy ID.
precedence Service Class Support Uber Class Support body integer Policy 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

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

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload as JSON formatted dictionary.
id Service Class Support Uber Class Support body string Policy ID.
rule_groups Service Class Support Uber Class Support body list of dictionaries Rule 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

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

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
policy_id Service Class Support Uber Class Support query string The id of the policy to modify.
custom_rule_ids Service Class Support Uber Class Support query string or list of strings The ids of the custom Rego rules to delete (maximum 100 IDs allowed).
parameters Service Class Support Uber Class Support query dictionary Full 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

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

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload as JSON formatted dictionary.
id Service Class Support Uber Class Support body string Policy ID.
rule_groups Service Class Support Uber Class Support body list of dictionaries List 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

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

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload as JSON formatted dictionary.
id Service Class Support Uber Class Support body string Policy ID.
rule_groups Service Class Support Uber Class Support body list of dictionaries Rule 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

Method Route
POST /admission-control-policies/entities/policy-rule-groups/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload as JSON formatted dictionary.
id Service Class Support Uber Class Support body string Policy ID.
rule_groups Service Class Support Uber Class Support body list of dictionaries Rule 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

Method Route
PATCH /admission-control-policies/entities/policy-rule-groups/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
body Service Class Support Uber Class Support body dictionary Full body payload as JSON formatted dictionary. Valid rule action values: Disabled, Prevent, Alert. Valid image assessment unassessed handling values: Prevent, Alert, Allow Without Alert.
id Service Class Support Uber Class Support body string Policy ID.
rule_groups Service Class Support Uber Class Support body list of dictionaries Rule 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

Method Route
DELETE /admission-control-policies/entities/policy-rule-groups/v1

Required Scope

falcon-container-policies:write

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
policy_id Service Class Support Uber Class Support query string The id of the policy to modify.
rule_group_ids Service Class Support Uber Class Support query string or list of strings The ids of the rule groups to delete (maximum 100 IDs allowed).
parameters Service Class Support Uber Class Support query dictionary Full 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

Method Route
GET /admission-control-policies/queries/policies/v1

Required Scope

falcon-container-policies:read

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Data type Description
filter Service Class Support Uber Class Support query string FQL filter. Allowed properties: precedence, created_timestamp, modified_timestamp, name, description.
limit Service Class Support Uber Class Support query integer The maximum number of resources to return. The maximum allowed is 500. [Default: 100]
offset Service Class Support Uber Class Support query integer The number of results to skip before starting to return results. [Default: 0]
sort Service Class Support Uber Class Support query string Field to sort on. Sortable fields: precedence, created_timestamp, modified_timestamp. Use the |asc or |desc suffix to specify sort direction.
parameters Service Class Support Uber Class Support query dictionary Full 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

⚠️ **GitHub.com Fallback** ⚠️