From d511c3417cb7f02ed2a62ab4fdd17dfa6898eae4 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 8 Jul 2026 14:21:11 +0000 Subject: [PATCH] Regenerate client from commit 1a38ab6 of spec repo --- .generator/schemas/v2/openapi.yaml | 311 +++++++++++++++++- .../ActivateIntegration.rb | 22 ++ .../DeactivateIntegration.rb | 8 + .../GetEntraIdAzureAppRegistrations.rb | 8 + features/scenarios_model_mapping.rb | 7 + features/v2/security_monitoring.feature | 50 +++ features/v2/undo.json | 18 + lib/datadog_api_client/configuration.rb | 3 + lib/datadog_api_client/inflector.rb | 9 + .../v2/api/security_monitoring_api.rb | 214 ++++++++++++ ...urity_monitoring_azure_app_registration.rb | 207 ++++++++++++ ...a_id_azure_app_registrations_attributes.rb | 176 ++++++++++ ...g_entra_id_azure_app_registrations_data.rb | 165 ++++++++++ ...d_azure_app_registrations_resource_type.rb | 26 ++ ...tra_id_azure_app_registrations_response.rb | 123 +++++++ ...itoring_integration_activate_attributes.rb | 125 +++++++ ...ty_monitoring_integration_activate_data.rb | 115 +++++++ ...monitoring_integration_activate_request.rb | 105 ++++++ ...ring_integration_activate_resource_type.rb | 26 ++ ...ng_integration_config_create_attributes.rb | 16 +- ...ng_integration_config_update_attributes.rb | 3 +- ...gration_credentials_validate_attributes.rb | 16 +- 22 files changed, 1723 insertions(+), 30 deletions(-) create mode 100644 examples/v2/security-monitoring/ActivateIntegration.rb create mode 100644 examples/v2/security-monitoring/DeactivateIntegration.rb create mode 100644 examples/v2/security-monitoring/GetEntraIdAzureAppRegistrations.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_azure_app_registration.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_data.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_response.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_integration_activate_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_integration_activate_data.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_integration_activate_request.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_integration_activate_resource_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3661bf3fc2f3..6fb83718399c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -87258,6 +87258,38 @@ components: x-enum-varnames: - DONE - TIMEOUT + SecurityMonitoringAzureAppRegistration: + description: An Azure App Registration discovered for the organization. + properties: + client_id: + description: The client ID of the App Registration. + example: 66666666-7777-8888-9999-000000000000 + type: string + error_count: + description: The number of errors encountered while crawling resources for this App Registration. + example: 0 + format: int64 + type: integer + resource_collection_enabled: + description: Whether resource collection is enabled for this App Registration. + example: true + type: boolean + subscription_count: + description: The number of Azure subscriptions associated with this App Registration. + example: 3 + format: int64 + type: integer + tenant_id: + description: The Azure tenant ID of the App Registration. + example: 11111111-2222-3333-4444-555555555555 + type: string + required: + - tenant_id + - client_id + - resource_collection_enabled + - subscription_count + - error_count + type: object SecurityMonitoringContentPackActivation: description: The activation status of a content pack. enum: @@ -88153,6 +88185,68 @@ components: (for example, `siem_entity_identity` for identities). Defaults to `entity` when the kind is unknown. example: siem_entity_identity type: string + SecurityMonitoringEntraIdAzureAppRegistrationsAttributes: + description: The attributes of the Entra ID Azure App Registration prerequisites. + properties: + azure_app_registrations: + description: The Azure App Registrations discovered for the organization. + items: + $ref: "#/components/schemas/SecurityMonitoringAzureAppRegistration" + type: array + has_valid_prerequisite: + description: Whether at least one Azure App Registration has resource collection enabled. + example: true + type: boolean + integration_id: + description: The ID of the Entra ID integration configuration, if one exists. + example: 11111111-2222-3333-4444-555555555555 + type: string + is_enabled: + description: Whether the Entra ID integration configuration is enabled, if one exists. + example: true + type: boolean + subscribed_at: + description: The time at which the Entra ID integration configuration was created, if one exists. + example: "2026-05-01T12:00:00Z" + format: date-time + type: string + required: + - azure_app_registrations + - has_valid_prerequisite + type: object + SecurityMonitoringEntraIdAzureAppRegistrationsData: + description: The Azure App Registration prerequisites for the Entra ID integration. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringEntraIdAzureAppRegistrationsAttributes" + id: + description: The ID of the organization the Azure App Registrations belong to. + example: "123456" + type: string + type: + $ref: "#/components/schemas/SecurityMonitoringEntraIdAzureAppRegistrationsResourceType" + required: + - id + - type + - attributes + type: object + SecurityMonitoringEntraIdAzureAppRegistrationsResourceType: + default: entra_id_azure_app_registrations + description: The type of the resource. The value should always be `entra_id_azure_app_registrations`. + enum: + - entra_id_azure_app_registrations + example: entra_id_azure_app_registrations + type: string + x-enum-varnames: + - ENTRA_ID_AZURE_APP_REGISTRATIONS + SecurityMonitoringEntraIdAzureAppRegistrationsResponse: + description: Response containing the Azure App Registration prerequisites for the Entra ID integration. + properties: + data: + $ref: "#/components/schemas/SecurityMonitoringEntraIdAzureAppRegistrationsData" + required: + - data + type: object SecurityMonitoringFilter: description: The rule's suppression filter. properties: @@ -88171,6 +88265,43 @@ components: x-enum-varnames: - REQUIRE - SUPPRESS + SecurityMonitoringIntegrationActivateAttributes: + description: Overrides applied when activating the integration. All fields are optional. + properties: + domain: + description: The domain associated with the external entity source. + example: default + type: string + name: + description: The display name for the entity context sync configuration. + example: My Entra ID Integration + type: string + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + type: object + SecurityMonitoringIntegrationActivateData: + description: The configuration overrides for the integration to activate. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringIntegrationActivateAttributes" + type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationActivateResourceType" + type: object + SecurityMonitoringIntegrationActivateRequest: + description: Request body to activate an entity context sync integration for a source type that does not require secrets. + properties: + data: + $ref: "#/components/schemas/SecurityMonitoringIntegrationActivateData" + type: object + SecurityMonitoringIntegrationActivateResourceType: + default: activate_entra_id_request + description: The type of the resource. The value should always be `activate_entra_id_request`. + enum: + - activate_entra_id_request + example: activate_entra_id_request + type: string + x-enum-varnames: + - ACTIVATE_ENTRA_ID_REQUEST SecurityMonitoringIntegrationConfigAttributes: description: The attributes of an entity context sync configuration as returned by the API. properties: @@ -88228,7 +88359,6 @@ components: - integration_type - domain - name - - secrets type: object SecurityMonitoringIntegrationConfigCreateData: description: The entity context sync configuration to create. @@ -88284,7 +88414,9 @@ components: type: object SecurityMonitoringIntegrationConfigSecrets: additionalProperties: {} - description: The secrets used to authenticate against the external entity source. The accepted keys depend on the source type (for example, `admin_email` for Google Workspace). + description: |- + The secrets used to authenticate against the external entity source. The accepted keys depend on the source type + (for example, `admin_email` for Google Workspace). Not required for source types that do not use secrets (for example, `ENTRA_ID`). example: admin_email: test@example.com type: object @@ -88372,7 +88504,6 @@ components: required: - integration_type - domain - - secrets type: object SecurityMonitoringIntegrationCredentialsValidateData: description: The credentials to validate. @@ -178092,6 +178223,54 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security_monitoring/configuration/integration_config/entra_id/azure_app_registrations: + get: + description: |- + Get the Azure App Registrations discovered for the organization and whether at least one of them has + resource collection enabled, which is a prerequisite for activating the Entra ID entity context sync integration. + operationId: GetEntraIdAzureAppRegistrations + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + azure_app_registrations: + - client_id: 66666666-7777-8888-9999-000000000000 + error_count: 0 + resource_collection_enabled: true + subscription_count: 3 + tenant_id: 11111111-2222-3333-4444-555555555555 + has_valid_prerequisite: true + integration_id: 11111111-2222-3333-4444-555555555555 + is_enabled: true + subscribed_at: "2026-05-01T12:00:00Z" + id: "123456" + type: entra_id_azure_app_registrations + schema: + $ref: "#/components/schemas/SecurityMonitoringEntraIdAzureAppRegistrationsResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - integrations_read + summary: Get Entra ID Azure App Registration prerequisites + tags: ["Security Monitoring"] + x-permission: + operator: OR + permissions: + - integrations_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security_monitoring/configuration/integration_config/validate: post: description: |- @@ -178317,6 +178496,132 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security_monitoring/configuration/integration_config/{integration_type}/activate: + post: + description: |- + Activate an entity context sync integration for a source type that does not require manually + supplied credentials (for example, Entra ID). If an integration of this type already exists, + it is returned (re-enabling it first if it was disabled) instead of creating a duplicate. + operationId: ActivateIntegration + parameters: + - description: The integration type to activate (for example, `entra_id`). + in: path + name: integration_type + required: true + schema: + example: entra_id + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + name: My Entra ID Integration + type: activate_entra_id_request + schema: + $ref: "#/components/schemas/SecurityMonitoringIntegrationActivateRequest" + description: Optional configuration overrides for the integration to activate. + required: false + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-05-01T12:00:00Z" + domain: default + enabled: true + integration_type: ENTRA_ID + modified_at: "2026-05-01T12:00:00Z" + name: My Entra ID Integration + state: valid + id: 11111111-2222-3333-4444-555555555555 + type: integration_config + schema: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - manage_integrations + summary: Activate an entity context sync integration + tags: ["Security Monitoring"] + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security_monitoring/configuration/integration_config/{integration_type}/deactivate: + post: + description: Deactivate all active entity context sync integrations of the given source type (for example, Entra ID). + operationId: DeactivateIntegration + parameters: + - description: The integration type to deactivate (for example, `entra_id`). + in: path + name: integration_type + required: true + schema: + example: entra_id + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-05-01T12:00:00Z" + domain: default + enabled: false + integration_type: ENTRA_ID + modified_at: "2026-05-08T12:00:00Z" + name: My Entra ID Integration + state: valid + id: 11111111-2222-3333-4444-555555555555 + type: integration_config + schema: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - manage_integrations + summary: Deactivate an entity context sync integration + tags: ["Security Monitoring"] + x-permission: + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security_monitoring/configuration/notification_rules/send_notification_preview: post: description: Send a notification preview to test that a notification rule's targets are properly configured. diff --git a/examples/v2/security-monitoring/ActivateIntegration.rb b/examples/v2/security-monitoring/ActivateIntegration.rb new file mode 100644 index 000000000000..b36144b94243 --- /dev/null +++ b/examples/v2/security-monitoring/ActivateIntegration.rb @@ -0,0 +1,22 @@ +# Activate an entity context sync integration returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.activate_integration".to_sym] = true +end +api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new + +body = DatadogAPIClient::V2::SecurityMonitoringIntegrationActivateRequest.new({ + data: DatadogAPIClient::V2::SecurityMonitoringIntegrationActivateData.new({ + attributes: DatadogAPIClient::V2::SecurityMonitoringIntegrationActivateAttributes.new({ + domain: "default", + name: "My Entra ID Integration", + settings: DatadogAPIClient::V2::SecurityMonitoringIntegrationConfigSettings.new({}), + }), + type: DatadogAPIClient::V2::SecurityMonitoringIntegrationActivateResourceType::ACTIVATE_ENTRA_ID_REQUEST, + }), +}) +opts = { + body: body, +} +p api_instance.activate_integration("entra_id", opts) diff --git a/examples/v2/security-monitoring/DeactivateIntegration.rb b/examples/v2/security-monitoring/DeactivateIntegration.rb new file mode 100644 index 000000000000..ed302be52978 --- /dev/null +++ b/examples/v2/security-monitoring/DeactivateIntegration.rb @@ -0,0 +1,8 @@ +# Deactivate an entity context sync integration returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.deactivate_integration".to_sym] = true +end +api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new +p api_instance.deactivate_integration("entra_id") diff --git a/examples/v2/security-monitoring/GetEntraIdAzureAppRegistrations.rb b/examples/v2/security-monitoring/GetEntraIdAzureAppRegistrations.rb new file mode 100644 index 000000000000..7c2f65b3d6a0 --- /dev/null +++ b/examples/v2/security-monitoring/GetEntraIdAzureAppRegistrations.rb @@ -0,0 +1,8 @@ +# Get Entra ID Azure App Registration prerequisites returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_entra_id_azure_app_registrations".to_sym] = true +end +api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new +p api_instance.get_entra_id_azure_app_registrations() diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 9ca74170ce5e..f4cb633ab3a6 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2324,6 +2324,13 @@ "v2.ValidateSecurityMonitoringIntegrationConfig" => { "integration_config_id" => "String", }, + "v2.ActivateIntegration" => { + "integration_type" => "String", + "body" => "SecurityMonitoringIntegrationActivateRequest", + }, + "v2.DeactivateIntegration" => { + "integration_type" => "String", + }, "v2.SendSecurityMonitoringNotificationPreview" => { "body" => "CreateNotificationRuleParameters", }, diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index c204c1d587fc..e2fb1a68b9f8 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -9,6 +9,33 @@ Feature: Security Monitoring And a valid "appKeyAuth" key in the system And an instance of "SecurityMonitoring" API + @generated @skip @team:DataDog/cloud-siem + Scenario: Activate an entity context sync integration returns "Bad Request" response + Given operation "ActivateIntegration" enabled + And new "ActivateIntegration" request + And request contains "integration_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"domain": "default", "name": "My Entra ID Integration", "settings": {"setting1": "value1"}}, "type": "activate_entra_id_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-siem + Scenario: Activate an entity context sync integration returns "Not Found" response + Given operation "ActivateIntegration" enabled + And new "ActivateIntegration" request + And request contains "integration_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"domain": "default", "name": "My Entra ID Integration", "settings": {"setting1": "value1"}}, "type": "activate_entra_id_request"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/cloud-siem + Scenario: Activate an entity context sync integration returns "OK" response + Given operation "ActivateIntegration" enabled + And new "ActivateIntegration" request + And request contains "integration_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"domain": "default", "name": "My Entra ID Integration", "settings": {"setting1": "value1"}}, "type": "activate_entra_id_request"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-siem Scenario: Activate content pack returns "Accepted" response Given operation "ActivateContentPack" enabled @@ -1093,6 +1120,22 @@ Feature: Security Monitoring When the request is sent Then the response status is 201 Created + @generated @skip @team:DataDog/cloud-siem + Scenario: Deactivate an entity context sync integration returns "Not Found" response + Given operation "DeactivateIntegration" enabled + And new "DeactivateIntegration" request + And request contains "integration_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/cloud-siem + Scenario: Deactivate an entity context sync integration returns "OK" response + Given operation "DeactivateIntegration" enabled + And new "DeactivateIntegration" request + And request contains "integration_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-siem Scenario: Deactivate content pack returns "Accepted" response Given operation "DeactivateContentPack" enabled @@ -1439,6 +1482,13 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-siem + Scenario: Get Entra ID Azure App Registration prerequisites returns "OK" response + Given operation "GetEntraIdAzureAppRegistrations" enabled + And new "GetEntraIdAzureAppRegistrations" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/k9-cloud-vm Scenario: Get SBOM returns "Bad request: The server cannot process the request due to invalid syntax in the request." response Given new "GetSBOM" request diff --git a/features/v2/undo.json b/features/v2/undo.json index 9db948088ae6..1eaba52ee9bf 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -7526,6 +7526,12 @@ "type": "unsafe" } }, + "GetEntraIdAzureAppRegistrations": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, "ValidateSecurityMonitoringIntegrationCredentials": { "tag": "Security Monitoring", "undo": { @@ -7556,6 +7562,18 @@ "type": "safe" } }, + "ActivateIntegration": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "DeactivateIntegration": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, "SendSecurityMonitoringNotificationPreview": { "tag": "Security Monitoring", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index e962893abe58..5b2130e9913c 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -337,6 +337,7 @@ def initialize "v2.get_aws_cloud_auth_persona_mapping": false, "v2.list_aws_cloud_auth_persona_mappings": false, "v2.activate_content_pack": false, + "v2.activate_integration": false, "v2.attach_linear_issue": false, "v2.batch_get_security_monitoring_dataset_dependencies": false, "v2.bulk_create_sample_log_generation_subscriptions": false, @@ -355,6 +356,7 @@ def initialize "v2.create_static_analysis_ast": false, "v2.create_static_analysis_server_analysis": false, "v2.deactivate_content_pack": false, + "v2.deactivate_integration": false, "v2.delete_historical_job": false, "v2.delete_sample_log_generation_subscription": false, "v2.delete_security_findings_automation_due_date_rule": false, @@ -365,6 +367,7 @@ def initialize "v2.export_security_monitoring_terraform_resource": false, "v2.get_content_packs_states": false, "v2.get_entity_context": false, + "v2.get_entra_id_azure_app_registrations": false, "v2.get_finding": false, "v2.get_historical_job": false, "v2.get_indicator_of_compromise": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index cdff09d5da7f..059ca14d65e8 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -6421,6 +6421,7 @@ def overrides "v2.security_findings_sort" => "SecurityFindingsSort", "v2.security_findings_status" => "SecurityFindingsStatus", "v2.security_finding_type" => "SecurityFindingType", + "v2.security_monitoring_azure_app_registration" => "SecurityMonitoringAzureAppRegistration", "v2.security_monitoring_content_pack_activation" => "SecurityMonitoringContentPackActivation", "v2.security_monitoring_content_pack_integration_status" => "SecurityMonitoringContentPackIntegrationStatus", "v2.security_monitoring_content_pack_state_attributes" => "SecurityMonitoringContentPackStateAttributes", @@ -6474,8 +6475,16 @@ def overrides "v2.security_monitoring_dataset_version_history_data" => "SecurityMonitoringDatasetVersionHistoryData", "v2.security_monitoring_dataset_version_history_response" => "SecurityMonitoringDatasetVersionHistoryResponse", "v2.security_monitoring_dataset_version_history_type" => "SecurityMonitoringDatasetVersionHistoryType", + "v2.security_monitoring_entra_id_azure_app_registrations_attributes" => "SecurityMonitoringEntraIdAzureAppRegistrationsAttributes", + "v2.security_monitoring_entra_id_azure_app_registrations_data" => "SecurityMonitoringEntraIdAzureAppRegistrationsData", + "v2.security_monitoring_entra_id_azure_app_registrations_resource_type" => "SecurityMonitoringEntraIdAzureAppRegistrationsResourceType", + "v2.security_monitoring_entra_id_azure_app_registrations_response" => "SecurityMonitoringEntraIdAzureAppRegistrationsResponse", "v2.security_monitoring_filter" => "SecurityMonitoringFilter", "v2.security_monitoring_filter_action" => "SecurityMonitoringFilterAction", + "v2.security_monitoring_integration_activate_attributes" => "SecurityMonitoringIntegrationActivateAttributes", + "v2.security_monitoring_integration_activate_data" => "SecurityMonitoringIntegrationActivateData", + "v2.security_monitoring_integration_activate_request" => "SecurityMonitoringIntegrationActivateRequest", + "v2.security_monitoring_integration_activate_resource_type" => "SecurityMonitoringIntegrationActivateResourceType", "v2.security_monitoring_integration_config_attributes" => "SecurityMonitoringIntegrationConfigAttributes", "v2.security_monitoring_integration_config_create_attributes" => "SecurityMonitoringIntegrationConfigCreateAttributes", "v2.security_monitoring_integration_config_create_data" => "SecurityMonitoringIntegrationConfigCreateData", diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index 9751fcbb908b..4c3f2ad074ff 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -96,6 +96,82 @@ def activate_content_pack_with_http_info(content_pack_id, opts = {}) return data, status_code, headers end + # Activate an entity context sync integration. + # + # @see #activate_integration_with_http_info + def activate_integration(integration_type, opts = {}) + data, _status_code, _headers = activate_integration_with_http_info(integration_type, opts) + data + end + + # Activate an entity context sync integration. + # + # Activate an entity context sync integration for a source type that does not require manually + # supplied credentials (for example, Entra ID). If an integration of this type already exists, + # it is returned (re-enabling it first if it was disabled) instead of creating a duplicate. + # + # @param integration_type [String] The integration type to activate (for example, `entra_id`). + # @param opts [Hash] the optional parameters + # @option opts [SecurityMonitoringIntegrationActivateRequest] :body Optional configuration overrides for the integration to activate. + # @return [Array<(SecurityMonitoringIntegrationConfigResponse, Integer, Hash)>] SecurityMonitoringIntegrationConfigResponse data, response status code and response headers + def activate_integration_with_http_info(integration_type, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.activate_integration".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.activate_integration") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.activate_integration")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.activate_integration ...' + end + # verify the required parameter 'integration_type' is set + if @api_client.config.client_side_validation && integration_type.nil? + fail ArgumentError, "Missing the required parameter 'integration_type' when calling SecurityMonitoringAPI.activate_integration" + end + # resource path + local_var_path = '/api/v2/security_monitoring/configuration/integration_config/{integration_type}/activate'.sub('{integration_type}', CGI.escape(integration_type.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) + + # return_type + return_type = opts[:debug_return_type] || 'SecurityMonitoringIntegrationConfigResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :activate_integration, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SecurityMonitoringAPI#activate_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Attach security findings to a case. # # @see #attach_case_with_http_info @@ -2893,6 +2969,77 @@ def deactivate_content_pack_with_http_info(content_pack_id, opts = {}) return data, status_code, headers end + # Deactivate an entity context sync integration. + # + # @see #deactivate_integration_with_http_info + def deactivate_integration(integration_type, opts = {}) + data, _status_code, _headers = deactivate_integration_with_http_info(integration_type, opts) + data + end + + # Deactivate an entity context sync integration. + # + # Deactivate all active entity context sync integrations of the given source type (for example, Entra ID). + # + # @param integration_type [String] The integration type to deactivate (for example, `entra_id`). + # @param opts [Hash] the optional parameters + # @return [Array<(SecurityMonitoringIntegrationConfigResponse, Integer, Hash)>] SecurityMonitoringIntegrationConfigResponse data, response status code and response headers + def deactivate_integration_with_http_info(integration_type, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.deactivate_integration".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.deactivate_integration") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.deactivate_integration")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.deactivate_integration ...' + end + # verify the required parameter 'integration_type' is set + if @api_client.config.client_side_validation && integration_type.nil? + fail ArgumentError, "Missing the required parameter 'integration_type' when calling SecurityMonitoringAPI.deactivate_integration" + end + # resource path + local_var_path = '/api/v2/security_monitoring/configuration/integration_config/{integration_type}/deactivate'.sub('{integration_type}', CGI.escape(integration_type.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SecurityMonitoringIntegrationConfigResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :deactivate_integration, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SecurityMonitoringAPI#deactivate_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a custom framework. # # @see #delete_custom_framework_with_http_info @@ -4580,6 +4727,73 @@ def get_entity_context_with_http_info(opts = {}) return data, status_code, headers end + # Get Entra ID Azure App Registration prerequisites. + # + # @see #get_entra_id_azure_app_registrations_with_http_info + def get_entra_id_azure_app_registrations(opts = {}) + data, _status_code, _headers = get_entra_id_azure_app_registrations_with_http_info(opts) + data + end + + # Get Entra ID Azure App Registration prerequisites. + # + # Get the Azure App Registrations discovered for the organization and whether at least one of them has + # resource collection enabled, which is a prerequisite for activating the Entra ID entity context sync integration. + # + # @param opts [Hash] the optional parameters + # @return [Array<(SecurityMonitoringEntraIdAzureAppRegistrationsResponse, Integer, Hash)>] SecurityMonitoringEntraIdAzureAppRegistrationsResponse data, response status code and response headers + def get_entra_id_azure_app_registrations_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_entra_id_azure_app_registrations".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_entra_id_azure_app_registrations") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_entra_id_azure_app_registrations")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_entra_id_azure_app_registrations ...' + end + # resource path + local_var_path = '/api/v2/security_monitoring/configuration/integration_config/entra_id/azure_app_registrations' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SecurityMonitoringEntraIdAzureAppRegistrationsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_entra_id_azure_app_registrations, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_entra_id_azure_app_registrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a finding. # # @see #get_finding_with_http_info diff --git a/lib/datadog_api_client/v2/models/security_monitoring_azure_app_registration.rb b/lib/datadog_api_client/v2/models/security_monitoring_azure_app_registration.rb new file mode 100644 index 000000000000..7cf397a61818 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_azure_app_registration.rb @@ -0,0 +1,207 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An Azure App Registration discovered for the organization. + class SecurityMonitoringAzureAppRegistration + include BaseGenericModel + + # The client ID of the App Registration. + attr_reader :client_id + + # The number of errors encountered while crawling resources for this App Registration. + attr_reader :error_count + + # Whether resource collection is enabled for this App Registration. + attr_reader :resource_collection_enabled + + # The number of Azure subscriptions associated with this App Registration. + attr_reader :subscription_count + + # The Azure tenant ID of the App Registration. + attr_reader :tenant_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'client_id' => :'client_id', + :'error_count' => :'error_count', + :'resource_collection_enabled' => :'resource_collection_enabled', + :'subscription_count' => :'subscription_count', + :'tenant_id' => :'tenant_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'client_id' => :'String', + :'error_count' => :'Integer', + :'resource_collection_enabled' => :'Boolean', + :'subscription_count' => :'Integer', + :'tenant_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringAzureAppRegistration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'error_count') + self.error_count = attributes[:'error_count'] + end + + if attributes.key?(:'resource_collection_enabled') + self.resource_collection_enabled = attributes[:'resource_collection_enabled'] + end + + if attributes.key?(:'subscription_count') + self.subscription_count = attributes[:'subscription_count'] + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @client_id.nil? + return false if @error_count.nil? + return false if @resource_collection_enabled.nil? + return false if @subscription_count.nil? + return false if @tenant_id.nil? + true + end + + # Custom attribute writer method with validation + # @param client_id [Object] Object to be assigned + # @!visibility private + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'invalid value for "client_id", client_id cannot be nil.' + end + @client_id = client_id + end + + # Custom attribute writer method with validation + # @param error_count [Object] Object to be assigned + # @!visibility private + def error_count=(error_count) + if error_count.nil? + fail ArgumentError, 'invalid value for "error_count", error_count cannot be nil.' + end + @error_count = error_count + end + + # Custom attribute writer method with validation + # @param resource_collection_enabled [Object] Object to be assigned + # @!visibility private + def resource_collection_enabled=(resource_collection_enabled) + if resource_collection_enabled.nil? + fail ArgumentError, 'invalid value for "resource_collection_enabled", resource_collection_enabled cannot be nil.' + end + @resource_collection_enabled = resource_collection_enabled + end + + # Custom attribute writer method with validation + # @param subscription_count [Object] Object to be assigned + # @!visibility private + def subscription_count=(subscription_count) + if subscription_count.nil? + fail ArgumentError, 'invalid value for "subscription_count", subscription_count cannot be nil.' + end + @subscription_count = subscription_count + end + + # Custom attribute writer method with validation + # @param tenant_id [Object] Object to be assigned + # @!visibility private + def tenant_id=(tenant_id) + if tenant_id.nil? + fail ArgumentError, 'invalid value for "tenant_id", tenant_id cannot be nil.' + end + @tenant_id = tenant_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + error_count == o.error_count && + resource_collection_enabled == o.resource_collection_enabled && + subscription_count == o.subscription_count && + tenant_id == o.tenant_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [client_id, error_count, resource_collection_enabled, subscription_count, tenant_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_attributes.rb new file mode 100644 index 000000000000..da75e87fc913 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_attributes.rb @@ -0,0 +1,176 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The attributes of the Entra ID Azure App Registration prerequisites. + class SecurityMonitoringEntraIdAzureAppRegistrationsAttributes + include BaseGenericModel + + # The Azure App Registrations discovered for the organization. + attr_reader :azure_app_registrations + + # Whether at least one Azure App Registration has resource collection enabled. + attr_reader :has_valid_prerequisite + + # The ID of the Entra ID integration configuration, if one exists. + attr_accessor :integration_id + + # Whether the Entra ID integration configuration is enabled, if one exists. + attr_accessor :is_enabled + + # The time at which the Entra ID integration configuration was created, if one exists. + attr_accessor :subscribed_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'azure_app_registrations' => :'azure_app_registrations', + :'has_valid_prerequisite' => :'has_valid_prerequisite', + :'integration_id' => :'integration_id', + :'is_enabled' => :'is_enabled', + :'subscribed_at' => :'subscribed_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'azure_app_registrations' => :'Array', + :'has_valid_prerequisite' => :'Boolean', + :'integration_id' => :'String', + :'is_enabled' => :'Boolean', + :'subscribed_at' => :'Time' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringEntraIdAzureAppRegistrationsAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'azure_app_registrations') + if (value = attributes[:'azure_app_registrations']).is_a?(Array) + self.azure_app_registrations = value + end + end + + if attributes.key?(:'has_valid_prerequisite') + self.has_valid_prerequisite = attributes[:'has_valid_prerequisite'] + end + + if attributes.key?(:'integration_id') + self.integration_id = attributes[:'integration_id'] + end + + if attributes.key?(:'is_enabled') + self.is_enabled = attributes[:'is_enabled'] + end + + if attributes.key?(:'subscribed_at') + self.subscribed_at = attributes[:'subscribed_at'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @azure_app_registrations.nil? + return false if @has_valid_prerequisite.nil? + true + end + + # Custom attribute writer method with validation + # @param azure_app_registrations [Object] Object to be assigned + # @!visibility private + def azure_app_registrations=(azure_app_registrations) + if azure_app_registrations.nil? + fail ArgumentError, 'invalid value for "azure_app_registrations", azure_app_registrations cannot be nil.' + end + @azure_app_registrations = azure_app_registrations + end + + # Custom attribute writer method with validation + # @param has_valid_prerequisite [Object] Object to be assigned + # @!visibility private + def has_valid_prerequisite=(has_valid_prerequisite) + if has_valid_prerequisite.nil? + fail ArgumentError, 'invalid value for "has_valid_prerequisite", has_valid_prerequisite cannot be nil.' + end + @has_valid_prerequisite = has_valid_prerequisite + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + azure_app_registrations == o.azure_app_registrations && + has_valid_prerequisite == o.has_valid_prerequisite && + integration_id == o.integration_id && + is_enabled == o.is_enabled && + subscribed_at == o.subscribed_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [azure_app_registrations, has_valid_prerequisite, integration_id, is_enabled, subscribed_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_data.rb b/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_data.rb new file mode 100644 index 000000000000..91757c8ea302 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The Azure App Registration prerequisites for the Entra ID integration. + class SecurityMonitoringEntraIdAzureAppRegistrationsData + include BaseGenericModel + + # The attributes of the Entra ID Azure App Registration prerequisites. + attr_reader :attributes + + # The ID of the organization the Azure App Registrations belong to. + attr_reader :id + + # The type of the resource. The value should always be `entra_id_azure_app_registrations`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SecurityMonitoringEntraIdAzureAppRegistrationsAttributes', + :'id' => :'String', + :'type' => :'SecurityMonitoringEntraIdAzureAppRegistrationsResourceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringEntraIdAzureAppRegistrationsData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_resource_type.rb b/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_resource_type.rb new file mode 100644 index 000000000000..0acb3f70e273 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_resource_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of the resource. The value should always be `entra_id_azure_app_registrations`. + class SecurityMonitoringEntraIdAzureAppRegistrationsResourceType + include BaseEnumModel + + ENTRA_ID_AZURE_APP_REGISTRATIONS = "entra_id_azure_app_registrations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_response.rb new file mode 100644 index 000000000000..fa940d536027 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_entra_id_azure_app_registrations_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing the Azure App Registration prerequisites for the Entra ID integration. + class SecurityMonitoringEntraIdAzureAppRegistrationsResponse + include BaseGenericModel + + # The Azure App Registration prerequisites for the Entra ID integration. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'SecurityMonitoringEntraIdAzureAppRegistrationsData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringEntraIdAzureAppRegistrationsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_attributes.rb new file mode 100644 index 000000000000..88d523403062 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_attributes.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Overrides applied when activating the integration. All fields are optional. + class SecurityMonitoringIntegrationActivateAttributes + include BaseGenericModel + + # The domain associated with the external entity source. + attr_accessor :domain + + # The display name for the entity context sync configuration. + attr_accessor :name + + # Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the source type. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'domain' => :'domain', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'domain' => :'String', + :'name' => :'String', + :'settings' => :'Hash' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringIntegrationActivateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + domain == o.domain && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [domain, name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_data.rb b/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_data.rb new file mode 100644 index 000000000000..ac917d0906df --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_data.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The configuration overrides for the integration to activate. + class SecurityMonitoringIntegrationActivateData + include BaseGenericModel + + # Overrides applied when activating the integration. All fields are optional. + attr_accessor :attributes + + # The type of the resource. The value should always be `activate_entra_id_request`. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SecurityMonitoringIntegrationActivateAttributes', + :'type' => :'SecurityMonitoringIntegrationActivateResourceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringIntegrationActivateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_request.rb b/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_request.rb new file mode 100644 index 000000000000..7eea7a671474 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request body to activate an entity context sync integration for a source type that does not require secrets. + class SecurityMonitoringIntegrationActivateRequest + include BaseGenericModel + + # The configuration overrides for the integration to activate. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'SecurityMonitoringIntegrationActivateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringIntegrationActivateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_resource_type.rb b/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_resource_type.rb new file mode 100644 index 000000000000..84b1a6a335a0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_integration_activate_resource_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of the resource. The value should always be `activate_entra_id_request`. + class SecurityMonitoringIntegrationActivateResourceType + include BaseEnumModel + + ACTIVATE_ENTRA_ID_REQUEST = "activate_entra_id_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_integration_config_create_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_integration_config_create_attributes.rb index 0732965fb090..09e35069f748 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_integration_config_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_integration_config_create_attributes.rb @@ -30,8 +30,9 @@ class SecurityMonitoringIntegrationConfigCreateAttributes # The display name for the entity context sync configuration. attr_reader :name - # The secrets used to authenticate against the external entity source. The accepted keys depend on the source type (for example, `admin_email` for Google Workspace). - attr_reader :secrets + # The secrets used to authenticate against the external entity source. The accepted keys depend on the source type + # (for example, `admin_email` for Google Workspace). Not required for source types that do not use secrets (for example, `ENTRA_ID`). + attr_accessor :secrets # Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the source type. attr_accessor :settings @@ -108,7 +109,6 @@ def valid? return false if @domain.nil? return false if @integration_type.nil? return false if @name.nil? - return false if @secrets.nil? true end @@ -142,16 +142,6 @@ def name=(name) @name = name end - # Custom attribute writer method with validation - # @param secrets [Object] Object to be assigned - # @!visibility private - def secrets=(secrets) - if secrets.nil? - fail ArgumentError, 'invalid value for "secrets", secrets cannot be nil.' - end - @secrets = secrets - end - # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private diff --git a/lib/datadog_api_client/v2/models/security_monitoring_integration_config_update_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_integration_config_update_attributes.rb index 378b5c3bfa4b..aec07422c0b9 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_integration_config_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_integration_config_update_attributes.rb @@ -33,7 +33,8 @@ class SecurityMonitoringIntegrationConfigUpdateAttributes # The new display name for the entity context sync configuration. attr_accessor :name - # The secrets used to authenticate against the external entity source. The accepted keys depend on the source type (for example, `admin_email` for Google Workspace). + # The secrets used to authenticate against the external entity source. The accepted keys depend on the source type + # (for example, `admin_email` for Google Workspace). Not required for source types that do not use secrets (for example, `ENTRA_ID`). attr_accessor :secrets # Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the source type. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_integration_credentials_validate_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_integration_credentials_validate_attributes.rb index e8620b13801c..e273946c6fda 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_integration_credentials_validate_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_integration_credentials_validate_attributes.rb @@ -27,8 +27,9 @@ class SecurityMonitoringIntegrationCredentialsValidateAttributes # The type of external source that provides entities to Cloud SIEM. attr_reader :integration_type - # The secrets used to authenticate against the external entity source. The accepted keys depend on the source type (for example, `admin_email` for Google Workspace). - attr_reader :secrets + # The secrets used to authenticate against the external entity source. The accepted keys depend on the source type + # (for example, `admin_email` for Google Workspace). Not required for source types that do not use secrets (for example, `ENTRA_ID`). + attr_accessor :secrets attr_accessor :additional_properties @@ -89,7 +90,6 @@ def initialize(attributes = {}) def valid? return false if @domain.nil? return false if @integration_type.nil? - return false if @secrets.nil? true end @@ -113,16 +113,6 @@ def integration_type=(integration_type) @integration_type = integration_type end - # Custom attribute writer method with validation - # @param secrets [Object] Object to be assigned - # @!visibility private - def secrets=(secrets) - if secrets.nil? - fail ArgumentError, 'invalid value for "secrets", secrets cannot be nil.' - end - @secrets = secrets - end - # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private