Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions aws-msk-serverlessvpcconnection/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# macOS
.DS_Store
._*

# Maven outputs
.classpath

# IntelliJ
*.iml
.idea
out.java
out/
.settings
.project

# auto-generated files
target/

# our logs
rpdk.log*

# contains credentials
sam-tests/
28 changes: 28 additions & 0 deletions aws-msk-serverlessvpcconnection/.rpdk-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"artifact_type": "RESOURCE",
"typeName": "AWS::MSK::ServerlessVpcConnection",
"language": "java",
"runtime": "java8",
"entrypoint": "software.amazon.msk.serverlessvpcconnection.HandlerWrapper::handleRequest",
"testEntrypoint": "software.amazon.msk.serverlessvpcconnection.HandlerWrapper::testEntrypoint",
"settings": {
"version": false,
"subparser_name": null,
"verbose": 0,
"force": false,
"type_name": null,
"artifact_type": null,
"endpoint_url": null,
"region": null,
"target_schemas": [],
"namespace": [
"software",
"amazon",
"msk",
"serverlessvpcconnection"
],
"codegen_template_path": "guided_aws",
"protocolVersion": "2.0.0"
},
"executableEntrypoint": "software.amazon.msk.serverlessvpcconnection.HandlerWrapperExecutable"
}
12 changes: 12 additions & 0 deletions aws-msk-serverlessvpcconnection/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AWS::MSK::ServerlessVpcConnection

Congratulations on starting development! Next steps:

1. Write the JSON schema describing your resource, `aws-msk-serverlessvpcconnection.json`
1. Implement your resource handlers.

The RPDK will automatically generate the correct resource model from the schema whenever the project is built via Maven. You can also do this manually with the following command: `cfn generate`.

> Please don't modify files under `target/generated-sources/rpdk`, as they will be automatically overwritten.

The code uses [Lombok](https://projectlombok.org/), and [you may have to install IDE integrations](https://projectlombok.org/setup/overview) to enable auto-complete for Lombok-annotated classes.
148 changes: 148 additions & 0 deletions aws-msk-serverlessvpcconnection/aws-msk-serverlessvpcconnection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"typeName": "AWS::MSK::ServerlessVpcConnection",
"description": "Resource Type definition for AWS::MSK::ServerlessVpcConnection",
"definitions": {
"Authentication": {
"type": "string",
"description": "The type of private link authentication",
"minLength": 3,
"maxLength": 10,
"enum": [
"SASL_IAM"
]
},
"ClientSubnets": {
"type": "array",
"uniqueItems": false,
"insertionOrder": false,
"items": {
"type": "string",
"pattern": "^(subnet-)([a-z0-9]+)\\Z"
}
},
"SecurityGroups": {
"type": "array",
"uniqueItems": false,
"insertionOrder": false,
"items": {
"type": "string",
"pattern": "^(sg-)([a-z0-9]+)\\Z"
}
},
"Tags": {
"type": "object",
"description": "A key-value pair to associate with a resource.",
"patternProperties": {
"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$": {
"type": "string"
}
},
"additionalProperties": false
},
"VpcId": {
"type": "string",
"pattern": "^(vpc-)([a-z0-9]+)\\Z"
}
},
"properties": {
"Arn": {
"type": "string"
},
"Authentication": {
"$ref": "#/definitions/Authentication"
},
"ClientSubnets": {
"$ref": "#/definitions/ClientSubnets"
},
"TargetClusterArn": {
"description": "The Amazon Resource Name (ARN) of the target cluster",
"type": "string",
"pattern": "^arn:[\\w-]+:kafka:[\\w-]+:\\d+:cluster.*\\Z"
},
"SecurityGroups": {
"$ref": "#/definitions/SecurityGroups"
},
"Tags": {
"$ref": "#/definitions/Tags"
},
"VpcId": {
"$ref": "#/definitions/VpcId"
}
},
"additionalProperties": false,
"required": [
"Authentication",
"ClientSubnets",
"SecurityGroups",
"TargetClusterArn",
"VpcId"
],
"createOnlyProperties": [
"/properties/ClientSubnets",
"/properties/Authentication",
"/properties/SecurityGroups",
"/properties/TargetClusterArn",
"/properties/VpcId"
],
"readOnlyProperties": [
"/properties/Arn"
],
"primaryIdentifier": [
"/properties/Arn"
],
"tagging": {
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags"
},
"handlers": {
"create": {
"permissions": [
"ec2:CreateVpcEndpoint",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSubnets",
"ec2:DescribeVpcAttribute",
"ec2:DescribeVpcs",
"ec2:DescribeVpcEndpoints",
"ec2:DescribeVpcEndpointConnections",
"ec2:CreateTags",
"iam:AttachRolePolicy",
"iam:CreateServiceLinkedRole",
"iam:PutRolePolicy",
"kafka:CreateVpcConnection",
"kafka:DescribeVpcConnection",
"kafka:TagResource"
]
},
"read": {
"permissions": [
"kafka:DescribeVpcConnection"
]
},
"update": {
"permissions": [
"kafka:DescribeVpcConnection",
"kafka:TagResource",
"kafka:UntagResource"
]
},
"delete": {
"permissions": [
"ec2:DeleteVpcEndpoint",
"ec2:DeleteVpcEndpoints",
"ec2:DescribeVpcEndpoints",
"ec2:DescribeVpcEndpointConnections",
"kafka:DeleteVpcConnection",
"kafka:DescribeVpcConnection"
]
},
"list": {
"permissions": [
"kafka:ListVpcConnections"
]
}
}
}

