Skip to content

Commit

Permalink
Regenerate client from commit 1e75e401 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Dec 20, 2023
1 parent 289c0a5 commit 87ff06d
Show file tree
Hide file tree
Showing 15 changed files with 231 additions and 40 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": "2023-12-18 13:46:53.516392",
"spec_repo_commit": "f363f7b4"
"regenerated": "2023-12-20 13:53:17.396665",
"spec_repo_commit": "1e75e401"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-18 13:46:53.531307",
"spec_repo_commit": "f363f7b4"
"regenerated": "2023-12-20 13:53:17.411015",
"spec_repo_commit": "1e75e401"
}
}
}
7 changes: 2 additions & 5 deletions examples/v1/gcp-integration/CreateGCPIntegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
body = GCPAccount(
auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
auth_uri="https://accounts.google.com/o/oauth2/auth",
client_email="[email protected].com",
client_id="123456712345671234567",
client_email="252bf553ef04b351@example.com",
client_id="163662907116366290710",
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,
is_security_command_center_enabled=True,
Expand Down
18 changes: 2 additions & 16 deletions examples/v1/gcp-integration/DeleteGCPIntegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,9 @@
from datadog_api_client.v1.model.gcp_account import GCPAccount

body = GCPAccount(
auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
auth_uri="https://accounts.google.com/o/oauth2/auth",
client_email="[email protected]",
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,
is_security_command_center_enabled=True,
private_key="private_key",
private_key_id="123456789abcdefghi123456789abcdefghijklm",
client_email="[email protected]",
client_id="163662907116366290710",
project_id="datadog-apitest",
resource_collection_enabled=True,
token_uri="https://accounts.google.com/o/oauth2/token",
type="service_account",
)

configuration = Configuration()
Expand Down
7 changes: 2 additions & 5 deletions examples/v1/gcp-integration/UpdateGCPIntegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
body = GCPAccount(
auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
auth_uri="https://accounts.google.com/o/oauth2/auth",
client_email="[email protected].com",
client_id="123456712345671234567",
client_email="252bf553ef04b351@example.com",
client_id="163662907116366290710",
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,
is_security_command_center_enabled=True,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-12-20T13:18:07.717Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
interactions:
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"[email protected]","client_id":"170307828717030782870","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","host_filters":"key:value,filter:example","is_cspm_enabled":true,"is_security_command_center_enabled":true,"private_key":"private_key","private_key_id":"123456789abcdefghi123456789abcdefghijklm","project_id":"datadog-apitest","resource_collection_enabled":true,"token_uri":"https://accounts.google.com/o/oauth2/token","type":"service_account"}'
headers:
accept:
- application/json
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
- request:
body: '{"client_email":"[email protected]","client_id":"170307828717030782870","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
content-type:
- application/json
method: DELETE
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-12-20T13:20:18.421Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
interactions:
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"[email protected]","client_id":"170307841817030784180","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","host_filters":"key:value,filter:example","is_cspm_enabled":true,"is_security_command_center_enabled":true,"private_key":"private_key","private_key_id":"123456789abcdefghi123456789abcdefghijklm","project_id":"datadog-apitest","resource_collection_enabled":true,"token_uri":"https://accounts.google.com/o/oauth2/token","type":"service_account"}'
headers:
accept:
- application/json
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
- request:
body: '{"client_email":"[email protected]","client_id":"170307841817030784180","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
content-type:
- application/json
method: DELETE
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
- request:
body: '{"client_email":"[email protected]","client_id":"170307841817030784180","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
content-type:
- application/json
method: DELETE
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-12-20T13:44:06.411Z

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-12-20T13:43:40.420Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
interactions:
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"[email protected]","client_id":"170307982017030798200","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","host_filters":"key:value,filter:example","is_cspm_enabled":true,"is_security_command_center_enabled":true,"private_key":"private_key","private_key_id":"123456789abcdefghi123456789abcdefghijklm","project_id":"datadog-apitest","resource_collection_enabled":true,"token_uri":"https://accounts.google.com/o/oauth2/token","type":"service_account"}'
headers:
accept:
- application/json
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"[email protected]","client_id":"170307982017030798200","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","host_filters":"key:value,filter:example","is_cspm_enabled":true,"is_security_command_center_enabled":true,"private_key":"private_key","private_key_id":"123456789abcdefghi123456789abcdefghijklm","project_id":"datadog-apitest","resource_collection_enabled":true,"token_uri":"https://accounts.google.com/o/oauth2/token","type":"service_account"}'
headers:
accept:
- application/json
content-type:
- application/json
method: PUT
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
- request:
body: '{"client_email":"[email protected]","client_id":"170307982017030798200","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
content-type:
- application/json
method: DELETE
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
version: 1
20 changes: 11 additions & 9 deletions tests/v1/features/gcp_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Feature: GCP Integration
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/gcp-integrations
@team:DataDog/gcp-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": "[email protected].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, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "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": "{{unique_hash}}@example.com", "client_id": "{{ timestamp("now") }}{{ timestamp("now") }}0", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
When the request is sent
Then the response status is 200 OK

