bedrock.d.ts 91 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102
  1. import {Request} from '../lib/request';
  2. import {Response} from '../lib/response';
  3. import {AWSError} from '../lib/error';
  4. import {Service} from '../lib/service';
  5. import {ServiceConfigurationOptions} from '../lib/service';
  6. import {ConfigBase as Config} from '../lib/config-base';
  7. interface Blob {}
  8. declare class Bedrock extends Service {
  9. /**
  10. * Constructs a service object. This object has one method for each API operation.
  11. */
  12. constructor(options?: Bedrock.Types.ClientConfiguration)
  13. config: Config & Bedrock.Types.ClientConfiguration;
  14. /**
  15. * API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers. To learn more about the requirements for creating a model evaluation job see, Model evaluations.
  16. */
  17. createEvaluationJob(params: Bedrock.Types.CreateEvaluationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateEvaluationJobResponse) => void): Request<Bedrock.Types.CreateEvaluationJobResponse, AWSError>;
  18. /**
  19. * API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers. To learn more about the requirements for creating a model evaluation job see, Model evaluations.
  20. */
  21. createEvaluationJob(callback?: (err: AWSError, data: Bedrock.Types.CreateEvaluationJobResponse) => void): Request<Bedrock.Types.CreateEvaluationJobResponse, AWSError>;
  22. /**
  23. * Creates a guardrail to block topics and to filter out harmful content. Specify a name and optional description. Specify messages for when the guardrail successfully blocks a prompt or a model response in the blockedInputMessaging and blockedOutputsMessaging fields. Specify topics for the guardrail to deny in the topicPolicyConfig object. Each GuardrailTopicConfig object in the topicsConfig list pertains to one topic. Give a name and description so that the guardrail can properly identify the topic. Specify DENY in the type field. (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the examples list. Specify filter strengths for the harmful categories defined in Amazon Bedrock in the contentPolicyConfig object. Each GuardrailContentFilterConfig object in the filtersConfig list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig. Specify the category in the type field. Specify the strength of the filter for prompts in the inputStrength field and for model responses in the strength field of the GuardrailContentFilterConfig. (Optional) For security, include the ARN of a KMS key in the kmsKeyId field. (Optional) Attach any tags to the guardrail in the tags object. For more information, see Tag resources.
  24. */
  25. createGuardrail(params: Bedrock.Types.CreateGuardrailRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateGuardrailResponse) => void): Request<Bedrock.Types.CreateGuardrailResponse, AWSError>;
  26. /**
  27. * Creates a guardrail to block topics and to filter out harmful content. Specify a name and optional description. Specify messages for when the guardrail successfully blocks a prompt or a model response in the blockedInputMessaging and blockedOutputsMessaging fields. Specify topics for the guardrail to deny in the topicPolicyConfig object. Each GuardrailTopicConfig object in the topicsConfig list pertains to one topic. Give a name and description so that the guardrail can properly identify the topic. Specify DENY in the type field. (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the examples list. Specify filter strengths for the harmful categories defined in Amazon Bedrock in the contentPolicyConfig object. Each GuardrailContentFilterConfig object in the filtersConfig list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig. Specify the category in the type field. Specify the strength of the filter for prompts in the inputStrength field and for model responses in the strength field of the GuardrailContentFilterConfig. (Optional) For security, include the ARN of a KMS key in the kmsKeyId field. (Optional) Attach any tags to the guardrail in the tags object. For more information, see Tag resources.
  28. */
  29. createGuardrail(callback?: (err: AWSError, data: Bedrock.Types.CreateGuardrailResponse) => void): Request<Bedrock.Types.CreateGuardrailResponse, AWSError>;
  30. /**
  31. * Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.
  32. */
  33. createGuardrailVersion(params: Bedrock.Types.CreateGuardrailVersionRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateGuardrailVersionResponse) => void): Request<Bedrock.Types.CreateGuardrailVersionResponse, AWSError>;
  34. /**
  35. * Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.
  36. */
  37. createGuardrailVersion(callback?: (err: AWSError, data: Bedrock.Types.CreateGuardrailVersionResponse) => void): Request<Bedrock.Types.CreateGuardrailVersionResponse, AWSError>;
  38. /**
  39. * Creates a fine-tuning job to customize a base model. You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes. For information on the format of training and validation data, see Prepare the datasets. Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the GetModelCustomizationJob operation to retrieve the job status. For more information, see Custom models in the Amazon Bedrock User Guide.
  40. */
  41. createModelCustomizationJob(params: Bedrock.Types.CreateModelCustomizationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateModelCustomizationJobResponse) => void): Request<Bedrock.Types.CreateModelCustomizationJobResponse, AWSError>;
  42. /**
  43. * Creates a fine-tuning job to customize a base model. You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes. For information on the format of training and validation data, see Prepare the datasets. Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the GetModelCustomizationJob operation to retrieve the job status. For more information, see Custom models in the Amazon Bedrock User Guide.
  44. */
  45. createModelCustomizationJob(callback?: (err: AWSError, data: Bedrock.Types.CreateModelCustomizationJobResponse) => void): Request<Bedrock.Types.CreateModelCustomizationJobResponse, AWSError>;
  46. /**
  47. * Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  48. */
  49. createProvisionedModelThroughput(params: Bedrock.Types.CreateProvisionedModelThroughputRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.CreateProvisionedModelThroughputResponse, AWSError>;
  50. /**
  51. * Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  52. */
  53. createProvisionedModelThroughput(callback?: (err: AWSError, data: Bedrock.Types.CreateProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.CreateProvisionedModelThroughputResponse, AWSError>;
  54. /**
  55. * Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
  56. */
  57. deleteCustomModel(params: Bedrock.Types.DeleteCustomModelRequest, callback?: (err: AWSError, data: Bedrock.Types.DeleteCustomModelResponse) => void): Request<Bedrock.Types.DeleteCustomModelResponse, AWSError>;
  58. /**
  59. * Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
  60. */
  61. deleteCustomModel(callback?: (err: AWSError, data: Bedrock.Types.DeleteCustomModelResponse) => void): Request<Bedrock.Types.DeleteCustomModelResponse, AWSError>;
  62. /**
  63. * Deletes a guardrail. To delete a guardrail, only specify the ARN of the guardrail in the guardrailIdentifier field. If you delete a guardrail, all of its versions will be deleted. To delete a version of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field and the version in the guardrailVersion field.
  64. */
  65. deleteGuardrail(params: Bedrock.Types.DeleteGuardrailRequest, callback?: (err: AWSError, data: Bedrock.Types.DeleteGuardrailResponse) => void): Request<Bedrock.Types.DeleteGuardrailResponse, AWSError>;
  66. /**
  67. * Deletes a guardrail. To delete a guardrail, only specify the ARN of the guardrail in the guardrailIdentifier field. If you delete a guardrail, all of its versions will be deleted. To delete a version of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field and the version in the guardrailVersion field.
  68. */
  69. deleteGuardrail(callback?: (err: AWSError, data: Bedrock.Types.DeleteGuardrailResponse) => void): Request<Bedrock.Types.DeleteGuardrailResponse, AWSError>;
  70. /**
  71. * Delete the invocation logging.
  72. */
  73. deleteModelInvocationLoggingConfiguration(params: Bedrock.Types.DeleteModelInvocationLoggingConfigurationRequest, callback?: (err: AWSError, data: Bedrock.Types.DeleteModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.DeleteModelInvocationLoggingConfigurationResponse, AWSError>;
  74. /**
  75. * Delete the invocation logging.
  76. */
  77. deleteModelInvocationLoggingConfiguration(callback?: (err: AWSError, data: Bedrock.Types.DeleteModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.DeleteModelInvocationLoggingConfigurationResponse, AWSError>;
  78. /**
  79. * Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  80. */
  81. deleteProvisionedModelThroughput(params: Bedrock.Types.DeleteProvisionedModelThroughputRequest, callback?: (err: AWSError, data: Bedrock.Types.DeleteProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.DeleteProvisionedModelThroughputResponse, AWSError>;
  82. /**
  83. * Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  84. */
  85. deleteProvisionedModelThroughput(callback?: (err: AWSError, data: Bedrock.Types.DeleteProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.DeleteProvisionedModelThroughputResponse, AWSError>;
  86. /**
  87. * Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.
  88. */
  89. getCustomModel(params: Bedrock.Types.GetCustomModelRequest, callback?: (err: AWSError, data: Bedrock.Types.GetCustomModelResponse) => void): Request<Bedrock.Types.GetCustomModelResponse, AWSError>;
  90. /**
  91. * Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.
  92. */
  93. getCustomModel(callback?: (err: AWSError, data: Bedrock.Types.GetCustomModelResponse) => void): Request<Bedrock.Types.GetCustomModelResponse, AWSError>;
  94. /**
  95. * Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluations.
  96. */
  97. getEvaluationJob(params: Bedrock.Types.GetEvaluationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.GetEvaluationJobResponse) => void): Request<Bedrock.Types.GetEvaluationJobResponse, AWSError>;
  98. /**
  99. * Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluations.
  100. */
  101. getEvaluationJob(callback?: (err: AWSError, data: Bedrock.Types.GetEvaluationJobResponse) => void): Request<Bedrock.Types.GetEvaluationJobResponse, AWSError>;
  102. /**
  103. * Get details about a Amazon Bedrock foundation model.
  104. */
  105. getFoundationModel(params: Bedrock.Types.GetFoundationModelRequest, callback?: (err: AWSError, data: Bedrock.Types.GetFoundationModelResponse) => void): Request<Bedrock.Types.GetFoundationModelResponse, AWSError>;
  106. /**
  107. * Get details about a Amazon Bedrock foundation model.
  108. */
  109. getFoundationModel(callback?: (err: AWSError, data: Bedrock.Types.GetFoundationModelResponse) => void): Request<Bedrock.Types.GetFoundationModelResponse, AWSError>;
  110. /**
  111. * Gets details about a guardrail. If you don't specify a version, the response returns details for the DRAFT version.
  112. */
  113. getGuardrail(params: Bedrock.Types.GetGuardrailRequest, callback?: (err: AWSError, data: Bedrock.Types.GetGuardrailResponse) => void): Request<Bedrock.Types.GetGuardrailResponse, AWSError>;
  114. /**
  115. * Gets details about a guardrail. If you don't specify a version, the response returns details for the DRAFT version.
  116. */
  117. getGuardrail(callback?: (err: AWSError, data: Bedrock.Types.GetGuardrailResponse) => void): Request<Bedrock.Types.GetGuardrailResponse, AWSError>;
  118. /**
  119. * Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide.
  120. */
  121. getModelCustomizationJob(params: Bedrock.Types.GetModelCustomizationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.GetModelCustomizationJobResponse) => void): Request<Bedrock.Types.GetModelCustomizationJobResponse, AWSError>;
  122. /**
  123. * Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide.
  124. */
  125. getModelCustomizationJob(callback?: (err: AWSError, data: Bedrock.Types.GetModelCustomizationJobResponse) => void): Request<Bedrock.Types.GetModelCustomizationJobResponse, AWSError>;
  126. /**
  127. * Get the current configuration values for model invocation logging.
  128. */
  129. getModelInvocationLoggingConfiguration(params: Bedrock.Types.GetModelInvocationLoggingConfigurationRequest, callback?: (err: AWSError, data: Bedrock.Types.GetModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.GetModelInvocationLoggingConfigurationResponse, AWSError>;
  130. /**
  131. * Get the current configuration values for model invocation logging.
  132. */
  133. getModelInvocationLoggingConfiguration(callback?: (err: AWSError, data: Bedrock.Types.GetModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.GetModelInvocationLoggingConfigurationResponse, AWSError>;
  134. /**
  135. * Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  136. */
  137. getProvisionedModelThroughput(params: Bedrock.Types.GetProvisionedModelThroughputRequest, callback?: (err: AWSError, data: Bedrock.Types.GetProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.GetProvisionedModelThroughputResponse, AWSError>;
  138. /**
  139. * Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  140. */
  141. getProvisionedModelThroughput(callback?: (err: AWSError, data: Bedrock.Types.GetProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.GetProvisionedModelThroughputResponse, AWSError>;
  142. /**
  143. * Returns a list of the custom models that you have created with the CreateModelCustomizationJob operation. For more information, see Custom models in the Amazon Bedrock User Guide.
  144. */
  145. listCustomModels(params: Bedrock.Types.ListCustomModelsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListCustomModelsResponse) => void): Request<Bedrock.Types.ListCustomModelsResponse, AWSError>;
  146. /**
  147. * Returns a list of the custom models that you have created with the CreateModelCustomizationJob operation. For more information, see Custom models in the Amazon Bedrock User Guide.
  148. */
  149. listCustomModels(callback?: (err: AWSError, data: Bedrock.Types.ListCustomModelsResponse) => void): Request<Bedrock.Types.ListCustomModelsResponse, AWSError>;
  150. /**
  151. * Lists model evaluation jobs.
  152. */
  153. listEvaluationJobs(params: Bedrock.Types.ListEvaluationJobsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListEvaluationJobsResponse) => void): Request<Bedrock.Types.ListEvaluationJobsResponse, AWSError>;
  154. /**
  155. * Lists model evaluation jobs.
  156. */
  157. listEvaluationJobs(callback?: (err: AWSError, data: Bedrock.Types.ListEvaluationJobsResponse) => void): Request<Bedrock.Types.ListEvaluationJobsResponse, AWSError>;
  158. /**
  159. * Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide.
  160. */
  161. listFoundationModels(params: Bedrock.Types.ListFoundationModelsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListFoundationModelsResponse) => void): Request<Bedrock.Types.ListFoundationModelsResponse, AWSError>;
  162. /**
  163. * Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide.
  164. */
  165. listFoundationModels(callback?: (err: AWSError, data: Bedrock.Types.ListFoundationModelsResponse) => void): Request<Bedrock.Types.ListFoundationModelsResponse, AWSError>;
  166. /**
  167. * Lists details about all the guardrails in an account. To list the DRAFT version of all your guardrails, don't specify the guardrailIdentifier field. To list all versions of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field. You can set the maximum number of results to return in a response in the maxResults field. If there are more results than the number you set, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.
  168. */
  169. listGuardrails(params: Bedrock.Types.ListGuardrailsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListGuardrailsResponse) => void): Request<Bedrock.Types.ListGuardrailsResponse, AWSError>;
  170. /**
  171. * Lists details about all the guardrails in an account. To list the DRAFT version of all your guardrails, don't specify the guardrailIdentifier field. To list all versions of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field. You can set the maximum number of results to return in a response in the maxResults field. If there are more results than the number you set, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.
  172. */
  173. listGuardrails(callback?: (err: AWSError, data: Bedrock.Types.ListGuardrailsResponse) => void): Request<Bedrock.Types.ListGuardrailsResponse, AWSError>;
  174. /**
  175. * Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Custom models in the Amazon Bedrock User Guide.
  176. */
  177. listModelCustomizationJobs(params: Bedrock.Types.ListModelCustomizationJobsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListModelCustomizationJobsResponse) => void): Request<Bedrock.Types.ListModelCustomizationJobsResponse, AWSError>;
  178. /**
  179. * Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Custom models in the Amazon Bedrock User Guide.
  180. */
  181. listModelCustomizationJobs(callback?: (err: AWSError, data: Bedrock.Types.ListModelCustomizationJobsResponse) => void): Request<Bedrock.Types.ListModelCustomizationJobsResponse, AWSError>;
  182. /**
  183. * Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  184. */
  185. listProvisionedModelThroughputs(params: Bedrock.Types.ListProvisionedModelThroughputsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListProvisionedModelThroughputsResponse) => void): Request<Bedrock.Types.ListProvisionedModelThroughputsResponse, AWSError>;
  186. /**
  187. * Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  188. */
  189. listProvisionedModelThroughputs(callback?: (err: AWSError, data: Bedrock.Types.ListProvisionedModelThroughputsResponse) => void): Request<Bedrock.Types.ListProvisionedModelThroughputsResponse, AWSError>;
  190. /**
  191. * List the tags associated with the specified resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
  192. */
  193. listTagsForResource(params: Bedrock.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: Bedrock.Types.ListTagsForResourceResponse) => void): Request<Bedrock.Types.ListTagsForResourceResponse, AWSError>;
  194. /**
  195. * List the tags associated with the specified resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
  196. */
  197. listTagsForResource(callback?: (err: AWSError, data: Bedrock.Types.ListTagsForResourceResponse) => void): Request<Bedrock.Types.ListTagsForResourceResponse, AWSError>;
  198. /**
  199. * Set the configuration values for model invocation logging.
  200. */
  201. putModelInvocationLoggingConfiguration(params: Bedrock.Types.PutModelInvocationLoggingConfigurationRequest, callback?: (err: AWSError, data: Bedrock.Types.PutModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.PutModelInvocationLoggingConfigurationResponse, AWSError>;
  202. /**
  203. * Set the configuration values for model invocation logging.
  204. */
  205. putModelInvocationLoggingConfiguration(callback?: (err: AWSError, data: Bedrock.Types.PutModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.PutModelInvocationLoggingConfigurationResponse, AWSError>;
  206. /**
  207. * Stops an in progress model evaluation job.
  208. */
  209. stopEvaluationJob(params: Bedrock.Types.StopEvaluationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.StopEvaluationJobResponse) => void): Request<Bedrock.Types.StopEvaluationJobResponse, AWSError>;
  210. /**
  211. * Stops an in progress model evaluation job.
  212. */
  213. stopEvaluationJob(callback?: (err: AWSError, data: Bedrock.Types.StopEvaluationJobResponse) => void): Request<Bedrock.Types.StopEvaluationJobResponse, AWSError>;
  214. /**
  215. * Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
  216. */
  217. stopModelCustomizationJob(params: Bedrock.Types.StopModelCustomizationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.StopModelCustomizationJobResponse) => void): Request<Bedrock.Types.StopModelCustomizationJobResponse, AWSError>;
  218. /**
  219. * Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
  220. */
  221. stopModelCustomizationJob(callback?: (err: AWSError, data: Bedrock.Types.StopModelCustomizationJobResponse) => void): Request<Bedrock.Types.StopModelCustomizationJobResponse, AWSError>;
  222. /**
  223. * Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
  224. */
  225. tagResource(params: Bedrock.Types.TagResourceRequest, callback?: (err: AWSError, data: Bedrock.Types.TagResourceResponse) => void): Request<Bedrock.Types.TagResourceResponse, AWSError>;
  226. /**
  227. * Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
  228. */
  229. tagResource(callback?: (err: AWSError, data: Bedrock.Types.TagResourceResponse) => void): Request<Bedrock.Types.TagResourceResponse, AWSError>;
  230. /**
  231. * Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
  232. */
  233. untagResource(params: Bedrock.Types.UntagResourceRequest, callback?: (err: AWSError, data: Bedrock.Types.UntagResourceResponse) => void): Request<Bedrock.Types.UntagResourceResponse, AWSError>;
  234. /**
  235. * Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
  236. */
  237. untagResource(callback?: (err: AWSError, data: Bedrock.Types.UntagResourceResponse) => void): Request<Bedrock.Types.UntagResourceResponse, AWSError>;
  238. /**
  239. * Updates a guardrail with the values you specify. Specify a name and optional description. Specify messages for when the guardrail successfully blocks a prompt or a model response in the blockedInputMessaging and blockedOutputsMessaging fields. Specify topics for the guardrail to deny in the topicPolicyConfig object. Each GuardrailTopicConfig object in the topicsConfig list pertains to one topic. Give a name and description so that the guardrail can properly identify the topic. Specify DENY in the type field. (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the examples list. Specify filter strengths for the harmful categories defined in Amazon Bedrock in the contentPolicyConfig object. Each GuardrailContentFilterConfig object in the filtersConfig list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig. Specify the category in the type field. Specify the strength of the filter for prompts in the inputStrength field and for model responses in the strength field of the GuardrailContentFilterConfig. (Optional) For security, include the ARN of a KMS key in the kmsKeyId field. (Optional) Attach any tags to the guardrail in the tags object. For more information, see Tag resources.
  240. */
  241. updateGuardrail(params: Bedrock.Types.UpdateGuardrailRequest, callback?: (err: AWSError, data: Bedrock.Types.UpdateGuardrailResponse) => void): Request<Bedrock.Types.UpdateGuardrailResponse, AWSError>;
  242. /**
  243. * Updates a guardrail with the values you specify. Specify a name and optional description. Specify messages for when the guardrail successfully blocks a prompt or a model response in the blockedInputMessaging and blockedOutputsMessaging fields. Specify topics for the guardrail to deny in the topicPolicyConfig object. Each GuardrailTopicConfig object in the topicsConfig list pertains to one topic. Give a name and description so that the guardrail can properly identify the topic. Specify DENY in the type field. (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the examples list. Specify filter strengths for the harmful categories defined in Amazon Bedrock in the contentPolicyConfig object. Each GuardrailContentFilterConfig object in the filtersConfig list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig. Specify the category in the type field. Specify the strength of the filter for prompts in the inputStrength field and for model responses in the strength field of the GuardrailContentFilterConfig. (Optional) For security, include the ARN of a KMS key in the kmsKeyId field. (Optional) Attach any tags to the guardrail in the tags object. For more information, see Tag resources.
  244. */
  245. updateGuardrail(callback?: (err: AWSError, data: Bedrock.Types.UpdateGuardrailResponse) => void): Request<Bedrock.Types.UpdateGuardrailResponse, AWSError>;
  246. /**
  247. * Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  248. */
  249. updateProvisionedModelThroughput(params: Bedrock.Types.UpdateProvisionedModelThroughputRequest, callback?: (err: AWSError, data: Bedrock.Types.UpdateProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.UpdateProvisionedModelThroughputResponse, AWSError>;
  250. /**
  251. * Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  252. */
  253. updateProvisionedModelThroughput(callback?: (err: AWSError, data: Bedrock.Types.UpdateProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.UpdateProvisionedModelThroughputResponse, AWSError>;
  254. }
  255. declare namespace Bedrock {
  256. export interface AutomatedEvaluationConfig {
  257. /**
  258. * Specifies the required elements for an automatic model evaluation job.
  259. */
  260. datasetMetricConfigs: EvaluationDatasetMetricConfigs;
  261. }
  262. export type BaseModelIdentifier = string;
  263. export type BedrockModelId = string;
  264. export type Boolean = boolean;
  265. export type BrandedName = string;
  266. export type BucketName = string;
  267. export interface CloudWatchConfig {
  268. /**
  269. * The log group name.
  270. */
  271. logGroupName: LogGroupName;
  272. /**
  273. * The role Amazon Resource Name (ARN).
  274. */
  275. roleArn: RoleArn;
  276. /**
  277. * S3 configuration for delivering a large amount of data.
  278. */
  279. largeDataDeliveryS3Config?: S3Config;
  280. }
  281. export type CommitmentDuration = "OneMonth"|"SixMonths"|string;
  282. export interface CreateEvaluationJobRequest {
  283. /**
  284. * The name of the model evaluation job. Model evaluation job names must unique with your AWS account, and your account's AWS region.
  285. */
  286. jobName: EvaluationJobName;
  287. /**
  288. * A description of the model evaluation job.
  289. */
  290. jobDescription?: EvaluationJobDescription;
  291. /**
  292. * A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
  293. */
  294. clientRequestToken?: IdempotencyToken;
  295. /**
  296. * The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock can assume to perform tasks on your behalf. The service role must have Amazon Bedrock as the service principal, and provide access to any Amazon S3 buckets specified in the EvaluationConfig object. To pass this role to Amazon Bedrock, the caller of this API must have the iam:PassRole permission. To learn more about the required permissions, see Required permissions.
  297. */
  298. roleArn: RoleArn;
  299. /**
  300. * Specify your customer managed key ARN that will be used to encrypt your model evaluation job.
  301. */
  302. customerEncryptionKeyId?: KmsKeyId;
  303. /**
  304. * Tags to attach to the model evaluation job.
  305. */
  306. jobTags?: TagList;
  307. /**
  308. * Specifies whether the model evaluation job is automatic or uses human worker.
  309. */
  310. evaluationConfig: EvaluationConfig;
  311. /**
  312. * Specify the models you want to use in your model evaluation job. Automatic model evaluation jobs support a single model, and model evaluation job that use human workers support two models.
  313. */
  314. inferenceConfig: EvaluationInferenceConfig;
  315. /**
  316. * An object that defines where the results of model evaluation job will be saved in Amazon S3.
  317. */
  318. outputDataConfig: EvaluationOutputDataConfig;
  319. }
  320. export interface CreateEvaluationJobResponse {
  321. /**
  322. * The ARN of the model evaluation job.
  323. */
  324. jobArn: EvaluationJobArn;
  325. }
  326. export interface CreateGuardrailRequest {
  327. /**
  328. * The name to give the guardrail.
  329. */
  330. name: GuardrailName;
  331. /**
  332. * A description of the guardrail.
  333. */
  334. description?: GuardrailDescription;
  335. /**
  336. * The topic policies to configure for the guardrail.
  337. */
  338. topicPolicyConfig?: GuardrailTopicPolicyConfig;
  339. /**
  340. * The content filter policies to configure for the guardrail.
  341. */
  342. contentPolicyConfig?: GuardrailContentPolicyConfig;
  343. /**
  344. * The word policy you configure for the guardrail.
  345. */
  346. wordPolicyConfig?: GuardrailWordPolicyConfig;
  347. /**
  348. * The sensitive information policy to configure for the guardrail.
  349. */
  350. sensitiveInformationPolicyConfig?: GuardrailSensitiveInformationPolicyConfig;
  351. /**
  352. * The message to return when the guardrail blocks a prompt.
  353. */
  354. blockedInputMessaging: GuardrailBlockedMessaging;
  355. /**
  356. * The message to return when the guardrail blocks a model response.
  357. */
  358. blockedOutputsMessaging: GuardrailBlockedMessaging;
  359. /**
  360. * The ARN of the KMS key that you use to encrypt the guardrail.
  361. */
  362. kmsKeyId?: KmsKeyId;
  363. /**
  364. * The tags that you want to attach to the guardrail.
  365. */
  366. tags?: TagList;
  367. /**
  368. * A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency in the Amazon S3 User Guide.
  369. */
  370. clientRequestToken?: IdempotencyToken;
  371. }
  372. export interface CreateGuardrailResponse {
  373. /**
  374. * The unique identifier of the guardrail that was created.
  375. */
  376. guardrailId: GuardrailId;
  377. /**
  378. * The ARN of the guardrail that was created.
  379. */
  380. guardrailArn: GuardrailArn;
  381. /**
  382. * The version of the guardrail that was created. This value should be 1.
  383. */
  384. version: GuardrailDraftVersion;
  385. /**
  386. * The time at which the guardrail was created.
  387. */
  388. createdAt: Timestamp;
  389. }
  390. export interface CreateGuardrailVersionRequest {
  391. /**
  392. * The unique identifier of the guardrail.
  393. */
  394. guardrailIdentifier: GuardrailIdentifier;
  395. /**
  396. * A description of the guardrail version.
  397. */
  398. description?: GuardrailDescription;
  399. /**
  400. * A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency in the Amazon S3 User Guide.
  401. */
  402. clientRequestToken?: IdempotencyToken;
  403. }
  404. export interface CreateGuardrailVersionResponse {
  405. /**
  406. * The unique identifier of the guardrail.
  407. */
  408. guardrailId: GuardrailId;
  409. /**
  410. * The number of the version of the guardrail.
  411. */
  412. version: GuardrailNumericalVersion;
  413. }
  414. export interface CreateModelCustomizationJobRequest {
  415. /**
  416. * A name for the fine-tuning job.
  417. */
  418. jobName: JobName;
  419. /**
  420. * A name for the resulting custom model.
  421. */
  422. customModelName: CustomModelName;
  423. /**
  424. * The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock can assume to perform tasks on your behalf. For example, during model training, Amazon Bedrock needs your permission to read input data from an S3 bucket, write model artifacts to an S3 bucket. To pass this role to Amazon Bedrock, the caller of this API must have the iam:PassRole permission.
  425. */
  426. roleArn: RoleArn;
  427. /**
  428. * A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
  429. */
  430. clientRequestToken?: IdempotencyToken;
  431. /**
  432. * Name of the base model.
  433. */
  434. baseModelIdentifier: BaseModelIdentifier;
  435. /**
  436. * The customization type.
  437. */
  438. customizationType?: CustomizationType;
  439. /**
  440. * The custom model is encrypted at rest using this key.
  441. */
  442. customModelKmsKeyId?: KmsKeyId;
  443. /**
  444. * Tags to attach to the job.
  445. */
  446. jobTags?: TagList;
  447. /**
  448. * Tags to attach to the resulting custom model.
  449. */
  450. customModelTags?: TagList;
  451. /**
  452. * Information about the training dataset.
  453. */
  454. trainingDataConfig: TrainingDataConfig;
  455. /**
  456. * Information about the validation dataset.
  457. */
  458. validationDataConfig?: ValidationDataConfig;
  459. /**
  460. * S3 location for the output data.
  461. */
  462. outputDataConfig: OutputDataConfig;
  463. /**
  464. * Parameters related to tuning the model. For details on the format for different models, see Custom model hyperparameters.
  465. */
  466. hyperParameters: ModelCustomizationHyperParameters;
  467. /**
  468. * VPC configuration (optional). Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
  469. */
  470. vpcConfig?: VpcConfig;
  471. }
  472. export interface CreateModelCustomizationJobResponse {
  473. /**
  474. * Amazon Resource Name (ARN) of the fine tuning job
  475. */
  476. jobArn: ModelCustomizationJobArn;
  477. }
  478. export interface CreateProvisionedModelThroughputRequest {
  479. /**
  480. * A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency in the Amazon S3 User Guide.
  481. */
  482. clientRequestToken?: IdempotencyToken;
  483. /**
  484. * Number of model units to allocate. A model unit delivers a specific throughput level for the specified model. The throughput level of a model unit specifies the total number of input and output tokens that it can process and generate within a span of one minute. By default, your account has no model units for purchasing Provisioned Throughputs with commitment. You must first visit the Amazon Web Services support center to request MUs. For model unit quotas, see Provisioned Throughput quotas in the Amazon Bedrock User Guide. For more information about what an MU specifies, contact your Amazon Web Services account manager.
  485. */
  486. modelUnits: PositiveInteger;
  487. /**
  488. * The name for this Provisioned Throughput.
  489. */
  490. provisionedModelName: ProvisionedModelName;
  491. /**
  492. * The Amazon Resource Name (ARN) or name of the model to associate with this Provisioned Throughput. For a list of models for which you can purchase Provisioned Throughput, see Amazon Bedrock model IDs for purchasing Provisioned Throughput in the Amazon Bedrock User Guide.
  493. */
  494. modelId: ModelIdentifier;
  495. /**
  496. * The commitment duration requested for the Provisioned Throughput. Billing occurs hourly and is discounted for longer commitment terms. To request a no-commit Provisioned Throughput, omit this field. Custom models support all levels of commitment. To see which base models support no commitment, see Supported regions and models for Provisioned Throughput in the Amazon Bedrock User Guide
  497. */
  498. commitmentDuration?: CommitmentDuration;
  499. /**
  500. * Tags to associate with this Provisioned Throughput.
  501. */
  502. tags?: TagList;
  503. }
  504. export interface CreateProvisionedModelThroughputResponse {
  505. /**
  506. * The Amazon Resource Name (ARN) for this Provisioned Throughput.
  507. */
  508. provisionedModelArn: ProvisionedModelArn;
  509. }
  510. export type CustomModelArn = string;
  511. export type CustomModelName = string;
  512. export interface CustomModelSummary {
  513. /**
  514. * The Amazon Resource Name (ARN) of the custom model.
  515. */
  516. modelArn: CustomModelArn;
  517. /**
  518. * The name of the custom model.
  519. */
  520. modelName: CustomModelName;
  521. /**
  522. * Creation time of the model.
  523. */
  524. creationTime: Timestamp;
  525. /**
  526. * The base model Amazon Resource Name (ARN).
  527. */
  528. baseModelArn: ModelArn;
  529. /**
  530. * The base model name.
  531. */
  532. baseModelName: ModelName;
  533. /**
  534. * Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models.
  535. */
  536. customizationType?: CustomizationType;
  537. }
  538. export type CustomModelSummaryList = CustomModelSummary[];
  539. export type CustomizationType = "FINE_TUNING"|"CONTINUED_PRE_TRAINING"|string;
  540. export interface DeleteCustomModelRequest {
  541. /**
  542. * Name of the model to delete.
  543. */
  544. modelIdentifier: ModelIdentifier;
  545. }
  546. export interface DeleteCustomModelResponse {
  547. }
  548. export interface DeleteGuardrailRequest {
  549. /**
  550. * The unique identifier of the guardrail.
  551. */
  552. guardrailIdentifier: GuardrailIdentifier;
  553. /**
  554. * The version of the guardrail.
  555. */
  556. guardrailVersion?: GuardrailNumericalVersion;
  557. }
  558. export interface DeleteGuardrailResponse {
  559. }
  560. export interface DeleteModelInvocationLoggingConfigurationRequest {
  561. }
  562. export interface DeleteModelInvocationLoggingConfigurationResponse {
  563. }
  564. export interface DeleteProvisionedModelThroughputRequest {
  565. /**
  566. * The Amazon Resource Name (ARN) or name of the Provisioned Throughput.
  567. */
  568. provisionedModelId: ProvisionedModelId;
  569. }
  570. export interface DeleteProvisionedModelThroughputResponse {
  571. }
  572. export type ErrorMessage = string;
  573. export type ErrorMessages = ErrorMessage[];
  574. export interface EvaluationBedrockModel {
  575. /**
  576. * The ARN of the Amazon Bedrock model specified.
  577. */
  578. modelIdentifier: EvaluationModelIdentifier;
  579. /**
  580. * Each Amazon Bedrock support different inference parameters that change how the model behaves during inference.
  581. */
  582. inferenceParams: EvaluationModelInferenceParams;
  583. }
  584. export interface EvaluationConfig {
  585. /**
  586. * Used to specify an automated model evaluation job. See AutomatedEvaluationConfig to view the required parameters.
  587. */
  588. automated?: AutomatedEvaluationConfig;
  589. /**
  590. * Used to specify a model evaluation job that uses human workers.See HumanEvaluationConfig to view the required parameters.
  591. */
  592. human?: HumanEvaluationConfig;
  593. }
  594. export interface EvaluationDataset {
  595. /**
  596. * Used to specify supported built-in prompt datasets. Valid values are Builtin.Bold, Builtin.BoolQ, Builtin.NaturalQuestions, Builtin.Gigaword, Builtin.RealToxicityPrompts, Builtin.TriviaQa, Builtin.T-Rex, Builtin.WomensEcommerceClothingReviews and Builtin.Wikitext2.
  597. */
  598. name: EvaluationDatasetName;
  599. /**
  600. * For custom prompt datasets, you must specify the location in Amazon S3 where the prompt dataset is saved.
  601. */
  602. datasetLocation?: EvaluationDatasetLocation;
  603. }
  604. export interface EvaluationDatasetLocation {
  605. /**
  606. * The S3 URI of the S3 bucket specified in the job.
  607. */
  608. s3Uri?: S3Uri;
  609. }
  610. export interface EvaluationDatasetMetricConfig {
  611. /**
  612. * The task type you want the model to carry out.
  613. */
  614. taskType: EvaluationTaskType;
  615. /**
  616. * Specifies the prompt dataset.
  617. */
  618. dataset: EvaluationDataset;
  619. /**
  620. * The names of the metrics used. For automated model evaluation jobs valid values are "Builtin.Accuracy", "Builtin.Robustness", and "Builtin.Toxicity". In human-based model evaluation jobs the array of strings must match the name parameter specified in HumanEvaluationCustomMetric.
  621. */
  622. metricNames: EvaluationMetricNames;
  623. }
  624. export type EvaluationDatasetMetricConfigs = EvaluationDatasetMetricConfig[];
  625. export type EvaluationDatasetName = string;
  626. export interface EvaluationInferenceConfig {
  627. /**
  628. * Used to specify the models.
  629. */
  630. models?: EvaluationModelConfigs;
  631. }
  632. export type EvaluationJobArn = string;
  633. export type EvaluationJobDescription = string;
  634. export type EvaluationJobIdentifier = string;
  635. export type EvaluationJobName = string;
  636. export type EvaluationJobStatus = "InProgress"|"Completed"|"Failed"|"Stopping"|"Stopped"|string;
  637. export type EvaluationJobType = "Human"|"Automated"|string;
  638. export type EvaluationMetricDescription = string;
  639. export type EvaluationMetricName = string;
  640. export type EvaluationMetricNames = EvaluationMetricName[];
  641. export interface EvaluationModelConfig {
  642. /**
  643. * Defines the Amazon Bedrock model and inference parameters you want used.
  644. */
  645. bedrockModel?: EvaluationBedrockModel;
  646. }
  647. export type EvaluationModelConfigs = EvaluationModelConfig[];
  648. export type EvaluationModelIdentifier = string;
  649. export type EvaluationModelIdentifiers = EvaluationModelIdentifier[];
  650. export type EvaluationModelInferenceParams = string;
  651. export interface EvaluationOutputDataConfig {
  652. /**
  653. * The Amazon S3 URI where the results of model evaluation job are saved.
  654. */
  655. s3Uri: S3Uri;
  656. }
  657. export type EvaluationRatingMethod = string;
  658. export type EvaluationSummaries = EvaluationSummary[];
  659. export interface EvaluationSummary {
  660. /**
  661. * The Amazon Resource Name (ARN) of the model evaluation job.
  662. */
  663. jobArn: EvaluationJobArn;
  664. /**
  665. * The name of the model evaluation job.
  666. */
  667. jobName: EvaluationJobName;
  668. /**
  669. * The current status of the model evaluation job.
  670. */
  671. status: EvaluationJobStatus;
  672. /**
  673. * When the model evaluation job was created.
  674. */
  675. creationTime: Timestamp;
  676. /**
  677. * The type, either human or automatic, of model evaluation job.
  678. */
  679. jobType: EvaluationJobType;
  680. /**
  681. * What task type was used in the model evaluation job.
  682. */
  683. evaluationTaskTypes: EvaluationTaskTypes;
  684. /**
  685. * The Amazon Resource Names (ARNs) of the model(s) used in the model evaluation job.
  686. */
  687. modelIdentifiers: EvaluationModelIdentifiers;
  688. }
  689. export type EvaluationTaskType = "Summarization"|"Classification"|"QuestionAndAnswer"|"Generation"|"Custom"|string;
  690. export type EvaluationTaskTypes = EvaluationTaskType[];
  691. export type FineTuningJobStatus = "InProgress"|"Completed"|"Failed"|"Stopping"|"Stopped"|string;
  692. export type FoundationModelArn = string;
  693. export interface FoundationModelDetails {
  694. /**
  695. * The model Amazon Resource Name (ARN).
  696. */
  697. modelArn: FoundationModelArn;
  698. /**
  699. * The model identifier.
  700. */
  701. modelId: BedrockModelId;
  702. /**
  703. * The model name.
  704. */
  705. modelName?: BrandedName;
  706. /**
  707. * The model's provider name.
  708. */
  709. providerName?: BrandedName;
  710. /**
  711. * The input modalities that the model supports.
  712. */
  713. inputModalities?: ModelModalityList;
  714. /**
  715. * The output modalities that the model supports.
  716. */
  717. outputModalities?: ModelModalityList;
  718. /**
  719. * Indicates whether the model supports streaming.
  720. */
  721. responseStreamingSupported?: Boolean;
  722. /**
  723. * The customization that the model supports.
  724. */
  725. customizationsSupported?: ModelCustomizationList;
  726. /**
  727. * The inference types that the model supports.
  728. */
  729. inferenceTypesSupported?: InferenceTypeList;
  730. /**
  731. * Contains details about whether a model version is available or deprecated
  732. */
  733. modelLifecycle?: FoundationModelLifecycle;
  734. }
  735. export interface FoundationModelLifecycle {
  736. /**
  737. * Specifies whether a model version is available (ACTIVE) or deprecated (LEGACY.
  738. */
  739. status: FoundationModelLifecycleStatus;
  740. }
  741. export type FoundationModelLifecycleStatus = "ACTIVE"|"LEGACY"|string;
  742. export interface FoundationModelSummary {
  743. /**
  744. * The Amazon Resource Name (ARN) of the foundation model.
  745. */
  746. modelArn: FoundationModelArn;
  747. /**
  748. * The model ID of the foundation model.
  749. */
  750. modelId: BedrockModelId;
  751. /**
  752. * The name of the model.
  753. */
  754. modelName?: BrandedName;
  755. /**
  756. * The model's provider name.
  757. */
  758. providerName?: BrandedName;
  759. /**
  760. * The input modalities that the model supports.
  761. */
  762. inputModalities?: ModelModalityList;
  763. /**
  764. * The output modalities that the model supports.
  765. */
  766. outputModalities?: ModelModalityList;
  767. /**
  768. * Indicates whether the model supports streaming.
  769. */
  770. responseStreamingSupported?: Boolean;
  771. /**
  772. * Whether the model supports fine-tuning or continual pre-training.
  773. */
  774. customizationsSupported?: ModelCustomizationList;
  775. /**
  776. * The inference types that the model supports.
  777. */
  778. inferenceTypesSupported?: InferenceTypeList;
  779. /**
  780. * Contains details about whether a model version is available or deprecated.
  781. */
  782. modelLifecycle?: FoundationModelLifecycle;
  783. }
  784. export type FoundationModelSummaryList = FoundationModelSummary[];
  785. export interface GetCustomModelRequest {
  786. /**
  787. * Name or Amazon Resource Name (ARN) of the custom model.
  788. */
  789. modelIdentifier: ModelIdentifier;
  790. }
  791. export interface GetCustomModelResponse {
  792. /**
  793. * Amazon Resource Name (ARN) associated with this model.
  794. */
  795. modelArn: ModelArn;
  796. /**
  797. * Model name associated with this model.
  798. */
  799. modelName: CustomModelName;
  800. /**
  801. * Job name associated with this model.
  802. */
  803. jobName?: JobName;
  804. /**
  805. * Job Amazon Resource Name (ARN) associated with this model.
  806. */
  807. jobArn: ModelCustomizationJobArn;
  808. /**
  809. * Amazon Resource Name (ARN) of the base model.
  810. */
  811. baseModelArn: ModelArn;
  812. /**
  813. * The type of model customization.
  814. */
  815. customizationType?: CustomizationType;
  816. /**
  817. * The custom model is encrypted at rest using this key.
  818. */
  819. modelKmsKeyArn?: KmsKeyArn;
  820. /**
  821. * Hyperparameter values associated with this model. For details on the format for different models, see Custom model hyperparameters.
  822. */
  823. hyperParameters?: ModelCustomizationHyperParameters;
  824. /**
  825. * Contains information about the training dataset.
  826. */
  827. trainingDataConfig: TrainingDataConfig;
  828. /**
  829. * Contains information about the validation dataset.
  830. */
  831. validationDataConfig?: ValidationDataConfig;
  832. /**
  833. * Output data configuration associated with this custom model.
  834. */
  835. outputDataConfig: OutputDataConfig;
  836. /**
  837. * Contains training metrics from the job creation.
  838. */
  839. trainingMetrics?: TrainingMetrics;
  840. /**
  841. * The validation metrics from the job creation.
  842. */
  843. validationMetrics?: ValidationMetrics;
  844. /**
  845. * Creation time of the model.
  846. */
  847. creationTime: Timestamp;
  848. }
  849. export interface GetEvaluationJobRequest {
  850. /**
  851. * The Amazon Resource Name (ARN) of the model evaluation job.
  852. */
  853. jobIdentifier: EvaluationJobIdentifier;
  854. }
  855. export interface GetEvaluationJobResponse {
  856. /**
  857. * The name of the model evaluation job.
  858. */
  859. jobName: EvaluationJobName;
  860. /**
  861. * The status of the model evaluation job.
  862. */
  863. status: EvaluationJobStatus;
  864. /**
  865. * The Amazon Resource Name (ARN) of the model evaluation job.
  866. */
  867. jobArn: EvaluationJobArn;
  868. /**
  869. * The description of the model evaluation job.
  870. */
  871. jobDescription?: EvaluationJobDescription;
  872. /**
  873. * The Amazon Resource Name (ARN) of the IAM service role used in the model evaluation job.
  874. */
  875. roleArn: RoleArn;
  876. /**
  877. * The Amazon Resource Name (ARN) of the customer managed key specified when the model evaluation job was created.
  878. */
  879. customerEncryptionKeyId?: KmsKeyId;
  880. /**
  881. * The type of model evaluation job.
  882. */
  883. jobType: EvaluationJobType;
  884. /**
  885. * Contains details about the type of model evaluation job, the metrics used, the task type selected, the datasets used, and any custom metrics you defined.
  886. */
  887. evaluationConfig: EvaluationConfig;
  888. /**
  889. * Details about the models you specified in your model evaluation job.
  890. */
  891. inferenceConfig: EvaluationInferenceConfig;
  892. /**
  893. * Amazon S3 location for where output data is saved.
  894. */
  895. outputDataConfig: EvaluationOutputDataConfig;
  896. /**
  897. * When the model evaluation job was created.
  898. */
  899. creationTime: Timestamp;
  900. /**
  901. * When the model evaluation job was last modified.
  902. */
  903. lastModifiedTime?: Timestamp;
  904. /**
  905. * An array of strings the specify why the model evaluation job has failed.
  906. */
  907. failureMessages?: ErrorMessages;
  908. }
  909. export interface GetFoundationModelRequest {
  910. /**
  911. * The model identifier.
  912. */
  913. modelIdentifier: ModelIdentifier;
  914. }
  915. export interface GetFoundationModelResponse {
  916. /**
  917. * Information about the foundation model.
  918. */
  919. modelDetails?: FoundationModelDetails;
  920. }
  921. export interface GetGuardrailRequest {
  922. /**
  923. * The unique identifier of the guardrail for which to get details.
  924. */
  925. guardrailIdentifier: GuardrailIdentifier;
  926. /**
  927. * The version of the guardrail for which to get details. If you don't specify a version, the response returns details for the DRAFT version.
  928. */
  929. guardrailVersion?: GuardrailVersion;
  930. }
  931. export interface GetGuardrailResponse {
  932. /**
  933. * The name of the guardrail.
  934. */
  935. name: GuardrailName;
  936. /**
  937. * The description of the guardrail.
  938. */
  939. description?: GuardrailDescription;
  940. /**
  941. * The unique identifier of the guardrail.
  942. */
  943. guardrailId: GuardrailId;
  944. /**
  945. * The ARN of the guardrail that was created.
  946. */
  947. guardrailArn: GuardrailArn;
  948. /**
  949. * The version of the guardrail.
  950. */
  951. version: GuardrailVersion;
  952. /**
  953. * The status of the guardrail.
  954. */
  955. status: GuardrailStatus;
  956. /**
  957. * The topic policy that was configured for the guardrail.
  958. */
  959. topicPolicy?: GuardrailTopicPolicy;
  960. /**
  961. * The content policy that was configured for the guardrail.
  962. */
  963. contentPolicy?: GuardrailContentPolicy;
  964. /**
  965. * The word policy that was configured for the guardrail.
  966. */
  967. wordPolicy?: GuardrailWordPolicy;
  968. /**
  969. * The sensitive information policy that was configured for the guardrail.
  970. */
  971. sensitiveInformationPolicy?: GuardrailSensitiveInformationPolicy;
  972. /**
  973. * The date and time at which the guardrail was created.
  974. */
  975. createdAt: Timestamp;
  976. /**
  977. * The date and time at which the guardrail was updated.
  978. */
  979. updatedAt: Timestamp;
  980. /**
  981. * Appears if the status is FAILED. A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted.
  982. */
  983. statusReasons?: GuardrailStatusReasons;
  984. /**
  985. * Appears if the status of the guardrail is FAILED. A list of recommendations to carry out before retrying the request.
  986. */
  987. failureRecommendations?: GuardrailFailureRecommendations;
  988. /**
  989. * The message that the guardrail returns when it blocks a prompt.
  990. */
  991. blockedInputMessaging: GuardrailBlockedMessaging;
  992. /**
  993. * The message that the guardrail returns when it blocks a model response.
  994. */
  995. blockedOutputsMessaging: GuardrailBlockedMessaging;
  996. /**
  997. * The ARN of the KMS key that encrypts the guardrail.
  998. */
  999. kmsKeyArn?: KmsKeyArn;
  1000. }
  1001. export interface GetModelCustomizationJobRequest {
  1002. /**
  1003. * Identifier for the customization job.
  1004. */
  1005. jobIdentifier: ModelCustomizationJobIdentifier;
  1006. }
  1007. export interface GetModelCustomizationJobResponse {
  1008. /**
  1009. * The Amazon Resource Name (ARN) of the customization job.
  1010. */
  1011. jobArn: ModelCustomizationJobArn;
  1012. /**
  1013. * The name of the customization job.
  1014. */
  1015. jobName: JobName;
  1016. /**
  1017. * The name of the output model.
  1018. */
  1019. outputModelName: CustomModelName;
  1020. /**
  1021. * The Amazon Resource Name (ARN) of the output model.
  1022. */
  1023. outputModelArn?: CustomModelArn;
  1024. /**
  1025. * The token that you specified in the CreateCustomizationJob request.
  1026. */
  1027. clientRequestToken?: IdempotencyToken;
  1028. /**
  1029. * The Amazon Resource Name (ARN) of the IAM role.
  1030. */
  1031. roleArn: RoleArn;
  1032. /**
  1033. * The status of the job. A successful job transitions from in-progress to completed when the output model is ready to use. If the job failed, the failure message contains information about why the job failed.
  1034. */
  1035. status?: ModelCustomizationJobStatus;
  1036. /**
  1037. * Information about why the job failed.
  1038. */
  1039. failureMessage?: ErrorMessage;
  1040. /**
  1041. * Time that the resource was created.
  1042. */
  1043. creationTime: Timestamp;
  1044. /**
  1045. * Time that the resource was last modified.
  1046. */
  1047. lastModifiedTime?: Timestamp;
  1048. /**
  1049. * Time that the resource transitioned to terminal state.
  1050. */
  1051. endTime?: Timestamp;
  1052. /**
  1053. * Amazon Resource Name (ARN) of the base model.
  1054. */
  1055. baseModelArn: FoundationModelArn;
  1056. /**
  1057. * The hyperparameter values for the job. For details on the format for different models, see Custom model hyperparameters.
  1058. */
  1059. hyperParameters: ModelCustomizationHyperParameters;
  1060. /**
  1061. * Contains information about the training dataset.
  1062. */
  1063. trainingDataConfig: TrainingDataConfig;
  1064. /**
  1065. * Contains information about the validation dataset.
  1066. */
  1067. validationDataConfig: ValidationDataConfig;
  1068. /**
  1069. * Output data configuration
  1070. */
  1071. outputDataConfig: OutputDataConfig;
  1072. /**
  1073. * The type of model customization.
  1074. */
  1075. customizationType?: CustomizationType;
  1076. /**
  1077. * The custom model is encrypted at rest using this key.
  1078. */
  1079. outputModelKmsKeyArn?: KmsKeyArn;
  1080. /**
  1081. * Contains training metrics from the job creation.
  1082. */
  1083. trainingMetrics?: TrainingMetrics;
  1084. /**
  1085. * The loss metric for each validator that you provided in the createjob request.
  1086. */
  1087. validationMetrics?: ValidationMetrics;
  1088. /**
  1089. * VPC configuration for the custom model job.
  1090. */
  1091. vpcConfig?: VpcConfig;
  1092. }
  1093. export interface GetModelInvocationLoggingConfigurationRequest {
  1094. }
  1095. export interface GetModelInvocationLoggingConfigurationResponse {
  1096. /**
  1097. * The current configuration values.
  1098. */
  1099. loggingConfig?: LoggingConfig;
  1100. }
  1101. export interface GetProvisionedModelThroughputRequest {
  1102. /**
  1103. * The Amazon Resource Name (ARN) or name of the Provisioned Throughput.
  1104. */
  1105. provisionedModelId: ProvisionedModelId;
  1106. }
  1107. export interface GetProvisionedModelThroughputResponse {
  1108. /**
  1109. * The number of model units allocated to this Provisioned Throughput.
  1110. */
  1111. modelUnits: PositiveInteger;
  1112. /**
  1113. * The number of model units that was requested for this Provisioned Throughput.
  1114. */
  1115. desiredModelUnits: PositiveInteger;
  1116. /**
  1117. * The name of the Provisioned Throughput.
  1118. */
  1119. provisionedModelName: ProvisionedModelName;
  1120. /**
  1121. * The Amazon Resource Name (ARN) of the Provisioned Throughput.
  1122. */
  1123. provisionedModelArn: ProvisionedModelArn;
  1124. /**
  1125. * The Amazon Resource Name (ARN) of the model associated with this Provisioned Throughput.
  1126. */
  1127. modelArn: ModelArn;
  1128. /**
  1129. * The Amazon Resource Name (ARN) of the model requested to be associated to this Provisioned Throughput. This value differs from the modelArn if updating hasn't completed.
  1130. */
  1131. desiredModelArn: ModelArn;
  1132. /**
  1133. * The Amazon Resource Name (ARN) of the base model for which the Provisioned Throughput was created, or of the base model that the custom model for which the Provisioned Throughput was created was customized.
  1134. */
  1135. foundationModelArn: FoundationModelArn;
  1136. /**
  1137. * The status of the Provisioned Throughput.
  1138. */
  1139. status: ProvisionedModelStatus;
  1140. /**
  1141. * The timestamp of the creation time for this Provisioned Throughput.
  1142. */
  1143. creationTime: Timestamp;
  1144. /**
  1145. * The timestamp of the last time that this Provisioned Throughput was modified.
  1146. */
  1147. lastModifiedTime: Timestamp;
  1148. /**
  1149. * A failure message for any issues that occurred during creation, updating, or deletion of the Provisioned Throughput.
  1150. */
  1151. failureMessage?: ErrorMessage;
  1152. /**
  1153. * Commitment duration of the Provisioned Throughput.
  1154. */
  1155. commitmentDuration?: CommitmentDuration;
  1156. /**
  1157. * The timestamp for when the commitment term for the Provisioned Throughput expires.
  1158. */
  1159. commitmentExpirationTime?: Timestamp;
  1160. }
  1161. export type GuardrailArn = string;
  1162. export type GuardrailBlockedMessaging = string;
  1163. export interface GuardrailContentFilter {
  1164. /**
  1165. * The harmful category that the content filter is applied to.
  1166. */
  1167. type: GuardrailContentFilterType;
  1168. /**
  1169. * The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.
  1170. */
  1171. inputStrength: GuardrailFilterStrength;
  1172. /**
  1173. * The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.
  1174. */
  1175. outputStrength: GuardrailFilterStrength;
  1176. }
  1177. export interface GuardrailContentFilterConfig {
  1178. /**
  1179. * The harmful category that the content filter is applied to.
  1180. */
  1181. type: GuardrailContentFilterType;
  1182. /**
  1183. * The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.
  1184. */
  1185. inputStrength: GuardrailFilterStrength;
  1186. /**
  1187. * The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.
  1188. */
  1189. outputStrength: GuardrailFilterStrength;
  1190. }
  1191. export type GuardrailContentFilterType = "SEXUAL"|"VIOLENCE"|"HATE"|"INSULTS"|"MISCONDUCT"|"PROMPT_ATTACK"|string;
  1192. export type GuardrailContentFilters = GuardrailContentFilter[];
  1193. export type GuardrailContentFiltersConfig = GuardrailContentFilterConfig[];
  1194. export interface GuardrailContentPolicy {
  1195. /**
  1196. * Contains the type of the content filter and how strongly it should apply to prompts and model responses.
  1197. */
  1198. filters?: GuardrailContentFilters;
  1199. }
  1200. export interface GuardrailContentPolicyConfig {
  1201. /**
  1202. * Contains the type of the content filter and how strongly it should apply to prompts and model responses.
  1203. */
  1204. filtersConfig: GuardrailContentFiltersConfig;
  1205. }
  1206. export type GuardrailDescription = string;
  1207. export type GuardrailDraftVersion = string;
  1208. export type GuardrailFailureRecommendation = string;
  1209. export type GuardrailFailureRecommendations = GuardrailFailureRecommendation[];
  1210. export type GuardrailFilterStrength = "NONE"|"LOW"|"MEDIUM"|"HIGH"|string;
  1211. export type GuardrailId = string;
  1212. export type GuardrailIdentifier = string;
  1213. export type GuardrailManagedWordLists = GuardrailManagedWords[];
  1214. export type GuardrailManagedWordListsConfig = GuardrailManagedWordsConfig[];
  1215. export interface GuardrailManagedWords {
  1216. /**
  1217. * ManagedWords$type The managed word type that was configured for the guardrail. (For now, we only offer profanity word list)
  1218. */
  1219. type: GuardrailManagedWordsType;
  1220. }
  1221. export interface GuardrailManagedWordsConfig {
  1222. /**
  1223. * The managed word type to configure for the guardrail.
  1224. */
  1225. type: GuardrailManagedWordsType;
  1226. }
  1227. export type GuardrailManagedWordsType = "PROFANITY"|string;
  1228. export type GuardrailName = string;
  1229. export type GuardrailNumericalVersion = string;
  1230. export type GuardrailPiiEntities = GuardrailPiiEntity[];
  1231. export type GuardrailPiiEntitiesConfig = GuardrailPiiEntityConfig[];
  1232. export interface GuardrailPiiEntity {
  1233. /**
  1234. * The type of PII entity. For example, Social Security Number.
  1235. */
  1236. type: GuardrailPiiEntityType;
  1237. /**
  1238. * The configured guardrail action when PII entity is detected.
  1239. */
  1240. action: GuardrailSensitiveInformationAction;
  1241. }
  1242. export interface GuardrailPiiEntityConfig {
  1243. /**
  1244. * Configure guardrail type when the PII entity is detected.
  1245. */
  1246. type: GuardrailPiiEntityType;
  1247. /**
  1248. * Configure guardrail action when the PII entity is detected.
  1249. */
  1250. action: GuardrailSensitiveInformationAction;
  1251. }
  1252. export type GuardrailPiiEntityType = "ADDRESS"|"AGE"|"AWS_ACCESS_KEY"|"AWS_SECRET_KEY"|"CA_HEALTH_NUMBER"|"CA_SOCIAL_INSURANCE_NUMBER"|"CREDIT_DEBIT_CARD_CVV"|"CREDIT_DEBIT_CARD_EXPIRY"|"CREDIT_DEBIT_CARD_NUMBER"|"DRIVER_ID"|"EMAIL"|"INTERNATIONAL_BANK_ACCOUNT_NUMBER"|"IP_ADDRESS"|"LICENSE_PLATE"|"MAC_ADDRESS"|"NAME"|"PASSWORD"|"PHONE"|"PIN"|"SWIFT_CODE"|"UK_NATIONAL_HEALTH_SERVICE_NUMBER"|"UK_NATIONAL_INSURANCE_NUMBER"|"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER"|"URL"|"USERNAME"|"US_BANK_ACCOUNT_NUMBER"|"US_BANK_ROUTING_NUMBER"|"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER"|"US_PASSPORT_NUMBER"|"US_SOCIAL_SECURITY_NUMBER"|"VEHICLE_IDENTIFICATION_NUMBER"|string;
  1253. export interface GuardrailRegex {
  1254. /**
  1255. * The name of the regular expression for the guardrail.
  1256. */
  1257. name: GuardrailRegexNameString;
  1258. /**
  1259. * The description of the regular expression for the guardrail.
  1260. */
  1261. description?: GuardrailRegexDescriptionString;
  1262. /**
  1263. * The pattern of the regular expression configured for the guardrail.
  1264. */
  1265. pattern: GuardrailRegexPatternString;
  1266. /**
  1267. * The action taken when a match to the regular expression is detected.
  1268. */
  1269. action: GuardrailSensitiveInformationAction;
  1270. }
  1271. export interface GuardrailRegexConfig {
  1272. /**
  1273. * The name of the regular expression to configure for the guardrail.
  1274. */
  1275. name: GuardrailRegexConfigNameString;
  1276. /**
  1277. * The description of the regular expression to configure for the guardrail.
  1278. */
  1279. description?: GuardrailRegexConfigDescriptionString;
  1280. /**
  1281. * The regular expression pattern to configure for the guardrail.
  1282. */
  1283. pattern: GuardrailRegexConfigPatternString;
  1284. /**
  1285. * The guardrail action to configure when matching regular expression is detected.
  1286. */
  1287. action: GuardrailSensitiveInformationAction;
  1288. }
  1289. export type GuardrailRegexConfigDescriptionString = string;
  1290. export type GuardrailRegexConfigNameString = string;
  1291. export type GuardrailRegexConfigPatternString = string;
  1292. export type GuardrailRegexDescriptionString = string;
  1293. export type GuardrailRegexNameString = string;
  1294. export type GuardrailRegexPatternString = string;
  1295. export type GuardrailRegexes = GuardrailRegex[];
  1296. export type GuardrailRegexesConfig = GuardrailRegexConfig[];
  1297. export type GuardrailSensitiveInformationAction = "BLOCK"|"ANONYMIZE"|string;
  1298. export interface GuardrailSensitiveInformationPolicy {
  1299. /**
  1300. * The list of PII entities configured for the guardrail.
  1301. */
  1302. piiEntities?: GuardrailPiiEntities;
  1303. /**
  1304. * The list of regular expressions configured for the guardrail.
  1305. */
  1306. regexes?: GuardrailRegexes;
  1307. }
  1308. export interface GuardrailSensitiveInformationPolicyConfig {
  1309. /**
  1310. * A list of PII entities to configure to the guardrail.
  1311. */
  1312. piiEntitiesConfig?: GuardrailPiiEntitiesConfig;
  1313. /**
  1314. * A list of regular expressions to configure to the guardrail.
  1315. */
  1316. regexesConfig?: GuardrailRegexesConfig;
  1317. }
  1318. export type GuardrailStatus = "CREATING"|"UPDATING"|"VERSIONING"|"READY"|"FAILED"|"DELETING"|string;
  1319. export type GuardrailStatusReason = string;
  1320. export type GuardrailStatusReasons = GuardrailStatusReason[];
  1321. export type GuardrailSummaries = GuardrailSummary[];
  1322. export interface GuardrailSummary {
  1323. /**
  1324. * The unique identifier of the guardrail.
  1325. */
  1326. id: GuardrailId;
  1327. /**
  1328. * The ARN of the guardrail.
  1329. */
  1330. arn: GuardrailArn;
  1331. /**
  1332. * The status of the guardrail.
  1333. */
  1334. status: GuardrailStatus;
  1335. /**
  1336. * The name of the guardrail.
  1337. */
  1338. name: GuardrailName;
  1339. /**
  1340. * A description of the guardrail.
  1341. */
  1342. description?: GuardrailDescription;
  1343. /**
  1344. * The version of the guardrail.
  1345. */
  1346. version: GuardrailVersion;
  1347. /**
  1348. * The date and time at which the guardrail was created.
  1349. */
  1350. createdAt: Timestamp;
  1351. /**
  1352. * The date and time at which the guardrail was last updated.
  1353. */
  1354. updatedAt: Timestamp;
  1355. }
  1356. export interface GuardrailTopic {
  1357. /**
  1358. * The name of the topic to deny.
  1359. */
  1360. name: GuardrailTopicName;
  1361. /**
  1362. * A definition of the topic to deny.
  1363. */
  1364. definition: GuardrailTopicDefinition;
  1365. /**
  1366. * A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.
  1367. */
  1368. examples?: GuardrailTopicExamples;
  1369. /**
  1370. * Specifies to deny the topic.
  1371. */
  1372. type?: GuardrailTopicType;
  1373. }
  1374. export interface GuardrailTopicConfig {
  1375. /**
  1376. * The name of the topic to deny.
  1377. */
  1378. name: GuardrailTopicName;
  1379. /**
  1380. * A definition of the topic to deny.
  1381. */
  1382. definition: GuardrailTopicDefinition;
  1383. /**
  1384. * A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.
  1385. */
  1386. examples?: GuardrailTopicExamples;
  1387. /**
  1388. * Specifies to deny the topic.
  1389. */
  1390. type: GuardrailTopicType;
  1391. }
  1392. export type GuardrailTopicDefinition = string;
  1393. export type GuardrailTopicExample = string;
  1394. export type GuardrailTopicExamples = GuardrailTopicExample[];
  1395. export type GuardrailTopicName = string;
  1396. export interface GuardrailTopicPolicy {
  1397. /**
  1398. * A list of policies related to topics that the guardrail should deny.
  1399. */
  1400. topics: GuardrailTopics;
  1401. }
  1402. export interface GuardrailTopicPolicyConfig {
  1403. /**
  1404. * A list of policies related to topics that the guardrail should deny.
  1405. */
  1406. topicsConfig: GuardrailTopicsConfig;
  1407. }
  1408. export type GuardrailTopicType = "DENY"|string;
  1409. export type GuardrailTopics = GuardrailTopic[];
  1410. export type GuardrailTopicsConfig = GuardrailTopicConfig[];
  1411. export type GuardrailVersion = string;
  1412. export interface GuardrailWord {
  1413. /**
  1414. * Text of the word configured for the guardrail to block.
  1415. */
  1416. text: GuardrailWordTextString;
  1417. }
  1418. export interface GuardrailWordConfig {
  1419. /**
  1420. * Text of the word configured for the guardrail to block.
  1421. */
  1422. text: GuardrailWordConfigTextString;
  1423. }
  1424. export type GuardrailWordConfigTextString = string;
  1425. export interface GuardrailWordPolicy {
  1426. /**
  1427. * A list of words configured for the guardrail.
  1428. */
  1429. words?: GuardrailWords;
  1430. /**
  1431. * A list of managed words configured for the guardrail.
  1432. */
  1433. managedWordLists?: GuardrailManagedWordLists;
  1434. }
  1435. export interface GuardrailWordPolicyConfig {
  1436. /**
  1437. * A list of words to configure for the guardrail.
  1438. */
  1439. wordsConfig?: GuardrailWordsConfig;
  1440. /**
  1441. * A list of managed words to configure for the guardrail.
  1442. */
  1443. managedWordListsConfig?: GuardrailManagedWordListsConfig;
  1444. }
  1445. export type GuardrailWordTextString = string;
  1446. export type GuardrailWords = GuardrailWord[];
  1447. export type GuardrailWordsConfig = GuardrailWordConfig[];
  1448. export interface HumanEvaluationConfig {
  1449. /**
  1450. * The parameters of the human workflow.
  1451. */
  1452. humanWorkflowConfig?: HumanWorkflowConfig;
  1453. /**
  1454. * A HumanEvaluationCustomMetric object. It contains the names the metrics, how the metrics are to be evaluated, an optional description.
  1455. */
  1456. customMetrics?: HumanEvaluationCustomMetrics;
  1457. /**
  1458. * Use to specify the metrics, task, and prompt dataset to be used in your model evaluation job.
  1459. */
  1460. datasetMetricConfigs: EvaluationDatasetMetricConfigs;
  1461. }
  1462. export interface HumanEvaluationCustomMetric {
  1463. /**
  1464. * The name of the metric. Your human evaluators will see this name in the evaluation UI.
  1465. */
  1466. name: EvaluationMetricName;
  1467. /**
  1468. * An optional description of the metric. Use this parameter to provide more details about the metric.
  1469. */
  1470. description?: EvaluationMetricDescription;
  1471. /**
  1472. * Choose how you want your human workers to evaluation your model. Valid values for rating methods are ThumbsUpDown, IndividualLikertScale,ComparisonLikertScale, ComparisonChoice, and ComparisonRank
  1473. */
  1474. ratingMethod: EvaluationRatingMethod;
  1475. }
  1476. export type HumanEvaluationCustomMetrics = HumanEvaluationCustomMetric[];
  1477. export type HumanTaskInstructions = string;
  1478. export interface HumanWorkflowConfig {
  1479. /**
  1480. * The Amazon Resource Number (ARN) for the flow definition
  1481. */
  1482. flowDefinitionArn: SageMakerFlowDefinitionArn;
  1483. /**
  1484. * Instructions for the flow definition
  1485. */
  1486. instructions?: HumanTaskInstructions;
  1487. }
  1488. export type IdempotencyToken = string;
  1489. export type InferenceType = "ON_DEMAND"|"PROVISIONED"|string;
  1490. export type InferenceTypeList = InferenceType[];
  1491. export type JobName = string;
  1492. export type KeyPrefix = string;
  1493. export type KmsKeyArn = string;
  1494. export type KmsKeyId = string;
  1495. export interface ListCustomModelsRequest {
  1496. /**
  1497. * Return custom models created before the specified time.
  1498. */
  1499. creationTimeBefore?: Timestamp;
  1500. /**
  1501. * Return custom models created after the specified time.
  1502. */
  1503. creationTimeAfter?: Timestamp;
  1504. /**
  1505. * Return custom models only if the job name contains these characters.
  1506. */
  1507. nameContains?: CustomModelName;
  1508. /**
  1509. * Return custom models only if the base model Amazon Resource Name (ARN) matches this parameter.
  1510. */
  1511. baseModelArnEquals?: ModelArn;
  1512. /**
  1513. * Return custom models only if the foundation model Amazon Resource Name (ARN) matches this parameter.
  1514. */
  1515. foundationModelArnEquals?: FoundationModelArn;
  1516. /**
  1517. * Maximum number of results to return in the response.
  1518. */
  1519. maxResults?: MaxResults;
  1520. /**
  1521. * Continuation token from the previous response, for Amazon Bedrock to list the next set of results.
  1522. */
  1523. nextToken?: PaginationToken;
  1524. /**
  1525. * The field to sort by in the returned list of models.
  1526. */
  1527. sortBy?: SortModelsBy;
  1528. /**
  1529. * The sort order of the results.
  1530. */
  1531. sortOrder?: SortOrder;
  1532. }
  1533. export interface ListCustomModelsResponse {
  1534. /**
  1535. * Continuation token for the next request to list the next set of results.
  1536. */
  1537. nextToken?: PaginationToken;
  1538. /**
  1539. * Model summaries.
  1540. */
  1541. modelSummaries?: CustomModelSummaryList;
  1542. }
  1543. export interface ListEvaluationJobsRequest {
  1544. /**
  1545. * A filter that includes model evaluation jobs created after the time specified.
  1546. */
  1547. creationTimeAfter?: Timestamp;
  1548. /**
  1549. * A filter that includes model evaluation jobs created prior to the time specified.
  1550. */
  1551. creationTimeBefore?: Timestamp;
  1552. /**
  1553. * Only return jobs where the status condition is met.
  1554. */
  1555. statusEquals?: EvaluationJobStatus;
  1556. /**
  1557. * Query parameter string for model evaluation job names.
  1558. */
  1559. nameContains?: EvaluationJobName;
  1560. /**
  1561. * The maximum number of results to return.
  1562. */
  1563. maxResults?: MaxResults;
  1564. /**
  1565. * Continuation token from the previous response, for Amazon Bedrock to list the next set of results.
  1566. */
  1567. nextToken?: PaginationToken;
  1568. /**
  1569. * Allows you to sort model evaluation jobs by when they were created.
  1570. */
  1571. sortBy?: SortJobsBy;
  1572. /**
  1573. * How you want the order of jobs sorted.
  1574. */
  1575. sortOrder?: SortOrder;
  1576. }
  1577. export interface ListEvaluationJobsResponse {
  1578. /**
  1579. * Continuation token from the previous response, for Amazon Bedrock to list the next set of results.
  1580. */
  1581. nextToken?: PaginationToken;
  1582. /**
  1583. * A summary of the model evaluation jobs.
  1584. */
  1585. jobSummaries?: EvaluationSummaries;
  1586. }
  1587. export interface ListFoundationModelsRequest {
  1588. /**
  1589. * Return models belonging to the model provider that you specify.
  1590. */
  1591. byProvider?: Provider;
  1592. /**
  1593. * Return models that support the customization type that you specify. For more information, see Custom models in the Amazon Bedrock User Guide.
  1594. */
  1595. byCustomizationType?: ModelCustomization;
  1596. /**
  1597. * Return models that support the output modality that you specify.
  1598. */
  1599. byOutputModality?: ModelModality;
  1600. /**
  1601. * Return models that support the inference type that you specify. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
  1602. */
  1603. byInferenceType?: InferenceType;
  1604. }
  1605. export interface ListFoundationModelsResponse {
  1606. /**
  1607. * A list of Amazon Bedrock foundation models.
  1608. */
  1609. modelSummaries?: FoundationModelSummaryList;
  1610. }
  1611. export interface ListGuardrailsRequest {
  1612. /**
  1613. * The unique identifier of the guardrail.
  1614. */
  1615. guardrailIdentifier?: GuardrailIdentifier;
  1616. /**
  1617. * The maximum number of results to return in the response.
  1618. */
  1619. maxResults?: MaxResults;
  1620. /**
  1621. * If there are more results than were returned in the response, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.
  1622. */
  1623. nextToken?: PaginationToken;
  1624. }
  1625. export interface ListGuardrailsResponse {
  1626. /**
  1627. * A list of objects, each of which contains details about a guardrail.
  1628. */
  1629. guardrails: GuardrailSummaries;
  1630. /**
  1631. * If there are more results than were returned in the response, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.
  1632. */
  1633. nextToken?: PaginationToken;
  1634. }
  1635. export interface ListModelCustomizationJobsRequest {
  1636. /**
  1637. * Return customization jobs created after the specified time.
  1638. */
  1639. creationTimeAfter?: Timestamp;
  1640. /**
  1641. * Return customization jobs created before the specified time.
  1642. */
  1643. creationTimeBefore?: Timestamp;
  1644. /**
  1645. * Return customization jobs with the specified status.
  1646. */
  1647. statusEquals?: FineTuningJobStatus;
  1648. /**
  1649. * Return customization jobs only if the job name contains these characters.
  1650. */
  1651. nameContains?: JobName;
  1652. /**
  1653. * Maximum number of results to return in the response.
  1654. */
  1655. maxResults?: MaxResults;
  1656. /**
  1657. * Continuation token from the previous response, for Amazon Bedrock to list the next set of results.
  1658. */
  1659. nextToken?: PaginationToken;
  1660. /**
  1661. * The field to sort by in the returned list of jobs.
  1662. */
  1663. sortBy?: SortJobsBy;
  1664. /**
  1665. * The sort order of the results.
  1666. */
  1667. sortOrder?: SortOrder;
  1668. }
  1669. export interface ListModelCustomizationJobsResponse {
  1670. /**
  1671. * Page continuation token to use in the next request.
  1672. */
  1673. nextToken?: PaginationToken;
  1674. /**
  1675. * Job summaries.
  1676. */
  1677. modelCustomizationJobSummaries?: ModelCustomizationJobSummaries;
  1678. }
  1679. export interface ListProvisionedModelThroughputsRequest {
  1680. /**
  1681. * A filter that returns Provisioned Throughputs created after the specified time.
  1682. */
  1683. creationTimeAfter?: Timestamp;
  1684. /**
  1685. * A filter that returns Provisioned Throughputs created before the specified time.
  1686. */
  1687. creationTimeBefore?: Timestamp;
  1688. /**
  1689. * A filter that returns Provisioned Throughputs if their statuses matches the value that you specify.
  1690. */
  1691. statusEquals?: ProvisionedModelStatus;
  1692. /**
  1693. * A filter that returns Provisioned Throughputs whose model Amazon Resource Name (ARN) is equal to the value that you specify.
  1694. */
  1695. modelArnEquals?: ModelArn;
  1696. /**
  1697. * A filter that returns Provisioned Throughputs if their name contains the expression that you specify.
  1698. */
  1699. nameContains?: ProvisionedModelName;
  1700. /**
  1701. * THe maximum number of results to return in the response. If there are more results than the number you specified, the response returns a nextToken value. To see the next batch of results, send the nextToken value in another list request.
  1702. */
  1703. maxResults?: MaxResults;
  1704. /**
  1705. * If there are more results than the number you specified in the maxResults field, the response returns a nextToken value. To see the next batch of results, specify the nextToken value in this field.
  1706. */
  1707. nextToken?: PaginationToken;
  1708. /**
  1709. * The field by which to sort the returned list of Provisioned Throughputs.
  1710. */
  1711. sortBy?: SortByProvisionedModels;
  1712. /**
  1713. * The sort order of the results.
  1714. */
  1715. sortOrder?: SortOrder;
  1716. }
  1717. export interface ListProvisionedModelThroughputsResponse {
  1718. /**
  1719. * If there are more results than the number you specified in the maxResults field, this value is returned. To see the next batch of results, include this value in the nextToken field in another list request.
  1720. */
  1721. nextToken?: PaginationToken;
  1722. /**
  1723. * A list of summaries, one for each Provisioned Throughput in the response.
  1724. */
  1725. provisionedModelSummaries?: ProvisionedModelSummaries;
  1726. }
  1727. export interface ListTagsForResourceRequest {
  1728. /**
  1729. * The Amazon Resource Name (ARN) of the resource.
  1730. */
  1731. resourceARN: TaggableResourcesArn;
  1732. }
  1733. export interface ListTagsForResourceResponse {
  1734. /**
  1735. * An array of the tags associated with this resource.
  1736. */
  1737. tags?: TagList;
  1738. }
  1739. export type LogGroupName = string;
  1740. export interface LoggingConfig {
  1741. /**
  1742. * CloudWatch logging configuration.
  1743. */
  1744. cloudWatchConfig?: CloudWatchConfig;
  1745. /**
  1746. * S3 configuration for storing log data.
  1747. */
  1748. s3Config?: S3Config;
  1749. /**
  1750. * Set to include text data in the log delivery.
  1751. */
  1752. textDataDeliveryEnabled?: Boolean;
  1753. /**
  1754. * Set to include image data in the log delivery.
  1755. */
  1756. imageDataDeliveryEnabled?: Boolean;
  1757. /**
  1758. * Set to include embeddings data in the log delivery.
  1759. */
  1760. embeddingDataDeliveryEnabled?: Boolean;
  1761. }
  1762. export type MaxResults = number;
  1763. export type MetricFloat = number;
  1764. export type ModelArn = string;
  1765. export type ModelCustomization = "FINE_TUNING"|"CONTINUED_PRE_TRAINING"|string;
  1766. export type ModelCustomizationHyperParameters = {[key: string]: String};
  1767. export type ModelCustomizationJobArn = string;
  1768. export type ModelCustomizationJobIdentifier = string;
  1769. export type ModelCustomizationJobStatus = "InProgress"|"Completed"|"Failed"|"Stopping"|"Stopped"|string;
  1770. export type ModelCustomizationJobSummaries = ModelCustomizationJobSummary[];
  1771. export interface ModelCustomizationJobSummary {
  1772. /**
  1773. * Amazon Resource Name (ARN) of the customization job.
  1774. */
  1775. jobArn: ModelCustomizationJobArn;
  1776. /**
  1777. * Amazon Resource Name (ARN) of the base model.
  1778. */
  1779. baseModelArn: ModelArn;
  1780. /**
  1781. * Name of the customization job.
  1782. */
  1783. jobName: JobName;
  1784. /**
  1785. * Status of the customization job.
  1786. */
  1787. status: ModelCustomizationJobStatus;
  1788. /**
  1789. * Time that the customization job was last modified.
  1790. */
  1791. lastModifiedTime?: Timestamp;
  1792. /**
  1793. * Creation time of the custom model.
  1794. */
  1795. creationTime: Timestamp;
  1796. /**
  1797. * Time that the customization job ended.
  1798. */
  1799. endTime?: Timestamp;
  1800. /**
  1801. * Amazon Resource Name (ARN) of the custom model.
  1802. */
  1803. customModelArn?: CustomModelArn;
  1804. /**
  1805. * Name of the custom model.
  1806. */
  1807. customModelName?: CustomModelName;
  1808. /**
  1809. * Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models.
  1810. */
  1811. customizationType?: CustomizationType;
  1812. }
  1813. export type ModelCustomizationList = ModelCustomization[];
  1814. export type ModelIdentifier = string;
  1815. export type ModelModality = "TEXT"|"IMAGE"|"EMBEDDING"|string;
  1816. export type ModelModalityList = ModelModality[];
  1817. export type ModelName = string;
  1818. export interface OutputDataConfig {
  1819. /**
  1820. * The S3 URI where the output data is stored.
  1821. */
  1822. s3Uri: S3Uri;
  1823. }
  1824. export type PaginationToken = string;
  1825. export type PositiveInteger = number;
  1826. export type Provider = string;
  1827. export type ProvisionedModelArn = string;
  1828. export type ProvisionedModelId = string;
  1829. export type ProvisionedModelName = string;
  1830. export type ProvisionedModelStatus = "Creating"|"InService"|"Updating"|"Failed"|string;
  1831. export type ProvisionedModelSummaries = ProvisionedModelSummary[];
  1832. export interface ProvisionedModelSummary {
  1833. /**
  1834. * The name of the Provisioned Throughput.
  1835. */
  1836. provisionedModelName: ProvisionedModelName;
  1837. /**
  1838. * The Amazon Resource Name (ARN) of the Provisioned Throughput.
  1839. */
  1840. provisionedModelArn: ProvisionedModelArn;
  1841. /**
  1842. * The Amazon Resource Name (ARN) of the model associated with the Provisioned Throughput.
  1843. */
  1844. modelArn: ModelArn;
  1845. /**
  1846. * The Amazon Resource Name (ARN) of the model requested to be associated to this Provisioned Throughput. This value differs from the modelArn if updating hasn't completed.
  1847. */
  1848. desiredModelArn: ModelArn;
  1849. /**
  1850. * The Amazon Resource Name (ARN) of the base model for which the Provisioned Throughput was created, or of the base model that the custom model for which the Provisioned Throughput was created was customized.
  1851. */
  1852. foundationModelArn: FoundationModelArn;
  1853. /**
  1854. * The number of model units allocated to the Provisioned Throughput.
  1855. */
  1856. modelUnits: PositiveInteger;
  1857. /**
  1858. * The number of model units that was requested to be allocated to the Provisioned Throughput.
  1859. */
  1860. desiredModelUnits: PositiveInteger;
  1861. /**
  1862. * The status of the Provisioned Throughput.
  1863. */
  1864. status: ProvisionedModelStatus;
  1865. /**
  1866. * The duration for which the Provisioned Throughput was committed.
  1867. */
  1868. commitmentDuration?: CommitmentDuration;
  1869. /**
  1870. * The timestamp for when the commitment term of the Provisioned Throughput expires.
  1871. */
  1872. commitmentExpirationTime?: Timestamp;
  1873. /**
  1874. * The time that the Provisioned Throughput was created.
  1875. */
  1876. creationTime: Timestamp;
  1877. /**
  1878. * The time that the Provisioned Throughput was last modified.
  1879. */
  1880. lastModifiedTime: Timestamp;
  1881. }
  1882. export interface PutModelInvocationLoggingConfigurationRequest {
  1883. /**
  1884. * The logging configuration values to set.
  1885. */
  1886. loggingConfig: LoggingConfig;
  1887. }
  1888. export interface PutModelInvocationLoggingConfigurationResponse {
  1889. }
  1890. export type RoleArn = string;
  1891. export interface S3Config {
  1892. /**
  1893. * S3 bucket name.
  1894. */
  1895. bucketName: BucketName;
  1896. /**
  1897. * S3 prefix.
  1898. */
  1899. keyPrefix?: KeyPrefix;
  1900. }
  1901. export type S3Uri = string;
  1902. export type SageMakerFlowDefinitionArn = string;
  1903. export type SecurityGroupId = string;
  1904. export type SecurityGroupIds = SecurityGroupId[];
  1905. export type SortByProvisionedModels = "CreationTime"|string;
  1906. export type SortJobsBy = "CreationTime"|string;
  1907. export type SortModelsBy = "CreationTime"|string;
  1908. export type SortOrder = "Ascending"|"Descending"|string;
  1909. export interface StopEvaluationJobRequest {
  1910. /**
  1911. * The ARN of the model evaluation job you want to stop.
  1912. */
  1913. jobIdentifier: EvaluationJobIdentifier;
  1914. }
  1915. export interface StopEvaluationJobResponse {
  1916. }
  1917. export interface StopModelCustomizationJobRequest {
  1918. /**
  1919. * Job identifier of the job to stop.
  1920. */
  1921. jobIdentifier: ModelCustomizationJobIdentifier;
  1922. }
  1923. export interface StopModelCustomizationJobResponse {
  1924. }
  1925. export type String = string;
  1926. export type SubnetId = string;
  1927. export type SubnetIds = SubnetId[];
  1928. export interface Tag {
  1929. /**
  1930. * Key for the tag.
  1931. */
  1932. key: TagKey;
  1933. /**
  1934. * Value for the tag.
  1935. */
  1936. value: TagValue;
  1937. }
  1938. export type TagKey = string;
  1939. export type TagKeyList = TagKey[];
  1940. export type TagList = Tag[];
  1941. export interface TagResourceRequest {
  1942. /**
  1943. * The Amazon Resource Name (ARN) of the resource to tag.
  1944. */
  1945. resourceARN: TaggableResourcesArn;
  1946. /**
  1947. * Tags to associate with the resource.
  1948. */
  1949. tags: TagList;
  1950. }
  1951. export interface TagResourceResponse {
  1952. }
  1953. export type TagValue = string;
  1954. export type TaggableResourcesArn = string;
  1955. export type Timestamp = Date;
  1956. export interface TrainingDataConfig {
  1957. /**
  1958. * The S3 URI where the training data is stored.
  1959. */
  1960. s3Uri: S3Uri;
  1961. }
  1962. export interface TrainingMetrics {
  1963. /**
  1964. * Loss metric associated with the custom job.
  1965. */
  1966. trainingLoss?: MetricFloat;
  1967. }
  1968. export interface UntagResourceRequest {
  1969. /**
  1970. * The Amazon Resource Name (ARN) of the resource to untag.
  1971. */
  1972. resourceARN: TaggableResourcesArn;
  1973. /**
  1974. * Tag keys of the tags to remove from the resource.
  1975. */
  1976. tagKeys: TagKeyList;
  1977. }
  1978. export interface UntagResourceResponse {
  1979. }
  1980. export interface UpdateGuardrailRequest {
  1981. /**
  1982. * The unique identifier of the guardrail
  1983. */
  1984. guardrailIdentifier: GuardrailIdentifier;
  1985. /**
  1986. * A name for the guardrail.
  1987. */
  1988. name: GuardrailName;
  1989. /**
  1990. * A description of the guardrail.
  1991. */
  1992. description?: GuardrailDescription;
  1993. /**
  1994. * The topic policy to configure for the guardrail.
  1995. */
  1996. topicPolicyConfig?: GuardrailTopicPolicyConfig;
  1997. /**
  1998. * The content policy to configure for the guardrail.
  1999. */
  2000. contentPolicyConfig?: GuardrailContentPolicyConfig;
  2001. /**
  2002. * The word policy to configure for the guardrail.
  2003. */
  2004. wordPolicyConfig?: GuardrailWordPolicyConfig;
  2005. /**
  2006. * The sensitive information policy to configure for the guardrail.
  2007. */
  2008. sensitiveInformationPolicyConfig?: GuardrailSensitiveInformationPolicyConfig;
  2009. /**
  2010. * The message to return when the guardrail blocks a prompt.
  2011. */
  2012. blockedInputMessaging: GuardrailBlockedMessaging;
  2013. /**
  2014. * The message to return when the guardrail blocks a model response.
  2015. */
  2016. blockedOutputsMessaging: GuardrailBlockedMessaging;
  2017. /**
  2018. * The ARN of the KMS key with which to encrypt the guardrail.
  2019. */
  2020. kmsKeyId?: KmsKeyId;
  2021. }
  2022. export interface UpdateGuardrailResponse {
  2023. /**
  2024. * The unique identifier of the guardrail
  2025. */
  2026. guardrailId: GuardrailId;
  2027. /**
  2028. * The ARN of the guardrail that was created.
  2029. */
  2030. guardrailArn: GuardrailArn;
  2031. /**
  2032. * The version of the guardrail.
  2033. */
  2034. version: GuardrailDraftVersion;
  2035. /**
  2036. * The date and time at which the guardrail was updated.
  2037. */
  2038. updatedAt: Timestamp;
  2039. }
  2040. export interface UpdateProvisionedModelThroughputRequest {
  2041. /**
  2042. * The Amazon Resource Name (ARN) or name of the Provisioned Throughput to update.
  2043. */
  2044. provisionedModelId: ProvisionedModelId;
  2045. /**
  2046. * The new name for this Provisioned Throughput.
  2047. */
  2048. desiredProvisionedModelName?: ProvisionedModelName;
  2049. /**
  2050. * The Amazon Resource Name (ARN) of the new model to associate with this Provisioned Throughput. You can't specify this field if this Provisioned Throughput is associated with a base model. If this Provisioned Throughput is associated with a custom model, you can specify one of the following options: The base model from which the custom model was customized. Another custom model that was customized from the same base model as the custom model.
  2051. */
  2052. desiredModelId?: ModelIdentifier;
  2053. }
  2054. export interface UpdateProvisionedModelThroughputResponse {
  2055. }
  2056. export interface ValidationDataConfig {
  2057. /**
  2058. * Information about the validators.
  2059. */
  2060. validators: Validators;
  2061. }
  2062. export type ValidationMetrics = ValidatorMetric[];
  2063. export interface Validator {
  2064. /**
  2065. * The S3 URI where the validation data is stored.
  2066. */
  2067. s3Uri: S3Uri;
  2068. }
  2069. export interface ValidatorMetric {
  2070. /**
  2071. * The validation loss associated with this validator.
  2072. */
  2073. validationLoss?: MetricFloat;
  2074. }
  2075. export type Validators = Validator[];
  2076. export interface VpcConfig {
  2077. /**
  2078. * VPC configuration subnets.
  2079. */
  2080. subnetIds: SubnetIds;
  2081. /**
  2082. * VPC configuration security group Ids.
  2083. */
  2084. securityGroupIds: SecurityGroupIds;
  2085. }
  2086. /**
  2087. * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
  2088. */
  2089. export type apiVersion = "2023-04-20"|"latest"|string;
  2090. export interface ClientApiVersions {
  2091. /**
  2092. * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
  2093. */
  2094. apiVersion?: apiVersion;
  2095. }
  2096. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  2097. /**
  2098. * Contains interfaces for use with the Bedrock client.
  2099. */
  2100. export import Types = Bedrock;
  2101. }
  2102. export = Bedrock;