Skip to content
GitHubXDiscordRSS

Account

Learn how to create, update, and manage AWS ApiGateway Accounts using Alchemy Cloud Control.

The Account resource lets you manage AWS ApiGateway Accounts and their configurations for your API Gateway services.

Create a basic ApiGateway account with a CloudWatch role ARN.

import AWS from "alchemy/aws/control";
const apiGatewayAccount = await AWS.ApiGateway.Account("myApiGatewayAccount", {
CloudWatchRoleArn: "arn:aws:iam::123456789012:role/ApiGatewayCloudWatchRole"
});

Configure an ApiGateway account with the option to adopt existing resources.

const apiGatewayAccountWithAdoption = await AWS.ApiGateway.Account("existingApiGatewayAccount", {
CloudWatchRoleArn: "arn:aws:iam::123456789012:role/ApiGatewayCloudWatchRole",
adopt: true
});

Set up an ApiGateway account to enable detailed monitoring with additional CloudWatch settings.

const monitoredApiGatewayAccount = await AWS.ApiGateway.Account("monitoredApiGatewayAccount", {
CloudWatchRoleArn: "arn:aws:iam::123456789012:role/ApiGatewayCloudWatchRole",
adopt: false
});
// Additional monitoring configuration can be set through the AWS Management Console.

Update an existing ApiGateway account to change the CloudWatch role ARN.

const updatedApiGatewayAccount = await AWS.ApiGateway.Account("myApiGatewayAccount", {
CloudWatchRoleArn: "arn:aws:iam::123456789012:role/NewApiGatewayCloudWatchRole",
adopt: true
});