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
Idawscc.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.

For more information, see AWS::MSK::VpcConnection.

Methods

NameResourceAccessible byRequired Params
create_resourcevpc_connectionsINSERTAuthentication, ClientSubnets, SecurityGroups, TargetClusterArn, VpcId, region
delete_resourcevpc_connectionsDELETEIdentifier, region
update_resourcevpc_connectionsUPDATEIdentifier, PatchDocument, region
list_resourcesvpc_connections_list_onlySELECTregion
get_resourcevpc_connectionsSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
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 awscc.msk.vpc_connections (
Authentication,
ClientSubnets,
TargetClusterArn,
SecurityGroups,
VpcId,
region
)
SELECT
'{{ authentication }}',
'{{ client_subnets }}',
'{{ target_cluster_arn }}',
'{{ security_groups }}',
'{{ vpc_id }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.msk.vpc_connections
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

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