datadog_api_client 2.18.0 → 2.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +1 -1
  4. data/.generator/poetry.lock +69 -69
  5. data/.generator/schemas/v1/openapi.yaml +189 -11
  6. data/.generator/schemas/v2/openapi.yaml +1321 -188
  7. data/.generator/src/generator/templates/model_generic.j2 +2 -2
  8. data/CHANGELOG.md +18 -0
  9. data/examples/v1/azure-integration/CreateAzureIntegration.rb +4 -4
  10. data/examples/v1/azure-integration/DeleteAzureIntegration.rb +2 -15
  11. data/examples/v1/azure-integration/UpdateAzureIntegration.rb +4 -4
  12. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +4 -5
  13. data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +2 -14
  14. data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +4 -5
  15. data/examples/v1/service-level-objectives/CreateSLO_3765703239.rb +46 -0
  16. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +0 -3
  17. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -3
  18. data/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.rb +18 -0
  19. data/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb +29 -0
  20. data/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.rb +5 -0
  21. data/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.rb +5 -0
  22. data/examples/v2/cloud-cost-management/GetCloudCostActivity.rb +5 -0
  23. data/examples/v2/cloud-cost-management/ListAWSRelatedAccounts.rb +5 -0
  24. data/examples/v2/cloud-cost-management/ListCostAWSCURConfigs.rb +5 -0
  25. data/examples/v2/cloud-cost-management/ListCostAzureUCConfigs.rb +5 -0
  26. data/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.rb +14 -0
  27. data/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.rb +14 -0
  28. data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +1 -1
  29. data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +4 -1
  30. data/examples/v2/downtimes/ListMonitorDowntimes_3316718253.rb +5 -0
  31. data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +16 -0
  32. data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +16 -0
  33. data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +17 -0
  34. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +19 -0
  35. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_3367706049.rb +46 -0
  36. data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +7 -0
  37. data/examples/v2/sensitive-data-scanner/UpdateScanningRule.rb +7 -10
  38. data/examples/v2/teams/CreateTeamMembership.rb +6 -0
  39. data/lib/datadog_api_client/configuration.rb +0 -1
  40. data/lib/datadog_api_client/inflector.rb +52 -0
  41. data/lib/datadog_api_client/v1/api/downtimes_api.rb +28 -7
  42. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
  43. data/lib/datadog_api_client/v1/models/gcp_account.rb +22 -2
  44. data/lib/datadog_api_client/v1/models/organization.rb +1 -1
  45. data/lib/datadog_api_client/v1/models/service_level_objective.rb +11 -1
  46. data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +11 -1
  47. data/lib/datadog_api_client/v1/models/slo_data_source_query_definition.rb +62 -0
  48. data/lib/datadog_api_client/v1/models/slo_formula.rb +98 -0
  49. data/lib/datadog_api_client/v1/models/slo_response_data.rb +11 -1
  50. data/lib/datadog_api_client/v1/models/slo_sli_spec.rb +62 -0
  51. data/lib/datadog_api_client/v1/models/slo_time_slice_comparator.rb +29 -0
  52. data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +141 -0
  53. data/lib/datadog_api_client/v1/models/slo_time_slice_query.rb +131 -0
  54. data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +99 -0
  55. data/lib/datadog_api_client/v1/models/slo_type.rb +1 -0
  56. data/lib/datadog_api_client/v1/models/slo_type_numeric.rb +1 -0
  57. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
  58. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
  59. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
  60. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +0 -6
  61. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +680 -0
  62. data/lib/datadog_api_client/v2/api/downtimes_api.rb +25 -0
  63. data/lib/datadog_api_client/v2/api/metrics_api.rb +3 -2
  64. data/lib/datadog_api_client/v2/models/aws_cur_config.rb +129 -0
  65. data/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +305 -0
  66. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_data.rb +119 -0
  67. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request.rb +98 -0
  68. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb +98 -0
  69. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_type.rb +26 -0
  70. data/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +119 -0
  71. data/lib/datadog_api_client/v2/models/aws_cur_config_post_request.rb +98 -0
  72. data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb +202 -0
  73. data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_type.rb +26 -0
  74. data/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +80 -0
  75. data/lib/datadog_api_client/v2/models/aws_cur_config_type.rb +26 -0
  76. data/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +82 -0
  77. data/lib/datadog_api_client/v2/models/aws_related_account.rb +129 -0
  78. data/lib/datadog_api_client/v2/models/aws_related_account_attributes.rb +90 -0
  79. data/lib/datadog_api_client/v2/models/aws_related_account_type.rb +26 -0
  80. data/lib/datadog_api_client/v2/models/aws_related_accounts_response.rb +82 -0
  81. data/lib/datadog_api_client/v2/models/azure_uc_config.rb +378 -0
  82. data/lib/datadog_api_client/v2/models/azure_uc_config_pair.rb +129 -0
  83. data/lib/datadog_api_client/v2/models/azure_uc_config_pair_attributes.rb +110 -0
  84. data/lib/datadog_api_client/v2/models/azure_uc_config_pair_type.rb +26 -0
  85. data/lib/datadog_api_client/v2/models/azure_uc_config_pairs_response.rb +80 -0
  86. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +119 -0
  87. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request.rb +98 -0
  88. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_attributes.rb +98 -0
  89. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_type.rb +26 -0
  90. data/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +119 -0
  91. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request.rb +98 -0
  92. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +192 -0
  93. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_type.rb +26 -0
  94. data/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +82 -0
  95. data/lib/datadog_api_client/v2/models/bill_config.rb +161 -0
  96. data/lib/datadog_api_client/v2/models/ci_app_git_info.rb +2 -2
  97. data/lib/datadog_api_client/v2/models/cloud_cost_activity.rb +119 -0
  98. data/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb +98 -0
  99. data/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb +80 -0
  100. data/lib/datadog_api_client/v2/models/cloud_cost_activity_type.rb +26 -0
  101. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +28 -4
  102. data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +28 -4
  103. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +28 -4
  104. data/lib/datadog_api_client/v2/models/dora_git_info.rb +2 -2
  105. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +25 -5
  106. data/lib/datadog_api_client/v2/models/relationship_to_user_team_team.rb +98 -0
  107. data/lib/datadog_api_client/v2/models/relationship_to_user_team_team_data.rb +119 -0
  108. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +14 -4
  109. data/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb +114 -0
  110. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
  111. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
  112. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
  113. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_root_query.rb +92 -0
  114. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb +112 -0
  115. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb +130 -0
  116. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +134 -0
  117. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +46 -1
  118. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +33 -1
  119. data/lib/datadog_api_client/v2/models/user_team_attributes.rb +24 -1
  120. data/lib/datadog_api_client/v2/models/user_team_relationships.rb +11 -1
  121. data/lib/datadog_api_client/v2/models/user_team_team_type.rb +26 -0
  122. data/lib/datadog_api_client/version.rb +1 -1
  123. metadata +71 -2
