static_analysis_custom_rulesets
Creates, updates, deletes, gets or lists a static_analysis_custom_rulesets resource.
Overview
| Name | static_analysis_custom_rulesets |
| Type | Resource |
| Id | datadog.security.static_analysis_custom_rulesets |
Fields
The following fields are returned by SELECT queries:
- get_custom_ruleset
- list_custom_rulesets
| Name | Datatype | Description |
|---|---|---|
id | string | Ruleset identifier (example: my-ruleset) |
attributes | object | Attributes of a custom ruleset, including its name, description, and rules. |
type | string | Resource type (custom_ruleset) (example: custom_ruleset) |
| Name | Datatype | Description |
|---|---|---|
id | string | Ruleset identifier (example: my-ruleset) |
attributes | object | Attributes of a custom ruleset, including its name, description, and rules. |
type | string | Resource type (custom_ruleset) (example: custom_ruleset) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_custom_ruleset | select | ruleset_name | Get a custom ruleset by name | |
list_custom_rulesets | select | Get all custom rulesets for the authenticated organization. | ||
update_custom_ruleset | update | ruleset_name | Update an existing custom ruleset | |
create_custom_ruleset | replace | Create a new custom ruleset for the authenticated organization. | ||
delete_custom_ruleset | delete | ruleset_name | Delete a custom ruleset |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
ruleset_name | string | The ruleset name |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
SELECT examples
- get_custom_ruleset
- list_custom_rulesets
Get a custom ruleset by name
SELECT
id,
attributes,
type
FROM datadog.security.static_analysis_custom_rulesets
WHERE ruleset_name = '{{ ruleset_name }}' -- required
;
Get all custom rulesets for the authenticated organization.
SELECT
id,
attributes,
type
FROM datadog.security.static_analysis_custom_rulesets
;
UPDATE examples
- update_custom_ruleset
Update an existing custom ruleset
UPDATE datadog.security.static_analysis_custom_rulesets
SET
data = '{{ data }}'
WHERE
ruleset_name = '{{ ruleset_name }}' --required
RETURNING
data;
REPLACE examples
- create_custom_ruleset
Create a new custom ruleset for the authenticated organization.
REPLACE datadog.security.static_analysis_custom_rulesets
SET
data = '{{ data }}'
WHERE
RETURNING
data;
DELETE examples
- delete_custom_ruleset
Delete a custom ruleset
DELETE FROM datadog.security.static_analysis_custom_rulesets
WHERE ruleset_name = '{{ ruleset_name }}' --required
;