diff --git a/.apigentools-info b/.apigentools-info index 8f60ae67547..ccf57c34c36 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-18 16:21:27.746834", - "spec_repo_commit": "e12aeab9" + "regenerated": "2024-12-18 17:18:37.829361", + "spec_repo_commit": "8cb3faac" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-18 16:21:27.761718", - "spec_repo_commit": "e12aeab9" + "regenerated": "2024-12-18 17:18:37.843992", + "spec_repo_commit": "8cb3faac" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 51185eef690..dc238c59a76 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -844,8 +844,15 @@ components: Only hosts that match one of the defined tags are imported into Datadog.' example: key:value,filter:example type: string - metrics_config: - $ref: '#/components/schemas/AzureAccountMetricsConfig' + metrics_enabled: + description: Enable Azure metrics for your organization. + example: true + type: boolean + metrics_enabled_default: + description: Enable Azure metrics for your organization for resource providers + where no resource provider config is specified. + example: true + type: boolean new_client_id: description: Your New Azure web application ID. example: new1c7f6-1234-5678-9101-3fcbf464test @@ -860,37 +867,26 @@ components: monitored by this app registration. example: true type: boolean + resource_provider_configs: + description: Configuration settings applied to resources from the specified + Azure resource providers. + items: + $ref: '#/components/schemas/ResourceProviderConfig' + type: array tenant_name: description: Your Azure Active Directory ID. example: testc44-1234-5678-9101-cc00736ftest type: string + usage_metrics_enabled: + description: Enable azure.usage metrics for your organization. + example: true + type: boolean type: object AzureAccountListResponse: description: Accounts configured for your organization. items: $ref: '#/components/schemas/AzureAccount' type: array - AzureAccountMetricsConfig: - description: 'Dictionary containing the key `excluded_resource_providers` which - has to be a list of Microsoft Azure Resource Provider names. - - This feature is currently being beta tested. - - In order to enable all resource providers for metric collection, pass: - - `metrics_config: {"excluded_resource_providers": []}` (i.e., an empty list - for `excluded_resource_providers`).' - properties: - excluded_resource_providers: - description: List of Microsoft Azure Resource Providers to exclude from - metric collection. - example: - - Microsoft.Sql - - Microsoft.Cdn - items: - type: string - type: array - type: object CancelDowntimesByScopeRequest: description: Cancel downtimes according to scope. properties: @@ -10209,6 +10205,19 @@ components: - lookup_enrichment_table - type type: object + ResourceProviderConfig: + description: Configuration settings applied to resources from the specified + Azure resource provider. + properties: + metrics_enabled: + description: Collect metrics for resources from this provider. + example: true + type: boolean + namespace: + description: The provider namespace to apply this configuration to. + example: Microsoft.Compute + type: string + type: object ResponseMetaAttributes: description: Object describing meta attributes of response. properties: diff --git a/examples/v1/azure-integration/UpdateAzureHostFilters.java b/examples/v1/azure-integration/UpdateAzureHostFilters.java index 3a7825f46ff..ff62057d0da 100644 --- a/examples/v1/azure-integration/UpdateAzureHostFilters.java +++ b/examples/v1/azure-integration/UpdateAzureHostFilters.java @@ -4,8 +4,7 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.v1.api.AzureIntegrationApi; import com.datadog.api.client.v1.model.AzureAccount; -import com.datadog.api.client.v1.model.AzureAccountMetricsConfig; -import java.util.Arrays; +import com.datadog.api.client.v1.model.ResourceProviderConfig; import java.util.Collections; public class Example { @@ -24,13 +23,18 @@ public static void main(String[] args) { .customMetricsEnabled(true) .errors(Collections.singletonList("*")) .hostFilters("key:value,filter:example") - .metricsConfig( - new AzureAccountMetricsConfig() - .excludedResourceProviders(Arrays.asList("Microsoft.Sql", "Microsoft.Cdn"))) + .metricsEnabled(true) + .metricsEnabledDefault(true) .newClientId("new1c7f6-1234-5678-9101-3fcbf464test") .newTenantName("new1c44-1234-5678-9101-cc00736ftest") .resourceCollectionEnabled(true) - .tenantName("testc44-1234-5678-9101-cc00736ftest"); + .resourceProviderConfigs( + Collections.singletonList( + new ResourceProviderConfig() + .metricsEnabled(true) + .namespace("Microsoft.Compute"))) + .tenantName("testc44-1234-5678-9101-cc00736ftest") + .usageMetricsEnabled(true); try { apiInstance.updateAzureHostFilters(body); diff --git a/examples/v1/azure-integration/UpdateAzureIntegration.java b/examples/v1/azure-integration/UpdateAzureIntegration.java index 54f2e6e28cf..ecc66cb37f0 100644 --- a/examples/v1/azure-integration/UpdateAzureIntegration.java +++ b/examples/v1/azure-integration/UpdateAzureIntegration.java @@ -4,8 +4,6 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.v1.api.AzureIntegrationApi; import com.datadog.api.client.v1.model.AzureAccount; -import com.datadog.api.client.v1.model.AzureAccountMetricsConfig; -import java.util.Arrays; import java.util.Collections; public class Example { @@ -27,9 +25,6 @@ public static void main(String[] args) { .newClientId("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") .newTenantName("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") .resourceCollectionEnabled(true) - .metricsConfig( - new AzureAccountMetricsConfig() - .excludedResourceProviders(Arrays.asList("Microsoft.Sql", "Microsoft.Cdn"))) .tenantName("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"); try { diff --git a/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java b/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java index b0edcb4aa6d..9a0fe61c12f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java +++ b/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java @@ -29,11 +29,14 @@ AzureAccount.JSON_PROPERTY_CUSTOM_METRICS_ENABLED, AzureAccount.JSON_PROPERTY_ERRORS, AzureAccount.JSON_PROPERTY_HOST_FILTERS, - AzureAccount.JSON_PROPERTY_METRICS_CONFIG, + AzureAccount.JSON_PROPERTY_METRICS_ENABLED, + AzureAccount.JSON_PROPERTY_METRICS_ENABLED_DEFAULT, AzureAccount.JSON_PROPERTY_NEW_CLIENT_ID, AzureAccount.JSON_PROPERTY_NEW_TENANT_NAME, AzureAccount.JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED, - AzureAccount.JSON_PROPERTY_TENANT_NAME + AzureAccount.JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS, + AzureAccount.JSON_PROPERTY_TENANT_NAME, + AzureAccount.JSON_PROPERTY_USAGE_METRICS_ENABLED }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -66,8 +69,11 @@ public class AzureAccount { public static final String JSON_PROPERTY_HOST_FILTERS = "host_filters"; private String hostFilters; - public static final String JSON_PROPERTY_METRICS_CONFIG = "metrics_config"; - private AzureAccountMetricsConfig metricsConfig; + public static final String JSON_PROPERTY_METRICS_ENABLED = "metrics_enabled"; + private Boolean metricsEnabled; + + public static final String JSON_PROPERTY_METRICS_ENABLED_DEFAULT = "metrics_enabled_default"; + private Boolean metricsEnabledDefault; public static final String JSON_PROPERTY_NEW_CLIENT_ID = "new_client_id"; private String newClientId; @@ -79,9 +85,15 @@ public class AzureAccount { "resource_collection_enabled"; private Boolean resourceCollectionEnabled; + public static final String JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS = "resource_provider_configs"; + private List resourceProviderConfigs = null; + public static final String JSON_PROPERTY_TENANT_NAME = "tenant_name"; private String tenantName; + public static final String JSON_PROPERTY_USAGE_METRICS_ENABLED = "usage_metrics_enabled"; + private Boolean usageMetricsEnabled; + public AzureAccount appServicePlanFilters(String appServicePlanFilters) { this.appServicePlanFilters = appServicePlanFilters; return this; @@ -284,30 +296,47 @@ public void setHostFilters(String hostFilters) { this.hostFilters = hostFilters; } - public AzureAccount metricsConfig(AzureAccountMetricsConfig metricsConfig) { - this.metricsConfig = metricsConfig; - this.unparsed |= metricsConfig.unparsed; + public AzureAccount metricsEnabled(Boolean metricsEnabled) { + this.metricsEnabled = metricsEnabled; + return this; + } + + /** + * Enable Azure metrics for your organization. + * + * @return metricsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMetricsEnabled() { + return metricsEnabled; + } + + public void setMetricsEnabled(Boolean metricsEnabled) { + this.metricsEnabled = metricsEnabled; + } + + public AzureAccount metricsEnabledDefault(Boolean metricsEnabledDefault) { + this.metricsEnabledDefault = metricsEnabledDefault; return this; } /** - * Dictionary containing the key excluded_resource_providers which has to be a list - * of Microsoft Azure Resource Provider names. This feature is currently being beta tested. In - * order to enable all resource providers for metric collection, pass: - * metrics_config: {"excluded_resource_providers": []} (i.e., an empty list for - * excluded_resource_providers). + * Enable Azure metrics for your organization for resource providers where no resource provider + * config is specified. * - * @return metricsConfig + * @return metricsEnabledDefault */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRICS_CONFIG) + @JsonProperty(JSON_PROPERTY_METRICS_ENABLED_DEFAULT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AzureAccountMetricsConfig getMetricsConfig() { - return metricsConfig; + public Boolean getMetricsEnabledDefault() { + return metricsEnabledDefault; } - public void setMetricsConfig(AzureAccountMetricsConfig metricsConfig) { - this.metricsConfig = metricsConfig; + public void setMetricsEnabledDefault(Boolean metricsEnabledDefault) { + this.metricsEnabledDefault = metricsEnabledDefault; } public AzureAccount newClientId(String newClientId) { @@ -374,6 +403,41 @@ public void setResourceCollectionEnabled(Boolean resourceCollectionEnabled) { this.resourceCollectionEnabled = resourceCollectionEnabled; } + public AzureAccount resourceProviderConfigs( + List resourceProviderConfigs) { + this.resourceProviderConfigs = resourceProviderConfigs; + for (ResourceProviderConfig item : resourceProviderConfigs) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AzureAccount addResourceProviderConfigsItem( + ResourceProviderConfig resourceProviderConfigsItem) { + if (this.resourceProviderConfigs == null) { + this.resourceProviderConfigs = new ArrayList<>(); + } + this.resourceProviderConfigs.add(resourceProviderConfigsItem); + this.unparsed |= resourceProviderConfigsItem.unparsed; + return this; + } + + /** + * Configuration settings applied to resources from the specified Azure resource providers. + * + * @return resourceProviderConfigs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResourceProviderConfigs() { + return resourceProviderConfigs; + } + + public void setResourceProviderConfigs(List resourceProviderConfigs) { + this.resourceProviderConfigs = resourceProviderConfigs; + } + public AzureAccount tenantName(String tenantName) { this.tenantName = tenantName; return this; @@ -395,6 +459,27 @@ public void setTenantName(String tenantName) { this.tenantName = tenantName; } + public AzureAccount usageMetricsEnabled(Boolean usageMetricsEnabled) { + this.usageMetricsEnabled = usageMetricsEnabled; + return this; + } + + /** + * Enable azure.usage metrics for your organization. + * + * @return usageMetricsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE_METRICS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUsageMetricsEnabled() { + return usageMetricsEnabled; + } + + public void setUsageMetricsEnabled(Boolean usageMetricsEnabled) { + this.usageMetricsEnabled = usageMetricsEnabled; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -460,11 +545,14 @@ public boolean equals(Object o) { && Objects.equals(this.customMetricsEnabled, azureAccount.customMetricsEnabled) && Objects.equals(this.errors, azureAccount.errors) && Objects.equals(this.hostFilters, azureAccount.hostFilters) - && Objects.equals(this.metricsConfig, azureAccount.metricsConfig) + && Objects.equals(this.metricsEnabled, azureAccount.metricsEnabled) + && Objects.equals(this.metricsEnabledDefault, azureAccount.metricsEnabledDefault) && Objects.equals(this.newClientId, azureAccount.newClientId) && Objects.equals(this.newTenantName, azureAccount.newTenantName) && Objects.equals(this.resourceCollectionEnabled, azureAccount.resourceCollectionEnabled) + && Objects.equals(this.resourceProviderConfigs, azureAccount.resourceProviderConfigs) && Objects.equals(this.tenantName, azureAccount.tenantName) + && Objects.equals(this.usageMetricsEnabled, azureAccount.usageMetricsEnabled) && Objects.equals(this.additionalProperties, azureAccount.additionalProperties); } @@ -480,11 +568,14 @@ public int hashCode() { customMetricsEnabled, errors, hostFilters, - metricsConfig, + metricsEnabled, + metricsEnabledDefault, newClientId, newTenantName, resourceCollectionEnabled, + resourceProviderConfigs, tenantName, + usageMetricsEnabled, additionalProperties); } @@ -507,13 +598,22 @@ public String toString() { .append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" hostFilters: ").append(toIndentedString(hostFilters)).append("\n"); - sb.append(" metricsConfig: ").append(toIndentedString(metricsConfig)).append("\n"); + sb.append(" metricsEnabled: ").append(toIndentedString(metricsEnabled)).append("\n"); + sb.append(" metricsEnabledDefault: ") + .append(toIndentedString(metricsEnabledDefault)) + .append("\n"); sb.append(" newClientId: ").append(toIndentedString(newClientId)).append("\n"); sb.append(" newTenantName: ").append(toIndentedString(newTenantName)).append("\n"); sb.append(" resourceCollectionEnabled: ") .append(toIndentedString(resourceCollectionEnabled)) .append("\n"); + sb.append(" resourceProviderConfigs: ") + .append(toIndentedString(resourceProviderConfigs)) + .append("\n"); sb.append(" tenantName: ").append(toIndentedString(tenantName)).append("\n"); + sb.append(" usageMetricsEnabled: ") + .append(toIndentedString(usageMetricsEnabled)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v1/model/AzureAccountMetricsConfig.java b/src/main/java/com/datadog/api/client/v1/model/ResourceProviderConfig.java similarity index 55% rename from src/main/java/com/datadog/api/client/v1/model/AzureAccountMetricsConfig.java rename to src/main/java/com/datadog/api/client/v1/model/ResourceProviderConfig.java index a11666a45c9..4b542a08a49 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AzureAccountMetricsConfig.java +++ b/src/main/java/com/datadog/api/client/v1/model/ResourceProviderConfig.java @@ -12,57 +12,65 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Objects; -/** - * Dictionary containing the key excluded_resource_providers which has to be a list of - * Microsoft Azure Resource Provider names. This feature is currently being beta tested. In order to - * enable all resource providers for metric collection, pass: - * metrics_config: {"excluded_resource_providers": []} (i.e., an empty list for - * excluded_resource_providers). - */ -@JsonPropertyOrder({AzureAccountMetricsConfig.JSON_PROPERTY_EXCLUDED_RESOURCE_PROVIDERS}) +/** Configuration settings applied to resources from the specified Azure resource provider. */ +@JsonPropertyOrder({ + ResourceProviderConfig.JSON_PROPERTY_METRICS_ENABLED, + ResourceProviderConfig.JSON_PROPERTY_NAMESPACE +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class AzureAccountMetricsConfig { +public class ResourceProviderConfig { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_EXCLUDED_RESOURCE_PROVIDERS = - "excluded_resource_providers"; - private List excludedResourceProviders = null; + public static final String JSON_PROPERTY_METRICS_ENABLED = "metrics_enabled"; + private Boolean metricsEnabled; + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + private String namespace; - public AzureAccountMetricsConfig excludedResourceProviders( - List excludedResourceProviders) { - this.excludedResourceProviders = excludedResourceProviders; + public ResourceProviderConfig metricsEnabled(Boolean metricsEnabled) { + this.metricsEnabled = metricsEnabled; return this; } - public AzureAccountMetricsConfig addExcludedResourceProvidersItem( - String excludedResourceProvidersItem) { - if (this.excludedResourceProviders == null) { - this.excludedResourceProviders = new ArrayList<>(); - } - this.excludedResourceProviders.add(excludedResourceProvidersItem); + /** + * Collect metrics for resources from this provider. + * + * @return metricsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMetricsEnabled() { + return metricsEnabled; + } + + public void setMetricsEnabled(Boolean metricsEnabled) { + this.metricsEnabled = metricsEnabled; + } + + public ResourceProviderConfig namespace(String namespace) { + this.namespace = namespace; return this; } /** - * List of Microsoft Azure Resource Providers to exclude from metric collection. + * The provider namespace to apply this configuration to. * - * @return excludedResourceProviders + * @return namespace */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXCLUDED_RESOURCE_PROVIDERS) + @JsonProperty(JSON_PROPERTY_NAMESPACE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getExcludedResourceProviders() { - return excludedResourceProviders; + public String getNamespace() { + return namespace; } - public void setExcludedResourceProviders(List excludedResourceProviders) { - this.excludedResourceProviders = excludedResourceProviders; + public void setNamespace(String namespace) { + this.namespace = namespace; } /** @@ -77,10 +85,10 @@ public void setExcludedResourceProviders(List excludedResourceProviders) * * @param key The arbitrary key to set * @param value The associated value - * @return AzureAccountMetricsConfig + * @return ResourceProviderConfig */ @JsonAnySetter - public AzureAccountMetricsConfig putAdditionalProperty(String key, Object value) { + public ResourceProviderConfig putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -111,7 +119,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this AzureAccountMetricsConfig object is equal to o. */ + /** Return true if this ResourceProviderConfig object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,25 +128,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AzureAccountMetricsConfig azureAccountMetricsConfig = (AzureAccountMetricsConfig) o; - return Objects.equals( - this.excludedResourceProviders, azureAccountMetricsConfig.excludedResourceProviders) - && Objects.equals( - this.additionalProperties, azureAccountMetricsConfig.additionalProperties); + ResourceProviderConfig resourceProviderConfig = (ResourceProviderConfig) o; + return Objects.equals(this.metricsEnabled, resourceProviderConfig.metricsEnabled) + && Objects.equals(this.namespace, resourceProviderConfig.namespace) + && Objects.equals(this.additionalProperties, resourceProviderConfig.additionalProperties); } @Override public int hashCode() { - return Objects.hash(excludedResourceProviders, additionalProperties); + return Objects.hash(metricsEnabled, namespace, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AzureAccountMetricsConfig {\n"); - sb.append(" excludedResourceProviders: ") - .append(toIndentedString(excludedResourceProviders)) - .append("\n"); + sb.append("class ResourceProviderConfig {\n"); + sb.append(" metricsEnabled: ").append(toIndentedString(metricsEnabled)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/test/resources/cassettes/features/v1/Create_an_Azure_integration_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Create_an_Azure_integration_returns_OK_response.json index 8bdd33aadfd..3f8e6ea5c15 100644 --- a/src/test/resources/cassettes/features/v1/Create_an_Azure_integration_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v1/Create_an_Azure_integration_returns_OK_response.json @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "92cc025e-6a5d-ac9c-a6af-65450cdedad2" + "id": "92cc025e-6a5d-ac9c-a6af-65450cdedad1" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.freeze b/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.freeze index 870f5621991..4cf590b2a0f 100644 --- a/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.freeze @@ -1 +1 @@ -2024-07-25T18:47:35.517Z \ No newline at end of file +2024-12-17T21:43:00.678Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.json index b9a2d2bc12a..2af4db53e78 100644 --- a/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17219332-0000-0000-0000-172193325500\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"metrics_config\":{\"excluded_resource_providers\":[\"Microsoft.Sql\",\"Microsoft.Cdn\"]},\"new_client_id\":\"17219332-0000-0000-0000-172193325500\",\"new_tenant_name\":\"17219332-0000-0000-0000-172193325500\",\"resource_collection_enabled\":true,\"tenant_name\":\"17219332-0000-0000-0000-172193325500\"}" + "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17344717-0000-0000-0000-173447178000\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"metrics_enabled\":true,\"metrics_enabled_default\":true,\"new_client_id\":\"17344717-0000-0000-0000-173447178000\",\"new_tenant_name\":\"17344717-0000-0000-0000-173447178000\",\"resource_collection_enabled\":true,\"resource_provider_configs\":[{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Compute\"},{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Web\"}],\"tenant_name\":\"17344717-0000-0000-0000-173447178000\",\"usage_metrics_enabled\":true}" }, "headers": {}, "method": "POST", @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "a4786fba-223e-c55e-474f-89e7ba3e2920" + "id": "4e2e023b-b6c5-6332-0969-71d544522742" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"client_id\":\"17219332-0000-0000-0000-172193325500\",\"tenant_name\":\"17219332-0000-0000-0000-172193325500\"}" + "json": "{\"client_id\":\"17344717-0000-0000-0000-173447178000\",\"tenant_name\":\"17344717-0000-0000-0000-173447178000\"}" }, "headers": {}, "method": "DELETE", @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "92cc025e-6a5d-ac9c-a6af-65450cdedad3" + "id": "18bf59b1-5d58-2ef7-1a8b-79afe390d743" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"client_id\":\"17219332-0000-0000-0000-172193325500\",\"tenant_name\":\"17219332-0000-0000-0000-172193325500\"}" + "json": "{\"client_id\":\"17344717-0000-0000-0000-173447178000\",\"tenant_name\":\"17344717-0000-0000-0000-173447178000\"}" }, "headers": {}, "method": "DELETE", @@ -87,6 +87,6 @@ "timeToLive": { "unlimited": true }, - "id": "92cc025e-6a5d-ac9c-a6af-65450cdedad4" + "id": "18bf59b1-5d58-2ef7-1a8b-79afe390d744" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.freeze b/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.freeze index fd432cbc306..d500dc214ee 100644 --- a/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.freeze @@ -1 +1 @@ -2024-07-25T18:47:35.975Z \ No newline at end of file +2024-12-17T21:43:01.129Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.json index 895966729f7..a14403baa9f 100644 --- a/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17219332-0000-0000-0000-172193325500\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"metrics_config\":{\"excluded_resource_providers\":[\"Microsoft.Sql\",\"Microsoft.Cdn\"]},\"new_client_id\":\"17219332-0000-0000-0000-172193325500\",\"new_tenant_name\":\"17219332-0000-0000-0000-172193325500\",\"resource_collection_enabled\":true,\"tenant_name\":\"17219332-0000-0000-0000-172193325500\"}" + "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17344717-0000-0000-0000-173447178100\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"metrics_enabled\":true,\"metrics_enabled_default\":true,\"new_client_id\":\"17344717-0000-0000-0000-173447178100\",\"new_tenant_name\":\"17344717-0000-0000-0000-173447178100\",\"resource_collection_enabled\":true,\"resource_provider_configs\":[{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Compute\"},{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Web\"}],\"tenant_name\":\"17344717-0000-0000-0000-173447178100\",\"usage_metrics_enabled\":true}" }, "headers": {}, "method": "POST", @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "a4786fba-223e-c55e-474f-89e7ba3e291f" + "id": "6ba1c834-178d-7fbd-05a9-8c57c5b3a59c" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17219332-0000-0000-0000-172193325500\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"metrics_config\":{\"excluded_resource_providers\":[\"Microsoft.Sql\",\"Microsoft.Cdn\"]},\"new_client_id\":\"17219332-0000-0000-0000-172193325500\",\"new_tenant_name\":\"17219332-0000-0000-0000-172193325500\",\"resource_collection_enabled\":true,\"tenant_name\":\"17219332-0000-0000-0000-172193325500\"}" + "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17344717-0000-0000-0000-173447178100\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"new_client_id\":\"17344717-0000-0000-0000-173447178100\",\"new_tenant_name\":\"17344717-0000-0000-0000-173447178100\",\"resource_collection_enabled\":true,\"tenant_name\":\"17344717-0000-0000-0000-173447178100\"}" }, "headers": {}, "method": "PUT", @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "4b7878a3-4670-2d19-bc5f-b0a28b21768c" + "id": "d21774b0-7473-079b-4c57-d1a122d1c43a" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"client_id\":\"17219332-0000-0000-0000-172193325500\",\"tenant_name\":\"17219332-0000-0000-0000-172193325500\"}" + "json": "{\"client_id\":\"17344717-0000-0000-0000-173447178100\",\"tenant_name\":\"17344717-0000-0000-0000-173447178100\"}" }, "headers": {}, "method": "DELETE", @@ -87,6 +87,6 @@ "timeToLive": { "unlimited": true }, - "id": "92cc025e-6a5d-ac9c-a6af-65450cdedad1" + "id": "5f728266-9032-95f3-5a63-47b82c4cbe45" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v1/api/azure_integration.feature b/src/test/resources/com/datadog/api/client/v1/api/azure_integration.feature index 6a9449c67b5..8d31237b5b6 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/azure_integration.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/azure_integration.feature @@ -12,7 +12,7 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Create an Azure integration returns "Bad Request" response Given new "CreateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @@ -26,7 +26,7 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Delete an Azure integration returns "Bad Request" response Given new "DeleteAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @@ -53,21 +53,21 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "Bad Request" response Given new "UpdateAzureHostFilters" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "OK" response Given new "UpdateAzureHostFilters" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/azure-integrations Scenario: Update an Azure integration returns "Bad Request" response Given new "UpdateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @@ -75,6 +75,6 @@ Feature: Azure Integration Scenario: Update an Azure integration returns "OK" response Given there is a valid "azure_account" in the system And new "UpdateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "tenant_name": "{{ uuid }}"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "tenant_name": "{{ uuid }}"} When the request is sent Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v1/api/given.json b/src/test/resources/com/datadog/api/client/v1/api/given.json index 1997404026d..8b01df19ad6 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/given.json +++ b/src/test/resources/com/datadog/api/client/v1/api/given.json @@ -117,7 +117,7 @@ { "name": "body", "origin": "request", - "value": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{ uuid }}\",\n \"client_secret\": \"TestingRh2nx664kUy5dIApvM54T4AtO\",\n \"container_app_filters\": \"key:value,filter:example\",\n \"cspm_enabled\": true,\n \"custom_metrics_enabled\": true,\n \"errors\": [\"*\"],\n \"host_filters\": \"key:value,filter:example\",\n \"new_client_id\": \"{{ uuid }}\",\n \"new_tenant_name\": \"{{ uuid }}\",\n \"resource_collection_enabled\": true,\n \"metrics_config\": {\n \"excluded_resource_providers\": [\"Microsoft.Sql\", \"Microsoft.Cdn\"]\n },\n \"tenant_name\": \"{{ uuid }}\"\n}" + "value": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{ uuid }}\",\n \"client_secret\": \"TestingRh2nx664kUy5dIApvM54T4AtO\",\n \"container_app_filters\": \"key:value,filter:example\",\n \"cspm_enabled\": true,\n \"custom_metrics_enabled\": true,\n \"errors\": [\"*\"],\n \"host_filters\": \"key:value,filter:example\",\n \"metrics_enabled\": true,\n \"metrics_enabled_default\": true,\n \"new_client_id\": \"{{ uuid }}\",\n \"new_tenant_name\": \"{{ uuid }}\",\n \"resource_collection_enabled\": true,\n \"resource_provider_configs\": [\n {\n \"namespace\": \"Microsoft.Compute\",\n \"metrics_enabled\": false\n },\n {\n \"namespace\": \"Microsoft.Web\",\n \"metrics_enabled\": false\n }\n ],\n \"tenant_name\": \"{{ uuid }}\",\n \"usage_metrics_enabled\": true\n}" } ], "step": "there is a valid \"azure_account\" in the system",