@@ -474,8 +474,10 @@ module DatadogAPIClient
474
474
  "v1.slo_correction_update_request" => "SLOCorrectionUpdateRequest",
475
475
  "v1.slo_correction_update_request_attributes" => "SLOCorrectionUpdateRequestAttributes",
476
476
  "v1.slo_creator" => "SLOCreator",
477
+ "v1.slo_data_source_query_definition" => "SLODataSourceQueryDefinition",
477
478
  "v1.slo_delete_response" => "SLODeleteResponse",
478
479
  "v1.slo_error_timeframe" => "SLOErrorTimeframe",
480
+ "v1.slo_formula" => "SLOFormula",
479
481
  "v1.slo_history_metrics" => "SLOHistoryMetrics",
480
482
  "v1.slo_history_metrics_series" => "SLOHistoryMetricsSeries",
481
483
  "v1.slo_history_metrics_series_metadata" => "SLOHistoryMetricsSeriesMetadata",
@@ -498,10 +500,15 @@ module DatadogAPIClient
498
500
  "v1.slo_raw_error_budget_remaining" => "SLORawErrorBudgetRemaining",
499
501
  "v1.slo_response" => "SLOResponse",
500
502
  "v1.slo_response_data" => "SLOResponseData",
503
+ "v1.slo_sli_spec" => "SLOSliSpec",
501
504
  "v1.slo_state" => "SLOState",
502
505
  "v1.slo_status" => "SLOStatus",
503
506
  "v1.slo_threshold" => "SLOThreshold",
504
507
  "v1.slo_timeframe" => "SLOTimeframe",
508
+ "v1.slo_time_slice_comparator" => "SLOTimeSliceComparator",
509
+ "v1.slo_time_slice_condition" => "SLOTimeSliceCondition",
510
+ "v1.slo_time_slice_query" => "SLOTimeSliceQuery",
511
+ "v1.slo_time_slice_spec" => "SLOTimeSliceSpec",
505
512
  "v1.slo_type" => "SLOType",
506
513
  "v1.slo_type_numeric" => "SLOTypeNumeric",
507
514
  "v1.slo_widget_definition" => "SLOWidgetDefinition",
@@ -905,6 +912,38 @@ module DatadogAPIClient
905
912
  "v2.authn_mapping_update_data" => "AuthNMappingUpdateData",
906
913
  "v2.authn_mapping_update_relationships" => "AuthNMappingUpdateRelationships",
907
914
  "v2.authn_mapping_update_request" => "AuthNMappingUpdateRequest",
