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 = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all vpc_connections in a region.
SELECT
region,
arn
FROM awscc.msk.vpc_connections_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
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:
| Parameter | Description |
|---|---|
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:
- 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