BucktDocs

Update AWS account

PATCH/v1/aws-accounts/{id}aws-accounts:writeSDK: awsAccounts.update

Patches the connected AWS account record. Most of the time you'll only set roleArn (and optionally stackId) once after CloudFormation finishes deploying the Buckt IAM role. After updating, call Validate to flip the account to active.

Path parameters

NameTypeDefaultDescription
idrequiredstringThe AWS account record ID.

Body parameters

All fields are optional. Send only the ones you want to change.

NameTypeDefaultDescription
roleArnstringIAM role ARN Buckt assumes to access your AWS resources. Must match `arn:aws:iam::<account-id>:role/<role-name>`.
stackIdstringCloudFormation stack ARN you used to deploy the IAM role. Stored for reference.
labelstringUpdate the human-readable label. Max 100 characters.

Example request

import { Buckt } from "@buckt/sdk";

const client = new Buckt({ apiKey: process.env.BUCKT_API_KEY });

await client.awsAccounts.update("acc_01J5AAAAAAAAAAAAAAAAAAAAAA", {
  roleArn: "arn:aws:iam::123456789012:role/BucktAccess",
  stackId:
    "arn:aws:cloudformation:us-east-1:123456789012:stack/buckt-byoa/abc123",
});

Responses

{
  "data": {
    "object": "aws_account",
    "id": "acc_01J5AAAAAAAAAAAAAAAAAAAAAA"
  },
  "error": null,
  "meta": null
}