915
+ "v2.aws_cur_config" => "AwsCURConfig",
916
+ "v2.aws_cur_config_attributes" => "AwsCURConfigAttributes",
917
+ "v2.aws_cur_config_patch_data" => "AwsCURConfigPatchData",
918
+ "v2.aws_cur_config_patch_request" => "AwsCURConfigPatchRequest",
919
+ "v2.aws_cur_config_patch_request_attributes" => "AwsCURConfigPatchRequestAttributes",
920
+ "v2.aws_cur_config_patch_request_type" => "AwsCURConfigPatchRequestType",
921
+ "v2.aws_cur_config_post_data" => "AwsCURConfigPostData",
922
+ "v2.aws_cur_config_post_request" => "AwsCURConfigPostRequest",
923
+ "v2.aws_cur_config_post_request_attributes" => "AwsCURConfigPostRequestAttributes",
924
+ "v2.aws_cur_config_post_request_type" => "AwsCURConfigPostRequestType",
925
+ "v2.aws_cur_config_response" => "AwsCURConfigResponse",
926
+ "v2.aws_cur_configs_response" => "AwsCURConfigsResponse",
927
+ "v2.aws_cur_config_type" => "AwsCURConfigType",
928
+ "v2.aws_related_account" => "AWSRelatedAccount",
929
+ "v2.aws_related_account_attributes" => "AWSRelatedAccountAttributes",
930
+ "v2.aws_related_accounts_response" => "AWSRelatedAccountsResponse",
931
+ "v2.aws_related_account_type" => "AWSRelatedAccountType",
932
+ "v2.azure_uc_config" => "AzureUCConfig",
933
+ "v2.azure_uc_config_pair" => "AzureUCConfigPair",
934
+ "v2.azure_uc_config_pair_attributes" => "AzureUCConfigPairAttributes",
935
+ "v2.azure_uc_config_pairs_response" => "AzureUCConfigPairsResponse",
936
+ "v2.azure_uc_config_pair_type" => "AzureUCConfigPairType",
937
+ "v2.azure_uc_config_patch_data" => "AzureUCConfigPatchData",
938
+ "v2.azure_uc_config_patch_request" => "AzureUCConfigPatchRequest",
939
+ "v2.azure_uc_config_patch_request_attributes" => "AzureUCConfigPatchRequestAttributes",
940
+ "v2.azure_uc_config_patch_request_type" => "AzureUCConfigPatchRequestType",
941
+ "v2.azure_uc_config_post_data" => "AzureUCConfigPostData",
942
+ "v2.azure_uc_config_post_request" => "AzureUCConfigPostRequest",
943
+ "v2.azure_uc_config_post_request_attributes" => "AzureUCConfigPostRequestAttributes",
944
+ "v2.azure_uc_config_post_request_type" => "AzureUCConfigPostRequestType",
945
+ "v2.azure_uc_configs_response" => "AzureUCConfigsResponse",
946
+ "v2.bill_config" => "BillConfig",
908
947
  "v2.bulk_mute_findings_request" => "BulkMuteFindingsRequest",
909
948
  "v2.bulk_mute_findings_request_attributes" => "BulkMuteFindingsRequestAttributes",
910
949
  "v2.bulk_mute_findings_request_data" => "BulkMuteFindingsRequestData",
@@ -988,6 +1027,10 @@ module DatadogAPIClient
988
1027
  "v2.cloud_configuration_rule_create_payload" => "CloudConfigurationRuleCreatePayload",
989
1028
  "v2.cloud_configuration_rule_options" => "CloudConfigurationRuleOptions",
990
1029
  "v2.cloud_configuration_rule_type" => "CloudConfigurationRuleType",
1030
+ "v2.cloud_cost_activity" => "CloudCostActivity",
1031
+ "v2.cloud_cost_activity_attributes" => "CloudCostActivityAttributes",
1032
+ "v2.cloud_cost_activity_response" => "CloudCostActivityResponse",
1033
+ "v2.cloud_cost_activity_type" => "CloudCostActivityType",
991
1034
  "v2.cloudflare_account_create_request" => "CloudflareAccountCreateRequest",
992
1035
  "v2.cloudflare_account_create_request_attributes" => "CloudflareAccountCreateRequestAttributes",
993
1036
  "v2.cloudflare_account_create_request_data" => "CloudflareAccountCreateRequestData",
@@ -1648,6 +1691,8 @@ module DatadogAPIClient
1648
1691
  "v2.relationship_to_users" => "RelationshipToUsers",
1649
1692
  "v2.relationship_to_user_team_permission" => "RelationshipToUserTeamPermission",
1650
1693
  "v2.relationship_to_user_team_permission_data" => "RelationshipToUserTeamPermissionData",
1694
+ "v2.relationship_to_user_team_team" => "RelationshipToUserTeamTeam",
1695
+ "v2.relationship_to_user_team_team_data" => "RelationshipToUserTeamTeamData",
1651
1696
  "v2.relationship_to_user_team_user" => "RelationshipToUserTeamUser",
1652
1697
  "v2.relationship_to_user_team_user_data" => "RelationshipToUserTeamUserData",
