Skip to content

aws: support bare-POST token generation + typed models (onboarding 1/3) - #5

Draft
droth-plerion wants to merge 1 commit into
plerionhq:mainfrom
droth-plerion:feat/aws-token-plumbing
Draft

droth-plerion wants to merge 1 commit into
plerionhq:mainfrom
droth-plerion:feat/aws-token-plumbing

Conversation

@droth-plerion

Copy link
Copy Markdown

1 of 3 in the integrations add aws series (this → onboarding engine → CLI command). Jira: PL-5466 · APPP-15.

What

  • generate_token takes Option<&str>: Some(id) keeps today's integration-scoped behavior — the plerion aws generate-token --integration-id subcommand is byte-for-byte unchanged — while None issues the bare POST that mints an onboarding token for registering a new AWS account (per docs.plerion.com; the CloudFormation console flow uses the same call).
  • New typed envelope models for the three AWS endpoints (models/aws.rs), used by the upcoming onboarding engine. The raw plerion aws ... subcommands keep returning serde_json::Value, so their passthrough output is untouched. (Temporary module-level dead_code allow until the binary consumes them in PR 3.)

Why split out

No behavior change; reviewable in minutes; unblocks the engine PR.

Testing

mockito asserts both request bodies: {"integrationId":"..."} for Some, empty body for None. Existing tests unchanged.

Ask for eng: confirm against a dev tenant that the bare POST /v1/tenant/integrations/token mints an onboarding token — mockito can't prove the API contract.

🤖 Generated with Claude Code

generate_token now takes Option<&str>: Some(id) keeps the existing
integration-scoped behavior (aws generate-token is unchanged), None issues
the bare POST that mints an onboarding token for registering a new AWS
account. New typed envelope models for the three AWS endpoints; the raw
subcommands keep returning serde_json::Value so their output is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 2c1bffa)
@droth-plerion

Copy link
Copy Markdown
Author

Series: #5 (token plumbing) → #6 (onboarding engine, stacked on #5) → #7 (CLI command, stacked on #6). Merge in order; each is independently green (build, tests, clippy). Supersedes #4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant