From ea3e65dc546a090d03812e6531aa442aaa46c65e Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 1 Feb 2023 09:27:52 +0000 Subject: [PATCH] Regenerate client from commit a0ca58a8 of spec repo --- .apigentools-info | 8 ++++---- .generator/schemas/v1/openapi.yaml | 6 ++++++ examples/v1/gcp-integration/CreateGCPIntegration.ts | 1 + examples/v1/gcp-integration/DeleteGCPIntegration.ts | 1 + examples/v1/gcp-integration/UpdateGCPIntegration.ts | 1 + features/v1/gcp_integration.feature | 12 ++++++------ packages/datadog-api-client-v1/models/GCPAccount.ts | 8 ++++++++ 7 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index e6dc6a05fc3..2fcf26b5746 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-01-27 19:05:30.354710", - "spec_repo_commit": "e546294e" + "regenerated": "2023-02-01 09:26:44.732299", + "spec_repo_commit": "a0ca58a8" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-01-27 19:05:30.367411", - "spec_repo_commit": "e546294e" + "regenerated": "2023-02-01 09:26:44.744151", + "spec_repo_commit": "a0ca58a8" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index b0ebff9ce0c..027b5cfb27a 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -2838,6 +2838,12 @@ components: Only hosts that match one of the defined tags are imported into Datadog.' example: key:value,filter:example type: string + is_cspm_enabled: + default: false + description: When enabled, Datadog performs configuration checks across + your Google Cloud environment by continuously scanning every resource. + example: true + type: boolean private_key: description: Your private key name found in your JSON service account key. example: private_key diff --git a/examples/v1/gcp-integration/CreateGCPIntegration.ts b/examples/v1/gcp-integration/CreateGCPIntegration.ts index 25044ca310d..05dd93401f1 100644 --- a/examples/v1/gcp-integration/CreateGCPIntegration.ts +++ b/examples/v1/gcp-integration/CreateGCPIntegration.ts @@ -17,6 +17,7 @@ const params: v1.GCPIntegrationApiCreateGCPIntegrationRequest = { "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", errors: ["*"], hostFilters: "key:value,filter:example", + isCspmEnabled: true, privateKey: "private_key", privateKeyId: "123456789abcdefghi123456789abcdefghijklm", projectId: "datadog-apitest", diff --git a/examples/v1/gcp-integration/DeleteGCPIntegration.ts b/examples/v1/gcp-integration/DeleteGCPIntegration.ts index dc61a2e4237..e1a99db03a5 100644 --- a/examples/v1/gcp-integration/DeleteGCPIntegration.ts +++ b/examples/v1/gcp-integration/DeleteGCPIntegration.ts @@ -17,6 +17,7 @@ const params: v1.GCPIntegrationApiDeleteGCPIntegrationRequest = { "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", errors: ["*"], hostFilters: "key:value,filter:example", + isCspmEnabled: true, privateKey: "private_key", privateKeyId: "123456789abcdefghi123456789abcdefghijklm", projectId: "datadog-apitest", diff --git a/examples/v1/gcp-integration/UpdateGCPIntegration.ts b/examples/v1/gcp-integration/UpdateGCPIntegration.ts index 2be3b8d9fc5..5f3a517db0b 100644 --- a/examples/v1/gcp-integration/UpdateGCPIntegration.ts +++ b/examples/v1/gcp-integration/UpdateGCPIntegration.ts @@ -17,6 +17,7 @@ const params: v1.GCPIntegrationApiUpdateGCPIntegrationRequest = { "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", errors: ["*"], hostFilters: "key:value,filter:example", + isCspmEnabled: true, privateKey: "private_key", privateKeyId: "123456789abcdefghi123456789abcdefghijklm", projectId: "datadog-apitest", diff --git a/features/v1/gcp_integration.feature b/features/v1/gcp_integration.feature index ccf14857139..ae1f2eb902c 100644 --- a/features/v1/gcp_integration.feature +++ b/features/v1/gcp_integration.feature @@ -13,28 +13,28 @@ Feature: GCP Integration @generated @skip @team:DataDog/cloud-integrations Scenario: Create a GCP integration returns "Bad Request" response Given new "CreateGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/cloud-integrations Scenario: Create a GCP integration returns "OK" response Given new "CreateGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/cloud-integrations Scenario: Delete a GCP integration returns "Bad Request" response Given new "DeleteGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/cloud-integrations Scenario: Delete a GCP integration returns "OK" response Given new "DeleteGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 200 OK @@ -53,13 +53,13 @@ Feature: GCP Integration @generated @skip @team:DataDog/cloud-integrations Scenario: Update a GCP integration returns "Bad Request" response Given new "UpdateGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/cloud-integrations Scenario: Update a GCP integration returns "OK" response Given new "UpdateGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 200 OK diff --git a/packages/datadog-api-client-v1/models/GCPAccount.ts b/packages/datadog-api-client-v1/models/GCPAccount.ts index 508b2f9d12e..e035126b1d8 100644 --- a/packages/datadog-api-client-v1/models/GCPAccount.ts +++ b/packages/datadog-api-client-v1/models/GCPAccount.ts @@ -44,6 +44,10 @@ export class GCPAccount { * Only hosts that match one of the defined tags are imported into Datadog. */ "hostFilters"?: string; + /** + * When enabled, Datadog performs configuration checks across your Google Cloud environment by continuously scanning every resource. + */ + "isCspmEnabled"?: boolean; /** * Your private key name found in your JSON service account key. */ @@ -106,6 +110,10 @@ export class GCPAccount { baseName: "host_filters", type: "string", }, + isCspmEnabled: { + baseName: "is_cspm_enabled", + type: "boolean", + }, privateKey: { baseName: "private_key", type: "string",