1653
1698
  "v2.reorder_retention_filters_request" => "ReorderRetentionFiltersRequest",
@@ -1796,6 +1841,7 @@ module DatadogAPIClient
1796
1841
  "v2.security_monitoring_rule_query_aggregation" => "SecurityMonitoringRuleQueryAggregation",
1797
1842
  "v2.security_monitoring_rule_response" => "SecurityMonitoringRuleResponse",
1798
1843
  "v2.security_monitoring_rule_severity" => "SecurityMonitoringRuleSeverity",
1844
+ "v2.security_monitoring_rule_third_party_options" => "SecurityMonitoringRuleThirdPartyOptions",
1799
1845
  "v2.security_monitoring_rule_type_create" => "SecurityMonitoringRuleTypeCreate",
1800
1846
  "v2.security_monitoring_rule_type_read" => "SecurityMonitoringRuleTypeRead",
1801
1847
  "v2.security_monitoring_rule_update_payload" => "SecurityMonitoringRuleUpdatePayload",
@@ -1834,6 +1880,9 @@ module DatadogAPIClient
1834
1880
  "v2.security_monitoring_standard_rule_create_payload" => "SecurityMonitoringStandardRuleCreatePayload",
1835
1881
  "v2.security_monitoring_standard_rule_query" => "SecurityMonitoringStandardRuleQuery",
1836
1882
  "v2.security_monitoring_standard_rule_response" => "SecurityMonitoringStandardRuleResponse",
1883
+ "v2.security_monitoring_third_party_root_query" => "SecurityMonitoringThirdPartyRootQuery",
1884
+ "v2.security_monitoring_third_party_rule_case" => "SecurityMonitoringThirdPartyRuleCase",
1885
+ "v2.security_monitoring_third_party_rule_case_create" => "SecurityMonitoringThirdPartyRuleCaseCreate",
1837
1886
  "v2.security_monitoring_triage_user" => "SecurityMonitoringTriageUser",
1838
1887
  "v2.sensitive_data_scanner_config_request" => "SensitiveDataScannerConfigRequest",
1839
1888
  "v2.sensitive_data_scanner_configuration" => "SensitiveDataScannerConfiguration",
@@ -1862,6 +1911,7 @@ module DatadogAPIClient
1862
1911
  "v2.sensitive_data_scanner_group_update" => "SensitiveDataScannerGroupUpdate",
1863
1912
  "v2.sensitive_data_scanner_group_update_request" => "SensitiveDataScannerGroupUpdateRequest",
1864
1913
  "v2.sensitive_data_scanner_group_update_response" => "SensitiveDataScannerGroupUpdateResponse",
1914
+ "v2.sensitive_data_scanner_included_keyword_configuration" => "SensitiveDataScannerIncludedKeywordConfiguration",
1865
1915
  "v2.sensitive_data_scanner_meta" => "SensitiveDataScannerMeta",
1866
1916
  "v2.sensitive_data_scanner_meta_version_only" => "SensitiveDataScannerMetaVersionOnly",
1867
1917
  "v2.sensitive_data_scanner_product" => "SensitiveDataScannerProduct",
@@ -2098,6 +2148,7 @@ module DatadogAPIClient
2098
2148
  "v2.user_team_response" => "UserTeamResponse",
2099
2149
  "v2.user_team_role" => "UserTeamRole",
2100
2150
  "v2.user_teams_response" => "UserTeamsResponse",
2151
+ "v2.user_team_team_type" => "UserTeamTeamType",
2101
2152
  "v2.user_team_type" => "UserTeamType",
2102
2153
  "v2.user_team_update" => "UserTeamUpdate",
2103
2154
  "v2.user_team_update_request" => "UserTeamUpdateRequest",
@@ -2143,6 +2194,7 @@ module DatadogAPIClient
2143
2194
  "v2.authn_mappings_api" => "AuthNMappingsAPI",
2144
2195
  "v2.ci_visibility_pipelines_api" => "CIVisibilityPipelinesAPI",
2145
2196
  "v2.ci_visibility_tests_api" => "CIVisibilityTestsAPI",
2197
+ "v2.cloud_cost_management_api" => "CloudCostManagementAPI",
2146
2198
  "v2.cloud_workload_security_api" => "CloudWorkloadSecurityAPI",
2147
2199
  "v2.cloudflare_integration_api" => "CloudflareIntegrationAPI",
2148
2200
  "v2.confluent_cloud_api" => "ConfluentCloudAPI",
@@ -33,12 +33,15 @@ module DatadogAPIClient::V1
33
33
 
34
34
  # Cancel a downtime.
35
35
  #
36
- # Cancel a downtime.
36
+ # Cancel a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
37
+ #
38
+ # @deprecated This API is deprecated.
37
39
  #
38
40
  # @param downtime_id [Integer] ID of the downtime to cancel.
