datadog_api_client 2.41.0 → 2.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/.generator/schemas/v1/openapi.yaml +69 -8
  3. data/.generator/schemas/v2/openapi.yaml +1568 -40
  4. data/CHANGELOG.md +15 -0
  5. data/examples/v2/actions-datastores/BulkWriteDatastoreItems.rb +24 -0
  6. data/examples/v2/actions-datastores/CreateDatastore.rb +15 -0
  7. data/examples/v2/actions-datastores/DeleteDatastore.rb +8 -0
  8. data/examples/v2/actions-datastores/DeleteDatastoreItem.rb +17 -0
  9. data/examples/v2/actions-datastores/GetDatastore.rb +8 -0
  10. data/examples/v2/actions-datastores/ListDatastoreItems.rb +8 -0
  11. data/examples/v2/actions-datastores/ListDatastores.rb +5 -0
  12. data/examples/v2/actions-datastores/UpdateDatastore.rb +18 -0
  13. data/examples/v2/actions-datastores/UpdateDatastoreItem.rb +18 -0
  14. data/examples/v2/aws-integration/CreateAWSAccount.rb +0 -3
  15. data/examples/v2/aws-integration/CreateAWSAccount_1716720881.rb +0 -3
  16. data/examples/v2/aws-integration/CreateNewAWSExternalID.rb +0 -3
  17. data/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.rb +0 -3
  18. data/examples/v2/aws-integration/DeleteAWSAccount.rb +0 -3
  19. data/examples/v2/aws-integration/GetAWSAccount.rb +0 -3
  20. data/examples/v2/aws-integration/ListAWSAccounts.rb +0 -3
  21. data/examples/v2/aws-integration/ListAWSNamespaces.rb +0 -3
  22. data/examples/v2/aws-integration/ListAWSNamespaces_3031307873.rb +0 -3
  23. data/examples/v2/aws-integration/UpdateAWSAccount.rb +0 -3
  24. data/examples/v2/aws-logs-integration/ListAWSLogsServices.rb +0 -3
  25. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_2836340212.rb +52 -0
  26. data/examples/v2/incidents/CreateIncidentNotificationRule.rb +50 -0
  27. data/examples/v2/incidents/CreateIncidentNotificationRule_3029800608.rb +42 -0
  28. data/examples/v2/incidents/DeleteIncidentNotificationRule.rb +8 -0
  29. data/examples/v2/incidents/DeleteIncidentNotificationRule_4148107167.rb +11 -0
  30. data/examples/v2/incidents/GetIncidentNotificationRule.rb +8 -0
  31. data/examples/v2/incidents/GetIncidentNotificationRule_67441486.rb +11 -0
  32. data/examples/v2/incidents/ListIncidentNotificationRules.rb +8 -0
  33. data/examples/v2/incidents/UpdateIncidentNotificationRule.rb +51 -0
  34. data/examples/v2/incidents/UpdateIncidentNotificationRule_1207309457.rb +45 -0
  35. data/lib/datadog_api_client/configuration.rb +5 -8
  36. data/lib/datadog_api_client/inflector.rb +67 -0
  37. data/lib/datadog_api_client/v1/api/aws_integration_api.rb +27 -0
  38. data/lib/datadog_api_client/v1/api/aws_logs_integration_api.rb +9 -0
  39. data/lib/datadog_api_client/v1/models/gcp_account.rb +18 -4
  40. data/lib/datadog_api_client/v1/models/gcp_monitored_resource_config.rb +118 -0
  41. data/lib/datadog_api_client/v1/models/gcp_monitored_resource_config_type.rb +28 -0
  42. data/lib/datadog_api_client/v2/api/actions_datastores_api.rb +655 -0
  43. data/lib/datadog_api_client/v2/api/aws_integration_api.rb +0 -42
  44. data/lib/datadog_api_client/v2/api/aws_logs_integration_api.rb +0 -6
  45. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +2 -0
  46. data/lib/datadog_api_client/v2/api/incidents_api.rb +367 -0
  47. data/lib/datadog_api_client/v2/api/org_connections_api.rb +8 -0
  48. data/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request.rb +105 -0
  49. data/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data.rb +133 -0
  50. data/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data_attributes.rb +139 -0
  51. data/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request.rb +2 -2
  52. data/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_data_single_or_array.rb +63 -0
  53. data/lib/datadog_api_client/v2/models/create_apps_datastore_request.rb +105 -0
  54. data/lib/datadog_api_client/v2/models/create_apps_datastore_request_data.rb +143 -0
  55. data/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes.rb +180 -0
  56. data/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes_org_access.rb +28 -0
  57. data/lib/datadog_api_client/v2/models/create_apps_datastore_response.rb +105 -0
  58. data/lib/datadog_api_client/v2/models/create_apps_datastore_response_data.rb +133 -0
  59. data/lib/datadog_api_client/v2/models/create_incident_notification_rule_request.rb +123 -0
  60. data/lib/datadog_api_client/v2/models/datastore.rb +105 -0
  61. data/lib/datadog_api_client/v2/models/datastore_array.rb +125 -0
  62. data/lib/datadog_api_client/v2/models/datastore_data.rb +143 -0
  63. data/lib/datadog_api_client/v2/models/datastore_data_attributes.rb +205 -0
  64. data/lib/datadog_api_client/v2/models/datastore_data_type.rb +26 -0
  65. data/lib/datadog_api_client/v2/models/datastore_item_conflict_mode.rb +27 -0
  66. data/lib/datadog_api_client/v2/models/datastore_items_data_type.rb +26 -0
  67. data/lib/datadog_api_client/v2/models/datastore_primary_key_generation_strategy.rb +27 -0
  68. data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request.rb +105 -0
  69. data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data.rb +133 -0
  70. data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data_attributes.rb +137 -0
  71. data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response.rb +105 -0
  72. data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response_data.rb +133 -0
  73. data/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb +1 -1
  74. data/lib/datadog_api_client/v2/models/gcp_monitored_resource_config.rb +118 -0
  75. data/lib/datadog_api_client/v2/models/gcp_monitored_resource_config_type.rb +28 -0
  76. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +17 -2
  77. data/lib/datadog_api_client/v2/models/incident_notification_rule.rb +135 -0
  78. data/lib/datadog_api_client/v2/models/incident_notification_rule_array.rb +147 -0
  79. data/lib/datadog_api_client/v2/models/incident_notification_rule_array_meta.rb +105 -0
  80. data/lib/datadog_api_client/v2/models/incident_notification_rule_array_meta_page.rb +125 -0
  81. data/lib/datadog_api_client/v2/models/incident_notification_rule_attributes.rb +265 -0
  82. data/lib/datadog_api_client/v2/models/incident_notification_rule_attributes_visibility.rb +28 -0
  83. data/lib/datadog_api_client/v2/models/incident_notification_rule_conditions_items.rb +146 -0
  84. data/lib/datadog_api_client/v2/models/incident_notification_rule_create_attributes.rb +201 -0
  85. data/lib/datadog_api_client/v2/models/incident_notification_rule_create_attributes_visibility.rb +28 -0
  86. data/lib/datadog_api_client/v2/models/incident_notification_rule_create_data.rb +154 -0
  87. data/lib/datadog_api_client/v2/models/incident_notification_rule_create_data_relationships.rb +115 -0
  88. data/lib/datadog_api_client/v2/models/incident_notification_rule_included_items.rb +64 -0
  89. data/lib/datadog_api_client/v2/models/incident_notification_rule_relationships.rb +135 -0
  90. data/lib/datadog_api_client/v2/models/incident_notification_rule_response_data.rb +164 -0
  91. data/lib/datadog_api_client/v2/models/incident_notification_rule_type.rb +26 -0
  92. data/lib/datadog_api_client/v2/models/incident_notification_rule_update_data.rb +175 -0
  93. data/lib/datadog_api_client/v2/models/incident_notification_template_object.rb +164 -0
  94. data/lib/datadog_api_client/v2/models/item_api_payload.rb +105 -0
  95. data/lib/datadog_api_client/v2/models/item_api_payload_array.rb +139 -0
  96. data/lib/datadog_api_client/v2/models/item_api_payload_data.rb +143 -0
  97. data/lib/datadog_api_client/v2/models/item_api_payload_data_attributes.rb +185 -0
  98. data/lib/datadog_api_client/v2/models/item_api_payload_meta.rb +115 -0
  99. data/lib/datadog_api_client/v2/models/item_api_payload_meta_page.rb +125 -0
  100. data/lib/datadog_api_client/v2/models/item_api_payload_meta_schema.rb +117 -0
  101. data/lib/datadog_api_client/v2/models/item_api_payload_meta_schema_field.rb +144 -0
  102. data/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_array.rb +129 -0
  103. data/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_data.rb +133 -0
  104. data/lib/datadog_api_client/v2/models/put_incident_notification_rule_request.rb +123 -0
  105. data/lib/datadog_api_client/v2/models/relationship_to_incident_notification_template.rb +123 -0
  106. data/lib/datadog_api_client/v2/models/relationship_to_incident_notification_template_data.rb +144 -0
  107. data/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_response.rb +11 -1
  108. data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request.rb +105 -0
  109. data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data.rb +143 -0
  110. data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes.rb +158 -0
  111. data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes_item_changes.rb +105 -0
  112. data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_type.rb +26 -0
  113. data/lib/datadog_api_client/v2/models/update_apps_datastore_request.rb +105 -0
  114. data/lib/datadog_api_client/v2/models/update_apps_datastore_request_data.rb +143 -0
  115. data/lib/datadog_api_client/v2/models/update_apps_datastore_request_data_attributes.rb +115 -0
  116. data/lib/datadog_api_client/version.rb +1 -1
  117. metadata +87 -1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.42.0/2025-09-15