Expand All @@ -31,10 +31,11 @@ Feature: GCP Integration
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/gcp-integrations
@team:DataDog/gcp-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": "[email protected]", "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, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
Given there is a valid "gcp_account" in the system
And new "DeleteGCPIntegration" request
And body with value {"client_email": "{{unique_hash}}@example.com", "client_id": "{{ timestamp("now") }}{{ timestamp("now") }}0", "project_id": "datadog-apitest"}
When the request is sent
Then the response status is 200 OK

Expand All @@ -44,7 +45,7 @@ Feature: GCP Integration
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: List all GCP integrations returns "OK" response
Given new "ListGCPIntegration" request
When the request is sent
Expand All @@ -57,9 +58,10 @@ Feature: GCP Integration
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/gcp-integrations
@team:DataDog/gcp-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": "[email protected]", "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, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
Given there is a valid "gcp_account" in the system
And 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": "{{unique_hash}}@example.com", "client_id": "{{ timestamp("now") }}{{ timestamp("now") }}0", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
When the request is sent
Then the response status is 200 OK
13 changes: 13 additions & 0 deletions tests/v1/features/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@
"tag": "Azure Integration",
"operationId": "CreateAzureIntegration"
},
{
"parameters": [
{
"name": "body",
"origin": "request",
"value": "{\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"client_email\": \"{{unique_hash}}@example.com\",\n \"client_id\": \"{{ timestamp(\"now\") }}{{ timestamp(\"now\") }}0\",\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL\",\n \"host_filters\": \"key:value,filter:example\",\n \"is_cspm_enabled\": true,\n \"is_security_command_center_enabled\": true,\n \"private_key\": \"private_key\",\n \"private_key_id\": \"123456789abcdefghi123456789abcdefghijklm\",\n \"project_id\": \"datadog-apitest\",\n \"resource_collection_enabled\": true,\n \"token_uri\": \"https://accounts.google.com/o/oauth2/token\",\n \"type\": \"service_account\"\n}"
}
],
"step": "there is a valid \"gcp_account\" in the system",
"key": "gcp_account",
"tag": "GCP Integration",
"operationId": "CreateGCPIntegration"
},
{
"parameters": [
{
Expand Down
8 changes: 7 additions & 1 deletion tests/v1/features/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,13 @@
"tag": "GCP Integration",
"undo": {
"operationId": "DeleteGCPIntegration",
"parameters": [],
"parameters": [
{
"name": "body",
"origin": "request",
"template": "{\"client_email\": \"{{ client_email }}\", \"client_id\": \"{{ client_id }}\", \"project_id\": \"{{ project_id }}\"}"
}
],
"type": "unsafe"
}
},
Expand Down

0 comments on commit 87ff06d

Please sign in to comment.