Skip to content

Commit 5db0e1d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7d13932 of spec repo
1 parent 68a636d commit 5db0e1d

File tree

10 files changed

+395
-46
lines changed

10 files changed

+395
-46
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.2",
7-
"regenerated": "2022-02-18 09:34:43.183587",
8-
"spec_repo_commit": "79cdf99"
7+
"regenerated": "2022-02-22 17:17:10.121963",
8+
"spec_repo_commit": "7d13932"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-02-18 09:34:43.195602",
13-
"spec_repo_commit": "79cdf99"
12+
"regenerated": "2022-02-22 17:17:10.133718",
13+
"spec_repo_commit": "7d13932"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11846,6 +11846,10 @@ components:
1184611846
allow_insecure:
1184711847
description: Allows loading insecure content for an HTTP request.
1184811848
type: boolean
11849+
checkCertificateRevocation:
11850+
description: For SSL test, whether or not the test should fail on revoked
11851+
certificate in stapled OCSP.
11852+
type: boolean
1184911853
device_ids:
1185011854
description: For browser test, array with the different device IDs used
1185111855
to run the test.
@@ -24052,7 +24056,7 @@ paths:
2405224056
x-given:
2405324057
synthetics_api_test:
2405424058
parameters:
24055-
- file: synthetics_api_test_payload.json
24059+
- file: synthetics_api_http_test_payload.json
2405624060
name: body
2405724061
step: there is a valid "synthetics_api_test" in the system
2405824062
synthetics_api_test_with_wrong_dns:

api/v1/datadog/docs/SyntheticsTestOptions.md

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22

33
## Properties
44

5-
| Name | Type | Description | Notes |
6-
| ---------------------- | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ---------- |
7-
| **AcceptSelfSigned** | Pointer to **bool** | For SSL test, whether or not the test should allow self signed certificates. | [optional] |
8-
| **AllowInsecure** | Pointer to **bool** | Allows loading insecure content for an HTTP request. | [optional] |
9-
| **DeviceIds** | Pointer to [**[]SyntheticsDeviceID**](SyntheticsDeviceID.md) | For browser test, array with the different device IDs used to run the test. | [optional] |
10-
| **DisableCors** | Pointer to **bool** | Whether or not to disable CORS mechanism. | [optional] |
11-
| **FollowRedirects** | Pointer to **bool** | For API HTTP test, whether or not the test should follow redirects. | [optional] |
12-
| **MinFailureDuration** | Pointer to **int64** | Minimum amount of time in failure required to trigger an alert. | [optional] |
13-
| **MinLocationFailed** | Pointer to **int64** | Minimum number of locations in failure required to trigger an alert. | [optional] |
14-
| **MonitorName** | Pointer to **string** | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs. | [optional] |
15-
| **MonitorOptions** | Pointer to [**SyntheticsTestOptionsMonitorOptions**](SyntheticsTestOptionsMonitorOptions.md) | | [optional] |
16-
| **MonitorPriority** | Pointer to **int32** | Integer from 1 (high) to 5 (low) indicating alert severity. | [optional] |
17-
| **NoScreenshot** | Pointer to **bool** | Prevents saving screenshots of the steps. | [optional] |
18-
| **Retry** | Pointer to [**SyntheticsTestOptionsRetry**](SyntheticsTestOptionsRetry.md) | | [optional] |
19-
| **TickEvery** | Pointer to **int64** | The frequency at which to run the Synthetic test (in seconds). | [optional] |
5+
| Name | Type | Description | Notes |
6+
| ------------------------------ | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ---------- |
7+
| **AcceptSelfSigned** | Pointer to **bool** | For SSL test, whether or not the test should allow self signed certificates. | [optional] |
8+
| **AllowInsecure** | Pointer to **bool** | Allows loading insecure content for an HTTP request. | [optional] |
9+
| **CheckCertificateRevocation** | Pointer to **bool** | For SSL test, whether or not the test should fail on revoked certificate in stapled OCSP. | [optional] |
10+
| **DeviceIds** | Pointer to [**[]SyntheticsDeviceID**](SyntheticsDeviceID.md) | For browser test, array with the different device IDs used to run the test. | [optional] |
11+
| **DisableCors** | Pointer to **bool** | Whether or not to disable CORS mechanism. | [optional] |
12+
| **FollowRedirects** | Pointer to **bool** | For API HTTP test, whether or not the test should follow redirects. | [optional] |
13+
| **MinFailureDuration** | Pointer to **int64** | Minimum amount of time in failure required to trigger an alert. | [optional] |
14+
| **MinLocationFailed** | Pointer to **int64** | Minimum number of locations in failure required to trigger an alert. | [optional] |
15+
| **MonitorName** | Pointer to **string** | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs. | [optional] |
16+
| **MonitorOptions** | Pointer to [**SyntheticsTestOptionsMonitorOptions**](SyntheticsTestOptionsMonitorOptions.md) | | [optional] |
17+
| **MonitorPriority** | Pointer to **int32** | Integer from 1 (high) to 5 (low) indicating alert severity. | [optional] |
18+
| **NoScreenshot** | Pointer to **bool** | Prevents saving screenshots of the steps. | [optional] |
19+
| **Retry** | Pointer to [**SyntheticsTestOptionsRetry**](SyntheticsTestOptionsRetry.md) | | [optional] |
20+
| **TickEvery** | Pointer to **int64** | The frequency at which to run the Synthetic test (in seconds). | [optional] |
2021

