From 08beba876c0a9c3742276e7066ab27ce1c86c4f6 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 3 Oct 2023 23:42:20 +0000 Subject: [PATCH] Regenerate client from commit e62b4d51 of spec repo --- .apigentools-info | 8 ++-- .generator/schemas/v1/openapi.yaml | 8 ++++ api/datadogV1/model_azure_account.go | 38 ++++++++++++++++++- .../CreateAzureIntegration.go | 1 + .../DeleteAzureIntegration.go | 1 + .../UpdateAzureHostFilters.go | 1 + .../UpdateAzureIntegration.go | 1 + .../features/v1/azure_integration.feature | 16 ++++---- 8 files changed, 61 insertions(+), 13 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index b1d3eb5a2d1..c5af266ad93 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-10-02 18:58:13.126434", - "spec_repo_commit": "aee9e14a" + "regenerated": "2023-10-03 23:41:02.697671", + "spec_repo_commit": "e62b4d51" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-10-02 18:58:13.180866", - "spec_repo_commit": "aee9e14a" + "regenerated": "2023-10-03 23:41:02.711676", + "spec_repo_commit": "e62b4d51" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 15061f9e125..b48f25aed6a 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -667,6 +667,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. diff --git a/api/datadogV1/model_azure_account.go b/api/datadogV1/model_azure_account.go index b928036ef81..12e219a2f99 100644 --- a/api/datadogV1/model_azure_account.go +++ b/api/datadogV1/model_azure_account.go @@ -21,6 +21,9 @@ type AzureAccount struct { ClientId *string `json:"client_id,omitempty"` // Your Azure web application secret key. ClientSecret *string `json:"client_secret,omitempty"` + // 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. + ContainerAppFilters *string `json:"container_app_filters,omitempty"` // Enable Cloud Security Management Misconfigurations for your organization. CspmEnabled *bool `json:"cspm_enabled,omitempty"` // Enable custom metrics for your organization. @@ -170,6 +173,34 @@ func (o *AzureAccount) SetClientSecret(v string) { o.ClientSecret = &v } +// GetContainerAppFilters returns the ContainerAppFilters field value if set, zero value otherwise. +func (o *AzureAccount) GetContainerAppFilters() string { + if o == nil || o.ContainerAppFilters == nil { + var ret string + return ret + } + return *o.ContainerAppFilters +} + +// GetContainerAppFiltersOk returns a tuple with the ContainerAppFilters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AzureAccount) GetContainerAppFiltersOk() (*string, bool) { + if o == nil || o.ContainerAppFilters == nil { + return nil, false + } + return o.ContainerAppFilters, true +} + +// HasContainerAppFilters returns a boolean if a field has been set. +func (o *AzureAccount) HasContainerAppFilters() bool { + return o != nil && o.ContainerAppFilters != nil +} + +// SetContainerAppFilters gets a reference to the given string and assigns it to the ContainerAppFilters field. +func (o *AzureAccount) SetContainerAppFilters(v string) { + o.ContainerAppFilters = &v +} + // GetCspmEnabled returns the CspmEnabled field value if set, zero value otherwise. func (o *AzureAccount) GetCspmEnabled() bool { if o == nil || o.CspmEnabled == nil { @@ -384,6 +415,9 @@ func (o AzureAccount) MarshalJSON() ([]byte, error) { if o.ClientSecret != nil { toSerialize["client_secret"] = o.ClientSecret } + if o.ContainerAppFilters != nil { + toSerialize["container_app_filters"] = o.ContainerAppFilters + } if o.CspmEnabled != nil { toSerialize["cspm_enabled"] = o.CspmEnabled } @@ -419,6 +453,7 @@ func (o *AzureAccount) UnmarshalJSON(bytes []byte) (err error) { Automute *bool `json:"automute,omitempty"` ClientId *string `json:"client_id,omitempty"` ClientSecret *string `json:"client_secret,omitempty"` + ContainerAppFilters *string `json:"container_app_filters,omitempty"` CspmEnabled *bool `json:"cspm_enabled,omitempty"` CustomMetricsEnabled *bool `json:"custom_metrics_enabled,omitempty"` Errors []string `json:"errors,omitempty"` @@ -432,7 +467,7 @@ func (o *AzureAccount) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"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"}) + datadog.DeleteKeys(additionalProperties, &[]string{"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"}) } else { return err } @@ -440,6 +475,7 @@ func (o *AzureAccount) UnmarshalJSON(bytes []byte) (err error) { o.Automute = all.Automute o.ClientId = all.ClientId o.ClientSecret = all.ClientSecret + o.ContainerAppFilters = all.ContainerAppFilters o.CspmEnabled = all.CspmEnabled o.CustomMetricsEnabled = all.CustomMetricsEnabled o.Errors = all.Errors diff --git a/examples/v1/azure-integration/CreateAzureIntegration.go b/examples/v1/azure-integration/CreateAzureIntegration.go index d04da44efef..556d1d4b7a4 100644 --- a/examples/v1/azure-integration/CreateAzureIntegration.go +++ b/examples/v1/azure-integration/CreateAzureIntegration.go @@ -18,6 +18,7 @@ func main() { Automute: datadog.PtrBool(true), ClientId: datadog.PtrString("testc7f6-1234-5678-9101-3fcbf464test"), ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"), + ContainerAppFilters: datadog.PtrString("key:value,filter:example"), CspmEnabled: datadog.PtrBool(true), CustomMetricsEnabled: datadog.PtrBool(true), Errors: []string{ diff --git a/examples/v1/azure-integration/DeleteAzureIntegration.go b/examples/v1/azure-integration/DeleteAzureIntegration.go index a12276eb9fb..fa9b822b1e7 100644 --- a/examples/v1/azure-integration/DeleteAzureIntegration.go +++ b/examples/v1/azure-integration/DeleteAzureIntegration.go @@ -18,6 +18,7 @@ func main() { Automute: datadog.PtrBool(true), ClientId: datadog.PtrString("testc7f6-1234-5678-9101-3fcbf464test"), ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"), + ContainerAppFilters: datadog.PtrString("key:value,filter:example"), CspmEnabled: datadog.PtrBool(true), CustomMetricsEnabled: datadog.PtrBool(true), Errors: []string{ diff --git a/examples/v1/azure-integration/UpdateAzureHostFilters.go b/examples/v1/azure-integration/UpdateAzureHostFilters.go index 2ae93bd7f30..12ee2ea69bc 100644 --- a/examples/v1/azure-integration/UpdateAzureHostFilters.go +++ b/examples/v1/azure-integration/UpdateAzureHostFilters.go @@ -18,6 +18,7 @@ func main() { Automute: datadog.PtrBool(true), ClientId: datadog.PtrString("testc7f6-1234-5678-9101-3fcbf464test"), ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"), + ContainerAppFilters: datadog.PtrString("key:value,filter:example"), CspmEnabled: datadog.PtrBool(true), CustomMetricsEnabled: datadog.PtrBool(true), Errors: []string{ diff --git a/examples/v1/azure-integration/UpdateAzureIntegration.go b/examples/v1/azure-integration/UpdateAzureIntegration.go index 0b4e9143a31..8fef5264706 100644 --- a/examples/v1/azure-integration/UpdateAzureIntegration.go +++ b/examples/v1/azure-integration/UpdateAzureIntegration.go @@ -18,6 +18,7 @@ func main() { Automute: datadog.PtrBool(true), ClientId: datadog.PtrString("testc7f6-1234-5678-9101-3fcbf464test"), ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"), + ContainerAppFilters: datadog.PtrString("key:value,filter:example"), CspmEnabled: datadog.PtrBool(true), CustomMetricsEnabled: datadog.PtrBool(true), Errors: []string{ diff --git a/tests/scenarios/features/v1/azure_integration.feature b/tests/scenarios/features/v1/azure_integration.feature index eb8cf95d114..c7ef5e4b837 100644 --- a/tests/scenarios/features/v1/azure_integration.feature +++ b/tests/scenarios/features/v1/azure_integration.feature @@ -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 @@ -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