39
41
  # @param opts [Hash] the optional parameters
40
42
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
43
  def cancel_downtime_with_http_info(downtime_id, opts = {})
44
+ warn "[DEPRECATION] `CancelDowntime` is deprecated."
42
45
 
43
46
  if @api_client.config.debugging
44
47
  @api_client.config.logger.debug 'Calling API: DowntimesAPI.cancel_downtime ...'
@@ -98,12 +101,15 @@ module DatadogAPIClient::V1
98
101
 
99
102
  # Cancel downtimes by scope.
100
103
  #
101
- # Delete all downtimes that match the scope of `X`.
104
+ # Delete all downtimes that match the scope of `X`. **Note:** This only interacts with Downtimes created using v1 endpoints. This endpoint has been deprecated and will not be replaced. Please use v2 endpoints to find and cancel downtimes.
105
+ #
106
+ # @deprecated This API is deprecated.
102
107
  #
103
108
  # @param body [CancelDowntimesByScopeRequest] Scope to cancel downtimes for.
104
109
  # @param opts [Hash] the optional parameters
105
110
  # @return [Array<(CanceledDowntimesIds, Integer, Hash)>] CanceledDowntimesIds data, response status code and response headers
106
111
  def cancel_downtimes_by_scope_with_http_info(body, opts = {})
112
+ warn "[DEPRECATION] `CancelDowntimesByScope` is deprecated."
107
113
 
108
114
  if @api_client.config.debugging
109
115
  @api_client.config.logger.debug 'Calling API: DowntimesAPI.cancel_downtimes_by_scope ...'
@@ -165,12 +171,15 @@ module DatadogAPIClient::V1
165
171
 
166
172
  # Schedule a downtime.
167
173
  #
168
- # Schedule a downtime.
174
+ # Schedule a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
175
+ #
176
+ # @deprecated This API is deprecated.
169
177
  #
170
178
  # @param body [Downtime] Schedule a downtime request body.
171
179
  # @param opts [Hash] the optional parameters
172
180
  # @return [Array<(Downtime, Integer, Hash)>] Downtime data, response status code and response headers
173
181
  def create_downtime_with_http_info(body, opts = {})
182
+ warn "[DEPRECATION] `CreateDowntime` is deprecated."
174
183
 
175
184
  if @api_client.config.debugging
176
185
  @api_client.config.logger.debug 'Calling API: DowntimesAPI.create_downtime ...'
@@ -232,12 +241,15 @@ module DatadogAPIClient::V1
232
241
 
233
242
  # Get a downtime.
234
243
  #
235
- # Get downtime detail by `downtime_id`.
244
+ # Get downtime detail by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
245
+ #
246
+ # @deprecated This API is deprecated.
236
247
  #
237
248
  # @param downtime_id [Integer] ID of the downtime to fetch.
238
249
  # @param opts [Hash] the optional parameters
239
250
  # @return [Array<(Downtime, Integer, Hash)>] Downtime data, response status code and response headers
240
251
  def get_downtime_with_http_info(downtime_id, opts = {})
252
+ warn "[DEPRECATION] `GetDowntime` is deprecated."
241
253
 
242
254
  if @api_client.config.debugging
243
255
  @api_client.config.logger.debug 'Calling API: DowntimesAPI.get_downtime ...'
@@ -297,13 +309,16 @@ module DatadogAPIClient::V1
297
309
 
298
310
  # Get all downtimes.
299
311
  #
300
- # Get all scheduled downtimes.
312
+ # Get all scheduled downtimes. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
313
+ #
314
+ # @deprecated This API is deprecated.
301
315
  #
302
316
  # @param opts [Hash] the optional parameters
303
317
  # @option opts [Boolean] :current_only Only return downtimes that are active when the request is made.
304
318
  # @option opts [Boolean] :with_creator Return creator information.
305
319
  # @return [Array<(Array<Downtime>, Integer, Hash)>] Array<Downtime> data, response status code and response headers
306
320
  def list_downtimes_with_http_info(opts = {})
321
+ warn "[DEPRECATION] `ListDowntimes` is deprecated."
307
322
 
308
323
  if @api_client.config.debugging
309
324
  @api_client.config.logger.debug 'Calling API: DowntimesAPI.list_downtimes ...'
@@ -361,12 +376,15 @@ module DatadogAPIClient::V1
361
376
 
362
377
  # Get active downtimes for a monitor.
363
378
  #
364
- # Get all active downtimes for the specified monitor.
379
+ # Get all active v1 downtimes for the specified monitor. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
380
+ #
381
+ # @deprecated This API is deprecated.
365
382
  #
366
383
  # @param monitor_id [Integer] The id of the monitor
367
384
  # @param opts [Hash] the optional parameters
368
385
  # @return [Array<(Array<Downtime>, Integer, Hash)>] Array<Downtime> data, response status code and response headers
