Crate rusty_cdk

Crate rusty_cdk 

Source
Expand description

§Rusty CDK

This crate is the main entry point for rusty-cdk. It combines and re-exports rusty-cdk-core and rusty-cdk-macros to provide a seamless experience for defining and deploying AWS infrastructure.

rusty-cdk is a safer alternative to the AWS CDK, written in Rust.

§Features

  • Define Infrastructure in Rust: Use the power of Rust’s type system to define your AWS resources.
  • Deploy, Diff, and Destroy: Provides the command-line logic to manage the lifecycle of your CloudFormation stacks.
  • Safety: Leverages the Rust compiler to catch errors before deployment.

This crate is intended to be used as a library in your own binary crate that defines your infrastructure stack.

Modules§

apigateway
appconfig
appsync
cloudfront
cloudwatch
dynamodb
events
iam
lambda
s3
secretsmanager
shared
sns
sqs
stack
wrappers
Type-safe wrapper types

Macros§

app_config_name
Creates a validated AppConfigName wrapper for AWS AppConfig resource names at compile time.
app_sync_api_name
Creates a validated AppSyncApiName wrapper for AppSync Api names at compile time.
bucket
Creates a validated Bucket wrapper for existing AWS S3 bucket references at compile time.
bucket_name
Creates a validated BucketName wrapper for new AWS S3 bucket names at compile time.
bucket_tiering
cf_connection_timeout
Creates a validated CfConnectionTimeout wrapper for CloudFront origin connection timeouts at compile time.
channel_namespace_name
Creates a validated ChannelNamespaceName wrapper for AppSync Api at compile time.
connection_attempts
Checks whether the value that will be wrapped in the ConnectionAttempts struct is between 1 and 3
default_root_object
Creates a validated DefaultRootObject wrapper for CloudFront default root objects at compile time.
delay_seconds
Checks whether the value that will be wrapped in the DelaySeconds struct is between 0 and 900
deployment_duration_in_minutes
Checks whether the value that will be wrapped in the DeploymentDurationInMinutes struct is between 0 and 1440
dto_methods
Generated some methods that all resources have by passing in the resource name
env_var_key
Creates a validated EnvVarKey wrapper for AWS Lambda environment variable keys at compile time.
growth_factor
Checks whether the value that will be wrapped in the GrowthFactor struct is between 0 and 100
iam_action
Creates a validated IamAction wrapper for AWS IAM permissions at compile time.
lambda_permission_action
Creates a validated LambdaPermissionAction wrapper for Lambda resource-based policy actions at compile time.
lifecycle_object_sizes
Creates a validated S3LifecycleObjectSizes wrapper for S3 lifecycle rule object size constraints at compile time.
lifecycle_transition_in_days
Creates a validated LifecycleTransitionInDays wrapper for S3 lifecycle transition rules at compile time.
location_uri
Creates a validated LocationUri wrapper for AppConfig
log_group_name
Creates a validated LogGroupName wrapper for AWS CloudWatch Logs log group names at compile time.
log_retention
Creates a validated RetentionInDays wrapper for AWS CloudWatch Logs retention periods at compile time.
max_flexible_time_window
Checks whether the value that will be wrapped in the MaxFlexibleTimeWindow struct is between 1 and 1440
maximum_message_size
Checks whether the value that will be wrapped in the MaximumMessageSize struct is between 1024 and 1048576
memory
Checks whether the value that will be wrapped in the Memory struct is between 128 and 10240
message_retention_period
Checks whether the value that will be wrapped in the MessageRetentionPeriod struct is between 60 and 1209600
non_zero_number
Creates a validated NonZeroNumber wrapper for positive integers at compile time.
origin_path
Creates a validated OriginPath wrapper for CloudFront origin path prefixes at compile time.
policy_name
receive_message_wait_time
Checks whether the value that will be wrapped in the ReceiveMessageWaitTime struct is between 0 and 20
record_expiration_days
Checks whether the value that will be wrapped in the RecordExpirationDays struct is between 7 and 2147483647
ref_struct
Generated a ref struct, which is used to reference a given resource when you need it as a dependency of some other resource. To allow the other resources to depend on this one, the ref struct has methods for retrieving the Ref, ARN, and other attributes.
ref_struct_with_id_methods
Generated a ref struct, which is used to reference a given resource when you need it as a dependency of some other resource. To allow the other resources to depend on this one, the ref struct has methods for retrieving the Ref, ARN, and other attributes.
retry_policy_event_age
Checks whether the value that will be wrapped in the RetryPolicyEventAge struct is between 60 and 86400
retry_policy_retries
Checks whether the value that will be wrapped in the RetryPolicyRetries struct is between 0 and 185
s3_origin_read_timeout
Checks whether the value that will be wrapped in the S3OriginReadTimeout struct is between 1 and 120
schedule_at_expression
schedule_cron_expression
schedule_name
schedule_rate_expression
sqs_event_source_max_concurrency
Checks whether the value that will be wrapped in the SqsEventSourceMaxConcurrency struct is between 2 and 1000
string_for_secret
Creates a validated StringForSecret wrapper for AWS Secrets Manager secret names at compile time.
string_with_only_alphanumerics_and_hyphens
Creates a validated StringWithOnlyAlphaNumericsUnderscoresAndHyphens wrapper at compile time.
string_with_only_alphanumerics_and_underscores
Creates a validated StringWithOnlyAlphaNumericsAndUnderscores wrapper at compile time.
string_with_only_alphanumerics_underscores_and_hyphens
Creates a validated StringWithOnlyAlphaNumericsUnderscoresAndHyphens wrapper at compile time.
timeout
Checks whether the value that will be wrapped in the Timeout struct is between 1 and 900
toml_file
Creates a validated TomlFile wrapper.
type_state
Pass in the trait name, followed by names for the state structs that should implement it Values separated by commas
visibility_timeout
Checks whether the value that will be wrapped in the VisibilityTimeout struct is between 0 and 43200
zip_file
Creates a validated ZipFile wrapper for AWS Lambda deployment packages at compile time.

Enums§

DeployError
DestroyError

Functions§

deploy
Deploys a stack to AWS using CloudFormation.
deploy_with_result
Deploys a stack to AWS using CloudFormation.
destroy
Destroy a deployed stack
destroy_with_result
Destroy a deployed stack
diff
Creates a diff that will show what ids are being added / removed to an existing stack, as well as showing ids that remain without being added or removed. Currently, the diff does not show modifications to resources.