Skip to content

Commit c2d17de

Browse files
authored
Add AWS::DataSync::StorageSystem resource (#31)
1 parent 0f79342 commit c2d17de

25 files changed

+2446
-0
lines changed

aws-datasync-storagesystem/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# macOS
2+
.DS_Store
3+
._*
4+
5+
# Maven outputs
6+
.classpath
7+
8+
# IntelliJ
9+
*.iml
10+
.idea
11+
out.java
12+
out/
13+
.settings
14+
.project
15+
16+
# auto-generated files
17+
target/
18+
19+
# RPDK logs
20+
rpdk.log
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"artifact_type": "RESOURCE",
3+
"typeName": "AWS::DataSync::StorageSystem",
4+
"language": "java",
5+
"runtime": "java8",
6+
"entrypoint": "software.amazon.datasync.storagesystem.HandlerWrapper::handleRequest",
7+
"testEntrypoint": "software.amazon.datasync.storagesystem.HandlerWrapper::testEntrypoint",
8+
"settings": {
9+
"namespace": [
10+
"software",
11+
"amazon",
12+
"datasync",
13+
"storagesystem"
14+
],
15+
"codegen_template_path": "default",
16+
"protocolVersion": "2.0.0"
17+
},
18+
"logProcessorEnabled": "true",
19+
"executableEntrypoint": "software.amazon.datasync.storagesystem.HandlerWrapperExecutable"
20+
}

