Struct datadog_api_client::datadogV1::model::model_synthetics_api_wait_step::SyntheticsAPIWaitStep
source · #[non_exhaustive]pub struct SyntheticsAPIWaitStep {
pub name: String,
pub subtype: SyntheticsAPIWaitStepSubtype,
pub value: i32,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
The Wait step used in a Synthetic multi-step API test.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe name of the step.
subtype: SyntheticsAPIWaitStepSubtypeThe subtype of the Synthetic multi-step API wait step.
value: i32The time to wait in seconds. Minimum value: 0. Maximum value: 180.
additional_properties: BTreeMap<String, Value>Implementations§
source§impl SyntheticsAPIWaitStep
impl SyntheticsAPIWaitStep
sourcepub fn new(
name: String,
subtype: SyntheticsAPIWaitStepSubtype,
value: i32,
) -> SyntheticsAPIWaitStep
pub fn new( name: String, subtype: SyntheticsAPIWaitStepSubtype, value: i32, ) -> SyntheticsAPIWaitStep
Examples found in repository?
examples/v1_synthetics_CreateSyntheticsAPITest_1279271422.rs (line 89)
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
async fn main() {
let body =
SyntheticsAPITest::new(
SyntheticsAPITestConfig::new()
.config_variables(
vec![
SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT)
.example("content-type".to_string())
.pattern("content-type".to_string())
],
)
.steps(
vec![
SyntheticsAPIStep::SyntheticsAPITestStep(
Box::new(
SyntheticsAPITestStep::new(
vec![
SyntheticsAssertion::SyntheticsAssertionTarget(
Box::new(
SyntheticsAssertionTarget::new(
SyntheticsAssertionOperator::IS,
Value::from(200),
SyntheticsAssertionType::STATUS_CODE,
),
),
)
],
"request is sent".to_string(),
SyntheticsTestRequest::new()
.http_version(SyntheticsTestOptionsHTTPVersion::HTTP2)
.method("GET".to_string())
.timeout(10.0 as f64)
.url("https://datadoghq.com".to_string()),
SyntheticsAPITestStepSubtype::HTTP,
)
.allow_failure(true)
.extracted_values(
vec![
SyntheticsParsingOptions::new()
.field("server".to_string())
.name("EXTRACTED_VALUE".to_string())
.parser(
SyntheticsVariableParser::new(
SyntheticsGlobalVariableParserType::RAW,
),
)
.secure(true)
.type_(SyntheticsLocalVariableParsingOptionsType::HTTP_HEADER)
],
)
.is_critical(true)
.retry(SyntheticsTestOptionsRetry::new().count(5).interval(1000.0 as f64)),
),
),
SyntheticsAPIStep::SyntheticsAPIWaitStep(
Box::new(
SyntheticsAPIWaitStep::new("Wait".to_string(), SyntheticsAPIWaitStepSubtype::WAIT, 1),
),
),
SyntheticsAPIStep::SyntheticsAPITestStep(
Box::new(
SyntheticsAPITestStep::new(
vec![
SyntheticsAssertion::SyntheticsAssertionTarget(
Box::new(
SyntheticsAssertionTarget::new(
SyntheticsAssertionOperator::LESS_THAN,
Value::from(1000),
SyntheticsAssertionType::RESPONSE_TIME,
),
),
)
],
"GRPC CALL".to_string(),
SyntheticsTestRequest::new()
.call_type(SyntheticsTestCallType::UNARY)
.compressed_json_descriptor(
"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==".to_string(),
)
.host("grpcbin.test.k6.io".to_string())
.message("{}".to_string())
.metadata(BTreeMap::from([]))
.method("Index".to_string())
.port("9000".to_string())
.service("grpcbin.GRPCBin".to_string()),
SyntheticsAPITestStepSubtype::GRPC,
)
.allow_failure(false)
.extracted_values(vec![])
.is_critical(true)
.retry(SyntheticsTestOptionsRetry::new().count(0).interval(300.0 as f64)),
),
)
],
),
vec!["aws:us-east-2".to_string()],
"BDD test payload: synthetics_api_test_multi_step_payload.json".to_string(),
"Example-Synthetic".to_string(),
SyntheticsTestOptions::new()
.accept_self_signed(false)
.allow_insecure(true)
.follow_redirects(true)
.min_failure_duration(10)
.min_location_failed(1)
.monitor_name("Example-Synthetic".to_string())
.monitor_priority(5)
.retry(SyntheticsTestOptionsRetry::new().count(3).interval(1000.0 as f64))
.tick_every(60),
SyntheticsAPITestType::API,
)
.subtype(SyntheticsTestDetailsSubType::MULTI)
.tags(vec!["testing:api".to_string()]);
let configuration = datadog::Configuration::new();
let api = SyntheticsAPI::with_config(configuration);
let resp = api.create_synthetics_api_test(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
source§impl Clone for SyntheticsAPIWaitStep
impl Clone for SyntheticsAPIWaitStep
source§fn clone(&self) -> SyntheticsAPIWaitStep
fn clone(&self) -> SyntheticsAPIWaitStep
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for SyntheticsAPIWaitStep
impl Debug for SyntheticsAPIWaitStep
source§impl<'de> Deserialize<'de> for SyntheticsAPIWaitStep
impl<'de> Deserialize<'de> for SyntheticsAPIWaitStep
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for SyntheticsAPIWaitStep
impl PartialEq for SyntheticsAPIWaitStep
source§impl Serialize for SyntheticsAPIWaitStep
impl Serialize for SyntheticsAPIWaitStep
impl StructuralPartialEq for SyntheticsAPIWaitStep
Auto Trait Implementations§
impl Freeze for SyntheticsAPIWaitStep
impl RefUnwindSafe for SyntheticsAPIWaitStep
impl Send for SyntheticsAPIWaitStep
impl Sync for SyntheticsAPIWaitStep
impl Unpin for SyntheticsAPIWaitStep
impl UnwindSafe for SyntheticsAPIWaitStep
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)