369
386
  def list_monitor_downtimes_with_http_info(monitor_id, opts = {})
387
+ warn "[DEPRECATION] `ListMonitorDowntimes` is deprecated."
370
388
 
371
389
  if @api_client.config.debugging
372
390
  @api_client.config.logger.debug 'Calling API: DowntimesAPI.list_monitor_downtimes ...'
@@ -426,13 +444,16 @@ module DatadogAPIClient::V1
426
444
 
427
445
  # Update a downtime.
428
446
  #
429
- # Update a single downtime by `downtime_id`.
447
+ # Update a single downtime by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints.
448
+ #
449
+ # @deprecated This API is deprecated.
430
450
  #
431
451
  # @param downtime_id [Integer] ID of the downtime to update.
432
452
  # @param body [Downtime] Update a downtime request body.
433
453
  # @param opts [Hash] the optional parameters
434
454
  # @return [Array<(Downtime, Integer, Hash)>] Downtime data, response status code and response headers
435
455
  def update_downtime_with_http_info(downtime_id, body, opts = {})
456
+ warn "[DEPRECATION] `UpdateDowntime` is deprecated."
436
457
 
437
458
  if @api_client.config.debugging
438
459
  @api_client.config.logger.debug 'Calling API: DowntimesAPI.update_downtime ...'
@@ -121,7 +121,7 @@ module DatadogAPIClient::V1
121
121
  # - process: `service check`
122
122
  # - rum: `rum alert`
123
123
  # - SLO: `slo alert`
124
- # - watchdog: `event alert`
124
+ # - watchdog: `event-v2 alert`
125
125
  # - event-v2: `event-v2 alert`
126
126
  # - audit: `audit alert`
127
127
  # - error-tracking: `error-tracking alert`
@@ -47,9 +47,12 @@ module DatadogAPIClient::V1
47
47
  # Only hosts that match one of the defined tags are imported into Datadog.
48
48
  attr_accessor :host_filters
49
49
 
50
- # When enabled, Datadog performs configuration checks across your Google Cloud environment by continuously scanning every resource.
50
+ # When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true.
51
51
  attr_accessor :is_cspm_enabled
52
52
 
53
+ # When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
54
+ attr_accessor :is_security_command_center_enabled
55
+
53
56
  # Your private key name found in your JSON service account key.
54
57
  attr_accessor :private_key
55
58
 
@@ -59,6 +62,9 @@ module DatadogAPIClient::V1
59
62
  # Your Google Cloud project ID found in your JSON service account key.
60
63
  attr_accessor :project_id
61
64
 
65
+ # When enabled, Datadog scans for all resources in your GCP environment.
66
+ attr_accessor :resource_collection_enabled
67
+
62
68
  # Should be `https://accounts.google.com/o/oauth2/token`.
63
69
  attr_accessor :token_uri
64
70
 
@@ -78,9 +84,11 @@ module DatadogAPIClient::V1
78
84
  :'errors' => :'errors',
79
85
  :'host_filters' => :'host_filters',
80
86
  :'is_cspm_enabled' => :'is_cspm_enabled',
87
+ :'is_security_command_center_enabled' => :'is_security_command_center_enabled',
81
88
  :'private_key' => :'private_key',
82
89
  :'private_key_id' => :'private_key_id',
83
90
  :'project_id' => :'project_id',
91
+ :'resource_collection_enabled' => :'resource_collection_enabled',
84
92
  :'token_uri' => :'token_uri',
85
93
  :'type' => :'type'
86
94
  }
@@ -99,9 +107,11 @@ module DatadogAPIClient::V1
99
107
  :'errors' => :'Array<String>',
100
108
  :'host_filters' => :'String',
101
109
  :'is_cspm_enabled' => :'Boolean',
110
+ :'is_security_command_center_enabled' => :'Boolean',
102
111
  :'private_key' => :'String',
103
112
  :'private_key_id' => :'String',
104
113
  :'project_id' => :'String',
114
+ :'resource_collection_enabled' => :'Boolean',
105
115
  :'token_uri' => :'String',
106
116
  :'type' => :'String'
107
117
  }
@@ -161,6 +171,10 @@ module DatadogAPIClient::V1
161
171
  self.is_cspm_enabled = attributes[:'is_cspm_enabled']
162
172
  end
163
173
 
174
+ if attributes.key?(:'is_security_command_center_enabled')
175
+ self.is_security_command_center_enabled = attributes[:'is_security_command_center_enabled']
176
+ end
177
+
164
178
  if attributes.key?(:'private_key')
165
179
  self.private_key = attributes[:'private_key']
166
180
  end
@@ -173,6 +187,10 @@ module DatadogAPIClient::V1
173
187
  self.project_id = attributes[:'project_id']
174
188
  end
175
189
 
