telemetry_rust/middleware/aws/operations/
ssm.rs1use crate::{KeyValue, StringValue};
5
6use super::*;
7
8pub enum SsmSpanBuilder {}
14
15impl AwsSpanBuilder<'_> {
16 pub fn ssm(
26 method: impl Into<StringValue>,
27 parameter_name: Option<impl Into<StringValue>>,
28 ) -> Self {
29 let mut attributes = Vec::new();
30 if let Some(name) = parameter_name {
31 attributes.push(KeyValue::new("aws.ssm.parameter_name", name.into()));
32 }
33 Self::client("SSM", method, attributes)
34 }
35}
36
37macro_rules! ssm_global_operation {
38 ($op: ident) => {
39 impl SsmSpanBuilder {
40 #[doc = concat!("Creates a span builder for the SSM ", stringify!($op), " operation.")]
41 #[inline]
42 pub fn $op<'a>() -> AwsSpanBuilder<'a> {
43 AwsSpanBuilder::ssm(stringify_camel!($op), None::<StringValue>)
44 }
45 }
46 };
47}
48
49macro_rules! ssm_parameter_operation {
50 ($op: ident) => {
51 impl SsmSpanBuilder {
52 #[doc = concat!("Creates a span builder for the SSM ", stringify!($op), " parameter operation.")]
53 pub fn $op<'a>(
58 parameter_name: impl Into<StringValue>,
59 ) -> AwsSpanBuilder<'a> {
60 AwsSpanBuilder::ssm(stringify_camel!($op), Some(parameter_name))
61 }
62 }
63 };
64}
65
66ssm_parameter_operation!(get_parameter);
68ssm_parameter_operation!(put_parameter);
69ssm_parameter_operation!(delete_parameter);
70ssm_parameter_operation!(get_parameter_history);
71ssm_parameter_operation!(label_parameter_version);
72ssm_parameter_operation!(unlabel_parameter_version);
73
74ssm_global_operation!(get_parameters);
76ssm_global_operation!(delete_parameters);
77
78ssm_parameter_operation!(get_parameters_by_path);
80
81ssm_global_operation!(describe_parameters);