-
Notifications
You must be signed in to change notification settings - Fork 17
/
aws-bedrock-datasource.json
224 lines (224 loc) · 8.04 KB
/
aws-bedrock-datasource.json
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
{
"typeName" : "AWS::Bedrock::DataSource",
"description" : "Definition of AWS::Bedrock::DataSource Resource Type",
"sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-aps",
"definitions" : {
"ChunkingConfiguration" : {
"type" : "object",
"description" : "Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.",
"properties" : {
"ChunkingStrategy" : {
"$ref" : "#/definitions/ChunkingStrategy"
},
"FixedSizeChunkingConfiguration" : {
"$ref" : "#/definitions/FixedSizeChunkingConfiguration"
}
},
"required" : [ "ChunkingStrategy" ],
"additionalProperties" : false
},
"ChunkingStrategy" : {
"type" : "string",
"description" : "Knowledge base can split your source data into chunks. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for NONE, then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.",
"enum" : [ "FIXED_SIZE", "NONE" ]
},
"DataSourceConfiguration" : {
"type" : "object",
"description" : "Specifies a raw data source location to ingest.",
"properties" : {
"Type" : {
"$ref" : "#/definitions/DataSourceType"
},
"S3Configuration" : {
"$ref" : "#/definitions/S3DataSourceConfiguration"
}
},
"required" : [ "Type", "S3Configuration" ],
"additionalProperties" : false
},
"DataSourceStatus" : {
"type" : "string",
"description" : "The status of a data source.",
"enum" : [ "AVAILABLE", "DELETING", "DELETE_UNSUCCESSFUL" ]
},
"DataSourceType" : {
"type" : "string",
"description" : "The type of the data source location.",
"enum" : [ "S3" ]
},
"DataDeletionPolicy" : {
"type" : "string",
"description" : "The deletion policy for the data source.",
"enum" : [ "RETAIN", "DELETE" ]
},
"FixedSizeChunkingConfiguration" : {
"type" : "object",
"description" : "Configurations for when you choose fixed-size chunking. If you set the chunkingStrategy as NONE, exclude this field.",
"properties" : {
"MaxTokens" : {
"type" : "integer",
"minimum" : 1,
"description" : "The maximum number of tokens to include in a chunk."
},
"OverlapPercentage" : {
"type" : "integer",
"maximum" : 99,
"minimum" : 1,
"description" : "The percentage of overlap between adjacent chunks of a data source."
}
},
"required" : [ "MaxTokens", "OverlapPercentage" ],
"additionalProperties" : false
},
"S3DataSourceConfiguration" : {
"type" : "object",
"description" : "Contains information about the S3 configuration of the data source.",
"properties" : {
"BucketArn" : {
"type" : "string",
"maxLength" : 2048,
"minLength" : 1,
"pattern" : "^arn:aws(|-cn|-us-gov):s3:::[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$",
"description" : "The ARN of the bucket that contains the data source."
},
"InclusionPrefixes" : {
"type" : "array",
"items" : {
"type" : "string",
"maxLength" : 300,
"minLength" : 1,
"description" : "Prefix for s3 object."
},
"maxItems" : 1,
"minItems" : 1,
"description" : "A list of S3 prefixes that define the object containing the data sources.",
"insertionOrder" : false
},
"BucketOwnerAccountId" : {
"type" : "string",
"maxLength" : 12,
"minLength" : 12,
"pattern" : "^[0-9]{12}$",
"description" : "The account ID for the owner of the S3 bucket."
}
},
"required" : [ "BucketArn" ],
"additionalProperties" : false
},
"ServerSideEncryptionConfiguration" : {
"type" : "object",
"description" : "Contains details about the server-side encryption for the data source.",
"properties" : {
"KmsKeyArn" : {
"type" : "string",
"maxLength" : 2048,
"minLength" : 1,
"pattern" : "^arn:aws(|-cn|-us-gov):kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}$",
"description" : "The ARN of the AWS KMS key used to encrypt the resource."
}
},
"additionalProperties" : false
},
"VectorIngestionConfiguration" : {
"type" : "object",
"description" : "Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.",
"properties" : {
"ChunkingConfiguration" : {
"$ref" : "#/definitions/ChunkingConfiguration"
}
},
"additionalProperties" : false
}
},
"properties" : {
"DataSourceConfiguration" : {
"$ref" : "#/definitions/DataSourceConfiguration"
},
"DataSourceId" : {
"type" : "string",
"pattern" : "^[0-9a-zA-Z]{10}$",
"description" : "Identifier for a resource."
},
"Description" : {
"type" : "string",
"maxLength" : 200,
"minLength" : 1,
"description" : "Description of the Resource."
},
"KnowledgeBaseId" : {
"type" : "string",
"pattern" : "^[0-9a-zA-Z]{10}$",
"description" : "The unique identifier of the knowledge base to which to add the data source."
},
"DataSourceStatus" : {
"$ref" : "#/definitions/DataSourceStatus"
},
"Name" : {
"type" : "string",
"pattern" : "^([0-9a-zA-Z][_-]?){1,100}$",
"description" : "The name of the data source."
},
"ServerSideEncryptionConfiguration" : {
"$ref" : "#/definitions/ServerSideEncryptionConfiguration"
},
"VectorIngestionConfiguration" : {
"$ref" : "#/definitions/VectorIngestionConfiguration"
},
"DataDeletionPolicy" : {
"$ref" : "#/definitions/DataDeletionPolicy"
},
"CreatedAt" : {
"type" : "string",
"description" : "The time at which the data source was created."
},
"UpdatedAt" : {
"type" : "string",
"description" : "The time at which the knowledge base was last updated."
},
"FailureReasons" : {
"type" : "array",
"items" : {
"type" : "string",
"maxLength" : 2048,
"description" : "Failure Reason for Error."
},
"maxItems" : 2048,
"description" : "The details of the failure reasons related to the data source.",
"insertionOrder" : false
}
},
"required" : [ "DataSourceConfiguration", "Name", "KnowledgeBaseId" ],
"readOnlyProperties" : [ "/properties/DataSourceId", "/properties/DataSourceStatus", "/properties/CreatedAt", "/properties/UpdatedAt", "/properties/FailureReasons" ],
"createOnlyProperties" : [ "/properties/KnowledgeBaseId", "/properties/VectorIngestionConfiguration" ],
"primaryIdentifier" : [ "/properties/KnowledgeBaseId", "/properties/DataSourceId" ],
"tagging" : {
"taggable" : false,
"cloudFormationSystemTags" : true
},
"handlers" : {
"create" : {
"permissions" : [ "bedrock:CreateDataSource", "bedrock:GetDataSource", "bedrock:GetKnowledgeBase" ]
},
"read" : {
"permissions" : [ "bedrock:GetDataSource" ]
},
"update" : {
"permissions" : [ "bedrock:GetDataSource", "bedrock:UpdateDataSource" ]
},
"delete" : {
"permissions" : [ "bedrock:GetDataSource", "bedrock:DeleteDataSource" ]
},
"list" : {
"permissions" : [ "bedrock:ListDataSources" ],
"handlerSchema" : {
"properties" : {
"KnowledgeBaseId" : {
"$ref" : "resource-schema.json#/properties/KnowledgeBaseId"
}
},
"required" : [ "KnowledgeBaseId" ]
}
}
},
"additionalProperties" : false
}