190
+ if attributes.key?(:'resource_collection_enabled')
191
+ self.resource_collection_enabled = attributes[:'resource_collection_enabled']
192
+ end
193
+
176
194
  if attributes.key?(:'token_uri')
177
195
  self.token_uri = attributes[:'token_uri']
178
196
  end
@@ -197,9 +215,11 @@ module DatadogAPIClient::V1
197
215
  errors == o.errors &&
198
216
  host_filters == o.host_filters &&
199
217
  is_cspm_enabled == o.is_cspm_enabled &&
218
+ is_security_command_center_enabled == o.is_security_command_center_enabled &&
200
219
  private_key == o.private_key &&
201
220
  private_key_id == o.private_key_id &&
202
221
  project_id == o.project_id &&
222
+ resource_collection_enabled == o.resource_collection_enabled &&
203
223
  token_uri == o.token_uri &&
204
224
  type == o.type
205
225
  end
@@ -208,7 +228,7 @@ module DatadogAPIClient::V1
208
228
  # @return [Integer] Hash code
209
229
  # @!visibility private
210
230
  def hash
211
- [auth_provider_x509_cert_url, auth_uri, automute, client_email, client_id, client_x509_cert_url, errors, host_filters, is_cspm_enabled, private_key, private_key_id, project_id, token_uri, type].hash
231
+ [auth_provider_x509_cert_url, auth_uri, automute, client_email, client_id, client_x509_cert_url, errors, host_filters, is_cspm_enabled, is_security_command_center_enabled, private_key, private_key_id, project_id, resource_collection_enabled, token_uri, type].hash
212
232
  end
213
233
  end
214
234
  end
@@ -30,7 +30,7 @@ module DatadogAPIClient::V1
30
30
  # Description of the organization.
31
31
  attr_accessor :description
32
32
 
33
- # The name of the new child-organization, limited to 32 characters.
33
+ # The name of the child organization, limited to 32 characters.
34
34
  attr_reader :name
35
35
 
36
36
  # The `public_id` of the organization you are operating within.
@@ -73,6 +73,9 @@ module DatadogAPIClient::V1
73
73
  # min of all of those requests.
74
74
  attr_accessor :query
75
75
 
76
+ # A generic SLI specification. This is currently used for time-slice SLOs only.
77
+ attr_accessor :sli_specification
78
+
76
79
  # A list of tags associated with this service level objective.
77
80
  # Always included in service level objective responses (but may be empty).
78
81
  # Optional in create/update requests.
@@ -112,6 +115,7 @@ module DatadogAPIClient::V1
112
115
  :'monitor_tags' => :'monitor_tags',
113
116
  :'name' => :'name',
114
117
  :'query' => :'query',
118
+ :'sli_specification' => :'sli_specification',
115
119
  :'tags' => :'tags',
116
120
  :'target_threshold' => :'target_threshold',
117
121
  :'thresholds' => :'thresholds',
@@ -135,6 +139,7 @@ module DatadogAPIClient::V1
135
139
  :'monitor_tags' => :'Array<String>',
136
140
  :'name' => :'String',
137
141
  :'query' => :'ServiceLevelObjectiveQuery',
142
+ :'sli_specification' => :'SLOSliSpec',
138
143
  :'tags' => :'Array<String>',
139
144
  :'target_threshold' => :'Float',
140
145
  :'thresholds' => :'Array<SLOThreshold>',
@@ -214,6 +219,10 @@ module DatadogAPIClient::V1
214
219
  self.query = attributes[:'query']
215
220
  end
216
221
 
222
+ if attributes.key?(:'sli_specification')
223
+ self.sli_specification = attributes[:'sli_specification']
224
+ end
225
+
217
226
  if attributes.key?(:'tags')
218
227
  if (value = attributes[:'tags']).is_a?(Array)
219
228
  self.tags = value
@@ -299,6 +308,7 @@ module DatadogAPIClient::V1
299
308
  monitor_tags == o.monitor_tags &&
300
309
  name == o.name &&
301
310
  query == o.query &&
311
+ sli_specification == o.sli_specification &&
302
312
  tags == o.tags &&
303
313
  target_threshold == o.target_threshold &&
304
314
  thresholds == o.thresholds &&
@@ -311,7 +321,7 @@ module DatadogAPIClient::V1
311
321
  # @return [Integer] Hash code
312
322
  # @!visibility private
313
323
  def hash
314
- [created_at, creator, description, groups, id, modified_at, monitor_ids, monitor_tags, name, query, tags, target_threshold, thresholds, timeframe, type, warning_threshold].hash
324
+ [created_at, creator, description, groups, id, modified_at, monitor_ids, monitor_tags, name, query, sli_specification, tags, target_threshold, thresholds, timeframe, type, warning_threshold].hash
315
325
  end
316
326
  end
317
327
  end
@@ -47,6 +47,9 @@ module DatadogAPIClient::V1
47
47
  # min of all of those requests.
48
48
  attr_accessor :query
49
49
 
