generated from hashicorp/terraform-provider-scaffolding
/
task_resource_gen.go
1452 lines (1437 loc) · 61.3 KB
/
task_resource_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
// Code generated by generators/resource/main.go; DO NOT EDIT.
package datasync
import (
"context"
"regexp"
"github.com/hashicorp/terraform-plugin-framework-validators/int64validator"
"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
"github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-provider-awscc/internal/generic"
"github.com/hashicorp/terraform-provider-awscc/internal/registry"
)
func init() {
registry.AddResourceFactory("awscc_datasync_task", taskResource)
}
// taskResource returns the Terraform awscc_datasync_task resource.
// This Terraform resource corresponds to the CloudFormation AWS::DataSync::Task resource.
func taskResource(ctx context.Context) (resource.Resource, error) {
attributes := map[string]schema.Attribute{ /*START SCHEMA*/
// Property: CloudWatchLogGroupArn
// CloudFormation resource type schema:
//
// {
// "description": "The ARN of the Amazon CloudWatch log group that is used to monitor and log events in the task.",
// "maxLength": 562,
// "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):logs:[a-z\\-0-9]*:[0-9]{12}:log-group:([^:\\*]*)(:\\*)?$",
// "type": "string"
// }
"cloudwatch_log_group_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ARN of the Amazon CloudWatch log group that is used to monitor and log events in the task.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(562),
stringvalidator.RegexMatches(regexp.MustCompile("^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):logs:[a-z\\-0-9]*:[0-9]{12}:log-group:([^:\\*]*)(:\\*)?$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: DestinationLocationArn
// CloudFormation resource type schema:
//
// {
// "description": "The ARN of an AWS storage resource's location.",
// "maxLength": 128,
// "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$",
// "type": "string"
// }
"destination_location_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ARN of an AWS storage resource's location.",
Required: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(128),
stringvalidator.RegexMatches(regexp.MustCompile("^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.RequiresReplace(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: DestinationNetworkInterfaceArns
// CloudFormation resource type schema:
//
// {
// "description": "The Amazon Resource Names (ARNs) of the destination ENIs (Elastic Network Interfaces) that were created for your subnet.",
// "insertionOrder": false,
// "items": {
// "pattern": "^arn:aws[\\-a-z]{0,}:ec2:[a-z\\-0-9]*:[0-9]{12}:network-interface/eni-[0-9a-f]+$",
// "type": "string"
// },
// "maxItems": 128,
// "type": "array"
// }
"destination_network_interface_arns": schema.ListAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
Description: "The Amazon Resource Names (ARNs) of the destination ENIs (Elastic Network Interfaces) that were created for your subnet.",
Computed: true,
PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/
generic.Multiset(),
listplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Excludes
// CloudFormation resource type schema:
//
// {
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "description": "Specifies which files folders and objects to include or exclude when transferring files from source to destination.",
// "properties": {
// "FilterType": {
// "description": "The type of filter rule to apply. AWS DataSync only supports the SIMPLE_PATTERN rule type.",
// "enum": [
// "SIMPLE_PATTERN"
// ],
// "maxLength": 128,
// "pattern": "^[A-Z0-9_]+$",
// "type": "string"
// },
// "Value": {
// "description": "A single filter string that consists of the patterns to include or exclude. The patterns are delimited by \"|\".",
// "maxLength": 409600,
// "pattern": "^[^\\x00]+$",
// "type": "string"
// }
// },
// "type": "object"
// },
// "maxItems": 1,
// "minItems": 0,
// "type": "array"
// }
"excludes": schema.ListNestedAttribute{ /*START ATTRIBUTE*/
NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: FilterType
"filter_type": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The type of filter rule to apply. AWS DataSync only supports the SIMPLE_PATTERN rule type.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(128),
stringvalidator.RegexMatches(regexp.MustCompile("^[A-Z0-9_]+$"), ""),
stringvalidator.OneOf(
"SIMPLE_PATTERN",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Value
"value": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A single filter string that consists of the patterns to include or exclude. The patterns are delimited by \"|\".",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(409600),
stringvalidator.RegexMatches(regexp.MustCompile("^[^\\x00]+$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
}, /*END NESTED OBJECT*/
Optional: true,
Computed: true,
Validators: []validator.List{ /*START VALIDATORS*/
listvalidator.SizeBetween(0, 1),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/
generic.Multiset(),
listplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Includes
// CloudFormation resource type schema:
//
// {
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "description": "Specifies which files folders and objects to include or exclude when transferring files from source to destination.",
// "properties": {
// "FilterType": {
// "description": "The type of filter rule to apply. AWS DataSync only supports the SIMPLE_PATTERN rule type.",
// "enum": [
// "SIMPLE_PATTERN"
// ],
// "maxLength": 128,
// "pattern": "^[A-Z0-9_]+$",
// "type": "string"
// },
// "Value": {
// "description": "A single filter string that consists of the patterns to include or exclude. The patterns are delimited by \"|\".",
// "maxLength": 409600,
// "pattern": "^[^\\x00]+$",
// "type": "string"
// }
// },
// "type": "object"
// },
// "maxItems": 1,
// "minItems": 0,
// "type": "array"
// }
"includes": schema.ListNestedAttribute{ /*START ATTRIBUTE*/
NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: FilterType
"filter_type": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The type of filter rule to apply. AWS DataSync only supports the SIMPLE_PATTERN rule type.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(128),
stringvalidator.RegexMatches(regexp.MustCompile("^[A-Z0-9_]+$"), ""),
stringvalidator.OneOf(
"SIMPLE_PATTERN",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Value
"value": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A single filter string that consists of the patterns to include or exclude. The patterns are delimited by \"|\".",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(409600),
stringvalidator.RegexMatches(regexp.MustCompile("^[^\\x00]+$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
}, /*END NESTED OBJECT*/
Optional: true,
Computed: true,
Validators: []validator.List{ /*START VALIDATORS*/
listvalidator.SizeBetween(0, 1),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/
generic.Multiset(),
listplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: ManifestConfig
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "Configures a manifest, which is a list of files or objects that you want DataSync to transfer.",
// "properties": {
// "Action": {
// "description": "Specifies what DataSync uses the manifest for.",
// "enum": [
// "TRANSFER"
// ],
// "type": "string"
// },
// "Format": {
// "description": "Specifies the file format of your manifest.",
// "enum": [
// "CSV"
// ],
// "type": "string"
// },
// "Source": {
// "additionalProperties": false,
// "description": "Specifies the manifest that you want DataSync to use and where it's hosted.",
// "properties": {
// "S3": {
// "additionalProperties": false,
// "description": "Specifies the S3 bucket where you're hosting the manifest that you want AWS DataSync to use.",
// "properties": {
// "BucketAccessRoleArn": {
// "description": "Specifies the AWS Identity and Access Management (IAM) role that allows DataSync to access your manifest.",
// "maxLength": 2048,
// "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):iam::[0-9]{12}:role/.*$",
// "type": "string"
// },
// "ManifestObjectPath": {
// "description": "Specifies the Amazon S3 object key of your manifest.",
// "maxLength": 1024,
// "pattern": "^[\\p{L}\\p{M}\\p{Z}\\p{S}\\p{N}\\p{P}\\p{C}]*$",
// "type": "string"
// },
// "ManifestObjectVersionId": {
// "description": "Specifies the object version ID of the manifest that you want DataSync to use.",
// "maxLength": 100,
// "pattern": "^.+$",
// "type": "string"
// },
// "S3BucketArn": {
// "description": "Specifies the Amazon Resource Name (ARN) of the S3 bucket where you're hosting your manifest.",
// "maxLength": 156,
// "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):(s3|s3-outposts):[a-z\\-0-9]*:[0-9]*:.*$",
// "type": "string"
// }
// },
// "type": "object"
// }
// },
// "type": "object"
// }
// },
// "required": [
// "Source"
// ],
// "type": "object"
// }
"manifest_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Action
"action": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Specifies what DataSync uses the manifest for.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"TRANSFER",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Format
"format": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Specifies the file format of your manifest.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"CSV",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Source
"source": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: S3
"s3": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: BucketAccessRoleArn
"bucket_access_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Specifies the AWS Identity and Access Management (IAM) role that allows DataSync to access your manifest.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(2048),
stringvalidator.RegexMatches(regexp.MustCompile("^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):iam::[0-9]{12}:role/.*$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: ManifestObjectPath
"manifest_object_path": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Specifies the Amazon S3 object key of your manifest.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(1024),
stringvalidator.RegexMatches(regexp.MustCompile("^[\\p{L}\\p{M}\\p{Z}\\p{S}\\p{N}\\p{P}\\p{C}]*$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: ManifestObjectVersionId
"manifest_object_version_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Specifies the object version ID of the manifest that you want DataSync to use.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(100),
stringvalidator.RegexMatches(regexp.MustCompile("^.+$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: S3BucketArn
"s3_bucket_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Specifies the Amazon Resource Name (ARN) of the S3 bucket where you're hosting your manifest.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(156),
stringvalidator.RegexMatches(regexp.MustCompile("^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):(s3|s3-outposts):[a-z\\-0-9]*:[0-9]*:.*$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Specifies the S3 bucket where you're hosting the manifest that you want AWS DataSync to use.",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/
objectplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Specifies the manifest that you want DataSync to use and where it's hosted.",
Required: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Configures a manifest, which is a list of files or objects that you want DataSync to transfer.",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/
objectplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Name
// CloudFormation resource type schema:
//
// {
// "description": "The name of a task. This value is a text reference that is used to identify the task in the console.",
// "maxLength": 256,
// "minLength": 1,
// "pattern": "^[a-zA-Z0-9\\s+=._:@/-]+$",
// "type": "string"
// }
"name": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The name of a task. This value is a text reference that is used to identify the task in the console.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthBetween(1, 256),
stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9\\s+=._:@/-]+$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Options
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "Represents the options that are available to control the behavior of a StartTaskExecution operation.",
// "properties": {
// "Atime": {
// "description": "A file metadata value that shows the last time a file was accessed (that is, when the file was read or written to).",
// "enum": [
// "NONE",
// "BEST_EFFORT"
// ],
// "type": "string"
// },
// "BytesPerSecond": {
// "description": "A value that limits the bandwidth used by AWS DataSync.",
// "format": "int64",
// "minimum": -1,
// "type": "integer"
// },
// "Gid": {
// "description": "The group ID (GID) of the file's owners.",
// "enum": [
// "NONE",
// "INT_VALUE",
// "NAME",
// "BOTH"
// ],
// "type": "string"
// },
// "LogLevel": {
// "description": "A value that determines the types of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide.",
// "enum": [
// "OFF",
// "BASIC",
// "TRANSFER"
// ],
// "type": "string"
// },
// "Mtime": {
// "description": "A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase.",
// "enum": [
// "NONE",
// "PRESERVE"
// ],
// "type": "string"
// },
// "ObjectTags": {
// "description": "A value that determines whether object tags should be read from the source object store and written to the destination object store.",
// "enum": [
// "PRESERVE",
// "NONE"
// ],
// "type": "string"
// },
// "OverwriteMode": {
// "description": "A value that determines whether files at the destination should be overwritten or preserved when copying files.",
// "enum": [
// "ALWAYS",
// "NEVER"
// ],
// "type": "string"
// },
// "PosixPermissions": {
// "description": "A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.",
// "enum": [
// "NONE",
// "PRESERVE"
// ],
// "type": "string"
// },
// "PreserveDeletedFiles": {
// "description": "A value that specifies whether files in the destination that don't exist in the source file system should be preserved.",
// "enum": [
// "PRESERVE",
// "REMOVE"
// ],
// "type": "string"
// },
// "PreserveDevices": {
// "description": "A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and recreate the files with that device name and metadata on the destination.",
// "enum": [
// "NONE",
// "PRESERVE"
// ],
// "type": "string"
// },
// "SecurityDescriptorCopyFlags": {
// "description": "A value that determines which components of the SMB security descriptor are copied during transfer.",
// "enum": [
// "NONE",
// "OWNER_DACL",
// "OWNER_DACL_SACL"
// ],
// "type": "string"
// },
// "TaskQueueing": {
// "description": "A value that determines whether tasks should be queued before executing the tasks.",
// "enum": [
// "ENABLED",
// "DISABLED"
// ],
// "type": "string"
// },
// "TransferMode": {
// "description": "A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.",
// "enum": [
// "CHANGED",
// "ALL"
// ],
// "type": "string"
// },
// "Uid": {
// "description": "The user ID (UID) of the file's owner.",
// "enum": [
// "NONE",
// "INT_VALUE",
// "NAME",
// "BOTH"
// ],
// "type": "string"
// },
// "VerifyMode": {
// "description": "A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred.",
// "enum": [
// "POINT_IN_TIME_CONSISTENT",
// "ONLY_FILES_TRANSFERRED",
// "NONE"
// ],
// "type": "string"
// }
// },
// "type": "object"
// }
"options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Atime
"atime": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A file metadata value that shows the last time a file was accessed (that is, when the file was read or written to).",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"NONE",
"BEST_EFFORT",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: BytesPerSecond
"bytes_per_second": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "A value that limits the bandwidth used by AWS DataSync.",
Optional: true,
Computed: true,
Validators: []validator.Int64{ /*START VALIDATORS*/
int64validator.AtLeast(-1),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/
int64planmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Gid
"gid": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The group ID (GID) of the file's owners.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"NONE",
"INT_VALUE",
"NAME",
"BOTH",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: LogLevel
"log_level": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that determines the types of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"OFF",
"BASIC",
"TRANSFER",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Mtime
"mtime": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"NONE",
"PRESERVE",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: ObjectTags
"object_tags": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that determines whether object tags should be read from the source object store and written to the destination object store.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"PRESERVE",
"NONE",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: OverwriteMode
"overwrite_mode": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that determines whether files at the destination should be overwritten or preserved when copying files.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"ALWAYS",
"NEVER",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: PosixPermissions
"posix_permissions": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"NONE",
"PRESERVE",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: PreserveDeletedFiles
"preserve_deleted_files": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that specifies whether files in the destination that don't exist in the source file system should be preserved.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"PRESERVE",
"REMOVE",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: PreserveDevices
"preserve_devices": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and recreate the files with that device name and metadata on the destination.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"NONE",
"PRESERVE",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: SecurityDescriptorCopyFlags
"security_descriptor_copy_flags": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that determines which components of the SMB security descriptor are copied during transfer.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"NONE",
"OWNER_DACL",
"OWNER_DACL_SACL",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: TaskQueueing
"task_queueing": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that determines whether tasks should be queued before executing the tasks.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"ENABLED",
"DISABLED",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: TransferMode
"transfer_mode": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"CHANGED",
"ALL",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Uid
"uid": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The user ID (UID) of the file's owner.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"NONE",
"INT_VALUE",
"NAME",
"BOTH",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: VerifyMode
"verify_mode": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"POINT_IN_TIME_CONSISTENT",
"ONLY_FILES_TRANSFERRED",
"NONE",
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Represents the options that are available to control the behavior of a StartTaskExecution operation.",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/
objectplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Schedule
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "Specifies the schedule you want your task to use for repeated executions.",
// "properties": {
// "ScheduleExpression": {
// "description": "A cron expression that specifies when AWS DataSync initiates a scheduled transfer from a source to a destination location",
// "maxLength": 256,
// "pattern": "^[a-zA-Z0-9\\ \\_\\*\\?\\,\\|\\^\\-\\/\\#\\s\\(\\)\\+]*$",
// "type": "string"
// }
// },
// "required": [
// "ScheduleExpression"
// ],
// "type": "object"
// }
"schedule": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: ScheduleExpression
"schedule_expression": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A cron expression that specifies when AWS DataSync initiates a scheduled transfer from a source to a destination location",
Required: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(256),
stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9\\ \\_\\*\\?\\,\\|\\^\\-\\/\\#\\s\\(\\)\\+]*$"), ""),
}, /*END VALIDATORS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Specifies the schedule you want your task to use for repeated executions.",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/
objectplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: SourceLocationArn
// CloudFormation resource type schema:
//
// {
// "description": "The ARN of the source location for the task.",
// "maxLength": 128,
// "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$",
// "type": "string"
// }
"source_location_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ARN of the source location for the task.",
Required: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(128),
stringvalidator.RegexMatches(regexp.MustCompile("^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.RequiresReplace(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: SourceNetworkInterfaceArns
// CloudFormation resource type schema:
//
// {
// "description": "The Amazon Resource Names (ARNs) of the source ENIs (Elastic Network Interfaces) that were created for your subnet.",
// "insertionOrder": false,
// "items": {
// "pattern": "^arn:aws[\\-a-z]{0,}:ec2:[a-z\\-0-9]*:[0-9]{12}:network-interface/eni-[0-9a-f]+$",
// "type": "string"
// },
// "maxItems": 128,
// "type": "array"
// }
"source_network_interface_arns": schema.ListAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
Description: "The Amazon Resource Names (ARNs) of the source ENIs (Elastic Network Interfaces) that were created for your subnet.",
Computed: true,
PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/
generic.Multiset(),
listplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Status
// CloudFormation resource type schema:
//
// {
// "description": "The status of the task that was described.",
// "enum": [
// "AVAILABLE",
// "CREATING",
// "QUEUED",
// "RUNNING",
// "UNAVAILABLE"
// ],
// "type": "string"
// }
"status": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The status of the task that was described.",
Computed: true,
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Tags
// CloudFormation resource type schema:
//
// {
// "description": "An array of key-value pairs to apply to this resource.",
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "description": "A key-value pair to associate with a resource.",
// "properties": {
// "Key": {
// "description": "The key for an AWS resource tag.",
// "maxLength": 256,
// "minLength": 1,
// "pattern": "^[a-zA-Z0-9\\s+=._:/-]+$",
// "type": "string"
// },
// "Value": {
// "description": "The value for an AWS resource tag.",
// "maxLength": 256,
// "minLength": 1,
// "pattern": "^[a-zA-Z0-9\\s+=._:@/-]+$",
// "type": "string"
// }
// },
// "required": [
// "Key",
// "Value"
// ],
// "type": "object"
// },
// "maxItems": 50,
// "type": "array",
// "uniqueItems": true
// }
"tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/
NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Key
"key": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The key for an AWS resource tag.",
Required: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthBetween(1, 256),
stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9\\s+=._:/-]+$"), ""),
}, /*END VALIDATORS*/
}, /*END ATTRIBUTE*/
// Property: Value
"value": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The value for an AWS resource tag.",
Required: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthBetween(1, 256),
stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9\\s+=._:@/-]+$"), ""),
}, /*END VALIDATORS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
}, /*END NESTED OBJECT*/
Description: "An array of key-value pairs to apply to this resource.",
Optional: true,
Computed: true,
Validators: []validator.Set{ /*START VALIDATORS*/
setvalidator.SizeAtMost(50),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/
setplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: TaskArn
// CloudFormation resource type schema:
//
// {
// "description": "The ARN of the task.",
// "maxLength": 128,
// "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$",
// "type": "string"
// }
"task_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ARN of the task.",
Computed: true,