Skip to content
GitHubXDiscordRSS

VPCConnection

Learn how to create, update, and manage AWS QuickSight VPCConnections using Alchemy Cloud Control.

The VPCConnection resource allows you to manage AWS QuickSight VPCConnections for securely connecting QuickSight to your VPC resources.

Create a basic VPCConnection with required properties and a common optional property.

import AWS from "alchemy/aws/control";
const vpcConnection = await AWS.QuickSight.VPCConnection("myVpcConnection", {
AwsAccountId: "123456789012",
Name: "MyVPCConnection",
SubnetIds: ["subnet-0abcd1234efgh5678"],
SecurityGroupIds: ["sg-0abcd1234efgh5678"],
DnsResolvers: ["10.0.0.2"]
});

Configure a VPCConnection with additional properties for role ARN and tags.

const advancedVpcConnection = await AWS.QuickSight.VPCConnection("advancedVpcConnection", {
AwsAccountId: "123456789012",
Name: "AdvancedVPCConnection",
SubnetIds: ["subnet-0abcd1234efgh5678"],
SecurityGroupIds: ["sg-0abcd1234efgh5678"],
DnsResolvers: ["10.0.0.2"],
RoleArn: "arn:aws:iam::123456789012:role/MyQuickSightRole",
Tags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Department", Value: "Analytics" }
]
});

Create or update a VPCConnection while managing its availability status.

const vpcConnectionWithStatus = await AWS.QuickSight.VPCConnection("vpcConnectionWithStatus", {
AwsAccountId: "123456789012",
Name: "StatusManagedVPCConnection",
SubnetIds: ["subnet-0abcd1234efgh5678"],
SecurityGroupIds: ["sg-0abcd1234efgh5678"],
AvailabilityStatus: "AVAILABLE"
});

Adopt an existing VPCConnection by setting the adopt property to true.

const adoptedVpcConnection = await AWS.QuickSight.VPCConnection("adoptedVpcConnection", {
AwsAccountId: "123456789012",
Name: "AdoptedVPCConnection",
SubnetIds: ["subnet-0abcd1234efgh5678"],
SecurityGroupIds: ["sg-0abcd1234efgh5678"],
DnsResolvers: ["10.0.0.2"],
adopt: true
});