vpc_connections
Creates, updates, deletes or gets a vpc_connection resource or lists vpc_connections in a region
Overview
| Name | vpc_connections |
| Type | Resource |
| Description | Resource Type definition for AWS::MSK::VpcConnection |
| Id | awscc.msk.vpc_connections |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | |
authentication | string | The type of private link authentication |
client_subnets | array | |
target_cluster_arn | string | The Amazon Resource Name (ARN) of the target cluster |
security_groups | array | |
tags | object | A key-value pair to associate with a resource. |
vpc_id | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::MSK::VpcConnection.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | vpc_connections | INSERT | Authentication, ClientSubnets, SecurityGroups, TargetClusterArn, VpcId, region |
delete_resource | vpc_connections | DELETE | Identifier, region |
update_resource | vpc_connections | UPDATE | Identifier, PatchDocument, region |
list_resources | vpc_connections_list_only | SELECT | region |
get_resource | vpc_connections | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual vpc_connection.
SELECT
region,
arn,
authentication,
client_subnets,
target_cluster_arn,
security_groups,
tags,
vpc_id
FROM awscc.msk.vpc_connections
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all vpc_connections in a region.
SELECT
region,
arn
FROM awscc.msk.vpc_connections_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new vpc_connection resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.msk.vpc_connections (
Authentication,
ClientSubnets,
TargetClusterArn,
SecurityGroups,
VpcId,
region
)
SELECT
'{{ authentication }}',
'{{ client_subnets }}',
'{{ target_cluster_arn }}',
'{{ security_groups }}',
'{{ vpc_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.msk.vpc_connections (
Authentication,
ClientSubnets,
TargetClusterArn,
SecurityGroups,
Tags,
VpcId,
region
)
SELECT
'{{ authentication }}',
'{{ client_subnets }}',
'{{ target_cluster_arn }}',
'{{ security_groups }}',
'{{ tags }}',
'{{ vpc_id }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: vpc_connection
props:
- name: authentication
value: '{{ authentication }}'
- name: client_subnets
value:
- '{{ client_subnets[0] }}'
- name: target_cluster_arn
value: '{{ target_cluster_arn }}'
- name: security_groups
value:
- '{{ security_groups[0] }}'
- name: tags
value: {}
- name: vpc_id
value: '{{ vpc_id }}'
UPDATE example
Use the following StackQL query and manifest file to update a vpc_connection resource, using stack-deploy.
/*+ update */
UPDATE awscc.msk.vpc_connections
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.msk.vpc_connections
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the vpc_connections resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
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
kafka:DescribeVpcConnection,
kms:CreateGrant,
kms:DescribeKey
kafka:DescribeVpcConnection,
kms:CreateGrant,
kms:DescribeKey,
kafka:TagResource,
kafka:UntagResource
ec2:DeleteVpcEndpoint,
ec2:DeleteVpcEndpoints,
ec2:DescribeVpcEndpoints,
ec2:DescribeVpcEndpointConnections,
kafka:DeleteVpcConnection,
kafka:DescribeVpcConnection,
kms:CreateGrant,
kms:DescribeKey
kafka:ListVpcConnections,
kms:CreateGrant,
kms:DescribeKey