4
+
5
+ ### Added
6
+ * Add Query Parameters to ListOrgConnections Endpoint [#2663](https://github.com/DataDog/datadog-api-client-ruby/pull/2663)
7
+ * Add Incident Notification Rules Public Spec [#2658](https://github.com/DataDog/datadog-api-client-ruby/pull/2658)
8
+ * Update v1 and v2 GCP API specs to support `monitored_resource_configs` [#2656](https://github.com/DataDog/datadog-api-client-ruby/pull/2656)
9
+ * Add action datastore API [#2636](https://github.com/DataDog/datadog-api-client-ruby/pull/2636)
10
+ * Security Monitoring - Make hasOptionalGroupByFields updatable [#2594](https://github.com/DataDog/datadog-api-client-ruby/pull/2594)
11
+
12
+ ### Deprecated
13
+ * Promote unstable aws v2 APIs and deprecate v1 [#2655](https://github.com/DataDog/datadog-api-client-ruby/pull/2655)
14
+
15
+ ### Changed
16
+ * Allow to send batches of events in pipelines API [#2639](https://github.com/DataDog/datadog-api-client-ruby/pull/2639)
17
+
3
18
  ## 2.41.0/2025-09-09
4
19
 
5
20
  ### Added
@@ -0,0 +1,24 @@
1
+ # Bulk write datastore items returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new
5
+
6
+ # there is a valid "datastore" in the system
7
+ DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::BulkPutAppsDatastoreItemsRequest.new({
10
+ data: DatadogAPIClient::V2::BulkPutAppsDatastoreItemsRequestData.new({
11
+ attributes: DatadogAPIClient::V2::BulkPutAppsDatastoreItemsRequestDataAttributes.new({
12
+ values: [
13
+ {
14
+ "id": "cust_3141", "name": "Johnathan",
15
+ },
16
+ {
17
+ "id": "cust_3142", "name": "Mary",
18
+ },
19
+ ],
20
+ }),
21
+ type: DatadogAPIClient::V2::DatastoreItemsDataType::ITEMS,
22
+ }),
23
+ })
24
+ p api_instance.bulk_write_datastore_items(DATASTORE_DATA_ID, body)
@@ -0,0 +1,15 @@
1
+ # Create datastore returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CreateAppsDatastoreRequest.new({
7
+ data: DatadogAPIClient::V2::CreateAppsDatastoreRequestData.new({
8
+ attributes: DatadogAPIClient::V2::CreateAppsDatastoreRequestDataAttributes.new({
9
+ name: "datastore-name",
10
+ primary_column_name: "primaryKey",
11
+ }),
12
+ type: DatadogAPIClient::V2::DatastoreDataType::DATASTORES,
13
+ }),
14
+ })
15
+ p api_instance.create_datastore(body)
@@ -0,0 +1,8 @@
1
+ # Delete datastore returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new
5
+
6
+ # there is a valid "datastore" in the system
7
+ DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"]
8
+ p api_instance.delete_datastore(DATASTORE_DATA_ID)
@@ -0,0 +1,17 @@
1
+ # Delete datastore item returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new
5
+
6
+ # there is a valid "datastore" in the system
7
+ DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::DeleteAppsDatastoreItemRequest.new({
10
+ data: DatadogAPIClient::V2::DeleteAppsDatastoreItemRequestData.new({
11
+ attributes: DatadogAPIClient::V2::DeleteAppsDatastoreItemRequestDataAttributes.new({
12
+ item_key: "test-key",
13
+ }),
14
+ type: DatadogAPIClient::V2::DatastoreItemsDataType::ITEMS,
15
+ }),
16
+ })
17
+ p api_instance.delete_datastore_item(DATASTORE_DATA_ID, body)
@@ -0,0 +1,8 @@
1
+ # Get datastore returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new
5
+
6
+ # there is a valid "datastore" in the system
7
+ DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"]
8
+ p api_instance.get_datastore(DATASTORE_DATA_ID)
@@ -0,0 +1,8 @@
1
+ # List datastore items returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new
5
+
6
+ # there is a valid "datastore" in the system
7
+ DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"]
8
+ p api_instance.list_datastore_items(DATASTORE_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # List datastores returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new
5
+ p api_instance.list_datastores()
@@ -0,0 +1,18 @@
1
+ # Update datastore returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new
5
+
6
+ # there is a valid "datastore" in the system
7
+ DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::UpdateAppsDatastoreRequest.new({
10
+ data: DatadogAPIClient::V2::UpdateAppsDatastoreRequestData.new({
11
+ attributes: DatadogAPIClient::V2::UpdateAppsDatastoreRequestDataAttributes.new({
12
+ name: "updated name",
13
+ }),
14
+ type: DatadogAPIClient::V2::DatastoreDataType::DATASTORES,
15
+ id: DATASTORE_DATA_ID,
16
+ }),
17
+ })
18
+ p api_instance.update_datastore(DATASTORE_DATA_ID, body)
@@ -0,0 +1,18 @@
1
+ # Update datastore item returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new
5
+
6
+ # there is a valid "datastore" in the system
7
+ DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::UpdateAppsDatastoreItemRequest.new({
10
+ data: DatadogAPIClient::V2::UpdateAppsDatastoreItemRequestData.new({
11
+ attributes: DatadogAPIClient::V2::UpdateAppsDatastoreItemRequestDataAttributes.new({
12
+ item_changes: DatadogAPIClient::V2::UpdateAppsDatastoreItemRequestDataAttributesItemChanges.new({}),
13
+ item_key: "test-key",
14
+ }),
15
+ type: DatadogAPIClient::V2::UpdateAppsDatastoreItemRequestDataType::ITEMS,
16
+ }),
17
+ })
18
+ p api_instance.update_datastore_item(DATASTORE_DATA_ID, body)
@@ -1,9 +1,6 @@
1
1
  # Create an AWS integration returns "AWS Account object" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.create_aws_account".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8
5
 
9
6
  body = DatadogAPIClient::V2::AWSAccountCreateRequest.new({
@@ -1,9 +1,6 @@
1
1
  # Create an AWS account returns "AWS Account object" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.create_aws_account".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8
5
 
9
6
  body = DatadogAPIClient::V2::AWSAccountCreateRequest.new({
@@ -1,8 +1,5 @@
1
1
  # Generate a new external ID returns "AWS External ID object" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.create_new_aws_external_id".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8
5
  p api_instance.create_new_aws_external_id()
@@ -1,8 +1,5 @@
1
1
  # Generate new external ID returns "AWS External ID object" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.create_new_aws_external_id".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8
5
  p api_instance.create_new_aws_external_id()
@@ -1,9 +1,6 @@
1
1
  # Delete an AWS integration returns "No Content" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.delete_aws_account".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8
5
 
9
6
  # there is a valid "aws_account_v2" in the system
@@ -1,9 +1,6 @@
1
1
  # Get an AWS integration by config ID returns "AWS Account object" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.get_aws_account".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8
5
 
9
6
  # there is a valid "aws_account_v2" in the system
@@ -1,8 +1,5 @@
1
1
  # List all AWS integrations returns "AWS Accounts List object" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.list_aws_accounts".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8
5
  p api_instance.list_aws_accounts()
@@ -1,8 +1,5 @@
1
1
  # List available namespaces returns "AWS Namespaces List object" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.list_aws_namespaces".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8
5
  p api_instance.list_aws_namespaces()
@@ -1,8 +1,5 @@
1
1
  # List namespaces returns "AWS Namespaces List object" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.list_aws_namespaces".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8
5
  p api_instance.list_aws_namespaces()
@@ -1,9 +1,6 @@
1
1
  # Update an AWS integration returns "AWS Account object" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.update_aws_account".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8
5
 
9
6
  # there is a valid "aws_account_v2" in the system
@@ -1,8 +1,5 @@
1
1
  # Get list of AWS log ready services returns "AWS Logs Services List object" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.list_aws_logs_services".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::AWSLogsIntegrationAPI.new
8
5
  p api_instance.list_aws_logs_services()
@@ -0,0 +1,52 @@
1
+ # Send several pipeline events returns "Request accepted for processing" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CIVisibilityPipelinesAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CIAppCreatePipelineEventRequest.new({
7
+ data: [
8
+ DatadogAPIClient::V2::CIAppCreatePipelineEventRequestData.new({
9
+ attributes: DatadogAPIClient::V2::CIAppCreatePipelineEventRequestAttributes.new({
10
+ provider_name: "example-provider",
11
+ resource: DatadogAPIClient::V2::CIAppPipelineEventFinishedPipeline.new({
12
+ level: DatadogAPIClient::V2::CIAppPipelineEventPipelineLevel::PIPELINE,
13
+ unique_id: "3eacb6f3-ff04-4e10-8a9c-46e6d054024a",
14
+ name: "Deploy to AWS",
15
+ url: "https://my-ci-provider.example/pipelines/my-pipeline/run/1",
16
+ start: (Time.now + -120),
17
+ _end: (Time.now + -30),
18
+ status: DatadogAPIClient::V2::CIAppPipelineEventPipelineStatus::SUCCESS,
19
+ partial_retry: false,
20
+ git: DatadogAPIClient::V2::CIAppGitInfo.new({
21
+ repository_url: "https://github.com/DataDog/datadog-agent",
22
+ sha: "7f263865994b76066c4612fd1965215e7dcb4cd2",
23
+ author_email: "john.doe@email.com",
24
+ }),
25
+ }),
26
+ }),
27
+ type: DatadogAPIClient::V2::CIAppCreatePipelineEventRequestDataType::CIPIPELINE_RESOURCE_REQUEST,
28
+ }),
29
+ DatadogAPIClient::V2::CIAppCreatePipelineEventRequestData.new({
30
+ attributes: DatadogAPIClient::V2::CIAppCreatePipelineEventRequestAttributes.new({
31
+ provider_name: "example-provider",
32
+ resource: DatadogAPIClient::V2::CIAppPipelineEventFinishedPipeline.new({
33
+ level: DatadogAPIClient::V2::CIAppPipelineEventPipelineLevel::PIPELINE,
34
+ unique_id: "7b2c8f9e-aa15-4d22-9c7d-83f4e065138b",
35
+ name: "Deploy to Production",
36
+ url: "https://my-ci-provider.example/pipelines/prod-pipeline/run/2",
37
+ start: (Time.now + -180),
38
+ _end: (Time.now + -45),
39
+ status: DatadogAPIClient::V2::CIAppPipelineEventPipelineStatus::SUCCESS,
40
+ partial_retry: false,
41
+ git: DatadogAPIClient::V2::CIAppGitInfo.new({
42
+ repository_url: "https://github.com/DataDog/datadog-agent",
43
+ sha: "9a4f7c28b3e5d12f8e6c9b2a5d8f3e1c7b4a6d9e",
44
+ author_email: "jane.smith@email.com",
45
+ }),
46
+ }),
47
+ }),
48
+ type: DatadogAPIClient::V2::CIAppCreatePipelineEventRequestDataType::CIPIPELINE_RESOURCE_REQUEST,
49
+ }),
50
+ ],
51
+ })
52
+ p api_instance.create_ci_app_pipeline_event(body)
@@ -0,0 +1,50 @@
1
+ # Create an incident notification rule returns "Created" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.create_incident_notification_rule".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ body = DatadogAPIClient::V2::CreateIncidentNotificationRuleRequest.new({
10
+ data: DatadogAPIClient::V2::IncidentNotificationRuleCreateData.new({
11
+ attributes: DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributes.new({
12
+ conditions: [
13
+ DatadogAPIClient::V2::IncidentNotificationRuleConditionsItems.new({
14
+ field: "severity",
15
+ values: [
16
+ "SEV-1",
17
+ "SEV-2",
18
+ ],
19
+ }),
20
+ ],
21
+ enabled: true,
22
+ handles: [
23
+ "@team-email@company.com",
24
+ "@slack-channel",
25
+ ],
26
+ renotify_on: [
27
+ "status",
28
+ "severity",
29
+ ],
30
+ trigger: "incident_created_trigger",
31
+ visibility: DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributesVisibility::ORGANIZATION,
32
+ }),
33
+ relationships: DatadogAPIClient::V2::IncidentNotificationRuleCreateDataRelationships.new({
34
+ incident_type: DatadogAPIClient::V2::RelationshipToIncidentType.new({
35
+ data: DatadogAPIClient::V2::RelationshipToIncidentTypeData.new({
36
+ id: "00000000-0000-0000-0000-000000000000",
37
+ type: DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES,
38
+ }),
39
+ }),
40
+ notification_template: DatadogAPIClient::V2::RelationshipToIncidentNotificationTemplate.new({
41
+ data: DatadogAPIClient::V2::RelationshipToIncidentNotificationTemplateData.new({
42
+ id: "00000000-0000-0000-0000-000000000001",
43
+ type: DatadogAPIClient::V2::IncidentNotificationTemplateType::NOTIFICATION_TEMPLATES,
44
+ }),
45
+ }),
46
+ }),
47
+ type: DatadogAPIClient::V2::IncidentNotificationRuleType::INCIDENT_NOTIFICATION_RULES,
48
+ }),
49
+ })
50
+ p api_instance.create_incident_notification_rule(body)
@@ -0,0 +1,42 @@
1
+ # Create incident notification rule returns "Created" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.create_incident_notification_rule".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "incident_type" in the system
10
+ INCIDENT_TYPE_DATA_ID = ENV["INCIDENT_TYPE_DATA_ID"]
11
+
12
+ body = DatadogAPIClient::V2::CreateIncidentNotificationRuleRequest.new({
13
+ data: DatadogAPIClient::V2::IncidentNotificationRuleCreateData.new({
14
+ attributes: DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributes.new({
15
+ conditions: [
16
+ DatadogAPIClient::V2::IncidentNotificationRuleConditionsItems.new({
17
+ field: "severity",
18
+ values: [
19
+ "SEV-1",
20
+ "SEV-2",
21
+ ],
22
+ }),
23
+ ],
24
+ handles: [
25
+ "@test-email@company.com",
26
+ ],
27
+ visibility: DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributesVisibility::ORGANIZATION,
28
+ trigger: "incident_created_trigger",
29
+ enabled: true,
30
+ }),
31
+ relationships: DatadogAPIClient::V2::IncidentNotificationRuleCreateDataRelationships.new({
32
+ incident_type: DatadogAPIClient::V2::RelationshipToIncidentType.new({
33
+ data: DatadogAPIClient::V2::RelationshipToIncidentTypeData.new({
34
+ id: INCIDENT_TYPE_DATA_ID,
35
+ type: DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES,
36
+ }),
37
+ }),
38
+ }),
39
+ type: DatadogAPIClient::V2::IncidentNotificationRuleType::INCIDENT_NOTIFICATION_RULES,
40
+ }),
41
+ })
42
+ p api_instance.create_incident_notification_rule(body)
@@ -0,0 +1,8 @@
1
+ # Delete an incident notification rule returns "No Content" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.delete_incident_notification_rule".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+ api_instance.delete_incident_notification_rule("00000000-0000-0000-0000-000000000001")
@@ -0,0 +1,11 @@
1
+ # Delete incident notification rule returns "No Content" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.delete_incident_notification_rule".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "notification_rule" in the system
10
+ NOTIFICATION_RULE_DATA_ID = ENV["NOTIFICATION_RULE_DATA_ID"]
11
+ api_instance.delete_incident_notification_rule(NOTIFICATION_RULE_DATA_ID)
@@ -0,0 +1,8 @@
1
+ # Get an incident notification rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.get_incident_notification_rule".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+ p api_instance.get_incident_notification_rule("00000000-0000-0000-0000-000000000001")
@@ -0,0 +1,11 @@
1
+ # Get incident notification rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.get_incident_notification_rule".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "notification_rule" in the system
10
+ NOTIFICATION_RULE_DATA_ID = ENV["NOTIFICATION_RULE_DATA_ID"]
11
+ p api_instance.get_incident_notification_rule(NOTIFICATION_RULE_DATA_ID)
@@ -0,0 +1,8 @@
1
+ # List incident notification rules returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.list_incident_notification_rules".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+ p api_instance.list_incident_notification_rules()
@@ -0,0 +1,51 @@
1
+ # Update an incident notification rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.update_incident_notification_rule".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ body = DatadogAPIClient::V2::PutIncidentNotificationRuleRequest.new({
10
+ data: DatadogAPIClient::V2::IncidentNotificationRuleUpdateData.new({
11
+ attributes: DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributes.new({
12
+ conditions: [
13
+ DatadogAPIClient::V2::IncidentNotificationRuleConditionsItems.new({
14
+ field: "severity",
15
+ values: [
16
+ "SEV-1",
17
+ "SEV-2",
18
+ ],
19
+ }),
20
+ ],
21
+ enabled: true,
22
+ handles: [
23
+ "@team-email@company.com",
24
+ "@slack-channel",
25
+ ],
26
+ renotify_on: [
27
+ "status",
28
+ "severity",
29
+ ],
30
+ trigger: "incident_created_trigger",
31
+ visibility: DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributesVisibility::ORGANIZATION,
32
+ }),
33
+ id: "00000000-0000-0000-0000-000000000001",
34
+ relationships: DatadogAPIClient::V2::IncidentNotificationRuleCreateDataRelationships.new({
35
+ incident_type: DatadogAPIClient::V2::RelationshipToIncidentType.new({
36
+ data: DatadogAPIClient::V2::RelationshipToIncidentTypeData.new({
37
+ id: "00000000-0000-0000-0000-000000000000",
38
+ type: DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES,
39
+ }),
40
+ }),
41
+ notification_template: DatadogAPIClient::V2::RelationshipToIncidentNotificationTemplate.new({
42
+ data: DatadogAPIClient::V2::RelationshipToIncidentNotificationTemplateData.new({
43
+ id: "00000000-0000-0000-0000-000000000001",
44
+ type: DatadogAPIClient::V2::IncidentNotificationTemplateType::NOTIFICATION_TEMPLATES,
45
+ }),
46
+ }),
47
+ }),
48
+ type: DatadogAPIClient::V2::IncidentNotificationRuleType::INCIDENT_NOTIFICATION_RULES,
49
+ }),
50
+ })
51
+ p api_instance.update_incident_notification_rule("00000000-0000-0000-0000-000000000001", body)
@@ -0,0 +1,45 @@
1
+ # Update incident notification rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.update_incident_notification_rule".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "notification_rule" in the system
10
+ NOTIFICATION_RULE_DATA_ID = ENV["NOTIFICATION_RULE_DATA_ID"]
11
+
12
+ # there is a valid "incident_type" in the system
13
+ INCIDENT_TYPE_DATA_ID = ENV["INCIDENT_TYPE_DATA_ID"]
14
+
15
+ body = DatadogAPIClient::V2::PutIncidentNotificationRuleRequest.new({
16
+ data: DatadogAPIClient::V2::IncidentNotificationRuleUpdateData.new({
17
+ attributes: DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributes.new({
18
+ enabled: false,
19
+ conditions: [
20
+ DatadogAPIClient::V2::IncidentNotificationRuleConditionsItems.new({
21
+ field: "severity",
22
+ values: [
23
+ "SEV-1",
24
+ ],
25
+ }),
26
+ ],
27
+ handles: [
28
+ "@updated-team-email@company.com",
29
+ ],
30
+ visibility: DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributesVisibility::PRIVATE,
31
+ trigger: "incident_modified_trigger",
32
+ }),
33
+ relationships: DatadogAPIClient::V2::IncidentNotificationRuleCreateDataRelationships.new({
34
+ incident_type: DatadogAPIClient::V2::RelationshipToIncidentType.new({
35
+ data: DatadogAPIClient::V2::RelationshipToIncidentTypeData.new({
36
+ id: INCIDENT_TYPE_DATA_ID,
37
+ type: DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES,
38
+ }),
39
+ }),
40
+ }),
41
+ id: NOTIFICATION_RULE_DATA_ID,
42
+ type: DatadogAPIClient::V2::IncidentNotificationRuleType::INCIDENT_NOTIFICATION_RULES,
43
+ }),
44
+ })
45
+ p api_instance.update_incident_notification_rule(NOTIFICATION_RULE_DATA_ID, body)
@@ -222,21 +222,25 @@ module DatadogAPIClient
222
222
  "v2.get_data_deletion_requests": false,
223
223
  "v2.create_incident": false,
224
224
  "v2.create_incident_integration": false,
225
+ "v2.create_incident_notification_rule": false,
225
226
  "v2.create_incident_notification_template": false,
226
227
  "v2.create_incident_todo": false,
227
228
  "v2.create_incident_type": false,
228
229
  "v2.delete_incident": false,
229
230
  "v2.delete_incident_integration": false,
231
+ "v2.delete_incident_notification_rule": false,
230
232
  "v2.delete_incident_notification_template": false,
231
233
  "v2.delete_incident_todo": false,
232
234
  "v2.delete_incident_type": false,
233
235
  "v2.get_incident": false,
234
236
  "v2.get_incident_integration": false,
237
+ "v2.get_incident_notification_rule": false,
235
238
  "v2.get_incident_notification_template": false,
236
239
  "v2.get_incident_todo": false,
237
240
  "v2.get_incident_type": false,
238
241
  "v2.list_incident_attachments": false,
239
242
  "v2.list_incident_integrations": false,
243
+ "v2.list_incident_notification_rules": false,
240
244
  "v2.list_incident_notification_templates": false,
241
245
  "v2.list_incidents": false,
242
246
  "v2.list_incident_todos": false,
@@ -245,17 +249,10 @@ module DatadogAPIClient
245
249
  "v2.update_incident": false,
246
250
  "v2.update_incident_attachments": false,
247
251
  "v2.update_incident_integration": false,
252
+ "v2.update_incident_notification_rule": false,
248
253
  "v2.update_incident_notification_template": false,
249
254
  "v2.update_incident_todo": false,
250
255
  "v2.update_incident_type": false,
251
- "v2.create_aws_account": false,
252
- "v2.create_new_aws_external_id": false,
253
- "v2.delete_aws_account": false,
254
- "v2.get_aws_account": false,
255
- "v2.list_aws_accounts": false,
256
- "v2.list_aws_namespaces": false,
257
- "v2.update_aws_account": false,
258
- "v2.list_aws_logs_services": false,
259
256
  "v2.create_monitor_user_template": false,
260
257
  "v2.delete_monitor_user_template": false,
261
258
  "v2.get_monitor_user_template": false,