Skip to content

Commit

Permalink
Regenerate client from commit a3b4c237 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jan 15, 2025
1 parent 4249e96 commit 209ee7b
Show file tree
Hide file tree
Showing 14 changed files with 4,738 additions and 3,552 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-15 09:47:00.356255",
"spec_repo_commit": "21b02fc5"
"regenerated": "2025-01-15 18:48:09.130456",
"spec_repo_commit": "a3b4c237"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-15 09:47:00.371502",
"spec_repo_commit": "21b02fc5"
"regenerated": "2025-01-15 18:48:09.147884",
"spec_repo_commit": "a3b4c237"
}
}
}
165 changes: 165 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,20 @@ components:
required: false
schema:
$ref: '#/components/schemas/RelationType'
FrameworkHandle:
description: The framework handle
in: path
name: handle
required: true
schema:
type: string
FrameworkVersion:
description: The framework version
in: path
name: version
required: true
schema:
type: string
GCPSTSServiceAccountID:
description: Your GCP STS enabled service account's unique ID.
in: path
Expand Down Expand Up @@ -7145,6 +7159,10 @@ components:
type: string
x-enum-varnames:
- APPDEFINITIONS
CreateCustomFrameworkRequest:
$ref: '#/components/schemas/FrameworkData'
description: Create a custom framework.
type: object
CreateDataDeletionRequestBody:
description: Object needed to create a data deletion request.
properties:
Expand Down Expand Up @@ -11936,6 +11954,72 @@ components:
order:
$ref: '#/components/schemas/QuerySortOrder'
type: object
FrameworkControl:
description: Framework Control.
properties:
name:
description: Control Name.
example: ''
type: string
rule_ids:
description: Rule IDs.
example:
- ''
items:
type: string
type: array
required:
- name
- rule_ids
type: object
FrameworkData:
description: Framework Data.
properties:
description:
description: Framework Description
type: string
handle:
description: Framework Handle
example: ''
type: string
icon_url:
description: Framework Icon URL
type: string
name:
description: Framework Name
example: ''
type: string
requirements:
description: Framework Requirements
items:
$ref: '#/components/schemas/FrameworkRequirement'
type: array
version:
description: Framework Version
example: ''
type: string
required:
- handle
- version
- name
- requirements
type: object
FrameworkRequirement:
description: Framework Requirement.
properties:
controls:
description: Requirement Controls.
items:
$ref: '#/components/schemas/FrameworkControl'
type: array
name:
description: Requirement Name.
example: ''
type: string
required:
- name
- controls
type: object
FullAPIKey:
description: Datadog API key.
properties:
Expand Down Expand Up @@ -28953,6 +29037,10 @@ components:
deployment:
$ref: '#/components/schemas/DeploymentRelationship'
type: object
UpdateCustomFrameworkRequest:
$ref: '#/components/schemas/FrameworkData'
description: Update a custom framework.
type: object
UpdateOpenAPIResponse:
description: Response for `UpdateOpenAPI`.
properties:
Expand Down Expand Up @@ -33028,6 +33116,83 @@ paths:
operator: OR
permissions:
- ci_visibility_read
/api/v2/cloud_security_management/custom_frameworks:
post:
description: Create a custom framework.
operationId: CreateCustomFramework
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCustomFrameworkRequest'
required: true
responses:
'200':
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
'500':
$ref: '#/components/responses/BadRequestResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- security_monitoring_rules_read
- security_monitoring_rules_write
summary: Create a custom framework
tags:
- Security Monitoring
x-codegen-request-body-name: body
x-permission:
operator: AND
permissions:
- security_monitoring_rules_read
- security_monitoring_rules_write
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.

Please check the documentation regularly for updates.'
/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}:
put:
description: Update a custom framework.
operationId: UpdateCustomFramework
parameters:
- $ref: '#/components/parameters/FrameworkHandle'
- $ref: '#/components/parameters/FrameworkVersion'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCustomFrameworkRequest'
required: true
responses:
'200':
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
'500':
$ref: '#/components/responses/BadRequestResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- security_monitoring_rules_read
- security_monitoring_rules_write
summary: Update a custom framework
tags:
- Security Monitoring
x-codegen-request-body-name: body
x-permission:
operator: AND
permissions:
- security_monitoring_rules_read
- security_monitoring_rules_write
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.

