Skip to content

Commit

Permalink
Regenerate client from commit 924a9178 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Dec 17, 2024
1 parent 5ba1b4b commit 1b65a21
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 76 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-17 15:50:59.257797",
"spec_repo_commit": "b82d3677"
"regenerated": "2024-12-17 21:45:07.603090",
"spec_repo_commit": "924a9178"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-17 15:50:59.273162",
"spec_repo_commit": "b82d3677"
"regenerated": "2024-12-17 21:45:07.617982",
"spec_repo_commit": "924a9178"
}
}
}
55 changes: 32 additions & 23 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
15 changes: 9 additions & 6 deletions examples/v1/azure-integration/UpdateAzureHostFilters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@
"*",
],
host_filters: "key:value,filter:example",
metrics_config: DatadogAPIClient::V1::AzureAccountMetricsConfig.new({
excluded_resource_providers: [
"Microsoft.Sql",
"Microsoft.Cdn",
],
}),
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: [
DatadogAPIClient::V1::ResourceProviderConfig.new({
metrics_enabled: true,
namespace: "Microsoft.Compute",
}),
],
tenant_name: "testc44-1234-5678-9101-cc00736ftest",
usage_metrics_enabled: true,
})
p api_instance.update_azure_host_filters(body)
6 changes: 0 additions & 6 deletions examples/v1/azure-integration/UpdateAzureIntegration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
new_client_id: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
new_tenant_name: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
resource_collection_enabled: true,
metrics_config: DatadogAPIClient::V1::AzureAccountMetricsConfig.new({
excluded_resource_providers: [
"Microsoft.Sql",
"Microsoft.Cdn",
],
}),
tenant_name: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
})
p api_instance.update_azure_integration(body)
12 changes: 6 additions & 6 deletions features/v1/azure_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -53,28 +53,28 @@ 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

@team:DataDog/azure-integrations
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
2 changes: 1 addition & 1 deletion features/v1/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def overrides
"v1.aws_tag_filter_delete_request" => "AWSTagFilterDeleteRequest",
"v1.aws_tag_filter_list_response" => "AWSTagFilterListResponse",
"v1.azure_account" => "AzureAccount",
"v1.azure_account_metrics_config" => "AzureAccountMetricsConfig",
"v1.cancel_downtimes_by_scope_request" => "CancelDowntimesByScopeRequest",
"v1.canceled_downtimes_ids" => "CanceledDowntimesIds",
"v1.change_widget_definition" => "ChangeWidgetDefinition",
Expand Down Expand Up @@ -407,6 +406,7 @@ def overrides
"v1.query_value_widget_definition_type" => "QueryValueWidgetDefinitionType",
"v1.query_value_widget_request" => "QueryValueWidgetRequest",
"v1.reference_table_logs_lookup_processor" => "ReferenceTableLogsLookupProcessor",
"v1.resource_provider_config" => "ResourceProviderConfig",
"v1.response_meta_attributes" => "ResponseMetaAttributes",
"v1.run_workflow_widget_definition" => "RunWorkflowWidgetDefinition",
"v1.run_workflow_widget_definition_type" => "RunWorkflowWidgetDefinitionType",
Expand Down
Loading

0 comments on commit 1b65a21

Please sign in to comment.