pub struct AwsManager { /* private fields */ }Implementations§
Source§impl AwsManager
impl AwsManager
pub async fn new(aws_region: &str) -> Result<Self>
pub async fn create_lambda_execution_role(&self) -> Result<String>
pub async fn create_lambda_execution_role_with_name( &self, role_name: &str, ) -> Result<String>
pub async fn deploy_lambda_function( &self, zip_content: Vec<u8>, ) -> Result<String>
pub async fn create_cloudwatch_alarm(&self, function_name: &str) -> Result<()>
pub async fn create_bedrock_eventbridge_rule(&self) -> Result<String>
pub async fn add_lambda_target_to_eventbridge(&self) -> Result<()>
pub async fn test_lambda_function(&self, payload: &str) -> Result<String>
pub async fn create_lambda_function_url(&self) -> Result<String>
pub async fn setup_cloudtrail_for_bedrock(&self) -> Result<String>
pub async fn add_eventbridge_lambda_permission(&self) -> Result<()>
Sourcepub async fn create_sns_topic(&self) -> Result<String>
pub async fn create_sns_topic(&self) -> Result<String>
创建SNS主题用于Bedrock告警通知
Sourcepub async fn create_bedrock_cloudwatch_alarms(
&self,
sns_topic_arn: &str,
) -> Result<()>
pub async fn create_bedrock_cloudwatch_alarms( &self, sns_topic_arn: &str, ) -> Result<()>
创建完整的Bedrock监控CloudWatch告警
Sourcepub async fn configure_sns_lambda_trigger(
&self,
sns_topic_arn: &str,
) -> Result<()>
pub async fn configure_sns_lambda_trigger( &self, sns_topic_arn: &str, ) -> Result<()>
配置SNS到Lambda的触发器
Sourcepub async fn deploy_complete_monitoring_stack(
&self,
zip_content: Vec<u8>,
) -> Result<()>
pub async fn deploy_complete_monitoring_stack( &self, zip_content: Vec<u8>, ) -> Result<()>
部署完整的监控基础设施
Sourcepub async fn update_lambda_environment(&self) -> Result<()>
pub async fn update_lambda_environment(&self) -> Result<()>
更新Lambda函数环境变量
Sourcepub async fn update_iam_credentials_policy(&self) -> Result<()>
pub async fn update_iam_credentials_policy(&self) -> Result<()>
更新IAM角色权限以支持us-east-1
Sourcepub async fn fix_ak_sk_auto_disable(&self) -> Result<()>
pub async fn fix_ak_sk_auto_disable(&self) -> Result<()>
修复AK/SK自动关闭功能
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AwsManager
impl !RefUnwindSafe for AwsManager
impl Send for AwsManager
impl Sync for AwsManager
impl Unpin for AwsManager
impl !UnwindSafe for AwsManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.