Skip to content

Commit ec60d46

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add OpenAPI documentation for security monitoring content packs endpoints (#3146)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent f952c8a commit ec60d46

20 files changed

+1160
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52613,6 +52613,153 @@ components:
5261352613
x-enum-varnames:
5261452614
- DONE
5261552615
- TIMEOUT
52616+
SecurityMonitoringContentPackActivation:
52617+
description: The activation status of a content pack
52618+
enum:
52619+
- never_activated
52620+
- activated
52621+
- deactivated
52622+
example: activated
52623+
type: string
52624+
x-enum-varnames:
52625+
- NEVER_ACTIVATED
52626+
- ACTIVATED
52627+
- DEACTIVATED
52628+
SecurityMonitoringContentPackIntegrationStatus:
52629+
description: The installation status of the related integration
52630+
enum:
52631+
- installed
52632+
- available
52633+
- partially_installed
52634+
- detected
52635+
- error
52636+
example: installed
52637+
type: string
52638+
x-enum-varnames:
52639+
- INSTALLED
52640+
- AVAILABLE
52641+
- PARTIALLY_INSTALLED
52642+
- DETECTED
52643+
- ERROR
52644+
SecurityMonitoringContentPackStateAttributes:
52645+
description: Attributes of a content pack state
52646+
properties:
52647+
cloud_siem_index_incorrect:
52648+
description: Whether the cloud SIEM index configuration is incorrect (only
52649+
applies to certain pricing models)
52650+
example: false
52651+
type: boolean
52652+
cp_activation:
52653+
$ref: '#/components/schemas/SecurityMonitoringContentPackActivation'
52654+
filters_configured_for_logs:
52655+
description: Whether filters (Security Filters or Index Query depending
52656+
on the pricing model) are configured for logs
52657+
example: true
52658+
type: boolean
52659+
integration_installed_status:
52660+
$ref: '#/components/schemas/SecurityMonitoringContentPackIntegrationStatus'
52661+
logs_last_collected:
52662+
$ref: '#/components/schemas/SecurityMonitoringContentPackTimestampBucket'
52663+
logs_seen_from_any_index:
52664+
description: Whether logs have been seen from any index
52665+
example: true
52666+
type: boolean
52667+
state:
52668+
$ref: '#/components/schemas/SecurityMonitoringContentPackStatus'
52669+
required:
52670+
- state
52671+
- cp_activation
52672+
- logs_seen_from_any_index
52673+
- logs_last_collected
52674+
- cloud_siem_index_incorrect
52675+
- filters_configured_for_logs
52676+
type: object
52677+
SecurityMonitoringContentPackStateData:
52678+
description: Content pack state data.
52679+
properties:
52680+
attributes:
52681+
$ref: '#/components/schemas/SecurityMonitoringContentPackStateAttributes'
52682+
id:
52683+
description: The content pack identifier.
52684+
example: aws-cloudtrail
52685+
type: string
52686+
type:
52687+
$ref: '#/components/schemas/SecurityMonitoringContentPackStateType'
52688+
required:
52689+
- id
52690+
- type
52691+
- attributes
52692+
type: object
52693+
SecurityMonitoringContentPackStateMeta:
52694+
description: Metadata for content pack states
52695+
properties:
52696+
cloud_siem_index_incorrect:
52697+
description: Whether the cloud SIEM index configuration is incorrect at
52698+
the organization level
52699+
example: false
52700+
type: boolean
52701+
sku:
52702+
$ref: '#/components/schemas/SecurityMonitoringSKU'
52703+
required:
52704+
- cloud_siem_index_incorrect
52705+
- sku
52706+
type: object
52707+
SecurityMonitoringContentPackStateType:
52708+
description: Type for content pack state object
52709+
enum:
52710+
- content_pack_state
52711+
example: content_pack_state
52712+
type: string
52713+
x-enum-varnames:
52714+
- CONTENT_PACK_STATE
52715+
SecurityMonitoringContentPackStatesResponse:
52716+
description: Response containing content pack states.
52717+
properties:
52718+
data:
52719+
description: Array of content pack states.
52720+
items:
52721+
$ref: '#/components/schemas/SecurityMonitoringContentPackStateData'
52722+
type: array
52723+
meta:
52724+
$ref: '#/components/schemas/SecurityMonitoringContentPackStateMeta'
52725+
required:
52726+
- data
52727+
- meta
52728+
type: object
52729+
SecurityMonitoringContentPackStatus:
52730+
description: The current status of a content pack
52731+
enum:
52732+
- install
52733+
- activate
52734+
- initializing
52735+
- active
52736+
- warning
52737+
- broken
52738+
example: active
52739+
type: string
52740+
x-enum-varnames:
52741+
- INSTALL
52742+
- ACTIVATE
52743+
- INITIALIZING
52744+
- ACTIVE
52745+
- WARNING
52746+
- BROKEN
52747+
SecurityMonitoringContentPackTimestampBucket:
52748+
description: Timestamp bucket indicating when logs were last collected
52749+
enum:
52750+
- not_seen
52751+
- within_24_hours
52752+
- within_24_to_72_hours
52753+
- over_72h_to_30d
52754+
- over_30d
52755+
example: within_24_hours
52756+
type: string
52757+
x-enum-varnames:
52758+
- NOT_SEEN
52759+
- WITHIN_24_HOURS
52760+
- WITHIN_24_TO_72_HOURS
52761+
- OVER_72H_TO_30D
52762+
- OVER_30D
5261652763
SecurityMonitoringCriticalAsset:
5261752764
description: The critical asset's properties.
5261852765
properties:
@@ -53740,6 +53887,18 @@ components:
5374053887
- $ref: '#/components/schemas/SecurityMonitoringStandardRulePayload'
5374153888
- $ref: '#/components/schemas/SecurityMonitoringSignalRulePayload'
5374253889
- $ref: '#/components/schemas/CloudConfigurationRulePayload'
53890+
SecurityMonitoringSKU:
53891+
description: The SIEM pricing model (SKU) for the organization
53892+
enum:
53893+
- per_gb_analyzed
53894+
- per_event_in_siem_index_2023
53895+
- add_on_2024
53896+
example: add_on_2024
53897+
type: string
53898+
x-enum-varnames:
53899+
- PER_GB_ANALYZED
53900+
- PER_EVENT_IN_SIEM_INDEX_2023
53901+
- ADD_ON_2024
5374353902
SecurityMonitoringSchedulingOptions:
5374453903
description: Options for scheduled rules. When this field is present, the rule
5374553904
runs based on the schedule. When absent, it runs real-time on ingested logs.
@@ -94103,6 +94262,123 @@ paths:
9410394262
summary: Get a suppression's version history
9410494263
tags:
9410594264
- Security Monitoring
94265+
/api/v2/security_monitoring/content_packs/states:
94266+
get:
94267+
description: 'Get the activation and configuration states for all security monitoring
94268+
content packs.
94269+
94270+
This endpoint returns status information about each content pack including
94271+
activation state,
94272+
94273+
integration status, and log collection status.'
94274+
operationId: GetContentPacksStates
94275+
responses:
94276+
'200':
94277+
content:
94278+
application/json:
94279+
schema:
94280+
$ref: '#/components/schemas/SecurityMonitoringContentPackStatesResponse'
94281+
description: OK
94282+
'403':
94283+
content:
94284+
application/json:
94285+
schema:
94286+
$ref: '#/components/schemas/JSONAPIErrorResponse'
94287+
description: Forbidden
94288+
'404':
94289+
content:
94290+
application/json:
94291+
schema:
94292+
$ref: '#/components/schemas/JSONAPIErrorResponse'
94293+
description: Not Found
94294+
'429':
94295+
$ref: '#/components/responses/TooManyRequestsResponse'
94296+
summary: Get content pack states
94297+
tags:
94298+
- Security Monitoring
94299+
x-unstable: '**Note**: This endpoint is in preview and is subject to change.
94300+
94301+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
94302+
/api/v2/security_monitoring/content_packs/{content_pack_id}/activate:
94303+
put:
94304+
description: 'Activate a security monitoring content pack. This operation configures
94305+
the necessary
94306+
94307+
log filters or security filters depending on the pricing model and updates
94308+
the content
94309+
94310+
pack activation state.'
94311+
operationId: ActivateContentPack
94312+
parameters:
94313+
- description: The ID of the content pack to activate.
94314+
in: path
94315+
name: content_pack_id
94316+
required: true
94317+
schema:
94318+
example: aws-cloudtrail
94319+
type: string
94320+
responses:
94321+
'202':
94322+
description: Accepted
94323+
'403':
94324+
content:
94325+
application/json:
94326+
schema:
94327+
$ref: '#/components/schemas/JSONAPIErrorResponse'
94328+
description: Forbidden
94329+
'404':
94330+
content:
94331+
application/json:
94332+
schema:
94333+
$ref: '#/components/schemas/JSONAPIErrorResponse'
94334+
description: Not Found
94335+
'429':
94336+
$ref: '#/components/responses/TooManyRequestsResponse'
94337+
summary: Activate content pack
94338+
tags:
94339+
- Security Monitoring
94340+
x-unstable: '**Note**: This endpoint is in preview and is subject to change.
94341+
94342+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
94343+
/api/v2/security_monitoring/content_packs/{content_pack_id}/deactivate:
94344+
put:
94345+
description: 'Deactivate a security monitoring content pack. This operation
94346+
removes the content pack''s
94347+
94348+
configuration from log filters or security filters and updates the content
94349+
pack activation state.'
94350+
operationId: DeactivateContentPack
94351+
parameters:
94352+
- description: The ID of the content pack to deactivate.
94353+
in: path
94354+
name: content_pack_id
94355+
required: true
94356+
schema:
94357+
example: aws-cloudtrail
94358+
type: string
94359+
responses:
94360+
'202':
94361+
description: Accepted
94362+
'403':
94363+
content:
94364+
application/json:
94365+
schema:
94366+
$ref: '#/components/schemas/JSONAPIErrorResponse'
94367+
description: Forbidden
94368+
'404':
94369+
content:
94370+
application/json:
94371+
schema:
94372+
$ref: '#/components/schemas/JSONAPIErrorResponse'
94373+
description: Not Found
94374+
'429':
94375+
$ref: '#/components/responses/TooManyRequestsResponse'
94376+
summary: Deactivate content pack
94377+
tags:
94378+
- Security Monitoring
94379+
x-unstable: '**Note**: This endpoint is in preview and is subject to change.
94380+
94381+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
9410694382
/api/v2/security_monitoring/rules:
9410794383
get:
9410894384
description: List rules.

docs/datadog_api_client.v2.model.rst

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23195,6 +23195,69 @@ datadog\_api\_client.v2.model.security\_findings\_status module
2319523195
:members:
2319623196
:show-inheritance:
2319723197

23198+
datadog\_api\_client.v2.model.security\_monitoring\_content\_pack\_activation module
23199+
------------------------------------------------------------------------------------
23200+
23201+
.. automodule:: datadog_api_client.v2.model.security_monitoring_content_pack_activation
23202+
:members:
23203+
:show-inheritance:
23204+
23205+
datadog\_api\_client.v2.model.security\_monitoring\_content\_pack\_integration\_status module
23206+
---------------------------------------------------------------------------------------------
23207+
23208+
.. automodule:: datadog_api_client.v2.model.security_monitoring_content_pack_integration_status
23209+
:members:
23210+
:show-inheritance:
23211+
23212+
datadog\_api\_client.v2.model.security\_monitoring\_content\_pack\_state\_attributes module
23213+
-------------------------------------------------------------------------------------------
23214+
23215+
.. automodule:: datadog_api_client.v2.model.security_monitoring_content_pack_state_attributes
23216+
:members:
23217+
:show-inheritance:
23218+
23219+
datadog\_api\_client.v2.model.security\_monitoring\_content\_pack\_state\_data module
23220+
-------------------------------------------------------------------------------------
23221+
23222+
.. automodule:: datadog_api_client.v2.model.security_monitoring_content_pack_state_data
23223+
:members:
23224+
:show-inheritance:
23225+
23226+
datadog\_api\_client.v2.model.security\_monitoring\_content\_pack\_state\_meta module
23227+
-------------------------------------------------------------------------------------
23228+
23229+
.. automodule:: datadog_api_client.v2.model.security_monitoring_content_pack_state_meta
23230+
:members:
23231+
:show-inheritance:
23232+
23233+
datadog\_api\_client.v2.model.security\_monitoring\_content\_pack\_state\_type module
23234+
-------------------------------------------------------------------------------------
23235+
23236+
.. automodule:: datadog_api_client.v2.model.security_monitoring_content_pack_state_type
23237+
:members:
23238+
:show-inheritance:
23239+
23240+
datadog\_api\_client.v2.model.security\_monitoring\_content\_pack\_states\_response module
23241+
------------------------------------------------------------------------------------------
23242+
23243+
.. automodule:: datadog_api_client.v2.model.security_monitoring_content_pack_states_response
23244+
:members:
23245+
:show-inheritance:
23246+
23247+
datadog\_api\_client.v2.model.security\_monitoring\_content\_pack\_status module
23248+
--------------------------------------------------------------------------------
23249+
23250+
.. automodule:: datadog_api_client.v2.model.security_monitoring_content_pack_status
23251+
:members:
23252+
:show-inheritance:
23253+
23254+
datadog\_api\_client.v2.model.security\_monitoring\_content\_pack\_timestamp\_bucket module
23255+
-------------------------------------------------------------------------------------------
23256+
23257+
.. automodule:: datadog_api_client.v2.model.security_monitoring_content_pack_timestamp_bucket
23258+
:members:
23259+
:show-inheritance:
23260+
2319823261
datadog\_api\_client.v2.model.security\_monitoring\_critical\_asset module
2319923262
--------------------------------------------------------------------------
2320023263

@@ -23888,6 +23951,13 @@ datadog\_api\_client.v2.model.security\_monitoring\_signals\_sort module
2388823951
:members:
2388923952
:show-inheritance:
2389023953

23954+
datadog\_api\_client.v2.model.security\_monitoring\_sku module
23955+
--------------------------------------------------------------
23956+
23957+
.. automodule:: datadog_api_client.v2.model.security_monitoring_sku
23958+
:members:
23959+
:show-inheritance:
23960+
2389123961
datadog\_api\_client.v2.model.security\_monitoring\_standard\_data\_source module
2389223962
---------------------------------------------------------------------------------
2389323963

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Activate content pack returns "Accepted" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["activate_content_pack"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = SecurityMonitoringApi(api_client)
12+
api_instance.activate_content_pack(
13+
content_pack_id="aws-cloudtrail",
14+
)

0 commit comments

Comments
 (0)