aws-datasync-storagesystem/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# AWS::DataSync::StorageSystem
2+
3+
## Development
4+
5+
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`.
6+
7+
> Please don't modify files under `target/generated-sources/rpdk`, as they will be automatically overwritten.
8+
9+
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.
Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
{
2+
"typeName": "AWS::DataSync::StorageSystem",
3+
"description": "Resource schema for AWS::DataSync::StorageSystem.",
4+
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-datasync.git",
5+
"definitions": {
6+
"ServerConfiguration": {
7+
"additionalProperties": false,
8+
"description": "The server name and network port required to connect with the management interface of the on-premises storage system.",
9+
"type": "object",
10+
"properties": {
11+
"ServerHostname": {
12+
"type": "string",
13+
"description": "The domain name or IP address of the storage system's management interface.",
14+
"pattern": "^(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])$",
15+
"maxLength": 255
16+
},
17+
"ServerPort": {
18+
"type": "integer",
19+
"description": "The network port needed to access the system's management interface",
20+
"minimum": 1,
21+
"maximum": 65535
22+
}
23+
},
24+
"required": [
25+
"ServerHostname"
26+
]
27+
},
28+
"ServerCredentials": {
29+
"additionalProperties": false,
30+
"description": "The username and password for accessing your on-premises storage system's management interface.",
31+
"type": "object",
32+
"properties": {
33+
"Username": {
34+
"type": "string",
35+
"description": "The username for your storage system's management interface.",
36+
"maxLength": 1024
37+
},
38+
"Password": {
39+
"type": "string",
40+
"description": "The password for your storage system's management interface",
41+
"maxLength": 1024
42+
}
43+
},
44+
"required": [
45+
"Username",
46+
"Password"
47+
]
48+
},
49+
"Tag": {
50+
"additionalProperties": false,
51+
"description": "A key-value pair to associate with a resource.",
52+
"type": "object",
53+
"properties": {
54+
"Key": {
55+
"type": "string",
56+
"description": "The key for an AWS resource tag.",
57+
"pattern": "^[a-zA-Z0-9\\s+=._:/-]+$",
58+
"maxLength": 256,
59+
"minLength": 1
60+
},
61+
"Value": {
62+
"type": "string",
63+
"description": "The value for an AWS resource tag.",
64+
"pattern": "^[a-zA-Z0-9\\s+=._:@/-]+$",
65+
"maxLength": 256,
66+
"minLength": 1
67+
}
68+
},
69+
"required": [
70+
"Key",
71+
"Value"
72+
]
73+
}
74+
},
75+
"properties": {
76+
"ServerConfiguration": {
77+
"$ref": "#/definitions/ServerConfiguration"
78+
},
79+
"ServerCredentials": {
80+
"$ref": "#/definitions/ServerCredentials"
81+
},
82+
"SecretsManagerArn": {
83+
"description": "The ARN of a secret stored by AWS Secrets Manager.",
84+
"type": "string",
85+
"pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):secretsmanager:[a-z\\-0-9]+:[0-9]{12}:secret:.*",
86+
"maxLength": 2048
87+
},
88+
"SystemType": {
89+
"description": "The type of on-premises storage system that DataSync Discovery will analyze.",
90+
"type": "string",
91+
"enum": [
92+
"NetAppONTAP"
93+
]
94+
},
95+
"AgentArns": {
96+
"description": "The ARN of the DataSync agent that connects to and reads from the on-premises storage system's management interface.",
97+
"type": "array",
98+
"items": {
99+
"type": "string",
100+
"pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$",
101+
"maxLength": 128
102+
},
103+
"minItems": 1,
104+
"maxItems": 1,
105+
"insertionOrder": false
106+
},
107+
"CloudWatchLogGroupArn": {
108+
"description": "The ARN of the Amazon CloudWatch log group used to monitor and log discovery job events.",
109+
"type": "string",
110+
"pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):logs:[a-z\\-0-9]+:[0-9]{12}:log-group:([^:\\*]*)(:\\*)?$",
111+
"maxLength": 562
112+
},
113+
"Name": {
114+
"description": "A familiar name for the on-premises storage system.",
115+
"type": "string",
116+
"pattern": "^[a-zA-Z0-9\\s+=._:@/-]+$",
117+
"minLength": 1,
118+
"maxLength": 256
119+
},
120+
"Tags": {
121+
"description": "An array of key-value pairs to apply to this resource.",
122+
"type": "array",
123+
"maxItems": 50,
124+
"uniqueItems": true,
125+
"insertionOrder": false,
126+
"items": {
127+
"$ref": "#/definitions/Tag"
128+
}
129+
},
130+
"StorageSystemArn": {
131+
"description": "The ARN of the on-premises storage system added to DataSync Discovery.",
132+
"type": "string",
133+
"pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:system/storage-system-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
134+
"maxLength": 128
135+
},
136+
"ConnectivityStatus": {
137+
"description": "Indicates whether the DataSync agent can access the on-premises storage system.",
138+
"type": "string",
139+
"enum": [
140+
"PASS",
141+
"FAIL",
142+
"UNKNOWN"
143+
]
144+
}
145+
},
146+
"tagging": {
147+
"taggable": true,
148+
"tagOnCreate": true,
149+
"tagUpdatable": true,
150+
"cloudFormationSystemTags": true,
151+
"tagProperty": "/properties/Tags"
152+
},
153+
"additionalProperties": false,
154+
"required": [
155+
"ServerConfiguration",
156+
"SystemType",
157+
"AgentArns"
158+
],
159+
"primaryIdentifier": [
160+
"/properties/StorageSystemArn"
161+
],
162+
"writeOnlyProperties": [
163+
"/properties/ServerCredentials"
164+
],
165+
"readOnlyProperties": [
166+
"/properties/StorageSystemArn",
167+
"/properties/ConnectivityStatus",
168+
"/properties/SecretsManagerArn"
169+
],
170+
"handlers": {
171+
"create": {
172+
"permissions": [
173+
"datasync:AddStorageSystem",
174+
"datasync:DescribeStorageSystem",
175+
"datasync:ListTagsForResource",
176+
"datasync:TagResource",
177+
"secretsmanager:CreateSecret",
178+
"secretsmanager:DescribeSecret",
179+
"iam:CreateServiceLinkedRole"
180+
]
181+
},
182+
"read": {
183+
"permissions": [
184+
"datasync:DescribeStorageSystem",
185+
"datasync:ListTagsForResource",
186+
"secretsmanager:DescribeSecret"
187+
]
188+
},
189+
"update": {
190+
"permissions": [
191+
"datasync:UpdateStorageSystem",
192+
"datasync:DescribeStorageSystem",
193+
"datasync:ListTagsForResource",
194+
"datasync:TagResource",
195+
"datasync:UntagResource",
196+
"secretsmanager:DescribeSecret",
197+
"secretsmanager:PutSecretValue"
198+
]
199+
},
200+
"delete": {
201+
"permissions": [
202+
"datasync:DescribeStorageSystem",
203+
"datasync:RemoveStorageSystem",
204+
"secretsmanager:DescribeSecret",
205+
"secretsmanager:DeleteSecret"
206+
]
207+
},
208+
"list": {
209+
"permissions": [
210+
"datasync:ListStorageSystems"
211+
]
212+
}
213+
}
214+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lombok.addLombokGeneratedAnnotation = true

0 commit comments

Comments
 (0)