Skip to content

Commit

Permalink
Add sample files for kotlin (#6122)
Browse files Browse the repository at this point in the history
This PR has updated some Kotlin files, Linter issues, and added digital assets to a folder under kotlin so all tests can find dependant files, such as image files.  All Kotlin tests have successfully executed.
  • Loading branch information
scmacdon authored Feb 16, 2024
1 parent 155ffb9 commit 0b1785e
Show file tree
Hide file tree
Showing 39 changed files with 104,298 additions and 56 deletions.
Binary file added kotlin/services/.samplefiles/AdobePDF.pdf
Binary file not shown.
121 changes: 121 additions & 0 deletions kotlin/services/.samplefiles/CloudDashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"widgets": [
{
"height": 6,
"width": 6,
"y": 0,
"x": 0,
"type": "text",
"properties": {
"markdown": "# Code Example Dashboard \nThis dashboard was created by example code.\n"
}
},
{
"height": 8,
"width": 8,
"y": 0,
"x": 6,
"type": "metric",
"properties": {
"metrics": [
[
"AWS/Billing",
"EstimatedCharges",
"Currency",
"USD",
{
"region": "us-east-1"
}
]
],
"view": "timeSeries",
"region": "us-east-1",
"stat": "Maximum",
"period": 86400,
"yAxis": {
"left": {
"min": 0,
"max": 100
}
},
"stacked": false,
"title": "Estimated Billing",
"setPeriodToTimeRange": false,
"liveData": true,
"sparkline": true,
"trend": true
}
},
{
"height": 8,
"width": 8,
"y": 0,
"x": 14,
"type": "metric",
"properties": {
"metrics": [
[
"AWS/Usage",
"CallCount",
"Type",
"API",
"Resource",
"ListMetrics",
"Service",
"CloudWatch",
"Class",
"None"
],
[
"...",
"GetMetricStatistics",
".",
".",
".",
"."
],
[
"...",
"GetMetricData",
".",
".",
".",
"."
],
[
"...",
"PutDashboard",
".",
".",
".",
"."
],
[
"...",
"PutMetricData",
".",
".",
".",
"."
]
],
"view": "timeSeries",
"yAxis": {
"left": {
"min": 0,
"max": 200
}
},
"stacked": false,
"region": "us-east-1",
"stat": "Sum",
"period": 300,
"title": "CloudWatch Usage",
"setPeriodToTimeRange": false,
"liveData": true,
"sparkline": true,
"trend": true
}
}
]
}
12 changes: 12 additions & 0 deletions kotlin/services/.samplefiles/FunctionA.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function handler(event) {
// NOTE: This example function is for a viewer request event trigger.
// Choose viewer request for event trigger when you associate this function with a distribution.
var response = {
statusCode: 200,
statusDescription: 'OK',
headers: {
'cloudfront-functions': { value: 'generated-by-CloudFront-Functions' }
}
};
return response;
}
162 changes: 162 additions & 0 deletions kotlin/services/.samplefiles/GeoSpatialPipeline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{
"Version": "2020-12-01",
"Metadata": {},
"Parameters": [
{
"Name": "parameter_execution_role",
"Type": "String",
"DefaultValue": ""
},
{
"Name": "parameter_region",
"Type": "String",
"DefaultValue": "us-west-2"
},
{
"Name": "parameter_queue_url",
"Type": "String",
"DefaultValue": ""
},
{
"Name": "parameter_vej_input_config",
"Type": "String",
"DefaultValue": ""
},
{
"Name": "parameter_vej_export_config",
"Type": "String",
"DefaultValue": ""
},
{
"Name": "parameter_step_1_vej_config",
"Type": "String",
"DefaultValue": ""
}
],
"PipelineExperimentConfig": {
"ExperimentName": {
"Get": "Execution.PipelineName"
},
"TrialName": {
"Get": "Execution.PipelineExecutionId"
}
},
"Steps": [
{
"Name": "vej-processing-step",
"Type": "Lambda",
"Arguments": {
"role": {
"Get": "Parameters.parameter_execution_role"
},
"region": {
"Get": "Parameters.parameter_region"
},
"vej_input_config": {
"Get": "Parameters.parameter_vej_input_config"
},
"vej_config": {
"Get": "Parameters.parameter_step_1_vej_config"
},
"vej_name": "vej-pipeline-step-1"
},
"FunctionArn": "*FUNCTION_ARN*",
"OutputParameters": [
{
"OutputName": "statusCode",
"OutputType": "String"
},
{
"OutputName": "vej_arn",
"OutputType": "String"
}
]
},
{
"Name": "vej-callback-step",
"Type": "Callback",
"Arguments": {
"role": {
"Get": "Parameters.parameter_execution_role"
},
"region": {
"Get": "Parameters.parameter_region"
},
"vej_arn": {
"Get": "Steps.vej-processing-step.OutputParameters['vej_arn']"
}
},
"DependsOn": [
"vej-processing-step"
],
"SqsQueueUrl": {
"Get": "Parameters.parameter_queue_url"
},
"OutputParameters": [
{
"OutputName": "vej_status",
"OutputType": "String"
}
]
},
{
"Name": "export-vej-step",
"Type": "Lambda",
"Arguments": {
"vej_arn": {
"Get": "Steps.vej-processing-step.OutputParameters['vej_arn']"
},
"role": {
"Get": "Parameters.parameter_execution_role"
},
"region": {
"Get": "Parameters.parameter_region"
},
"vej_export_config": {
"Get": "Parameters.parameter_vej_export_config"
}
},
"DependsOn": [
"vej-callback-step"
],
"FunctionArn": "*FUNCTION_ARN*",
"OutputParameters": [
{
"OutputName": "statusCode",
"OutputType": "String"
},
{
"OutputName": "vej_arn",
"OutputType": "String"
}
]
},
{
"Name": "export-vej-callback",
"Type": "Callback",
"Arguments": {
"role": {
"Get": "Parameters.parameter_execution_role"
},
"region": {
"Get": "Parameters.parameter_region"
},
"vej_arn": {
"Get": "Steps.export-vej-step.OutputParameters['vej_arn']"
}
},
"DependsOn": [
"export-vej-step"
],
"SqsQueueUrl": {
"Get": "Parameters.parameter_queue_url"
},
"OutputParameters": [
{
"OutputName": "statusJob",
"OutputType": "String"
}
]
}
]
}
Binary file added kotlin/services/.samplefiles/Jack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added kotlin/services/.samplefiles/Rabbit.mp4
Binary file not shown.
Empty file.
Binary file added kotlin/services/.samplefiles/Sun22.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added kotlin/services/.samplefiles/WorkReport.xls
Binary file not shown.
Binary file added kotlin/services/.samplefiles/book.pdf
Binary file not shown.
Binary file added kotlin/services/.samplefiles/book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added kotlin/services/.samplefiles/book2.pdf
Binary file not shown.
Binary file added kotlin/services/.samplefiles/book22.pdf
Binary file not shown.
Binary file added kotlin/services/.samplefiles/book32.pdf
Binary file not shown.
17 changes: 17 additions & 0 deletions kotlin/services/.samplefiles/bucketpolicy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"PublicRead",
"Effect":"Deny",
"Principal":"*",
"Action":[
"s3:GetObject",
"s3:GetObjectVersion"
],
"Resource":[
"arn:aws:s3:::scottpolicytestbucket2/*"
]
}
]
}
76 changes: 76 additions & 0 deletions kotlin/services/.samplefiles/chat_sfn_state_machine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"Comment": "A non-AI simplistic chat simulator",
"StartAt": "Greeting",
"States": {
"Greeting": {
"Type": "Pass",
"Parameters": {
"message.$": "States.Format('Hello, {}!', $.name)"
},
"Next": "GetInput"
},
"GetInput": {
"Type": "Task",
"Resource": "{{DOC_EXAMPLE_ACTIVITY_ARN}}",
"Parameters": {
"message.$": "$.message",
"actions.$": "States.Array('song', 'poem', 'story', 'done')"
},
"TimeoutSeconds": 300,
"Next": "Choice"
},
"Choice": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.action",
"StringEquals": "song",
"Next": "Song"
},
{
"Variable": "$.action",
"StringEquals": "poem",
"Next": "Poem"
},
{
"Variable": "$.action",
"StringEquals": "story",
"Next": "Story"
},
{
"Variable": "$.action",
"StringEquals": "done",
"Next": "Done"
}
]
},
"Song": {
"Type": "Pass",
"Result": {
"message": "My song has no tune but you can still dance to it."
},
"Next": "GetInput"
},
"Poem": {
"Type": "Pass",
"Result": {
"message": "This is my poem but it doesn't rhyme."
},
"Next": "GetInput"
},
"Story": {
"Type": "Pass",
"Result": {
"message": "This story has neither beginning, middle, nor end."
},
"Next": "GetInput"
},
"Done": {
"Type": "Pass",
"End": true,
"Result": {
"message": "Thanks for chatting."
}
}
}
}
Loading

0 comments on commit 0b1785e

Please sign in to comment.