Skip to content

Commit

Permalink
Regenerate client from commit 0f6264a5 of spec repo (#1539)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
Co-authored-by: Thomas Hervé <[email protected]>
  • Loading branch information
3 people authored Jun 14, 2022
1 parent f495b6d commit ecc1226
Show file tree
Hide file tree
Showing 13 changed files with 284 additions and 33 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.2",
"regenerated": "2022-06-13 19:23:48.258264",
"spec_repo_commit": "04543c8c"
"regenerated": "2022-06-14 08:16:18.622596",
"spec_repo_commit": "0f6264a5"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-06-13 19:23:48.270824",
"spec_repo_commit": "04543c8c"
"regenerated": "2022-06-14 08:16:18.634865",
"spec_repo_commit": "0f6264a5"
}
}
}
5 changes: 4 additions & 1 deletion examples/v2/opsgenie-integration/DeleteOpsgenieService.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ import (
)

func main() {
// there is a valid "opsgenie_service" in the system
OpsgenieServiceDataID := os.Getenv("OPSGENIE_SERVICE_DATA_ID")

ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
r, err := apiClient.OpsgenieIntegrationApi.DeleteOpsgenieService(ctx, "integration_service_id")
r, err := apiClient.OpsgenieIntegrationApi.DeleteOpsgenieService(ctx, OpsgenieServiceDataID)

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OpsgenieIntegrationApi.DeleteOpsgenieService`: %v\n", err)
Expand Down
5 changes: 4 additions & 1 deletion examples/v2/opsgenie-integration/GetOpsgenieService.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ import (
)

func main() {
// there is a valid "opsgenie_service" in the system
OpsgenieServiceDataID := os.Getenv("OPSGENIE_SERVICE_DATA_ID")

ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.OpsgenieIntegrationApi.GetOpsgenieService(ctx, "integration_service_id")
resp, r, err := apiClient.OpsgenieIntegrationApi.GetOpsgenieService(ctx, OpsgenieServiceDataID)

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OpsgenieIntegrationApi.GetOpsgenieService`: %v\n", err)
Expand Down
12 changes: 7 additions & 5 deletions examples/v2/opsgenie-integration/UpdateOpsgenieService.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,24 @@ import (
)

func main() {
// there is a valid "opsgenie_service" in the system
OpsgenieServiceDataID := os.Getenv("OPSGENIE_SERVICE_DATA_ID")

body := datadog.OpsgenieServiceUpdateRequest{
Data: datadog.OpsgenieServiceUpdateData{
Attributes: datadog.OpsgenieServiceUpdateAttributes{
CustomUrl: *datadog.NewNullableString(datadog.PtrString("https://example.com")),
Name: datadog.PtrString("fake-opsgenie-service-name"),
Name: datadog.PtrString("fake-opsgenie-service-name--updated"),
OpsgenieApiKey: datadog.PtrString("00000000-0000-0000-0000-000000000000"),
Region: datadog.OPSGENIESERVICEREGIONTYPE_US.Ptr(),
Region: datadog.OPSGENIESERVICEREGIONTYPE_EU.Ptr(),
},
Id: "596da4af-0563-4097-90ff-07230c3f9db3",
Id: OpsgenieServiceDataID,
Type: datadog.OPSGENIESERVICETYPE_OPSGENIE_SERVICE,
},
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.OpsgenieIntegrationApi.UpdateOpsgenieService(ctx, "integration_service_id", body)
resp, r, err := apiClient.OpsgenieIntegrationApi.UpdateOpsgenieService(ctx, OpsgenieServiceDataID, body)

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OpsgenieIntegrationApi.UpdateOpsgenieService`: %v\n", err)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022-06-13T14:58:47.066Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
interactions:
- request:
body: |
{"data":{"attributes":{"name":"Test-Delete_a_single_service_object_returns_OK_response-1655132327","opsgenie_api_key":"00000000-0000-0000-0000-000000000000","region":"us"},"type":"opsgenie-service"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
method: POST
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services
response:
body: '{"data":{"attributes":{"region":"us","name":"Test-Delete_a_single_service_object_returns_OK_response-1655132327","custom_url":null},"type":"opsgenie-service","id":"78050750-0312-400d-ad80-161ea7900931"}}
'
code: 201
duration: ''
headers:
Content-Type:
- application/json
status: 201 Created
- request:
body: ''
form: {}
headers:
Accept:
- '*/*'
method: DELETE
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/78050750-0312-400d-ad80-161ea7900931
response:
body: ''
code: 204
duration: ''
headers:
Content-Type:
- text/html; charset=utf-8
status: 204 No Content
- request:
body: ''
form: {}
headers:
Accept:
- '*/*'
method: DELETE
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/78050750-0312-400d-ad80-161ea7900931
response:
body: '{"errors":["Service not found."]}
'
code: 404
duration: ''
headers:
Content-Type:
- application/json
status: 404 Not Found
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022-06-13T14:58:47.782Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
interactions:
- request:
body: |
{"data":{"attributes":{"name":"Test-Get_a_single_service_object_returns_OK_response-1655132327","opsgenie_api_key":"00000000-0000-0000-0000-000000000000","region":"us"},"type":"opsgenie-service"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
method: POST
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services
response:
body: '{"data":{"attributes":{"region":"us","name":"Test-Get_a_single_service_object_returns_OK_response-1655132327","custom_url":null},"type":"opsgenie-service","id":"3ca2db9d-e088-47d1-9bfe-b88463c23f2d"}}
'
code: 201
duration: ''
headers:
Content-Type:
- application/json
status: 201 Created
- request:
body: ''
form: {}
headers:
Accept:
- application/json
method: GET
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/3ca2db9d-e088-47d1-9bfe-b88463c23f2d
response:
body: '{"data":{"attributes":{"region":"us","name":"Test-Get_a_single_service_object_returns_OK_response-1655132327","custom_url":null},"type":"opsgenie-service","id":"3ca2db9d-e088-47d1-9bfe-b88463c23f2d"}}
'
code: 200
duration: ''
headers:
Content-Type:
- application/json
status: 200 OK
- request:
body: ''
form: {}
headers:
Accept:
- '*/*'
method: DELETE
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/3ca2db9d-e088-47d1-9bfe-b88463c23f2d
response:
body: ''
code: 204
duration: ''
headers:
Content-Type:
- text/html; charset=utf-8
status: 204 No Content
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022-06-13T14:58:48.657Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
interactions:
- request:
body: |
{"data":{"attributes":{"name":"Test-Get_all_service_objects_returns_OK_response-1655132328","opsgenie_api_key":"00000000-0000-0000-0000-000000000000","region":"us"},"type":"opsgenie-service"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
method: POST
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services
response:
body: '{"data":{"attributes":{"region":"us","name":"Test-Get_all_service_objects_returns_OK_response-1655132328","custom_url":null},"type":"opsgenie-service","id":"337861b6-ed46-4c66-b4a0-32d7a4ba94b9"}}
'
code: 201
duration: ''
headers:
Content-Type:
- application/json
status: 201 Created
- request:
body: ''
form: {}
headers:
Accept:
- application/json
method: GET
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services
response:
body: '{"data":[{"attributes":{"region":"us","name":"Test-Get_all_service_objects_returns_OK_response-1655132328","custom_url":null},"type":"opsgenie-service","id":"337861b6-ed46-4c66-b4a0-32d7a4ba94b9"}]}
'
code: 200
duration: ''
headers:
Content-Type:
- application/json
status: 200 OK
- request:
body: ''
form: {}
headers:
Accept:
- '*/*'
method: DELETE
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/337861b6-ed46-4c66-b4a0-32d7a4ba94b9
response:
body: ''
code: 204
duration: ''
headers:
Content-Type:
- text/html; charset=utf-8
status: 204 No Content
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022-06-09T19:57:06.404Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
interactions:
- request:
body: |
{"data":{"attributes":{"name":"Test-Update_a_single_service_object_returns_OK_response-1654804626","opsgenie_api_key":"00000000-0000-0000-0000-000000000000","region":"us"},"type":"opsgenie-service"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
method: POST
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services
response:
body: '{"data":{"attributes":{"region":"us","name":"Test-Update_a_single_service_object_returns_OK_response-1654804626","custom_url":null},"type":"opsgenie-service","id":"0b04ddfb-b00a-4243-baed-33ff1bff0909"}}
'
code: 201
duration: ''
headers:
Content-Type:
- application/json
status: 201 Created
- request:
body: |
{"data":{"attributes":{"name":"Test-Update_a_single_service_object_returns_OK_response-1654804626--updated","opsgenie_api_key":"00000000-0000-0000-0000-000000000000","region":"eu"},"id":"0b04ddfb-b00a-4243-baed-33ff1bff0909","type":"opsgenie-service"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
method: PATCH
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/0b04ddfb-b00a-4243-baed-33ff1bff0909
response:
body: '{"data":{"attributes":{"region":"eu","name":"Test-Update_a_single_service_object_returns_OK_response-1654804626--updated","custom_url":null},"type":"opsgenie-service","id":"0b04ddfb-b00a-4243-baed-33ff1bff0909"}}
'
code: 200
duration: ''
headers:
Content-Type:
- application/json
status: 200 OK
- request:
body: ''
form: {}
headers:
Accept:
- '*/*'
method: DELETE
url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/0b04ddfb-b00a-4243-baed-33ff1bff0909
response:
body: ''
code: 204
duration: ''
headers:
Content-Type:
- text/html; charset=utf-8
status: 204 No Content
version: 1
Loading

0 comments on commit ecc1226

Please sign in to comment.