generated from hashicorp/terraform-provider-scaffolding
/
monitoring_schedule_resource_gen.go
1623 lines (1608 loc) · 75.9 KB
/
monitoring_schedule_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 sagemaker
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/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/mapplanmodifier"
"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/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_sagemaker_monitoring_schedule", monitoringScheduleResource)
}
// monitoringScheduleResource returns the Terraform awscc_sagemaker_monitoring_schedule resource.
// This Terraform resource corresponds to the CloudFormation AWS::SageMaker::MonitoringSchedule resource.
func monitoringScheduleResource(ctx context.Context) (resource.Resource, error) {
attributes := map[string]schema.Attribute{ /*START SCHEMA*/
// Property: CreationTime
// CloudFormation resource type schema:
//
// {
// "description": "The time at which the schedule was created.",
// "type": "string"
// }
"creation_time": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The time at which the schedule was created.",
Computed: true,
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: EndpointName
// CloudFormation resource type schema:
//
// {
// "description": "The name of the endpoint used to run the monitoring job.",
// "maxLength": 63,
// "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*",
// "type": "string"
// }
"endpoint_name": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The name of the endpoint used to run the monitoring job.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(63),
stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9](-*[a-zA-Z0-9])*"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: FailureReason
// CloudFormation resource type schema:
//
// {
// "description": "Contains the reason a monitoring job failed, if it failed.",
// "maxLength": 1024,
// "minLength": 1,
// "type": "string"
// }
"failure_reason": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Contains the reason a monitoring job failed, if it failed.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthBetween(1, 1024),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: LastModifiedTime
// CloudFormation resource type schema:
//
// {
// "description": "A timestamp that indicates the last time the monitoring job was modified.",
// "type": "string"
// }
"last_modified_time": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A timestamp that indicates the last time the monitoring job was modified.",
Computed: true,
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: LastMonitoringExecutionSummary
// CloudFormation resource type schema:
//
// {
// "description": "Describes metadata on the last execution to run, if there was one.",
// "properties": {
// "CreationTime": {
// "description": "The time at which the monitoring job was created.",
// "type": "string"
// },
// "EndpointName": {
// "description": "The name of the endpoint used to run the monitoring job.",
// "maxLength": 63,
// "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*",
// "type": "string"
// },
// "FailureReason": {
// "description": "Contains the reason a monitoring job failed, if it failed.",
// "maxLength": 1024,
// "type": "string"
// },
// "LastModifiedTime": {
// "description": "A timestamp that indicates the last time the monitoring job was modified.",
// "type": "string"
// },
// "MonitoringExecutionStatus": {
// "description": "The status of the monitoring job.",
// "enum": [
// "Pending",
// "Completed",
// "CompletedWithViolations",
// "InProgress",
// "Failed",
// "Stopping",
// "Stopped"
// ],
// "type": "string"
// },
// "MonitoringScheduleName": {
// "description": "The name of the monitoring schedule.",
// "maxLength": 63,
// "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
// "type": "string"
// },
// "ProcessingJobArn": {
// "description": "The Amazon Resource Name (ARN) of the monitoring job.",
// "maxLength": 256,
// "pattern": "aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:processing-job/.*",
// "type": "string"
// },
// "ScheduledTime": {
// "description": "The time the monitoring job was scheduled.",
// "type": "string"
// }
// },
// "required": [
// "CreationTime",
// "LastModifiedTime",
// "MonitoringExecutionStatus",
// "MonitoringScheduleName",
// "ScheduledTime"
// ],
// "type": "object"
// }
"last_monitoring_execution_summary": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: CreationTime
"creation_time": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The time at which the monitoring job was created.",
Required: true,
}, /*END ATTRIBUTE*/
// Property: EndpointName
"endpoint_name": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The name of the endpoint used to run the monitoring job.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(63),
stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9](-*[a-zA-Z0-9])*"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: FailureReason
"failure_reason": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Contains the reason a monitoring job failed, if it failed.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(1024),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: LastModifiedTime
"last_modified_time": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A timestamp that indicates the last time the monitoring job was modified.",
Required: true,
}, /*END ATTRIBUTE*/
// Property: MonitoringExecutionStatus
"monitoring_execution_status": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The status of the monitoring job.",
Required: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.OneOf(
"Pending",
"Completed",
"CompletedWithViolations",
"InProgress",
"Failed",
"Stopping",
"Stopped",
),
}, /*END VALIDATORS*/
}, /*END ATTRIBUTE*/
// Property: MonitoringScheduleName
"monitoring_schedule_name": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The name of the monitoring schedule.",
Required: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(63),
stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9](-*[a-zA-Z0-9])*$"), ""),
}, /*END VALIDATORS*/
}, /*END ATTRIBUTE*/
// Property: ProcessingJobArn
"processing_job_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The Amazon Resource Name (ARN) of the monitoring job.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(256),
stringvalidator.RegexMatches(regexp.MustCompile("aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:processing-job/.*"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: ScheduledTime
"scheduled_time": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The time the monitoring job was scheduled.",
Required: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Describes metadata on the last execution to run, if there was one.",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/
objectplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: MonitoringScheduleArn
// CloudFormation resource type schema:
//
// {
// "description": "The Amazon Resource Name (ARN) of the monitoring schedule.",
// "maxLength": 256,
// "minLength": 1,
// "type": "string"
// }
"monitoring_schedule_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The Amazon Resource Name (ARN) of the monitoring schedule.",
Computed: true,
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: MonitoringScheduleConfig
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "The configuration object that specifies the monitoring schedule and defines the monitoring job.",
// "properties": {
// "MonitoringJobDefinition": {
// "additionalProperties": false,
// "description": "Defines the monitoring job.",
// "properties": {
// "BaselineConfig": {
// "additionalProperties": false,
// "description": "Baseline configuration used to validate that the data conforms to the specified constraints and statistics.",
// "properties": {
// "ConstraintsResource": {
// "additionalProperties": false,
// "description": "The baseline constraints resource for a monitoring job.",
// "properties": {
// "S3Uri": {
// "description": "The Amazon S3 URI for baseline constraint file in Amazon S3 that the current monitoring job should validated against.",
// "maxLength": 1024,
// "pattern": "^(https|s3)://([^/]+)/?(.*)$",
// "type": "string"
// }
// },
// "type": "object"
// },
// "StatisticsResource": {
// "additionalProperties": false,
// "description": "The baseline statistics resource for a monitoring job.",
// "properties": {
// "S3Uri": {
// "description": "The Amazon S3 URI for the baseline statistics file in Amazon S3 that the current monitoring job should be validated against.",
// "maxLength": 1024,
// "pattern": "^(https|s3)://([^/]+)/?(.*)$",
// "type": "string"
// }
// },
// "type": "object"
// }
// },
// "type": "object"
// },
// "Environment": {
// "description": "Sets the environment variables in the Docker container",
// "patternProperties": {
// "": {
// "maxLength": 256,
// "minLength": 1,
// "type": "string"
// },
// "[\\S\\s]*": {
// "maxLength": 256,
// "type": "string"
// }
// },
// "type": "object"
// },
// "MonitoringAppSpecification": {
// "additionalProperties": false,
// "description": "Container image configuration object for the monitoring job.",
// "properties": {
// "ContainerArguments": {
// "description": "An array of arguments for the container used to run the monitoring job.",
// "items": {
// "additionalProperties": false,
// "description": "Arguments for the container used to run the monitoring job.",
// "maxLength": 256,
// "minLength": 1,
// "type": "string"
// },
// "maxItems": 50,
// "type": "array"
// },
// "ContainerEntrypoint": {
// "description": "Specifies the entrypoint for a container used to run the monitoring job.",
// "items": {
// "maxLength": 256,
// "minLength": 1,
// "type": "string"
// },
// "maxItems": 100,
// "type": "array"
// },
// "ImageUri": {
// "description": "The container image to be run by the monitoring job.",
// "maxLength": 255,
// "pattern": ".*",
// "type": "string"
// },
// "PostAnalyticsProcessorSourceUri": {
// "description": "An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.",
// "maxLength": 1024,
// "pattern": "^(https|s3)://([^/]+)/?(.*)$",
// "type": "string"
// },
// "RecordPreprocessorSourceUri": {
// "description": "An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flatted json so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers",
// "maxLength": 1024,
// "pattern": "^(https|s3)://([^/]+)/?(.*)$",
// "type": "string"
// }
// },
// "required": [
// "ImageUri"
// ],
// "type": "object"
// },
// "MonitoringInputs": {
// "additionalProperties": false,
// "description": "The array of inputs for the monitoring job.",
// "items": {
// "additionalProperties": false,
// "description": "The inputs for a monitoring job.",
// "properties": {
// "BatchTransformInput": {
// "additionalProperties": false,
// "description": "The batch transform input for a monitoring job.",
// "properties": {
// "DataCapturedDestinationS3Uri": {
// "description": "A URI that identifies the Amazon S3 storage location where Batch Transform Job captures data.",
// "maxLength": 512,
// "pattern": "^(https|s3)://([^/]+)/?(.*)$",
// "type": "string"
// },
// "DatasetFormat": {
// "description": "The dataset format of the data to monitor",
// "properties": {
// "Csv": {
// "description": "The CSV format",
// "properties": {
// "Header": {
// "description": "A boolean flag indicating if given CSV has header",
// "type": "boolean"
// }
// },
// "type": "object"
// },
// "Json": {
// "description": "The Json format",
// "properties": {
// "Line": {
// "description": "A boolean flag indicating if it is JSON line format",
// "type": "boolean"
// }
// },
// "type": "object"
// },
// "Parquet": {
// "description": "A flag indicating if the dataset format is Parquet",
// "type": "boolean"
// }
// },
// "type": "object"
// },
// "ExcludeFeaturesAttribute": {
// "description": "Indexes or names of the features to be excluded from analysis",
// "maxLength": 100,
// "type": "string"
// },
// "LocalPath": {
// "description": "Path to the filesystem where the endpoint data is available to the container.",
// "maxLength": 256,
// "pattern": ".*",
// "type": "string"
// },
// "S3DataDistributionType": {
// "description": "Whether input data distributed in Amazon S3 is fully replicated or sharded by an S3 key. Defauts to FullyReplicated",
// "enum": [
// "FullyReplicated",
// "ShardedByS3Key"
// ],
// "type": "string"
// },
// "S3InputMode": {
// "description": "Whether the Pipe or File is used as the input mode for transfering data for the monitoring job. Pipe mode is recommended for large datasets. File mode is useful for small files that fit in memory. Defaults to File.",
// "enum": [
// "Pipe",
// "File"
// ],
// "type": "string"
// }
// },
// "required": [
// "DataCapturedDestinationS3Uri",
// "DatasetFormat",
// "LocalPath"
// ],
// "type": "object"
// },
// "EndpointInput": {
// "additionalProperties": false,
// "description": "The endpoint for a monitoring job.",
// "properties": {
// "EndpointName": {
// "description": "The name of the endpoint used to run the monitoring job.",
// "maxLength": 63,
// "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*",
// "type": "string"
// },
// "ExcludeFeaturesAttribute": {
// "description": "Indexes or names of the features to be excluded from analysis",
// "maxLength": 100,
// "type": "string"
// },
// "LocalPath": {
// "description": "Path to the filesystem where the endpoint data is available to the container.",
// "maxLength": 256,
// "pattern": ".*",
// "type": "string"
// },
// "S3DataDistributionType": {
// "description": "Whether input data distributed in Amazon S3 is fully replicated or sharded by an S3 key. Defauts to FullyReplicated",
// "enum": [
// "FullyReplicated",
// "ShardedByS3Key"
// ],
// "type": "string"
// },
// "S3InputMode": {
// "description": "Whether the Pipe or File is used as the input mode for transfering data for the monitoring job. Pipe mode is recommended for large datasets. File mode is useful for small files that fit in memory. Defaults to File.",
// "enum": [
// "Pipe",
// "File"
// ],
// "type": "string"
// }
// },
// "required": [
// "EndpointName",
// "LocalPath"
// ],
// "type": "object"
// }
// },
// "type": "object"
// },
// "maxItems": 1,
// "minItems": 1,
// "type": "array"
// },
// "MonitoringOutputConfig": {
// "additionalProperties": false,
// "description": "The output configuration for monitoring jobs.",
// "properties": {
// "KmsKeyId": {
// "description": "The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.",
// "maxLength": 2048,
// "pattern": ".*",
// "type": "string"
// },
// "MonitoringOutputs": {
// "description": "Monitoring outputs for monitoring jobs. This is where the output of the periodic monitoring jobs is uploaded.",
// "items": {
// "additionalProperties": false,
// "description": "The output object for a monitoring job.",
// "properties": {
// "S3Output": {
// "additionalProperties": false,
// "description": "Information about where and how to store the results of a monitoring job.",
// "properties": {
// "LocalPath": {
// "description": "The local path to the Amazon S3 storage location where Amazon SageMaker saves the results of a monitoring job. LocalPath is an absolute path for the output data.",
// "maxLength": 256,
// "pattern": ".*",
// "type": "string"
// },
// "S3UploadMode": {
// "description": "Whether to upload the results of the monitoring job continuously or after the job completes.",
// "enum": [
// "Continuous",
// "EndOfJob"
// ],
// "type": "string"
// },
// "S3Uri": {
// "description": "A URI that identifies the Amazon S3 storage location where Amazon SageMaker saves the results of a monitoring job.",
// "maxLength": 512,
// "pattern": "^(https|s3)://([^/]+)/?(.*)$",
// "type": "string"
// }
// },
// "required": [
// "LocalPath",
// "S3Uri"
// ],
// "type": "object"
// }
// },
// "required": [
// "S3Output"
// ],
// "type": "object"
// },
// "maxLength": 1,
// "minLength": 1,
// "type": "array"
// }
// },
// "required": [
// "MonitoringOutputs"
// ],
// "type": "object"
// },
// "MonitoringResources": {
// "additionalProperties": false,
// "description": "Identifies the resources to deploy for a monitoring job.",
// "properties": {
// "ClusterConfig": {
// "additionalProperties": false,
// "description": "Configuration for the cluster used to run model monitoring jobs.",
// "properties": {
// "InstanceCount": {
// "description": "The number of ML compute instances to use in the model monitoring job. For distributed processing jobs, specify a value greater than 1. The default value is 1.",
// "maximum": 100,
// "minimum": 1,
// "type": "integer"
// },
// "InstanceType": {
// "description": "The ML compute instance type for the processing job.",
// "type": "string"
// },
// "VolumeKmsKeyId": {
// "description": "The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the model monitoring job.",
// "maximum": 2048,
// "minimum": 1,
// "type": "string"
// },
// "VolumeSizeInGB": {
// "description": "The size of the ML storage volume, in gigabytes, that you want to provision. You must specify sufficient ML storage for your scenario.",
// "maximum": 16384,
// "minimum": 1,
// "type": "integer"
// }
// },
// "required": [
// "InstanceCount",
// "InstanceType",
// "VolumeSizeInGB"
// ],
// "type": "object"
// }
// },
// "required": [
// "ClusterConfig"
// ],
// "type": "object"
// },
// "NetworkConfig": {
// "additionalProperties": false,
// "description": "Networking options for a job, such as network traffic encryption between containers, whether to allow inbound and outbound network calls to and from containers, and the VPC subnets and security groups to use for VPC-enabled jobs.",
// "properties": {
// "EnableInterContainerTrafficEncryption": {
// "description": "Whether to encrypt all communications between distributed processing jobs. Choose True to encrypt communications. Encryption provides greater security for distributed processing jobs, but the processing might take longer.",
// "type": "boolean"
// },
// "EnableNetworkIsolation": {
// "description": "Whether to allow inbound and outbound network calls to and from the containers used for the processing job.",
// "type": "boolean"
// },
// "VpcConfig": {
// "additionalProperties": false,
// "description": "Specifies a VPC that your training jobs and hosted models have access to. Control access to and from your training and model containers by configuring the VPC.",
// "properties": {
// "SecurityGroupIds": {
// "description": "The VPC security group IDs, in the form sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field.",
// "items": {
// "maxLength": 32,
// "pattern": "[-0-9a-zA-Z]+",
// "type": "string"
// },
// "maxItems": 5,
// "minItems": 1,
// "type": "array"
// },
// "Subnets": {
// "description": "The ID of the subnets in the VPC to which you want to connect to your monitoring jobs.",
// "items": {
// "maxLength": 32,
// "pattern": "[-0-9a-zA-Z]+",
// "type": "string"
// },
// "maxItems": 16,
// "minItems": 1,
// "type": "array"
// }
// },
// "required": [
// "SecurityGroupIds",
// "Subnets"
// ],
// "type": "object"
// }
// },
// "type": "object"
// },
// "RoleArn": {
// "description": "The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.",
// "maxLength": 2048,
// "minLength": 20,
// "pattern": "^arn:aws[a-z\\-]*:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$",
// "type": "string"
// },
// "StoppingCondition": {
// "additionalProperties": false,
// "description": "Specifies a time limit for how long the monitoring job is allowed to run.",
// "properties": {
// "MaxRuntimeInSeconds": {
// "description": "The maximum runtime allowed in seconds.",
// "maximum": 86400,
// "minimum": 1,
// "type": "integer"
// }
// },
// "required": [
// "MaxRuntimeInSeconds"
// ],
// "type": "object"
// }
// },
// "required": [
// "MonitoringAppSpecification",
// "MonitoringInputs",
// "MonitoringOutputConfig",
// "MonitoringResources",
// "RoleArn"
// ],
// "type": "object"
// },
// "MonitoringJobDefinitionName": {
// "description": "Name of the job definition",
// "maxLength": 63,
// "minLength": 1,
// "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
// "type": "string"
// },
// "MonitoringType": {
// "description": "The type of monitoring job.",
// "enum": [
// "DataQuality",
// "ModelQuality",
// "ModelBias",
// "ModelExplainability"
// ],
// "type": "string"
// },
// "ScheduleConfig": {
// "additionalProperties": false,
// "description": "Configuration details about the monitoring schedule.",
// "properties": {
// "DataAnalysisEndTime": {
// "description": "Data Analysis end time, e.g. PT0H",
// "maxLength": 15,
// "minLength": 1,
// "pattern": "^.?P.*",
// "type": "string"
// },
// "DataAnalysisStartTime": {
// "description": "Data Analysis start time, e.g. -PT1H",
// "maxLength": 15,
// "minLength": 1,
// "pattern": "^.?P.*",
// "type": "string"
// },
// "ScheduleExpression": {
// "description": "A cron expression or 'NOW' that describes details about the monitoring schedule.",
// "maxLength": 256,
// "minLength": 1,
// "type": "string"
// }
// },
// "required": [
// "ScheduleExpression"
// ],
// "type": "object"
// }
// },
// "type": "object"
// }
"monitoring_schedule_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: MonitoringJobDefinition
"monitoring_job_definition": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: BaselineConfig
"baseline_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: ConstraintsResource
"constraints_resource": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: S3Uri
"s3_uri": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The Amazon S3 URI for baseline constraint file in Amazon S3 that the current monitoring job should validated against.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(1024),
stringvalidator.RegexMatches(regexp.MustCompile("^(https|s3)://([^/]+)/?(.*)$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "The baseline constraints resource for a monitoring job.",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/
objectplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: StatisticsResource
"statistics_resource": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: S3Uri
"s3_uri": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The Amazon S3 URI for the baseline statistics file in Amazon S3 that the current monitoring job should be validated against.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(1024),
stringvalidator.RegexMatches(regexp.MustCompile("^(https|s3)://([^/]+)/?(.*)$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "The baseline statistics resource for a monitoring job.",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/
objectplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Baseline configuration used to validate that the data conforms to the specified constraints and statistics.",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/
objectplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Environment
"environment": // Pattern: ""
schema.MapAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
// Pattern "[\\S\\s]*" ignored.
Description: "Sets the environment variables in the Docker container",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Map{ /*START PLAN MODIFIERS*/
mapplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: MonitoringAppSpecification
"monitoring_app_specification": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: ContainerArguments
"container_arguments": schema.ListAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
Description: "An array of arguments for the container used to run the monitoring job.",
Optional: true,
Computed: true,
Validators: []validator.List{ /*START VALIDATORS*/
listvalidator.SizeAtMost(50),
listvalidator.ValueStringsAre(
stringvalidator.LengthBetween(1, 256),
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/
listplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: ContainerEntrypoint
"container_entrypoint": schema.ListAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
Description: "Specifies the entrypoint for a container used to run the monitoring job.",
Optional: true,
Computed: true,
Validators: []validator.List{ /*START VALIDATORS*/
listvalidator.SizeAtMost(100),
listvalidator.ValueStringsAre(
stringvalidator.LengthBetween(1, 256),
),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/
listplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: ImageUri
"image_uri": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The container image to be run by the monitoring job.",
Required: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(255),
stringvalidator.RegexMatches(regexp.MustCompile(".*"), ""),
}, /*END VALIDATORS*/
}, /*END ATTRIBUTE*/
// Property: PostAnalyticsProcessorSourceUri
"post_analytics_processor_source_uri": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(1024),
stringvalidator.RegexMatches(regexp.MustCompile("^(https|s3)://([^/]+)/?(.*)$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: RecordPreprocessorSourceUri
"record_preprocessor_source_uri": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flatted json so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(1024),
stringvalidator.RegexMatches(regexp.MustCompile("^(https|s3)://([^/]+)/?(.*)$"), ""),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Container image configuration object for the monitoring job.",
Required: true,
}, /*END ATTRIBUTE*/
// Property: MonitoringInputs
"monitoring_inputs": schema.ListNestedAttribute{ /*START ATTRIBUTE*/
NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: BatchTransformInput
"batch_transform_input": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: DataCapturedDestinationS3Uri
"data_captured_destination_s3_uri": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A URI that identifies the Amazon S3 storage location where Batch Transform Job captures data.",
Required: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(512),
stringvalidator.RegexMatches(regexp.MustCompile("^(https|s3)://([^/]+)/?(.*)$"), ""),
}, /*END VALIDATORS*/
}, /*END ATTRIBUTE*/
// Property: DatasetFormat
"dataset_format": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Csv
"csv": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Header
"header": schema.BoolAttribute{ /*START ATTRIBUTE*/
Description: "A boolean flag indicating if given CSV has header",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/
boolplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "The CSV format",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/
objectplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Json
"json": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Line
"line": schema.BoolAttribute{ /*START ATTRIBUTE*/
Description: "A boolean flag indicating if it is JSON line format",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/
boolplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "The Json format",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/
objectplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Parquet
"parquet": schema.BoolAttribute{ /*START ATTRIBUTE*/
Description: "A flag indicating if the dataset format is Parquet",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/
boolplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "The dataset format of the data to monitor",
Required: true,
}, /*END ATTRIBUTE*/
// Property: ExcludeFeaturesAttribute
"exclude_features_attribute": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Indexes or names of the features to be excluded from analysis",
Optional: true,
Computed: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(100),
}, /*END VALIDATORS*/
PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
stringplanmodifier.UseStateForUnknown(),
}, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: LocalPath
"local_path": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Path to the filesystem where the endpoint data is available to the container.",
Required: true,
Validators: []validator.String{ /*START VALIDATORS*/
stringvalidator.LengthAtMost(256),
stringvalidator.RegexMatches(regexp.MustCompile(".*"), ""),
}, /*END VALIDATORS*/
}, /*END ATTRIBUTE*/
// Property: S3DataDistributionType
"s3_data_distribution_type": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Whether input data distributed in Amazon S3 is fully replicated or sharded by an S3 key. Defauts to FullyReplicated",
Optional: true,