telemetry_rust/middleware/aws/operations/
secretsmanager.rs1use crate::{KeyValue, StringValue};
5
6use super::*;
7
8pub enum SecretsManagerSpanBuilder {}
14
15impl AwsSpanBuilder<'_> {
16 pub fn secretsmanager(
26 method: impl Into<StringValue>,
27 secret_id: Option<impl Into<StringValue>>,
28 ) -> Self {
29 let mut attributes = Vec::new();
30 if let Some(id) = secret_id {
31 attributes.push(KeyValue::new("aws.secretsmanager.secret_id", id.into()));
32 }
33 Self::client("SecretsManager", method, attributes)
34 }
35}
36
37macro_rules! secretsmanager_global_operation {
38 ($op: ident) => {
39 impl SecretsManagerSpanBuilder {
40 #[doc = concat!("Creates a span builder for the Secrets Manager ", stringify!($op), " operation.")]
41 #[inline]
42 pub fn $op<'a>() -> AwsSpanBuilder<'a> {
43 AwsSpanBuilder::secretsmanager(stringify_camel!($op), None::<StringValue>)
44 }
45 }
46 };
47}
48
49macro_rules! secretsmanager_secret_operation {
50 ($op: ident) => {
51 impl SecretsManagerSpanBuilder {
52 #[doc = concat!("Creates a span builder for the Secrets Manager ", stringify!($op), " operation.")]
53 pub fn $op<'a>(
58 secret_id: impl Into<StringValue>,
59 ) -> AwsSpanBuilder<'a> {
60 AwsSpanBuilder::secretsmanager(stringify_camel!($op), Some(secret_id))
61 }
62 }
63 };
64}
65
66secretsmanager_secret_operation!(get_secret_value);
68secretsmanager_secret_operation!(put_secret_value);
69secretsmanager_secret_operation!(create_secret);
70
71secretsmanager_secret_operation!(delete_secret);
73secretsmanager_secret_operation!(describe_secret);
74secretsmanager_secret_operation!(update_secret);
75secretsmanager_secret_operation!(restore_secret);
76
77secretsmanager_secret_operation!(rotate_secret);
79secretsmanager_secret_operation!(cancel_rotate_secret);
80
81secretsmanager_secret_operation!(update_secret_version_stage);
83secretsmanager_secret_operation!(list_secret_version_ids);
84
85secretsmanager_secret_operation!(tag_resource);
87secretsmanager_secret_operation!(untag_resource);
88
89secretsmanager_secret_operation!(get_resource_policy);
91secretsmanager_secret_operation!(put_resource_policy);
92secretsmanager_secret_operation!(delete_resource_policy);
93secretsmanager_secret_operation!(validate_resource_policy);
94
95secretsmanager_secret_operation!(remove_regions_from_replication);
97secretsmanager_secret_operation!(replicate_secret_to_regions);
98secretsmanager_secret_operation!(stop_replication_to_replica);
99
100secretsmanager_global_operation!(list_secrets);
102secretsmanager_global_operation!(batch_get_secret_value);
103secretsmanager_global_operation!(get_random_password);