Skip to content

winterbaume-codestarnotifications

AWS CodeStar Notifications service implementation for winterbaume.

Coverage

MetricValue
ServiceCodeStar Notifications
AWS modelcodestar-notifications
ProtocolrestJson1
winterbaume coverage7/13 operations (53.8%)
stubs (routed, returns empty/default)0/13 operations (0.0%)
moto coverage0/13 operations (0.0%)
floci coverage0/13 operations (0.0%)
kumo coverage0/13 operations (0.0%)
Coverage report date2026-05-13

Server-mode usage

Start winterbaume-server and point the AWS CLI at it:

sh
cargo run -p winterbaume-server -- --host 127.0.0.1 --port 5555
sh
export AWS_ENDPOINT_URL=http://localhost:5555
aws codestarnotifications help

Example

rust
use aws_sdk_codestarnotifications::config::BehaviorVersion;
use aws_sdk_codestarnotifications::types::{DetailType, NotificationRuleStatus, Target};
use winterbaume_codestarnotifications::CodeStarNotificationsService;
use winterbaume_core::MockAws;

#[tokio::main]
async fn main() {
    let mock = MockAws::builder()
        .with_service(CodeStarNotificationsService::new())
        .build();

    let config = aws_config::defaults(BehaviorVersion::latest())
        .http_client(mock.http_client())
        .credentials_provider(mock.credentials_provider())
        .region(aws_sdk_codestarnotifications::config::Region::new(
            "us-east-1",
        ))
        .load()
        .await;

    let client = aws_sdk_codestarnotifications::Client::new(&config);
    let target = Target::builder()
        .target_type("SNS")
        .target_address("arn:aws:sns:us-east-1:123456789012:notify")
        .build();
    let resp = client
        .create_notification_rule()
        .name("demo-rule")
        .resource("arn:aws:codecommit:us-east-1:123456789012:my-repo")
        .detail_type(DetailType::Basic)
        .event_type_ids("codecommit-repository-pull-request-created")
        .targets(target)
        .status(NotificationRuleStatus::Enabled)
        .send()
        .await
        .expect("create");
    if let Some(arn) = resp.arn() {
        println!("Rule: {arn}");
    }
}

Implemented APIs (7)

  • DeleteTarget
  • ListEventTypes
  • ListTargets
  • Subscribe
  • TagResource
  • Unsubscribe
  • UntagResource
Not yet implemented APIs (6)
  • CreateNotificationRule
  • DeleteNotificationRule
  • DescribeNotificationRule
  • ListNotificationRules
  • ListTagsForResource
  • UpdateNotificationRule

Released under the Apache-2.0 License. This project is not affiliated with or endorsed by Amazon Web Services.