Skip to main content

Crate vantage_aws

Crate vantage_aws 

Source
Expand description

AWS API wrapper for Vantage — incubating.

Treat AWS API endpoints as Vantage TableSources. Build an AwsAccount, hand it to a Table, and encode the operation in the table name as {protocol}/{array_key}:{service}/{target}:

json1/logGroups:logs/Logs_20140328.DescribeLogGroups
  │       │      │    └── X-Amz-Target header value
  │       │      └─────── service code (also URL hostname segment)
  │       └────────────── response field that holds the row array
  └────────────────────── wire protocol

query/Users:iam/2010-05-08.ListUsers
  │     │    │     │
  │     │    │     └── "VERSION.Action" — both go in the form body
  │     │    └──────── service code (also URL hostname segment)
  │     └───────────── response element name (Query lists wrap in <member>)
  └─────────────────── wire protocol

Two protocols ship today: JSON-1.1 for CloudWatch, ECS, KMS, DynamoDB control-plane, etc.; and Query (form-encoded request, XML response) for IAM, STS, EC2, ELBv1, SES, etc. Both are routed through the same AwsAccount TableSource, so relations span services and protocols freely.

Conditions on the table fold into the request body. v0 is read-only; writes arrive later. The CloudWatch Logs and ECS list endpoints auto-paginate through nextToken until exhausted; cap the walk via AwsAccount::with_max_pages if you need to. Other protocols (Query/IAM, REST-XML/S3, REST-JSON/Lambda) are still single-page — they’ll need their own walk implementations.

Ready-made models live under models if you want to skip the table-name dance and start querying.

// env vars first, falling back to ~/.aws/credentials [default]
let aws = AwsAccount::from_default()?;

let mut groups: Table<AwsAccount, EmptyEntity> = Table::new(
    "json1/logGroups:logs/Logs_20140328.DescribeLogGroups",
    aws,
);
groups.add_condition(eq("logGroupNamePrefix", "/aws/lambda/"));

Re-exports§

pub use types::AnyAwsType;
pub use types::Arn;
pub use types::AwsDateTime;
pub use types::typed_records;
pub use types::untyped_records;

Modules§

dynamodb
DynamoDB persistence — incubating.
models
Ready-made tables to skip the table-name dance.
types
Custom value types for AWS records.

Structs§

AwsAccount

Enums§

AwsCondition

Traits§

AwsOperation
eq / in_ for AWS-backed columns. Auto-implemented for any Expressive<CborValue>Column<T>, identifier expressions, etc.

Functions§

eq
field == value. Shorthand for AwsCondition::eq.
in_
field IN values (literal set). Shorthand for AwsCondition::in_. Remember the single-value rule — a multi-element set will error at execute time.