Skip to main content

vpc_connections

Creates, updates, deletes or gets a vpc_connection resource or lists vpc_connections in a region

Overview

Namevpc_connections
TypeResource
DescriptionResource Type definition for AWS::MSK::VpcConnection
Idaws.msk.vpc_connections

Fields

NameDatatypeDescription
arnstring
authenticationstringThe type of private link authentication
client_subnetsarray
target_cluster_arnstringThe Amazon Resource Name (ARN) of the target cluster
security_groupsarray
tagsobjectA key-value pair to associate with a resource.
vpc_idstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAuthentication, ClientSubnets, SecurityGroups, TargetClusterArn, VpcId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all vpc_connections in a region.

SELECT
region,
arn,
authentication,
client_subnets,
target_cluster_arn,
security_groups,
tags,
vpc_id
FROM aws.msk.vpc_connections
WHERE region = 'us-east-1';

Gets all properties from an individual vpc_connection.

SELECT
region,
arn,
authentication,
client_subnets,
target_cluster_arn,
security_groups,
tags,
vpc_id
FROM aws.msk.vpc_connections
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new vpc_connection resource, using stack-deploy.

/*+ create */
INSERT INTO aws.msk.vpc_connections (
Authentication,
ClientSubnets,
TargetClusterArn,
SecurityGroups,
VpcId,
region
)
SELECT
'{{ Authentication }}',
'{{ ClientSubnets }}',
'{{ TargetClusterArn }}',
'{{ SecurityGroups }}',
'{{ VpcId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.msk.vpc_connections
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the vpc_connections resource, the following permissions are required:

Create

ec2:CreateVpcEndpoint,
ec2:DescribeSecurityGroups,
ec2:DescribeSubnets,
ec2:DescribeVpcAttribute,
ec2:DescribeVpcs,
ec2:DescribeVpcEndpoints,
ec2:AcceptVpcEndpointConnections,
ec2:RejectVpcEndpointConnections,
ec2:DescribeVpcEndpointConnections,
ec2:CreateTags,
iam:AttachRolePolicy,
iam:CreateServiceLinkedRole,
iam:PutRolePolicy,
kafka:CreateVpcConnection,
kafka:DescribeVpcConnection,
kafka:TagResource,
kms:CreateGrant,
kms:DescribeKey

Read

kafka:DescribeVpcConnection,
kms:CreateGrant,
kms:DescribeKey

Update

kafka:DescribeVpcConnection,
kms:CreateGrant,
kms:DescribeKey,
kafka:TagResource,
kafka:UntagResource

Delete

ec2:DeleteVpcEndpoint,
ec2:DeleteVpcEndpoints,
ec2:DescribeVpcEndpoints,
ec2:DescribeVpcEndpointConnections,
kafka:DeleteVpcConnection,
kafka:DescribeVpcConnection,
kms:CreateGrant,
kms:DescribeKey

List

kafka:ListVpcConnections,
kms:CreateGrant,
kms:DescribeKey