Please check the documentation regularly for updates.'
/api/v2/container_images:
get:
description: Get all Container Images for your organization.
Expand Down
28 changes: 28 additions & 0 deletions examples/v2_security-monitoring_CreateCustomFramework.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Create a custom framework returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;
use datadog_api_client::datadogV2::model::CreateCustomFrameworkRequest;
use datadog_api_client::datadogV2::model::FrameworkControl;
use datadog_api_client::datadogV2::model::FrameworkRequirement;

#[tokio::main]
async fn main() {
let body = CreateCustomFrameworkRequest::new(
"".to_string(),
"".to_string(),
vec![FrameworkRequirement::new(
vec![FrameworkControl::new("".to_string(), vec!["".to_string()])],
"".to_string(),
)],
"".to_string(),
);
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.CreateCustomFramework", true);
let api = SecurityMonitoringAPI::with_config(configuration);
let resp = api.create_custom_framework(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
30 changes: 30 additions & 0 deletions examples/v2_security-monitoring_UpdateCustomFramework.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Update a custom framework returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;
use datadog_api_client::datadogV2::model::FrameworkControl;
use datadog_api_client::datadogV2::model::FrameworkRequirement;
use datadog_api_client::datadogV2::model::UpdateCustomFrameworkRequest;

#[tokio::main]
async fn main() {
let body = UpdateCustomFrameworkRequest::new(
"".to_string(),
"".to_string(),
vec![FrameworkRequirement::new(
vec![FrameworkControl::new("".to_string(), vec!["".to_string()])],
"".to_string(),
)],
"".to_string(),
);
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.UpdateCustomFramework", true);
let api = SecurityMonitoringAPI::with_config(configuration);
let resp = api
.update_custom_framework("handle".to_string(), "version".to_string(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
24 changes: 13 additions & 11 deletions src/datadog/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,19 @@ impl Default for Configuration {
("v2.get_app".to_owned(), false),
("v2.list_apps".to_owned(), false),
("v2.update_app".to_owned(), false),
("v2.cancel_historical_job".to_owned(), false),
("v2.convert_job_result_to_signal".to_owned(), false),
("v2.create_custom_framework".to_owned(), false),
("v2.delete_historical_job".to_owned(), false),
("v2.get_finding".to_owned(), false),
("v2.get_historical_job".to_owned(), false),
("v2.list_findings".to_owned(), false),
("v2.list_historical_jobs".to_owned(), false),
("v2.list_vulnerabilities".to_owned(), false),
("v2.list_vulnerable_assets".to_owned(), false),
("v2.mute_findings".to_owned(), false),
("v2.run_historical_job".to_owned(), false),
("v2.update_custom_framework".to_owned(), false),
("v2.get_active_billing_dimensions".to_owned(), false),
("v2.get_billing_dimension_mapping".to_owned(), false),
("v2.get_monthly_cost_attribution".to_owned(), false),
Expand Down Expand Up @@ -181,17 +194,6 @@ impl Default for Configuration {
("v2.list_aws_namespaces".to_owned(), false),
("v2.update_aws_account".to_owned(), false),
("v2.list_aws_logs_services".to_owned(), false),
("v2.cancel_historical_job".to_owned(), false),
("v2.convert_job_result_to_signal".to_owned(), false),
("v2.delete_historical_job".to_owned(), false),
("v2.get_finding".to_owned(), false),
("v2.get_historical_job".to_owned(), false),
("v2.list_findings".to_owned(), false),
("v2.list_historical_jobs".to_owned(), false),
("v2.list_vulnerabilities".to_owned(), false),
("v2.list_vulnerable_assets".to_owned(), false),
("v2.mute_findings".to_owned(), false),
("v2.run_historical_job".to_owned(), false),
("v2.create_scorecard_outcomes_batch".to_owned(), false),
("v2.create_scorecard_rule".to_owned(), false),
("v2.delete_scorecard_rule".to_owned(), false),
Expand Down
Loading

0 comments on commit 209ee7b

Please sign in to comment.