braket.d.ts 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962
  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 Braket extends Service {
  9. /**
  10. * Constructs a service object. This object has one method for each API operation.
  11. */
  12. constructor(options?: Braket.Types.ClientConfiguration)
  13. config: Config & Braket.Types.ClientConfiguration;
  14. /**
  15. * Cancels an Amazon Braket job.
  16. */
  17. cancelJob(params: Braket.Types.CancelJobRequest, callback?: (err: AWSError, data: Braket.Types.CancelJobResponse) => void): Request<Braket.Types.CancelJobResponse, AWSError>;
  18. /**
  19. * Cancels an Amazon Braket job.
  20. */
  21. cancelJob(callback?: (err: AWSError, data: Braket.Types.CancelJobResponse) => void): Request<Braket.Types.CancelJobResponse, AWSError>;
  22. /**
  23. * Cancels the specified task.
  24. */
  25. cancelQuantumTask(params: Braket.Types.CancelQuantumTaskRequest, callback?: (err: AWSError, data: Braket.Types.CancelQuantumTaskResponse) => void): Request<Braket.Types.CancelQuantumTaskResponse, AWSError>;
  26. /**
  27. * Cancels the specified task.
  28. */
  29. cancelQuantumTask(callback?: (err: AWSError, data: Braket.Types.CancelQuantumTaskResponse) => void): Request<Braket.Types.CancelQuantumTaskResponse, AWSError>;
  30. /**
  31. * Creates an Amazon Braket job.
  32. */
  33. createJob(params: Braket.Types.CreateJobRequest, callback?: (err: AWSError, data: Braket.Types.CreateJobResponse) => void): Request<Braket.Types.CreateJobResponse, AWSError>;
  34. /**
  35. * Creates an Amazon Braket job.
  36. */
  37. createJob(callback?: (err: AWSError, data: Braket.Types.CreateJobResponse) => void): Request<Braket.Types.CreateJobResponse, AWSError>;
  38. /**
  39. * Creates a quantum task.
  40. */
  41. createQuantumTask(params: Braket.Types.CreateQuantumTaskRequest, callback?: (err: AWSError, data: Braket.Types.CreateQuantumTaskResponse) => void): Request<Braket.Types.CreateQuantumTaskResponse, AWSError>;
  42. /**
  43. * Creates a quantum task.
  44. */
  45. createQuantumTask(callback?: (err: AWSError, data: Braket.Types.CreateQuantumTaskResponse) => void): Request<Braket.Types.CreateQuantumTaskResponse, AWSError>;
  46. /**
  47. * Retrieves the devices available in Amazon Braket. For backwards compatibility with older versions of BraketSchemas, OpenQASM information is omitted from GetDevice API calls. To get this information the user-agent needs to present a recent version of the BraketSchemas (1.8.0 or later). The Braket SDK automatically reports this for you. If you do not see OpenQASM results in the GetDevice response when using a Braket SDK, you may need to set AWS_EXECUTION_ENV environment variable to configure user-agent. See the code examples provided below for how to do this for the AWS CLI, Boto3, and the Go, Java, and JavaScript/TypeScript SDKs.
  48. */
  49. getDevice(params: Braket.Types.GetDeviceRequest, callback?: (err: AWSError, data: Braket.Types.GetDeviceResponse) => void): Request<Braket.Types.GetDeviceResponse, AWSError>;
  50. /**
  51. * Retrieves the devices available in Amazon Braket. For backwards compatibility with older versions of BraketSchemas, OpenQASM information is omitted from GetDevice API calls. To get this information the user-agent needs to present a recent version of the BraketSchemas (1.8.0 or later). The Braket SDK automatically reports this for you. If you do not see OpenQASM results in the GetDevice response when using a Braket SDK, you may need to set AWS_EXECUTION_ENV environment variable to configure user-agent. See the code examples provided below for how to do this for the AWS CLI, Boto3, and the Go, Java, and JavaScript/TypeScript SDKs.
  52. */
  53. getDevice(callback?: (err: AWSError, data: Braket.Types.GetDeviceResponse) => void): Request<Braket.Types.GetDeviceResponse, AWSError>;
  54. /**
  55. * Retrieves the specified Amazon Braket job.
  56. */
  57. getJob(params: Braket.Types.GetJobRequest, callback?: (err: AWSError, data: Braket.Types.GetJobResponse) => void): Request<Braket.Types.GetJobResponse, AWSError>;
  58. /**
  59. * Retrieves the specified Amazon Braket job.
  60. */
  61. getJob(callback?: (err: AWSError, data: Braket.Types.GetJobResponse) => void): Request<Braket.Types.GetJobResponse, AWSError>;
  62. /**
  63. * Retrieves the specified quantum task.
  64. */
  65. getQuantumTask(params: Braket.Types.GetQuantumTaskRequest, callback?: (err: AWSError, data: Braket.Types.GetQuantumTaskResponse) => void): Request<Braket.Types.GetQuantumTaskResponse, AWSError>;
  66. /**
  67. * Retrieves the specified quantum task.
  68. */
  69. getQuantumTask(callback?: (err: AWSError, data: Braket.Types.GetQuantumTaskResponse) => void): Request<Braket.Types.GetQuantumTaskResponse, AWSError>;
  70. /**
  71. * Shows the tags associated with this resource.
  72. */
  73. listTagsForResource(params: Braket.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: Braket.Types.ListTagsForResourceResponse) => void): Request<Braket.Types.ListTagsForResourceResponse, AWSError>;
  74. /**
  75. * Shows the tags associated with this resource.
  76. */
  77. listTagsForResource(callback?: (err: AWSError, data: Braket.Types.ListTagsForResourceResponse) => void): Request<Braket.Types.ListTagsForResourceResponse, AWSError>;
  78. /**
  79. * Searches for devices using the specified filters.
  80. */
  81. searchDevices(params: Braket.Types.SearchDevicesRequest, callback?: (err: AWSError, data: Braket.Types.SearchDevicesResponse) => void): Request<Braket.Types.SearchDevicesResponse, AWSError>;
  82. /**
  83. * Searches for devices using the specified filters.
  84. */
  85. searchDevices(callback?: (err: AWSError, data: Braket.Types.SearchDevicesResponse) => void): Request<Braket.Types.SearchDevicesResponse, AWSError>;
  86. /**
  87. * Searches for Amazon Braket jobs that match the specified filter values.
  88. */
  89. searchJobs(params: Braket.Types.SearchJobsRequest, callback?: (err: AWSError, data: Braket.Types.SearchJobsResponse) => void): Request<Braket.Types.SearchJobsResponse, AWSError>;
  90. /**
  91. * Searches for Amazon Braket jobs that match the specified filter values.
  92. */
  93. searchJobs(callback?: (err: AWSError, data: Braket.Types.SearchJobsResponse) => void): Request<Braket.Types.SearchJobsResponse, AWSError>;
  94. /**
  95. * Searches for tasks that match the specified filter values.
  96. */
  97. searchQuantumTasks(params: Braket.Types.SearchQuantumTasksRequest, callback?: (err: AWSError, data: Braket.Types.SearchQuantumTasksResponse) => void): Request<Braket.Types.SearchQuantumTasksResponse, AWSError>;
  98. /**
  99. * Searches for tasks that match the specified filter values.
  100. */
  101. searchQuantumTasks(callback?: (err: AWSError, data: Braket.Types.SearchQuantumTasksResponse) => void): Request<Braket.Types.SearchQuantumTasksResponse, AWSError>;
  102. /**
  103. * Add a tag to the specified resource.
  104. */
  105. tagResource(params: Braket.Types.TagResourceRequest, callback?: (err: AWSError, data: Braket.Types.TagResourceResponse) => void): Request<Braket.Types.TagResourceResponse, AWSError>;
  106. /**
  107. * Add a tag to the specified resource.
  108. */
  109. tagResource(callback?: (err: AWSError, data: Braket.Types.TagResourceResponse) => void): Request<Braket.Types.TagResourceResponse, AWSError>;
  110. /**
  111. * Remove tags from a resource.
  112. */
  113. untagResource(params: Braket.Types.UntagResourceRequest, callback?: (err: AWSError, data: Braket.Types.UntagResourceResponse) => void): Request<Braket.Types.UntagResourceResponse, AWSError>;
  114. /**
  115. * Remove tags from a resource.
  116. */
  117. untagResource(callback?: (err: AWSError, data: Braket.Types.UntagResourceResponse) => void): Request<Braket.Types.UntagResourceResponse, AWSError>;
  118. }
  119. declare namespace Braket {
  120. export interface AlgorithmSpecification {
  121. /**
  122. * The container image used to create an Amazon Braket job.
  123. */
  124. containerImage?: ContainerImage;
  125. /**
  126. * Configures the paths to the Python scripts used for entry and training.
  127. */
  128. scriptModeConfig?: ScriptModeConfig;
  129. }
  130. export interface Association {
  131. /**
  132. * The Amazon Braket resource arn.
  133. */
  134. arn: BraketResourceArn;
  135. /**
  136. * The association type for the specified Amazon Braket resource arn.
  137. */
  138. type: AssociationType;
  139. }
  140. export type AssociationType = "RESERVATION_TIME_WINDOW_ARN"|string;
  141. export type Associations = Association[];
  142. export type BraketResourceArn = string;
  143. export interface CancelJobRequest {
  144. /**
  145. * The ARN of the Amazon Braket job to cancel.
  146. */
  147. jobArn: JobArn;
  148. }
  149. export interface CancelJobResponse {
  150. /**
  151. * The status of the job cancellation request.
  152. */
  153. cancellationStatus: CancellationStatus;
  154. /**
  155. * The ARN of the Amazon Braket job.
  156. */
  157. jobArn: JobArn;
  158. }
  159. export interface CancelQuantumTaskRequest {
  160. /**
  161. * The client token associated with the request.
  162. */
  163. clientToken: String64;
  164. /**
  165. * The ARN of the task to cancel.
  166. */
  167. quantumTaskArn: QuantumTaskArn;
  168. }
  169. export interface CancelQuantumTaskResponse {
  170. /**
  171. * The status of the cancellation request.
  172. */
  173. cancellationStatus: CancellationStatus;
  174. /**
  175. * The ARN of the task.
  176. */
  177. quantumTaskArn: QuantumTaskArn;
  178. }
  179. export type CancellationStatus = "CANCELLING"|"CANCELLED"|string;
  180. export type CompressionType = "NONE"|"GZIP"|string;
  181. export interface ContainerImage {
  182. /**
  183. * The URI locating the container image.
  184. */
  185. uri: Uri;
  186. }
  187. export interface CreateJobRequest {
  188. /**
  189. * Definition of the Amazon Braket job to be created. Specifies the container image the job uses and information about the Python scripts used for entry and training.
  190. */
  191. algorithmSpecification: AlgorithmSpecification;
  192. /**
  193. * The list of Amazon Braket resources associated with the hybrid job.
  194. */
  195. associations?: CreateJobRequestAssociationsList;
  196. /**
  197. * Information about the output locations for job checkpoint data.
  198. */
  199. checkpointConfig?: JobCheckpointConfig;
  200. /**
  201. * A unique token that guarantees that the call to this API is idempotent.
  202. */
  203. clientToken: String64;
  204. /**
  205. * The quantum processing unit (QPU) or simulator used to create an Amazon Braket job.
  206. */
  207. deviceConfig: DeviceConfig;
  208. /**
  209. * Algorithm-specific parameters used by an Amazon Braket job that influence the quality of the training job. The values are set with a string of JSON key:value pairs, where the key is the name of the hyperparameter and the value is the value of th hyperparameter.
  210. */
  211. hyperParameters?: HyperParameters;
  212. /**
  213. * A list of parameters that specify the name and type of input data and where it is located.
  214. */
  215. inputDataConfig?: CreateJobRequestInputDataConfigList;
  216. /**
  217. * Configuration of the resource instances to use while running the hybrid job on Amazon Braket.
  218. */
  219. instanceConfig: InstanceConfig;
  220. /**
  221. * The name of the Amazon Braket job.
  222. */
  223. jobName: CreateJobRequestJobNameString;
  224. /**
  225. * The path to the S3 location where you want to store job artifacts and the encryption key used to store them.
  226. */
  227. outputDataConfig: JobOutputDataConfig;
  228. /**
  229. * The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to perform tasks on behalf of a user. It can access user resources, run an Amazon Braket job container on behalf of user, and output resources to the users' s3 buckets.
  230. */
  231. roleArn: RoleArn;
  232. /**
  233. * The user-defined criteria that specifies when a job stops running.
  234. */
  235. stoppingCondition?: JobStoppingCondition;
  236. /**
  237. * A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
  238. */
  239. tags?: TagsMap;
  240. }
  241. export type CreateJobRequestAssociationsList = Association[];
  242. export type CreateJobRequestInputDataConfigList = InputFileConfig[];
  243. export type CreateJobRequestJobNameString = string;
  244. export interface CreateJobResponse {
  245. /**
  246. * The ARN of the Amazon Braket job created.
  247. */
  248. jobArn: JobArn;
  249. }
  250. export interface CreateQuantumTaskRequest {
  251. /**
  252. * The action associated with the task.
  253. */
  254. action: JsonValue;
  255. /**
  256. * The list of Amazon Braket resources associated with the quantum task.
  257. */
  258. associations?: CreateQuantumTaskRequestAssociationsList;
  259. /**
  260. * The client token associated with the request.
  261. */
  262. clientToken: String64;
  263. /**
  264. * The ARN of the device to run the task on.
  265. */
  266. deviceArn: DeviceArn;
  267. /**
  268. * The parameters for the device to run the task on.
  269. */
  270. deviceParameters?: CreateQuantumTaskRequestDeviceParametersString;
  271. /**
  272. * The token for an Amazon Braket job that associates it with the quantum task.
  273. */
  274. jobToken?: JobToken;
  275. /**
  276. * The S3 bucket to store task result files in.
  277. */
  278. outputS3Bucket: CreateQuantumTaskRequestOutputS3BucketString;
  279. /**
  280. * The key prefix for the location in the S3 bucket to store task results in.
  281. */
  282. outputS3KeyPrefix: CreateQuantumTaskRequestOutputS3KeyPrefixString;
  283. /**
  284. * The number of shots to use for the task.
  285. */
  286. shots: CreateQuantumTaskRequestShotsLong;
  287. /**
  288. * Tags to be added to the quantum task you're creating.
  289. */
  290. tags?: TagsMap;
  291. }
  292. export type CreateQuantumTaskRequestAssociationsList = Association[];
  293. export type CreateQuantumTaskRequestDeviceParametersString = string;
  294. export type CreateQuantumTaskRequestOutputS3BucketString = string;
  295. export type CreateQuantumTaskRequestOutputS3KeyPrefixString = string;
  296. export type CreateQuantumTaskRequestShotsLong = number;
  297. export interface CreateQuantumTaskResponse {
  298. /**
  299. * The ARN of the task created by the request.
  300. */
  301. quantumTaskArn: QuantumTaskArn;
  302. }
  303. export interface DataSource {
  304. /**
  305. * Information about the data stored in Amazon S3 used by the Amazon Braket job.
  306. */
  307. s3DataSource: S3DataSource;
  308. }
  309. export type DeviceArn = string;
  310. export interface DeviceConfig {
  311. /**
  312. * The primary quantum processing unit (QPU) or simulator used to create and run an Amazon Braket job.
  313. */
  314. device: String256;
  315. }
  316. export interface DeviceQueueInfo {
  317. /**
  318. * The name of the queue.
  319. */
  320. queue: QueueName;
  321. /**
  322. * Optional. Specifies the priority of the queue. Tasks in a priority queue are processed before the tasks in a normal queue.
  323. */
  324. queuePriority?: QueuePriority;
  325. /**
  326. * The number of jobs or tasks in the queue for a given device.
  327. */
  328. queueSize: String;
  329. }
  330. export type DeviceQueueInfoList = DeviceQueueInfo[];
  331. export type DeviceStatus = "ONLINE"|"OFFLINE"|"RETIRED"|string;
  332. export interface DeviceSummary {
  333. /**
  334. * The ARN of the device.
  335. */
  336. deviceArn: DeviceArn;
  337. /**
  338. * The name of the device.
  339. */
  340. deviceName: String;
  341. /**
  342. * The status of the device.
  343. */
  344. deviceStatus: DeviceStatus;
  345. /**
  346. * The type of the device.
  347. */
  348. deviceType: DeviceType;
  349. /**
  350. * The provider of the device.
  351. */
  352. providerName: String;
  353. }
  354. export type DeviceSummaryList = DeviceSummary[];
  355. export type DeviceType = "QPU"|"SIMULATOR"|string;
  356. export interface GetDeviceRequest {
  357. /**
  358. * The ARN of the device to retrieve.
  359. */
  360. deviceArn: DeviceArn;
  361. }
  362. export interface GetDeviceResponse {
  363. /**
  364. * The ARN of the device.
  365. */
  366. deviceArn: DeviceArn;
  367. /**
  368. * Details about the capabilities of the device.
  369. */
  370. deviceCapabilities: JsonValue;
  371. /**
  372. * The name of the device.
  373. */
  374. deviceName: String;
  375. /**
  376. * List of information about tasks and jobs queued on a device.
  377. */
  378. deviceQueueInfo?: DeviceQueueInfoList;
  379. /**
  380. * The status of the device.
  381. */
  382. deviceStatus: DeviceStatus;
  383. /**
  384. * The type of the device.
  385. */
  386. deviceType: DeviceType;
  387. /**
  388. * The name of the partner company for the device.
  389. */
  390. providerName: String;
  391. }
  392. export interface GetJobRequest {
  393. /**
  394. * A list of attributes to return information for.
  395. */
  396. additionalAttributeNames?: HybridJobAdditionalAttributeNamesList;
  397. /**
  398. * The ARN of the job to retrieve.
  399. */
  400. jobArn: JobArn;
  401. }
  402. export interface GetJobResponse {
  403. /**
  404. * Definition of the Amazon Braket job created. Specifies the container image the job uses, information about the Python scripts used for entry and training, and the user-defined metrics used to evaluation the job.
  405. */
  406. algorithmSpecification: AlgorithmSpecification;
  407. /**
  408. * The list of Amazon Braket resources associated with the hybrid job.
  409. */
  410. associations?: Associations;
  411. /**
  412. * The billable time the Amazon Braket job used to complete.
  413. */
  414. billableDuration?: Integer;
  415. /**
  416. * Information about the output locations for job checkpoint data.
  417. */
  418. checkpointConfig?: JobCheckpointConfig;
  419. /**
  420. * The date and time that the Amazon Braket job was created.
  421. */
  422. createdAt: SyntheticTimestamp_date_time;
  423. /**
  424. * The quantum processing unit (QPU) or simulator used to run the Amazon Braket job.
  425. */
  426. deviceConfig?: DeviceConfig;
  427. /**
  428. * The date and time that the Amazon Braket job ended.
  429. */
  430. endedAt?: SyntheticTimestamp_date_time;
  431. /**
  432. * Details about the type and time events occurred related to the Amazon Braket job.
  433. */
  434. events?: JobEvents;
  435. /**
  436. * A description of the reason why an Amazon Braket job failed, if it failed.
  437. */
  438. failureReason?: String1024;
  439. /**
  440. * Algorithm-specific parameters used by an Amazon Braket job that influence the quality of the traiing job. The values are set with a string of JSON key:value pairs, where the key is the name of the hyperparameter and the value is the value of th hyperparameter.
  441. */
  442. hyperParameters?: HyperParameters;
  443. /**
  444. * A list of parameters that specify the name and type of input data and where it is located.
  445. */
  446. inputDataConfig?: InputConfigList;
  447. /**
  448. * The resource instances to use while running the hybrid job on Amazon Braket.
  449. */
  450. instanceConfig: InstanceConfig;
  451. /**
  452. * The ARN of the Amazon Braket job.
  453. */
  454. jobArn: JobArn;
  455. /**
  456. * The name of the Amazon Braket job.
  457. */
  458. jobName: GetJobResponseJobNameString;
  459. /**
  460. * The path to the S3 location where job artifacts are stored and the encryption key used to store them there.
  461. */
  462. outputDataConfig: JobOutputDataConfig;
  463. /**
  464. * Queue information for the requested job. Only returned if QueueInfo is specified in the additionalAttributeNames" field in the GetJob API request.
  465. */
  466. queueInfo?: HybridJobQueueInfo;
  467. /**
  468. * The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to perform tasks on behalf of a user. It can access user resources, run an Amazon Braket job container on behalf of user, and output resources to the s3 buckets of a user.
  469. */
  470. roleArn: RoleArn;
  471. /**
  472. * The date and time that the Amazon Braket job was started.
  473. */
  474. startedAt?: SyntheticTimestamp_date_time;
  475. /**
  476. * The status of the Amazon Braket job.
  477. */
  478. status: JobPrimaryStatus;
  479. /**
  480. * The user-defined criteria that specifies when to stop a job running.
  481. */
  482. stoppingCondition?: JobStoppingCondition;
  483. /**
  484. * A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
  485. */
  486. tags?: TagsMap;
  487. }
  488. export type GetJobResponseJobNameString = string;
  489. export interface GetQuantumTaskRequest {
  490. /**
  491. * A list of attributes to return information for.
  492. */
  493. additionalAttributeNames?: QuantumTaskAdditionalAttributeNamesList;
  494. /**
  495. * The ARN of the task to retrieve.
  496. */
  497. quantumTaskArn: QuantumTaskArn;
  498. }
  499. export interface GetQuantumTaskResponse {
  500. /**
  501. * The list of Amazon Braket resources associated with the quantum task.
  502. */
  503. associations?: Associations;
  504. /**
  505. * The time at which the task was created.
  506. */
  507. createdAt: SyntheticTimestamp_date_time;
  508. /**
  509. * The ARN of the device the task was run on.
  510. */
  511. deviceArn: DeviceArn;
  512. /**
  513. * The parameters for the device on which the task ran.
  514. */
  515. deviceParameters: JsonValue;
  516. /**
  517. * The time at which the task ended.
  518. */
  519. endedAt?: SyntheticTimestamp_date_time;
  520. /**
  521. * The reason that a task failed.
  522. */
  523. failureReason?: String;
  524. /**
  525. * The ARN of the Amazon Braket job associated with the quantum task.
  526. */
  527. jobArn?: JobArn;
  528. /**
  529. * The S3 bucket where task results are stored.
  530. */
  531. outputS3Bucket: String;
  532. /**
  533. * The folder in the S3 bucket where task results are stored.
  534. */
  535. outputS3Directory: String;
  536. /**
  537. * The ARN of the task.
  538. */
  539. quantumTaskArn: QuantumTaskArn;
  540. /**
  541. * Queue information for the requested quantum task. Only returned if QueueInfo is specified in the additionalAttributeNames" field in the GetQuantumTask API request.
  542. */
  543. queueInfo?: QuantumTaskQueueInfo;
  544. /**
  545. * The number of shots used in the task.
  546. */
  547. shots: Long;
  548. /**
  549. * The status of the task.
  550. */
  551. status: QuantumTaskStatus;
  552. /**
  553. * The tags that belong to this task.
  554. */
  555. tags?: TagsMap;
  556. }
  557. export type HybridJobAdditionalAttributeName = "QueueInfo"|string;
  558. export type HybridJobAdditionalAttributeNamesList = HybridJobAdditionalAttributeName[];
  559. export interface HybridJobQueueInfo {
  560. /**
  561. * Optional. Provides more information about the queue position. For example, if the job is complete and no longer in the queue, the message field contains that information.
  562. */
  563. message?: String;
  564. /**
  565. * Current position of the job in the jobs queue.
  566. */
  567. position: String;
  568. /**
  569. * The name of the queue.
  570. */
  571. queue: QueueName;
  572. }
  573. export type HyperParameters = {[key: string]: HyperParametersValueString};
  574. export type HyperParametersValueString = string;
  575. export type InputConfigList = InputFileConfig[];
  576. export interface InputFileConfig {
  577. /**
  578. * A named input source that an Amazon Braket job can consume.
  579. */
  580. channelName: InputFileConfigChannelNameString;
  581. /**
  582. * The MIME type of the data.
  583. */
  584. contentType?: String256;
  585. /**
  586. * The location of the channel data.
  587. */
  588. dataSource: DataSource;
  589. }
  590. export type InputFileConfigChannelNameString = string;
  591. export interface InstanceConfig {
  592. /**
  593. * Configures the number of resource instances to use while running an Amazon Braket job on Amazon Braket. The default value is 1.
  594. */
  595. instanceCount?: InstanceConfigInstanceCountInteger;
  596. /**
  597. * Configures the type resource instances to use while running an Amazon Braket hybrid job.
  598. */
  599. instanceType: InstanceType;
  600. /**
  601. * The size of the storage volume, in GB, that user wants to provision.
  602. */
  603. volumeSizeInGb: InstanceConfigVolumeSizeInGbInteger;
  604. }
  605. export type InstanceConfigInstanceCountInteger = number;
  606. export type InstanceConfigVolumeSizeInGbInteger = number;
  607. export type InstanceType = "ml.m4.xlarge"|"ml.m4.2xlarge"|"ml.m4.4xlarge"|"ml.m4.10xlarge"|"ml.m4.16xlarge"|"ml.g4dn.xlarge"|"ml.g4dn.2xlarge"|"ml.g4dn.4xlarge"|"ml.g4dn.8xlarge"|"ml.g4dn.12xlarge"|"ml.g4dn.16xlarge"|"ml.m5.large"|"ml.m5.xlarge"|"ml.m5.2xlarge"|"ml.m5.4xlarge"|"ml.m5.12xlarge"|"ml.m5.24xlarge"|"ml.c4.xlarge"|"ml.c4.2xlarge"|"ml.c4.4xlarge"|"ml.c4.8xlarge"|"ml.p2.xlarge"|"ml.p2.8xlarge"|"ml.p2.16xlarge"|"ml.p3.2xlarge"|"ml.p3.8xlarge"|"ml.p3.16xlarge"|"ml.p3dn.24xlarge"|"ml.p4d.24xlarge"|"ml.c5.xlarge"|"ml.c5.2xlarge"|"ml.c5.4xlarge"|"ml.c5.9xlarge"|"ml.c5.18xlarge"|"ml.c5n.xlarge"|"ml.c5n.2xlarge"|"ml.c5n.4xlarge"|"ml.c5n.9xlarge"|"ml.c5n.18xlarge"|string;
  608. export type Integer = number;
  609. export type JobArn = string;
  610. export interface JobCheckpointConfig {
  611. /**
  612. * (Optional) The local directory where checkpoints are written. The default directory is /opt/braket/checkpoints/.
  613. */
  614. localPath?: String4096;
  615. /**
  616. * Identifies the S3 path where you want Amazon Braket to store checkpoints. For example, s3://bucket-name/key-name-prefix.
  617. */
  618. s3Uri: S3Path;
  619. }
  620. export interface JobEventDetails {
  621. /**
  622. * The type of event that occurred related to the Amazon Braket job.
  623. */
  624. eventType?: JobEventType;
  625. /**
  626. * A message describing the event that occurred related to the Amazon Braket job.
  627. */
  628. message?: JobEventDetailsMessageString;
  629. /**
  630. * The type of event that occurred related to the Amazon Braket job.
  631. */
  632. timeOfEvent?: SyntheticTimestamp_date_time;
  633. }
  634. export type JobEventDetailsMessageString = string;
  635. export type JobEventType = "WAITING_FOR_PRIORITY"|"QUEUED_FOR_EXECUTION"|"STARTING_INSTANCE"|"DOWNLOADING_DATA"|"RUNNING"|"DEPRIORITIZED_DUE_TO_INACTIVITY"|"UPLOADING_RESULTS"|"COMPLETED"|"FAILED"|"MAX_RUNTIME_EXCEEDED"|"CANCELLED"|string;
  636. export type JobEvents = JobEventDetails[];
  637. export interface JobOutputDataConfig {
  638. /**
  639. * The AWS Key Management Service (AWS KMS) key that Amazon Braket uses to encrypt the job training artifacts at rest using Amazon S3 server-side encryption.
  640. */
  641. kmsKeyId?: String2048;
  642. /**
  643. * Identifies the S3 path where you want Amazon Braket to store the job training artifacts. For example, s3://bucket-name/key-name-prefix.
  644. */
  645. s3Path: S3Path;
  646. }
  647. export type JobPrimaryStatus = "QUEUED"|"RUNNING"|"COMPLETED"|"FAILED"|"CANCELLING"|"CANCELLED"|string;
  648. export interface JobStoppingCondition {
  649. /**
  650. * The maximum length of time, in seconds, that an Amazon Braket job can run.
  651. */
  652. maxRuntimeInSeconds?: JobStoppingConditionMaxRuntimeInSecondsInteger;
  653. }
  654. export type JobStoppingConditionMaxRuntimeInSecondsInteger = number;
  655. export interface JobSummary {
  656. /**
  657. * The date and time that the Amazon Braket job was created.
  658. */
  659. createdAt: SyntheticTimestamp_date_time;
  660. /**
  661. * Provides summary information about the primary device used by an Amazon Braket job.
  662. */
  663. device: String256;
  664. /**
  665. * The date and time that the Amazon Braket job ended.
  666. */
  667. endedAt?: SyntheticTimestamp_date_time;
  668. /**
  669. * The ARN of the Amazon Braket job.
  670. */
  671. jobArn: JobArn;
  672. /**
  673. * The name of the Amazon Braket job.
  674. */
  675. jobName: String;
  676. /**
  677. * The date and time that the Amazon Braket job was started.
  678. */
  679. startedAt?: SyntheticTimestamp_date_time;
  680. /**
  681. * The status of the Amazon Braket job.
  682. */
  683. status: JobPrimaryStatus;
  684. /**
  685. * A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
  686. */
  687. tags?: TagsMap;
  688. }
  689. export type JobSummaryList = JobSummary[];
  690. export type JobToken = string;
  691. export type JsonValue = string;
  692. export interface ListTagsForResourceRequest {
  693. /**
  694. * Specify the resourceArn for the resource whose tags to display.
  695. */
  696. resourceArn: String;
  697. }
  698. export interface ListTagsForResourceResponse {
  699. /**
  700. * Displays the key, value pairs of tags associated with this resource.
  701. */
  702. tags?: TagsMap;
  703. }
  704. export type Long = number;
  705. export type QuantumTaskAdditionalAttributeName = "QueueInfo"|string;
  706. export type QuantumTaskAdditionalAttributeNamesList = QuantumTaskAdditionalAttributeName[];
  707. export type QuantumTaskArn = string;
  708. export interface QuantumTaskQueueInfo {
  709. /**
  710. * Optional. Provides more information about the queue position. For example, if the task is complete and no longer in the queue, the message field contains that information.
  711. */
  712. message?: String;
  713. /**
  714. * Current position of the task in the quantum tasks queue.
  715. */
  716. position: String;
  717. /**
  718. * The name of the queue.
  719. */
  720. queue: QueueName;
  721. /**
  722. * Optional. Specifies the priority of the queue. Quantum tasks in a priority queue are processed before the tasks in a normal queue.
  723. */
  724. queuePriority?: QueuePriority;
  725. }
  726. export type QuantumTaskStatus = "CREATED"|"QUEUED"|"RUNNING"|"COMPLETED"|"FAILED"|"CANCELLING"|"CANCELLED"|string;
  727. export interface QuantumTaskSummary {
  728. /**
  729. * The time at which the task was created.
  730. */
  731. createdAt: SyntheticTimestamp_date_time;
  732. /**
  733. * The ARN of the device the task ran on.
  734. */
  735. deviceArn: DeviceArn;
  736. /**
  737. * The time at which the task finished.
  738. */
  739. endedAt?: SyntheticTimestamp_date_time;
  740. /**
  741. * The S3 bucket where the task result file is stored..
  742. */
  743. outputS3Bucket: String;
  744. /**
  745. * The folder in the S3 bucket where the task result file is stored.
  746. */
  747. outputS3Directory: String;
  748. /**
  749. * The ARN of the task.
  750. */
  751. quantumTaskArn: QuantumTaskArn;
  752. /**
  753. * The shots used for the task.
  754. */
  755. shots: Long;
  756. /**
  757. * The status of the task.
  758. */
  759. status: QuantumTaskStatus;
  760. /**
  761. * Displays the key, value pairs of tags associated with this quantum task.
  762. */
  763. tags?: TagsMap;
  764. }
  765. export type QuantumTaskSummaryList = QuantumTaskSummary[];
  766. export type QueueName = "QUANTUM_TASKS_QUEUE"|"JOBS_QUEUE"|string;
  767. export type QueuePriority = "Normal"|"Priority"|string;
  768. export type RoleArn = string;
  769. export interface S3DataSource {
  770. /**
  771. * Depending on the value specified for the S3DataType, identifies either a key name prefix or a manifest that locates the S3 data source.
  772. */
  773. s3Uri: S3Path;
  774. }
  775. export type S3Path = string;
  776. export interface ScriptModeConfig {
  777. /**
  778. * The type of compression used by the Python scripts for an Amazon Braket job.
  779. */
  780. compressionType?: CompressionType;
  781. /**
  782. * The path to the Python script that serves as the entry point for an Amazon Braket job.
  783. */
  784. entryPoint: String;
  785. /**
  786. * The URI that specifies the S3 path to the Python script module that contains the training script used by an Amazon Braket job.
  787. */
  788. s3Uri: S3Path;
  789. }
  790. export interface SearchDevicesFilter {
  791. /**
  792. * The name to use to filter results.
  793. */
  794. name: SearchDevicesFilterNameString;
  795. /**
  796. * The values to use to filter results.
  797. */
  798. values: SearchDevicesFilterValuesList;
  799. }
  800. export type SearchDevicesFilterNameString = string;
  801. export type SearchDevicesFilterValuesList = String256[];
  802. export interface SearchDevicesRequest {
  803. /**
  804. * The filter values to use to search for a device.
  805. */
  806. filters: SearchDevicesRequestFiltersList;
  807. /**
  808. * The maximum number of results to return in the response.
  809. */
  810. maxResults?: SearchDevicesRequestMaxResultsInteger;
  811. /**
  812. * A token used for pagination of results returned in the response. Use the token returned from the previous request continue results where the previous request ended.
  813. */
  814. nextToken?: String;
  815. }
  816. export type SearchDevicesRequestFiltersList = SearchDevicesFilter[];
  817. export type SearchDevicesRequestMaxResultsInteger = number;
  818. export interface SearchDevicesResponse {
  819. /**
  820. * An array of DeviceSummary objects for devices that match the specified filter values.
  821. */
  822. devices: DeviceSummaryList;
  823. /**
  824. * A token used for pagination of results, or null if there are no additional results. Use the token value in a subsequent request to continue results where the previous request ended.
  825. */
  826. nextToken?: String;
  827. }
  828. export interface SearchJobsFilter {
  829. /**
  830. * The name to use for the jobs filter.
  831. */
  832. name: String64;
  833. /**
  834. * An operator to use for the jobs filter.
  835. */
  836. operator: SearchJobsFilterOperator;
  837. /**
  838. * The values to use for the jobs filter.
  839. */
  840. values: SearchJobsFilterValuesList;
  841. }
  842. export type SearchJobsFilterOperator = "LT"|"LTE"|"EQUAL"|"GT"|"GTE"|"BETWEEN"|"CONTAINS"|string;
  843. export type SearchJobsFilterValuesList = String256[];
  844. export interface SearchJobsRequest {
  845. /**
  846. * The filter values to use when searching for a job.
  847. */
  848. filters: SearchJobsRequestFiltersList;
  849. /**
  850. * The maximum number of results to return in the response.
  851. */
  852. maxResults?: SearchJobsRequestMaxResultsInteger;
  853. /**
  854. * A token used for pagination of results returned in the response. Use the token returned from the previous request to continue results where the previous request ended.
  855. */
  856. nextToken?: String;
  857. }
  858. export type SearchJobsRequestFiltersList = SearchJobsFilter[];
  859. export type SearchJobsRequestMaxResultsInteger = number;
  860. export interface SearchJobsResponse {
  861. /**
  862. * An array of JobSummary objects for devices that match the specified filter values.
  863. */
  864. jobs: JobSummaryList;
  865. /**
  866. * A token used for pagination of results, or null if there are no additional results. Use the token value in a subsequent request to continue results where the previous request ended.
  867. */
  868. nextToken?: String;
  869. }
  870. export interface SearchQuantumTasksFilter {
  871. /**
  872. * The name of the device used for the task.
  873. */
  874. name: String64;
  875. /**
  876. * An operator to use in the filter.
  877. */
  878. operator: SearchQuantumTasksFilterOperator;
  879. /**
  880. * The values to use for the filter.
  881. */
  882. values: SearchQuantumTasksFilterValuesList;
  883. }
  884. export type SearchQuantumTasksFilterOperator = "LT"|"LTE"|"EQUAL"|"GT"|"GTE"|"BETWEEN"|string;
  885. export type SearchQuantumTasksFilterValuesList = String256[];
  886. export interface SearchQuantumTasksRequest {
  887. /**
  888. * Array of SearchQuantumTasksFilter objects.
  889. */
  890. filters: SearchQuantumTasksRequestFiltersList;
  891. /**
  892. * Maximum number of results to return in the response.
  893. */
  894. maxResults?: SearchQuantumTasksRequestMaxResultsInteger;
  895. /**
  896. * A token used for pagination of results returned in the response. Use the token returned from the previous request continue results where the previous request ended.
  897. */
  898. nextToken?: String;
  899. }
  900. export type SearchQuantumTasksRequestFiltersList = SearchQuantumTasksFilter[];
  901. export type SearchQuantumTasksRequestMaxResultsInteger = number;
  902. export interface SearchQuantumTasksResponse {
  903. /**
  904. * A token used for pagination of results, or null if there are no additional results. Use the token value in a subsequent request to continue results where the previous request ended.
  905. */
  906. nextToken?: String;
  907. /**
  908. * An array of QuantumTaskSummary objects for tasks that match the specified filters.
  909. */
  910. quantumTasks: QuantumTaskSummaryList;
  911. }
  912. export type String = string;
  913. export type String1024 = string;
  914. export type String2048 = string;
  915. export type String256 = string;
  916. export type String4096 = string;
  917. export type String64 = string;
  918. export type SyntheticTimestamp_date_time = Date;
  919. export type TagKeys = String[];
  920. export interface TagResourceRequest {
  921. /**
  922. * Specify the resourceArn of the resource to which a tag will be added.
  923. */
  924. resourceArn: String;
  925. /**
  926. * Specify the tags to add to the resource.
  927. */
  928. tags: TagsMap;
  929. }
  930. export interface TagResourceResponse {
  931. }
  932. export type TagsMap = {[key: string]: String};
  933. export interface UntagResourceRequest {
  934. /**
  935. * Specify the resourceArn for the resource from which to remove the tags.
  936. */
  937. resourceArn: String;
  938. /**
  939. * Specify the keys for the tags to remove from the resource.
  940. */
  941. tagKeys: TagKeys;
  942. }
  943. export interface UntagResourceResponse {
  944. }
  945. export type Uri = string;
  946. /**
  947. * 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.
  948. */
  949. export type apiVersion = "2019-09-01"|"latest"|string;
  950. export interface ClientApiVersions {
  951. /**
  952. * 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.
  953. */
  954. apiVersion?: apiVersion;
  955. }
  956. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  957. /**
  958. * Contains interfaces for use with the Braket client.
  959. */
  960. export import Types = Braket;
  961. }
  962. export = Braket;