@@ -15,6 +15,8 @@ type SyntheticsTestOptions struct {
1515AcceptSelfSigned * bool `json:"accept_self_signed,omitempty"`
1616// Allows loading insecure content for an HTTP request in an API test.
1717AllowInsecure * bool `json:"allow_insecure,omitempty"`
18+ // Array of URL patterns to block.
19+ BlockedRequestPatterns []string `json:"blockedRequestPatterns,omitempty"`
1820// For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.
1921CheckCertificateRevocation * bool `json:"checkCertificateRevocation,omitempty"`
2022// CI/CD options for a Synthetic test.
@@ -152,6 +154,34 @@ func (o *SyntheticsTestOptions) SetAllowInsecure(v bool) {
152154o .AllowInsecure = & v
153155}
154156
157+ // GetBlockedRequestPatterns returns the BlockedRequestPatterns field value if set, zero value otherwise.
158+ func (o * SyntheticsTestOptions ) GetBlockedRequestPatterns () []string {
159+ if o == nil || o .BlockedRequestPatterns == nil {
160+ var ret []string
161+ return ret
162+ }
163+ return o .BlockedRequestPatterns
164+ }
165+
166+ // GetBlockedRequestPatternsOk returns a tuple with the BlockedRequestPatterns field value if set, nil otherwise
167+ // and a boolean to check if the value has been set.
168+ func (o * SyntheticsTestOptions ) GetBlockedRequestPatternsOk () (* []string , bool ) {
169+ if o == nil || o .BlockedRequestPatterns == nil {
170+ return nil , false
171+ }
172+ return & o .BlockedRequestPatterns , true
173+ }
174+
175+ // HasBlockedRequestPatterns returns a boolean if a field has been set.
176+ func (o * SyntheticsTestOptions ) HasBlockedRequestPatterns () bool {
177+ return o != nil && o .BlockedRequestPatterns != nil
178+ }
179+
180+ // SetBlockedRequestPatterns gets a reference to the given []string and assigns it to the BlockedRequestPatterns field.
181+ func (o * SyntheticsTestOptions ) SetBlockedRequestPatterns (v []string ) {
182+ o .BlockedRequestPatterns = v
183+ }
184+
155185// GetCheckCertificateRevocation returns the CheckCertificateRevocation field value if set, zero value otherwise.
156186func (o * SyntheticsTestOptions ) GetCheckCertificateRevocation () bool {
157187if o == nil || o .CheckCertificateRevocation == nil {
@@ -811,6 +841,9 @@ func (o SyntheticsTestOptions) MarshalJSON() ([]byte, error) {
811841if o .AllowInsecure != nil {
812842toSerialize ["allow_insecure" ] = o .AllowInsecure
813843}
844+ if o .BlockedRequestPatterns != nil {
845+ toSerialize ["blockedRequestPatterns" ] = o .BlockedRequestPatterns
846+ }
814847if o .CheckCertificateRevocation != nil {
815848toSerialize ["checkCertificateRevocation" ] = o .CheckCertificateRevocation
816849}
@@ -892,6 +925,7 @@ func (o *SyntheticsTestOptions) UnmarshalJSON(bytes []byte) (err error) {
892925all := struct {
893926AcceptSelfSigned * bool `json:"accept_self_signed,omitempty"`
894927AllowInsecure * bool `json:"allow_insecure,omitempty"`
928+ BlockedRequestPatterns []string `json:"blockedRequestPatterns,omitempty"`
895929CheckCertificateRevocation * bool `json:"checkCertificateRevocation,omitempty"`
896930Ci * SyntheticsTestCiOptions `json:"ci,omitempty"`
897931DeviceIds []string `json:"device_ids,omitempty"`
@@ -921,14 +955,15 @@ func (o *SyntheticsTestOptions) UnmarshalJSON(bytes []byte) (err error) {
921955}
922956additionalProperties := make (map [string ]interface {})
923957if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
924- datadog .DeleteKeys (additionalProperties , & []string {"accept_self_signed" , "allow_insecure" , "checkCertificateRevocation" , "ci" , "device_ids" , "disableAiaIntermediateFetching" , "disableCors" , "disableCsp" , "enableProfiling" , "enableSecurityTesting" , "follow_redirects" , "httpVersion" , "ignoreServerCertificateError" , "initialNavigationTimeout" , "min_failure_duration" , "min_location_failed" , "monitor_name" , "monitor_options" , "monitor_priority" , "noScreenshot" , "restricted_roles" , "retry" , "rumSettings" , "scheduling" , "tick_every" })
958+ datadog .DeleteKeys (additionalProperties , & []string {"accept_self_signed" , "allow_insecure" , "blockedRequestPatterns" , " checkCertificateRevocation" , "ci" , "device_ids" , "disableAiaIntermediateFetching" , "disableCors" , "disableCsp" , "enableProfiling" , "enableSecurityTesting" , "follow_redirects" , "httpVersion" , "ignoreServerCertificateError" , "initialNavigationTimeout" , "min_failure_duration" , "min_location_failed" , "monitor_name" , "monitor_options" , "monitor_priority" , "noScreenshot" , "restricted_roles" , "retry" , "rumSettings" , "scheduling" , "tick_every" })
925959} else {
926960return err
927961}
928962
929963hasInvalidField := false
930964o .AcceptSelfSigned = all .AcceptSelfSigned
931965o .AllowInsecure = all .AllowInsecure
966+ o .BlockedRequestPatterns = all .BlockedRequestPatterns
932967o .CheckCertificateRevocation = all .CheckCertificateRevocation
933968if all .Ci != nil && all .Ci .UnparsedObject != nil && o .UnparsedObject == nil {
934969hasInvalidField = true
0 commit comments