use crate::{KeyValue, StringValue};
use super::*;
pub enum SecretsManagerSpanBuilder {}
impl AwsSpanBuilder<'_> {
pub fn secretsmanager(
method: impl Into<StringValue>,
secret_id: Option<impl Into<StringValue>>,
) -> Self {
let mut attributes = Vec::new();
if let Some(id) = secret_id {
attributes.push(KeyValue::new("aws.secretsmanager.secret_id", id.into()));
}
Self::client("SecretsManager", method, attributes)
}
}
macro_rules! secretsmanager_global_operation {
($op: ident) => {
impl SecretsManagerSpanBuilder {
#[doc = concat!("Creates a span builder for the Secrets Manager ", stringify!($op), " operation.")]
#[inline]
pub fn $op<'a>() -> AwsSpanBuilder<'a> {
AwsSpanBuilder::secretsmanager(stringify_camel!($op), None::<StringValue>)
}
}
};
}
macro_rules! secretsmanager_secret_operation {
($op: ident) => {
impl SecretsManagerSpanBuilder {
#[doc = concat!("Creates a span builder for the Secrets Manager ", stringify!($op), " operation.")]
pub fn $op<'a>(
secret_id: impl Into<StringValue>,
) -> AwsSpanBuilder<'a> {
AwsSpanBuilder::secretsmanager(stringify_camel!($op), Some(secret_id))
}
}
};
}
secretsmanager_secret_operation!(get_secret_value);
secretsmanager_secret_operation!(put_secret_value);
secretsmanager_secret_operation!(create_secret);
secretsmanager_secret_operation!(delete_secret);
secretsmanager_secret_operation!(describe_secret);
secretsmanager_secret_operation!(update_secret);
secretsmanager_secret_operation!(restore_secret);
secretsmanager_secret_operation!(rotate_secret);
secretsmanager_secret_operation!(cancel_rotate_secret);
secretsmanager_secret_operation!(update_secret_version_stage);
secretsmanager_secret_operation!(list_secret_version_ids);
secretsmanager_secret_operation!(tag_resource);
secretsmanager_secret_operation!(untag_resource);
secretsmanager_secret_operation!(get_resource_policy);
secretsmanager_secret_operation!(put_resource_policy);
secretsmanager_secret_operation!(delete_resource_policy);
secretsmanager_secret_operation!(validate_resource_policy);
secretsmanager_secret_operation!(remove_regions_from_replication);
secretsmanager_secret_operation!(replicate_secret_to_regions);
secretsmanager_secret_operation!(stop_replication_to_replica);
secretsmanager_global_operation!(list_secrets);
secretsmanager_global_operation!(batch_get_secret_value);
secretsmanager_global_operation!(get_random_password);