-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run cfn init to set up LookoutVision Project resource providers (#6)
* Run cfn init to set up LookoutVision Project resource providers * Rewrite READMEs to contain relevant info
- Loading branch information
Showing
31 changed files
with
1,746 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"artifact_type": "RESOURCE", | ||
"typeName": "AWS::LookoutVision::Project", | ||
"language": "java", | ||
"runtime": "java8", | ||
"entrypoint": "software.amazon.lookoutvision.project.HandlerWrapper::handleRequest", | ||
"testEntrypoint": "software.amazon.lookoutvision.project.HandlerWrapper::testEntrypoint", | ||
"settings": { | ||
"version": false, | ||
"subparser_name": null, | ||
"verbose": 0, | ||
"force": false, | ||
"type_name": null, | ||
"artifact_type": null, | ||
"namespace": [ | ||
"software", | ||
"amazon", | ||
"lookoutvision", | ||
"project" | ||
], | ||
"codegen_template_path": "guided_aws", | ||
"protocolVersion": "2.0.0" | ||
}, | ||
"executableEntrypoint": "software.amazon.lookoutvision.project.HandlerWrapperExecutable" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# AWS::LookoutVision::Project | ||
|
||
1. Write the JSON schema describing your resource, `aws-lookoutvision-project.json` | ||
1. Implement your resource handlers. | ||
|
||
This package has two main components: | ||
1. The JSON schema describing an Amazon Lookout for Vision Project, `aws-lookoutvision-project.json` | ||
1. The resource handlers that actually create, delete, update, read, and list Amazon Lookout for Vision Projects. | ||
|
||
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. |
105 changes: 105 additions & 0 deletions
105
aws-lookoutvision-project/aws-lookoutvision-project.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"typeName": "AWS::LookoutVision::Project", | ||
"description": "An example resource schema demonstrating some basic constructs and validation rules.", | ||
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git", | ||
"definitions": { | ||
"InitechDateFormat": { | ||
"$comment": "Use the `definitions` block to provide shared resource property schemas", | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"Memo": { | ||
"type": "object", | ||
"properties": { | ||
"Heading": { | ||
"type": "string" | ||
}, | ||
"Body": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"properties": { | ||
"TPSCode": { | ||
"description": "A TPS Code is automatically generated on creation and assigned as the unique identifier.", | ||
"type": "string", | ||
"pattern": "^[A-Z]{3,5}[0-9]{8}-[0-9]{4}$" | ||
}, | ||
"Title": { | ||
"description": "The title of the TPS report is a mandatory element.", | ||
"type": "string", | ||
"minLength": 20, | ||
"maxLength": 250 | ||
}, | ||
"CoverSheetIncluded": { | ||
"description": "Required for all TPS Reports submitted after 2/19/1999", | ||
"type": "boolean" | ||
}, | ||
"DueDate": { | ||
"$ref": "#/definitions/InitechDateFormat" | ||
}, | ||
"ApprovalDate": { | ||
"$ref": "#/definitions/InitechDateFormat" | ||
}, | ||
"Memo": { | ||
"$ref": "#/definitions/Memo" | ||
}, | ||
"SecondCopyOfMemo": { | ||
"description": "In case you didn't get the first one.", | ||
"$ref": "#/definitions/Memo" | ||
}, | ||
"TestCode": { | ||
"type": "string", | ||
"enum": [ | ||
"NOT_STARTED", | ||
"CANCELLED" | ||
] | ||
}, | ||
"Authors": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"TestCode", | ||
"Title" | ||
], | ||
"readOnlyProperties": [ | ||
"/properties/TPSCode" | ||
], | ||
"primaryIdentifier": [ | ||
"/properties/TPSCode" | ||
], | ||
"handlers": { | ||
"create": { | ||
"permissions": [ | ||
"initech:CreateReport" | ||
] | ||
}, | ||
"read": { | ||
"permissions": [ | ||
"initech:DescribeReport" | ||
] | ||
}, | ||
"update": { | ||
"permissions": [ | ||
"initech:UpdateReport" | ||
] | ||
}, | ||
"delete": { | ||
"permissions": [ | ||
"initech:DeleteReport" | ||
] | ||
}, | ||
"list": { | ||
"permissions": [ | ||
"initech:ListReports" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# AWS::LookoutVision::Project | ||
|
||
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::LookoutVision::Project", | ||
"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> | ||
} | ||
} | ||
</pre> | ||
|
||
### YAML | ||
|
||
<pre> | ||
Type: AWS::LookoutVision::Project | ||
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> | ||
</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) | ||
|
||
## 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# AWS::LookoutVision::Project Memo | ||
|
||
## Syntax | ||
|
||
To declare this entity in your AWS CloudFormation template, use the following syntax: | ||
|
||
### JSON | ||
|
||
<pre> | ||
{ | ||
"<a href="#heading" title="Heading">Heading</a>" : <i>String</i>, | ||
"<a href="#body" title="Body">Body</a>" : <i>String</i> | ||
} | ||
</pre> | ||
|
||
### YAML | ||
|
||
<pre> | ||
<a href="#heading" title="Heading">Heading</a>: <i>String</i> | ||
<a href="#body" title="Body">Body</a>: <i>String</i> | ||
</pre> | ||
|
||
## Properties | ||
|
||
#### Heading | ||
|
||
_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) | ||
|
||
#### Body | ||
|
||
_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) |
11 changes: 11 additions & 0 deletions
11
aws-lookoutvision-project/example_inputs/inputs_1_create.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"TPSCode": "...", | ||
"Title": "...", | ||
"CoverSheetIncluded": "...", | ||
"DueDate": "...", | ||
"ApprovalDate": "...", | ||
"Memo": "...", | ||
"SecondCopyOfMemo": "...", | ||
"TestCode": "...", | ||
"Authors": "..." | ||
} |
11 changes: 11 additions & 0 deletions
11
aws-lookoutvision-project/example_inputs/inputs_1_invalid.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"TPSCode": "...", | ||
"Title": "...", | ||
"CoverSheetIncluded": "...", | ||
"DueDate": "...", | ||
"ApprovalDate": "...", | ||
"Memo": "...", | ||
"SecondCopyOfMemo": "...", | ||
"TestCode": "...", | ||
"Authors": "..." | ||
} |
11 changes: 11 additions & 0 deletions
11
aws-lookoutvision-project/example_inputs/inputs_1_update.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"TPSCode": "...", | ||
"Title": "...", | ||
"CoverSheetIncluded": "...", | ||
"DueDate": "...", | ||
"ApprovalDate": "...", | ||
"Memo": "...", | ||
"SecondCopyOfMemo": "...", | ||
"TestCode": "...", | ||
"Authors": "..." | ||
} |
Oops, something went wrong.