Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Container App filters to Azure API #1571

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "2023-10-26 14:19:44.920936",
"spec_repo_commit": "10504fc3"
"regenerated": "2023-10-26 18:12:28.024539",
"spec_repo_commit": "d4ce0c7b"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-26 14:19:44.934709",
"spec_repo_commit": "10504fc3"
"regenerated": "2023-10-26 18:12:28.058713",
"spec_repo_commit": "d4ce0c7b"
}
}
}
8 changes: 8 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,14 @@ components:
description: Your Azure web application secret key.
example: testingx./Sw*g/Y33t..R1cH+hScMDt
type: string
container_app_filters:
description: 'Limit the Azure container apps that are pulled into Datadog
using tags.

Only container apps that match one of the defined tags are imported into
Datadog.'
example: key:value,filter:example
type: string
cspm_enabled:
description: Enable Cloud Security Management Misconfigurations for your
organization.
Expand Down
1 change: 1 addition & 0 deletions examples/v1/azure-integration/CreateAzureIntegration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
automute: true,
client_id: "testc7f6-1234-5678-9101-3fcbf464test",
client_secret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
container_app_filters: "key:value,filter:example",
cspm_enabled: true,
custom_metrics_enabled: true,
errors: [
Expand Down
1 change: 1 addition & 0 deletions examples/v1/azure-integration/DeleteAzureIntegration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
automute: true,
client_id: "testc7f6-1234-5678-9101-3fcbf464test",
client_secret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
container_app_filters: "key:value,filter:example",
cspm_enabled: true,
custom_metrics_enabled: true,
errors: [
Expand Down
1 change: 1 addition & 0 deletions examples/v1/azure-integration/UpdateAzureHostFilters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
automute: true,
client_id: "testc7f6-1234-5678-9101-3fcbf464test",
client_secret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
container_app_filters: "key:value,filter:example",
cspm_enabled: true,
custom_metrics_enabled: true,
errors: [
Expand Down
1 change: 1 addition & 0 deletions examples/v1/azure-integration/UpdateAzureIntegration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
automute: true,
client_id: "testc7f6-1234-5678-9101-3fcbf464test",
client_secret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
container_app_filters: "key:value,filter:example",
cspm_enabled: true,
custom_metrics_enabled: true,
errors: [
Expand Down
16 changes: 8 additions & 8 deletions features/v1/azure_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ Feature: Azure Integration
@generated @skip @team:DataDog/cloud-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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-integrations
Scenario: Create an Azure integration returns "OK" 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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-integrations
Scenario: Delete an Azure integration returns "OK" 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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 200 OK

Expand All @@ -52,27 +52,27 @@ Feature: Azure Integration
@generated @skip @team:DataDog/cloud-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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-integrations
Scenario: Update an Azure integration returns "OK" 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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "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": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 200 OK
13 changes: 12 additions & 1 deletion lib/datadog_api_client/v1/models/azure_account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class AzureAccount
# Your Azure web application secret key.
attr_accessor :client_secret

# Limit the Azure container apps that are pulled into Datadog using tags.
# Only container apps that match one of the defined tags are imported into Datadog.
attr_accessor :container_app_filters

# Enable Cloud Security Management Misconfigurations for your organization.
attr_accessor :cspm_enabled

Expand Down Expand Up @@ -64,6 +68,7 @@ def self.attribute_map
:'automute' => :'automute',
:'client_id' => :'client_id',
:'client_secret' => :'client_secret',
:'container_app_filters' => :'container_app_filters',
:'cspm_enabled' => :'cspm_enabled',
:'custom_metrics_enabled' => :'custom_metrics_enabled',
:'errors' => :'errors',
Expand All @@ -82,6 +87,7 @@ def self.openapi_types
:'automute' => :'Boolean',
:'client_id' => :'String',
:'client_secret' => :'String',
:'container_app_filters' => :'String',
:'cspm_enabled' => :'Boolean',
:'custom_metrics_enabled' => :'Boolean',
:'errors' => :'Array<String>',
Expand Down Expand Up @@ -124,6 +130,10 @@ def initialize(attributes = {})
self.client_secret = attributes[:'client_secret']
end

if attributes.key?(:'container_app_filters')
self.container_app_filters = attributes[:'container_app_filters']
end

if attributes.key?(:'cspm_enabled')
self.cspm_enabled = attributes[:'cspm_enabled']
end
Expand Down Expand Up @@ -165,6 +175,7 @@ def ==(o)
automute == o.automute &&
client_id == o.client_id &&
client_secret == o.client_secret &&
container_app_filters == o.container_app_filters &&
cspm_enabled == o.cspm_enabled &&
custom_metrics_enabled == o.custom_metrics_enabled &&
errors == o.errors &&
Expand All @@ -178,7 +189,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[app_service_plan_filters, automute, client_id, client_secret, cspm_enabled, custom_metrics_enabled, errors, host_filters, new_client_id, new_tenant_name, tenant_name].hash
[app_service_plan_filters, automute, client_id, client_secret, container_app_filters, cspm_enabled, custom_metrics_enabled, errors, host_filters, new_client_id, new_tenant_name, tenant_name].hash
end
end
end
Loading