Account
The Account resource lets you manage AWS ApiGateway Accounts and their configurations for your API Gateway services.
Minimal Example
Section titled “Minimal Example”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"});
Advanced Configuration
Section titled “Advanced Configuration”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});
Monitoring Configuration
Section titled “Monitoring Configuration”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.
Updating an Existing Account
Section titled “Updating an Existing Account”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});