50
+ # A generic SLI specification. This is currently used for time-slice SLOs only.
51
+ attr_accessor :sli_specification
52
+
50
53
  # A list of tags associated with this service level objective.
51
54
  # Always included in service level objective responses (but may be empty).
52
55
  # Optional in create/update requests.
@@ -81,6 +84,7 @@ module DatadogAPIClient::V1
81
84
  :'monitor_ids' => :'monitor_ids',
82
85
  :'name' => :'name',
83
86
  :'query' => :'query',
87
+ :'sli_specification' => :'sli_specification',
84
88
  :'tags' => :'tags',
85
89
  :'target_threshold' => :'target_threshold',
86
90
  :'thresholds' => :'thresholds',
@@ -99,6 +103,7 @@ module DatadogAPIClient::V1
99
103
  :'monitor_ids' => :'Array<Integer>',
100
104
  :'name' => :'String',
101
105
  :'query' => :'ServiceLevelObjectiveQuery',
106
+ :'sli_specification' => :'SLOSliSpec',
102
107
  :'tags' => :'Array<String>',
103
108
  :'target_threshold' => :'Float',
104
109
  :'thresholds' => :'Array<SLOThreshold>',
@@ -156,6 +161,10 @@ module DatadogAPIClient::V1
156
161
  self.query = attributes[:'query']
157
162
  end
158
163
 
164
+ if attributes.key?(:'sli_specification')
165
+ self.sli_specification = attributes[:'sli_specification']
166
+ end
167
+
159
168
  if attributes.key?(:'tags')
160
169
  if (value = attributes[:'tags']).is_a?(Array)
161
170
  self.tags = value
@@ -236,6 +245,7 @@ module DatadogAPIClient::V1
236
245
  monitor_ids == o.monitor_ids &&
237
246
  name == o.name &&
238
247
  query == o.query &&
248
+ sli_specification == o.sli_specification &&
239
249
  tags == o.tags &&
240
250
  target_threshold == o.target_threshold &&
241
251
  thresholds == o.thresholds &&
@@ -248,7 +258,7 @@ module DatadogAPIClient::V1
248
258
  # @return [Integer] Hash code
249
259
  # @!visibility private
250
260
  def hash
251
- [description, groups, monitor_ids, name, query, tags, target_threshold, thresholds, timeframe, type, warning_threshold].hash
261
+ [description, groups, monitor_ids, name, query, sli_specification, tags, target_threshold, thresholds, timeframe, type, warning_threshold].hash
252
262
  end
253
263
  end
254
264
  end
@@ -0,0 +1,62 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # A formula and function query.
21
+ module SLODataSourceQueryDefinition
22
+ class << self
23
+ include BaseOneOfModel
24
+ include BaseOneOfModelNoDiscriminator
25
+
26
+ # List of class defined in oneOf (OpenAPI v3)
27
+ def openapi_one_of
28
+ [
29
+ :'FormulaAndFunctionMetricQueryDefinition'
30
+ ]
31
+ end
32
+ # Builds the object
33
+ # @param data [Mixed] Data to be matched against the list of oneOf items
34
+ # @return [Object] Returns the model or the data itself
35
+ def build(data)
36
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
37
+ # Note:
38
+ # - We do not attempt to check whether exactly one item matches.
39
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
40
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
41
+ # - TODO: scalar values are de facto behaving as if they were nullable.
42
+ # - TODO: logging when debugging is set.
43
+ openapi_one_of.each do |klass|
44
+ begin
45
+ next if klass == :AnyType # "nullable: true"
46
+ typed_data = find_and_cast_into_type(klass, data)
47
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
48
+ return typed_data if typed_data
49
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
50
+ end
51
+ end
52
+
53
+ if openapi_one_of.include?(:AnyType)
54
+ data
55
+ else
56
+ self._unparsed = true
57
+ DatadogAPIClient::UnparsedObject.new(data)
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,98 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # A formula that specifies how to combine the results of multiple queries.
21
+ class SLOFormula
22
+ include BaseGenericModel
23
+
24
+ # The formula string, which is an expression involving named queries.
25
+ attr_reader :formula
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'formula' => :'formula'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'formula' => :'String'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOFormula` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOFormula`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'formula')
60
+ self.formula = attributes[:'formula']
61
+ end
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ # @!visibility private
67
+ def valid?
68
+ return false if @formula.nil?
69
+ true
70
+ end
71
+
72
+ # Custom attribute writer method with validation
73
+ # @param formula [Object] Object to be assigned
74
+ # @!visibility private
75
+ def formula=(formula)
76
+ if formula.nil?
77
+ fail ArgumentError, 'invalid value for "formula", formula cannot be nil.'
78
+ end
79
+ @formula = formula
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ formula == o.formula
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ # @!visibility private
94
+ def hash
95
+ [formula].hash
96
+ end
97
+ end
98
+ end