2122
## Methods
2223

@@ -87,6 +88,31 @@ SetAllowInsecure sets AllowInsecure field to given value.
8788

8889
HasAllowInsecure returns a boolean if a field has been set.
8990

91+
### GetCheckCertificateRevocation
92+
93+
`func (o *SyntheticsTestOptions) GetCheckCertificateRevocation() bool`
94+
95+
GetCheckCertificateRevocation returns the CheckCertificateRevocation field if non-nil, zero value otherwise.
96+
97+
### GetCheckCertificateRevocationOk
98+
99+
`func (o *SyntheticsTestOptions) GetCheckCertificateRevocationOk() (*bool, bool)`
100+
101+
GetCheckCertificateRevocationOk returns a tuple with the CheckCertificateRevocation field if it's non-nil, zero value otherwise
102+
and a boolean to check if the value has been set.
103+
104+
### SetCheckCertificateRevocation
105+
106+
`func (o *SyntheticsTestOptions) SetCheckCertificateRevocation(v bool)`
107+
108+
SetCheckCertificateRevocation sets CheckCertificateRevocation field to given value.
109+
110+
### HasCheckCertificateRevocation
111+
112+
`func (o *SyntheticsTestOptions) HasCheckCertificateRevocation() bool`
113+
114+
HasCheckCertificateRevocation returns a boolean if a field has been set.
115+
90116
### GetDeviceIds
91117

92118
`func (o *SyntheticsTestOptions) GetDeviceIds() []SyntheticsDeviceID`

api/v1/datadog/model_synthetics_test_options.go

Lines changed: 52 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Create an API SSL test returns "OK - Returns the created test details." response
2+
3+
package main
4+
5+
import (
6+
"context"
7+
"encoding/json"
8+
"fmt"
9+
"os"
10+
11+
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
12+
)
13+
14+
func main() {
15+
body := datadog.SyntheticsAPITest{
16+
Config: datadog.SyntheticsAPITestConfig{
17+
Assertions: &[]datadog.SyntheticsAssertion{
18+
datadog.SyntheticsAssertion{
19+
SyntheticsAssertionTarget: &datadog.SyntheticsAssertionTarget{
20+
Operator: datadog.SYNTHETICSASSERTIONOPERATOR_IS_IN_MORE_DAYS_THAN,
21+
Target: "10",
22+
Type: datadog.SYNTHETICSASSERTIONTYPE_CERTIFICATE,
23+
}},
24+
},
25+
Request: &datadog.SyntheticsTestRequest{
26+
Host: datadog.PtrString("datadoghq.com"),
27+
Port: datadog.PtrInt64(443),
28+
},
29+
},
30+
Locations: []string{
31+
"aws:us-east-2",
32+
},
33+
Message: datadog.PtrString("BDD test payload: synthetics_api_ssl_test_payload.json"),
34+
Name: "Example-Create_an_API_SSL_test_returns_OK_Returns_the_created_test_details_response",
35+
Options: datadog.SyntheticsTestOptions{
36+
AcceptSelfSigned: datadog.PtrBool(true),
37+
CheckCertificateRevocation: datadog.PtrBool(true),
38+
TickEvery: datadog.PtrInt64(60),
39+
},
40+
Subtype: datadog.SYNTHETICSTESTDETAILSSUBTYPE_SSL.Ptr(),
41+
Tags: &[]string{
42+
"testing:api",
43+
},
44+
Type: datadog.SYNTHETICSAPITESTTYPE_API,
45+
}
46+
ctx := datadog.NewDefaultContext(context.Background())
47+
configuration := datadog.NewConfiguration()
48+
apiClient := datadog.NewAPIClient(configuration)
49+
resp, r, err := apiClient.SyntheticsApi.CreateSyntheticsAPITest(ctx, body)
50+
51+
if err != nil {
52+
fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateSyntheticsAPITest`: %v\n", err)
53+
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
54+
}
55+
56+
responseContent, _ := json.MarshalIndent(resp, "", " ")
57+
fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsAPITest`:\n%s\n", responseContent)
58+
}

0 commit comments

Comments
 (0)