147 changes: 147 additions & 0 deletions aws-msk-serverlessvpcconnection/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# AWS::MSK::ServerlessVpcConnection

An example resource schema demonstrating some basic constructs and validation rules.

## Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

### JSON

<pre>
{
"Type" : "AWS::MSK::ServerlessVpcConnection",
"Properties" : {
"<a href="#title" title="Title">Title</a>" : <i>String</i>,
"<a href="#coversheetincluded" title="CoverSheetIncluded">CoverSheetIncluded</a>" : <i>Boolean</i>,
"<a href="#duedate" title="DueDate">DueDate</a>" : <i>String</i>,
"<a href="#approvaldate" title="ApprovalDate">ApprovalDate</a>" : <i>String</i>,
"<a href="#memo" title="Memo">Memo</a>" : <i><a href="memo.md">Memo</a></i>,
"<a href="#secondcopyofmemo" title="SecondCopyOfMemo">SecondCopyOfMemo</a>" : <i><a href="memo.md">Memo</a></i>,
"<a href="#testcode" title="TestCode">TestCode</a>" : <i>String</i>,
"<a href="#authors" title="Authors">Authors</a>" : <i>[ String, ... ]</i>,
"<a href="#tags" title="Tags">Tags</a>" : <i>[ <a href="tag.md">Tag</a>, ... ]</i>
}
}
</pre>

### YAML

<pre>
Type: AWS::MSK::ServerlessVpcConnection
Properties:
<a href="#title" title="Title">Title</a>: <i>String</i>
<a href="#coversheetincluded" title="CoverSheetIncluded">CoverSheetIncluded</a>: <i>Boolean</i>
<a href="#duedate" title="DueDate">DueDate</a>: <i>String</i>
<a href="#approvaldate" title="ApprovalDate">ApprovalDate</a>: <i>String</i>
<a href="#memo" title="Memo">Memo</a>: <i><a href="memo.md">Memo</a></i>
<a href="#secondcopyofmemo" title="SecondCopyOfMemo">SecondCopyOfMemo</a>: <i><a href="memo.md">Memo</a></i>
<a href="#testcode" title="TestCode">TestCode</a>: <i>String</i>
<a href="#authors" title="Authors">Authors</a>: <i>
- String</i>
<a href="#tags" title="Tags">Tags</a>: <i>
- <a href="tag.md">Tag</a></i>
</pre>

## Properties

#### Title

The title of the TPS report is a mandatory element.

_Required_: Yes

_Type_: String

_Minimum_: <code>20</code>

_Maximum_: <code>250</code>

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

#### CoverSheetIncluded

Required for all TPS Reports submitted after 2/19/1999

_Required_: No

_Type_: Boolean

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

#### DueDate

_Required_: No

_Type_: String

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

#### ApprovalDate

_Required_: No

_Type_: String

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

#### Memo

_Required_: No

_Type_: <a href="memo.md">Memo</a>

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

#### SecondCopyOfMemo

_Required_: No

_Type_: <a href="memo.md">Memo</a>

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

#### TestCode

_Required_: Yes

_Type_: String

_Allowed Values_: <code>NOT_STARTED</code> | <code>CANCELLED</code>

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

#### Authors

_Required_: No

_Type_: List of String

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

#### Tags

An array of key-value pairs to apply to this resource.

_Required_: No

_Type_: List of <a href="tag.md">Tag</a>

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return Values

### Ref

When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the TPSCode.

### Fn::GetAtt

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html).

#### TPSCode

A TPS Code is automatically generated on creation and assigned as the unique identifier.

Loading