Skip to content

Commit

Permalink
Enable delete and update aws tests (#1431)
Browse files Browse the repository at this point in the history
* Regenerate client from commit bfa2e051 of spec repo

* Support undo of given

* Regenerate client from commit 07df9ec5 of spec repo

---------

Co-authored-by: ci.datadog-api-spec <[email protected]>
Co-authored-by: HantingZhang2 <[email protected]>
  • Loading branch information
3 people authored Dec 4, 2023
1 parent f2a2dd5 commit 47205a4
Show file tree
Hide file tree
Showing 10 changed files with 338 additions and 35 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-04 15:37:46.423606",
"spec_repo_commit": "e66bf244"
"regenerated": "2023-12-04 18:32:04.096708",
"spec_repo_commit": "07df9ec5"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-04 15:37:46.444320",
"spec_repo_commit": "e66bf244"
"regenerated": "2023-12-04 18:32:04.111110",
"spec_repo_commit": "07df9ec5"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2023-11-21T19:25:15.118Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
{
"log": {
"_recordingName": "AWS Integration/Delete an AWS integration returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "bb29ad65cdffba55412405b976907dc1",
"_order": 0,
"cache": {},
"request": {
"bodySize": 340,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 566,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"account_id\":\"170059471500\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"resource_collection_enabled\":true,\"role_name\":\"DatadogAWSIntegrationRole\"}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/integration/aws"
},
"response": {
"bodySize": 51,
"content": {
"mimeType": "application/json",
"size": 51,
"text": "{\"external_id\":\"77c77ead62584b0fa1bb6a9fe7d2fa28\"}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 516,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-11-21T19:25:15.135Z",
"time": 1335
},
{
"_id": "c922634dc5c2ad1983b0cbb0aad81180",
"_order": 0,
"cache": {},
"request": {
"bodySize": 69,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 567,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"account_id\":\"170059471500\",\"role_name\":\"DatadogAWSIntegrationRole\"}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/integration/aws"
},
"response": {
"bodySize": 3,
"content": {
"mimeType": "application/json",
"size": 3,
"text": "{}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 492,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-11-21T19:25:16.482Z",
"time": 1225
},
{
"_id": "c922634dc5c2ad1983b0cbb0aad81180",
"_order": 1,
"cache": {},
"request": {
"bodySize": 69,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 567,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"account_id\":\"170059471500\",\"role_name\":\"DatadogAWSIntegrationRole\"}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/integration/aws"
},
"response": {
"bodySize": 69,
"content": {
"mimeType": "application/json",
"size": 69,
"text": "{\"errors\":[\"AWS account 170059471500 does not exist in integration\"]}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 516,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 400,
"statusText": "Bad Request"
},
"startedDateTime": "2023-11-21T19:25:17.719Z",
"time": 646
}
],
"pages": [],
"version": "1.2"
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2022-05-17T15:38:07.190Z"
"2023-11-23T18:16:16.323Z"
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
},
"entries": [
{
"_id": "5a091278ee38e1a5fecb01ae94815ef4",
"_id": "e683ecb697b42ae82b13f186c3db794e",
"_order": 0,
"cache": {},
"request": {
"bodySize": 347,
"bodySize": 340,
"cookies": [],
"headers": [
{
Expand All @@ -26,48 +26,154 @@
"value": "application/json"
}
],
"headersSize": 632,
"headersSize": 566,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"account_id\":\"170076337600\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"resource_collection_enabled\":true,\"role_name\":\"DatadogAWSIntegrationRole\"}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/integration/aws"
},
"response": {
"bodySize": 51,
"content": {
"mimeType": "application/json",
"size": 51,
"text": "{\"external_id\":\"c7298c166e774bf1bd1bc0419e68f1a0\"}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 516,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-11-23T18:16:16.343Z",
"time": 2615
},
{
"_id": "b9ef091797137f878c603a564f800395",
"_order": 0,
"cache": {},
"request": {
"bodySize": 340,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 625,
"httpVersion": "HTTP/1.1",
"method": "PUT",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"account_id\":\"123456789012\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"resource_collection_enabled\":true,\"role_name\":\"datadog-role\"}"
"text": "{\"account_id\":\"170076337600\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":false,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":true,\"resource_collection_enabled\":true,\"role_name\":\"DatadogAWSIntegrationRole\"}"
},
"queryString": [
{
"name": "account_id",
"value": "123456789012"
"value": "170076337600"
},
{
"name": "role_name",
"value": "datadog-role"
"value": "DatadogAWSIntegrationRole"
}
],
"url": "https://api.datadoghq.com/api/v1/integration/aws?account_id=170076337600&role_name=DatadogAWSIntegrationRole"
},
"response": {
"bodySize": 3,
"content": {
"mimeType": "application/json",
"size": 3,
"text": "{}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 492,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-11-23T18:16:18.984Z",
"time": 1204
},
{
"_id": "9979a2c458fd639b7988df76fa0025d7",
"_order": 0,
"cache": {},
"request": {
"bodySize": 69,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"url": "https://api.datadoghq.com/api/v1/integration/aws?account_id=123456789012&role_name=datadog-role"
"headersSize": 567,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"account_id\":\"170076337600\",\"role_name\":\"DatadogAWSIntegrationRole\"}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/integration/aws"
},
"response": {
"bodySize": 2,
"bodySize": 3,
"content": {
"mimeType": "application/json;charset=utf-8",
"size": 2,
"text": "{}"
"mimeType": "application/json",
"size": 3,
"text": "{}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json;charset=utf-8"
"value": "application/json"
}
],
"headersSize": 654,
"headersSize": 492,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2022-05-17T15:38:07.204Z",
"time": 878
"startedDateTime": "2023-11-23T18:16:20.211Z",
"time": 977
}
],
"pages": [],
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/aws-integration/DeleteAWSAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const apiInstance = new v1.AWSIntegrationApi(configuration);

const params: v1.AWSIntegrationApiDeleteAWSAccountRequest = {
body: {
accountId: "123456789012",
accountId: "163662907100",
roleName: "DatadogAWSIntegrationRole",
},
};
Expand Down
Loading

0 comments on commit 47205a4

Please sign in to comment.