Skip to content

Commit ea0ce59

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add security_filters and rules resource types to terraform export endpoints (#1774)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 117a610 commit ea0ce59

3 files changed

Lines changed: 34 additions & 9 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88816,10 +88816,14 @@ components:
8881688816
enum:
8881788817
- suppressions
8881888818
- critical_assets
88819+
- security_filters
88820+
- rules
8881988821
type: string
8882088822
x-enum-varnames:
8882188823
- SUPPRESSIONS
8882288824
- CRITICAL_ASSETS
88825+
- SECURITY_FILTERS
88826+
- RULES
8882388827
SecurityMonitoringThirdPartyRootQuery:
8882488828
description: A query to be combined with the third party case query.
8882588829
properties:
@@ -177523,8 +177527,9 @@ paths:
177523177527
description: |-
177524177528
Export multiple security monitoring resources to Terraform, packaged as a zip archive.
177525177529
The `resource_type` path parameter specifies the type of resources to export
177526-
and must be one of `suppressions` or `critical_assets`.
177530+
and must be one of `suppressions`, `critical_assets`, `security_filters`, or `rules`.
177527177531
A maximum of 1000 resources can be exported in a single request.
177532+
For `rules`, partner rules cannot be exported and return a 400 error.
177528177533
operationId: BulkExportSecurityMonitoringTerraformResources
177529177534
parameters:
177530177535
- $ref: "#/components/parameters/SecurityMonitoringTerraformResourceType"
@@ -177569,6 +177574,8 @@ paths:
177569177574
- security_monitoring_suppressions_read
177570177575
- AuthZ:
177571177576
- security_monitoring_rules_read
177577+
- AuthZ:
177578+
- security_monitoring_filters_read
177572177579
summary: Export security monitoring resources to Terraform
177573177580
tags:
177574177581
- Security Monitoring
@@ -177578,13 +177585,14 @@ paths:
177578177585
permissions:
177579177586
- security_monitoring_suppressions_read
177580177587
- security_monitoring_rules_read
177588+
- security_monitoring_filters_read
177581177589
x-unstable: "**Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)."
177582177590
/api/v2/security_monitoring/terraform/{resource_type}/convert:
177583177591
post:
177584177592
description: |-
177585177593
Convert a security monitoring resource that doesn't (yet) exist from JSON to Terraform.
177586177594
The `resource_type` path parameter specifies the type of resource to convert
177587-
and must be one of `suppressions` or `critical_assets`.
177595+
and must be one of `suppressions`, `critical_assets`, `security_filters`, or `rules`.
177588177596
operationId: ConvertSecurityMonitoringTerraformResource
177589177597
parameters:
177590177598
- $ref: "#/components/parameters/SecurityMonitoringTerraformResourceType"
@@ -177637,6 +177645,8 @@ paths:
177637177645
- security_monitoring_suppressions_read
177638177646
- AuthZ:
177639177647
- security_monitoring_rules_read
177648+
- AuthZ:
177649+
- security_monitoring_filters_read
177640177650
summary: Convert security monitoring resource to Terraform
177641177651
tags:
177642177652
- Security Monitoring
@@ -177646,13 +177656,15 @@ paths:
177646177656
permissions:
177647177657
- security_monitoring_suppressions_read
177648177658
- security_monitoring_rules_read
177659+
- security_monitoring_filters_read
177649177660
x-unstable: "**Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)."
177650177661
/api/v2/security_monitoring/terraform/{resource_type}/{resource_id}:
177651177662
get:
177652177663
description: |-
177653177664
Export a security monitoring resource to a Terraform configuration.
177654177665
The `resource_type` path parameter specifies the type of resource to export
177655-
and must be one of `suppressions` or `critical_assets`.
177666+
and must be one of `suppressions`, `critical_assets`, `security_filters`, or `rules`.
177667+
For `rules`, partner rules cannot be exported and return a 400 error.
177656177668
operationId: ExportSecurityMonitoringTerraformResource
177657177669
parameters:
177658177670
- $ref: "#/components/parameters/SecurityMonitoringTerraformResourceType"
@@ -177687,6 +177699,8 @@ paths:
177687177699
- security_monitoring_suppressions_read
177688177700
- AuthZ:
177689177701
- security_monitoring_rules_read
177702+
- AuthZ:
177703+
- security_monitoring_filters_read
177690177704
summary: Export security monitoring resource to Terraform
177691177705
tags:
177692177706
- Security Monitoring
@@ -177695,6 +177709,7 @@ paths:
177695177709
permissions:
177696177710
- security_monitoring_suppressions_read
177697177711
- security_monitoring_rules_read
177712+
- security_monitoring_filters_read
177698177713
x-unstable: "**Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)."
177699177714
/api/v2/sensitive-data-scanner/config:
177700177715
get:

src/datadogV2/api/api_security_monitoring.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4796,8 +4796,9 @@ impl SecurityMonitoringAPI {
47964796

47974797
/// Export multiple security monitoring resources to Terraform, packaged as a zip archive.
47984798
/// The `resource_type` path parameter specifies the type of resources to export
4799-
/// and must be one of `suppressions` or `critical_assets`.
4799+
/// and must be one of `suppressions`, `critical_assets`, `security_filters`, or `rules`.
48004800
/// A maximum of 1000 resources can be exported in a single request.
4801+
/// For `rules`, partner rules cannot be exported and return a 400 error.
48014802
pub async fn bulk_export_security_monitoring_terraform_resources(
48024803
&self,
48034804
resource_type: crate::datadogV2::model::SecurityMonitoringTerraformResourceType,
@@ -4822,8 +4823,9 @@ impl SecurityMonitoringAPI {
48224823

48234824
/// Export multiple security monitoring resources to Terraform, packaged as a zip archive.
48244825
/// The `resource_type` path parameter specifies the type of resources to export
4825-
/// and must be one of `suppressions` or `critical_assets`.
4826+
/// and must be one of `suppressions`, `critical_assets`, `security_filters`, or `rules`.
48264827
/// A maximum of 1000 resources can be exported in a single request.
4828+
/// For `rules`, partner rules cannot be exported and return a 400 error.
48274829
pub async fn bulk_export_security_monitoring_terraform_resources_with_http_info(
48284830
&self,
48294831
resource_type: crate::datadogV2::model::SecurityMonitoringTerraformResourceType,
@@ -5495,7 +5497,7 @@ impl SecurityMonitoringAPI {
54955497

54965498
/// Convert a security monitoring resource that doesn't (yet) exist from JSON to Terraform.
54975499
/// The `resource_type` path parameter specifies the type of resource to convert
5498-
/// and must be one of `suppressions` or `critical_assets`.
5500+
/// and must be one of `suppressions`, `critical_assets`, `security_filters`, or `rules`.
54995501
pub async fn convert_security_monitoring_terraform_resource(
55005502
&self,
55015503
resource_type: crate::datadogV2::model::SecurityMonitoringTerraformResourceType,
@@ -5523,7 +5525,7 @@ impl SecurityMonitoringAPI {
55235525

55245526
/// Convert a security monitoring resource that doesn't (yet) exist from JSON to Terraform.
55255527
/// The `resource_type` path parameter specifies the type of resource to convert
5526-
/// and must be one of `suppressions` or `critical_assets`.
5528+
/// and must be one of `suppressions`, `critical_assets`, `security_filters`, or `rules`.
55275529
pub async fn convert_security_monitoring_terraform_resource_with_http_info(
55285530
&self,
55295531
resource_type: crate::datadogV2::model::SecurityMonitoringTerraformResourceType,
@@ -11073,7 +11075,8 @@ impl SecurityMonitoringAPI {
1107311075

1107411076
/// Export a security monitoring resource to a Terraform configuration.
1107511077
/// The `resource_type` path parameter specifies the type of resource to export
11076-
/// and must be one of `suppressions` or `critical_assets`.
11078+
/// and must be one of `suppressions`, `critical_assets`, `security_filters`, or `rules`.
11079+
/// For `rules`, partner rules cannot be exported and return a 400 error.
1107711080
pub async fn export_security_monitoring_terraform_resource(
1107811081
&self,
1107911082
resource_type: crate::datadogV2::model::SecurityMonitoringTerraformResourceType,
@@ -11104,7 +11107,8 @@ impl SecurityMonitoringAPI {
1110411107

1110511108
/// Export a security monitoring resource to a Terraform configuration.
1110611109
/// The `resource_type` path parameter specifies the type of resource to export
11107-
/// and must be one of `suppressions` or `critical_assets`.
11110+
/// and must be one of `suppressions`, `critical_assets`, `security_filters`, or `rules`.
11111+
/// For `rules`, partner rules cannot be exported and return a 400 error.
1110811112
pub async fn export_security_monitoring_terraform_resource_with_http_info(
1110911113
&self,
1111011114
resource_type: crate::datadogV2::model::SecurityMonitoringTerraformResourceType,

src/datadogV2/model/model_security_monitoring_terraform_resource_type.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
99
pub enum SecurityMonitoringTerraformResourceType {
1010
SUPPRESSIONS,
1111
CRITICAL_ASSETS,
12+
SECURITY_FILTERS,
13+
RULES,
1214
UnparsedObject(crate::datadog::UnparsedObject),
1315
}
1416

@@ -17,6 +19,8 @@ impl ToString for SecurityMonitoringTerraformResourceType {
1719
match self {
1820
Self::SUPPRESSIONS => String::from("suppressions"),
1921
Self::CRITICAL_ASSETS => String::from("critical_assets"),
22+
Self::SECURITY_FILTERS => String::from("security_filters"),
23+
Self::RULES => String::from("rules"),
2024
Self::UnparsedObject(v) => v.value.to_string(),
2125
}
2226
}
@@ -43,6 +47,8 @@ impl<'de> Deserialize<'de> for SecurityMonitoringTerraformResourceType {
4347
Ok(match s.as_str() {
4448
"suppressions" => Self::SUPPRESSIONS,
4549
"critical_assets" => Self::CRITICAL_ASSETS,
50+
"security_filters" => Self::SECURITY_FILTERS,
51+
"rules" => Self::RULES,
4652
_ => Self::UnparsedObject(crate::datadog::UnparsedObject {
4753
value: serde_json::Value::String(s.into()),
4854
}),

0 commit comments

Comments
 (0)