sagemakeredge.d.ts 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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 SagemakerEdge extends Service {
  9. /**
  10. * Constructs a service object. This object has one method for each API operation.
  11. */
  12. constructor(options?: SagemakerEdge.Types.ClientConfiguration)
  13. config: Config & SagemakerEdge.Types.ClientConfiguration;
  14. /**
  15. * Use to get the active deployments from a device.
  16. */
  17. getDeployments(params: SagemakerEdge.Types.GetDeploymentsRequest, callback?: (err: AWSError, data: SagemakerEdge.Types.GetDeploymentsResult) => void): Request<SagemakerEdge.Types.GetDeploymentsResult, AWSError>;
  18. /**
  19. * Use to get the active deployments from a device.
  20. */
  21. getDeployments(callback?: (err: AWSError, data: SagemakerEdge.Types.GetDeploymentsResult) => void): Request<SagemakerEdge.Types.GetDeploymentsResult, AWSError>;
  22. /**
  23. * Use to check if a device is registered with SageMaker Edge Manager.
  24. */
  25. getDeviceRegistration(params: SagemakerEdge.Types.GetDeviceRegistrationRequest, callback?: (err: AWSError, data: SagemakerEdge.Types.GetDeviceRegistrationResult) => void): Request<SagemakerEdge.Types.GetDeviceRegistrationResult, AWSError>;
  26. /**
  27. * Use to check if a device is registered with SageMaker Edge Manager.
  28. */
  29. getDeviceRegistration(callback?: (err: AWSError, data: SagemakerEdge.Types.GetDeviceRegistrationResult) => void): Request<SagemakerEdge.Types.GetDeviceRegistrationResult, AWSError>;
  30. /**
  31. * Use to get the current status of devices registered on SageMaker Edge Manager.
  32. */
  33. sendHeartbeat(params: SagemakerEdge.Types.SendHeartbeatRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  34. /**
  35. * Use to get the current status of devices registered on SageMaker Edge Manager.
  36. */
  37. sendHeartbeat(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  38. }
  39. declare namespace SagemakerEdge {
  40. export type CacheTTLSeconds = string;
  41. export interface Checksum {
  42. /**
  43. * The type of the checksum.
  44. */
  45. Type?: ChecksumType;
  46. /**
  47. * The checksum of the model.
  48. */
  49. Sum?: ChecksumString;
  50. }
  51. export type ChecksumString = string;
  52. export type ChecksumType = "SHA1"|string;
  53. export interface Definition {
  54. /**
  55. * The unique model handle.
  56. */
  57. ModelHandle?: EntityName;
  58. /**
  59. * The absolute S3 location of the model.
  60. */
  61. S3Url?: S3Uri;
  62. /**
  63. * The checksum information of the model.
  64. */
  65. Checksum?: Checksum;
  66. /**
  67. * The desired state of the model.
  68. */
  69. State?: ModelState;
  70. }
  71. export type Definitions = Definition[];
  72. export interface DeploymentModel {
  73. /**
  74. * The unique handle of the model.
  75. */
  76. ModelHandle?: EntityName;
  77. /**
  78. * The name of the model.
  79. */
  80. ModelName?: ModelName;
  81. /**
  82. * The version of the model.
  83. */
  84. ModelVersion?: Version;
  85. /**
  86. * The desired state of the model.
  87. */
  88. DesiredState?: ModelState;
  89. /**
  90. * Returns the current state of the model.
  91. */
  92. State?: ModelState;
  93. /**
  94. * Returns the deployment status of the model.
  95. */
  96. Status?: DeploymentStatus;
  97. /**
  98. * Returns the error message for the deployment status result.
  99. */
  100. StatusReason?: String;
  101. /**
  102. * Returns the error message if there is a rollback.
  103. */
  104. RollbackFailureReason?: String;
  105. }
  106. export type DeploymentModels = DeploymentModel[];
  107. export interface DeploymentResult {
  108. /**
  109. * The name and unique ID of the deployment.
  110. */
  111. DeploymentName?: EntityName;
  112. /**
  113. * Returns the bucket error code.
  114. */
  115. DeploymentStatus?: EntityName;
  116. /**
  117. * Returns the detailed error message.
  118. */
  119. DeploymentStatusMessage?: String;
  120. /**
  121. * The timestamp of when the deployment was started on the agent.
  122. */
  123. DeploymentStartTime?: Timestamp;
  124. /**
  125. * The timestamp of when the deployment was ended, and the agent got the deployment results.
  126. */
  127. DeploymentEndTime?: Timestamp;
  128. /**
  129. * Returns a list of models deployed on the agent.
  130. */
  131. DeploymentModels?: DeploymentModels;
  132. }
  133. export type DeploymentStatus = "SUCCESS"|"FAIL"|string;
  134. export type DeploymentType = "Model"|string;
  135. export type DeviceFleetName = string;
  136. export type DeviceName = string;
  137. export type DeviceRegistration = string;
  138. export type Dimension = string;
  139. export interface EdgeDeployment {
  140. /**
  141. * The name and unique ID of the deployment.
  142. */
  143. DeploymentName?: EntityName;
  144. /**
  145. * The type of the deployment.
  146. */
  147. Type?: DeploymentType;
  148. /**
  149. * Determines whether to rollback to previous configuration if deployment fails.
  150. */
  151. FailureHandlingPolicy?: FailureHandlingPolicy;
  152. /**
  153. * Returns a list of Definition objects.
  154. */
  155. Definitions?: Definitions;
  156. }
  157. export type EdgeDeployments = EdgeDeployment[];
  158. export interface EdgeMetric {
  159. /**
  160. * The dimension of metrics published.
  161. */
  162. Dimension?: Dimension;
  163. /**
  164. * Returns the name of the metric.
  165. */
  166. MetricName?: Metric;
  167. /**
  168. * Returns the value of the metric.
  169. */
  170. Value?: Value;
  171. /**
  172. * Timestamp of when the metric was requested.
  173. */
  174. Timestamp?: Timestamp;
  175. }
  176. export type EdgeMetrics = EdgeMetric[];
  177. export type EntityName = string;
  178. export type FailureHandlingPolicy = "ROLLBACK_ON_FAILURE"|"DO_NOTHING"|string;
  179. export interface GetDeploymentsRequest {
  180. /**
  181. * The unique name of the device you want to get the configuration of active deployments from.
  182. */
  183. DeviceName: DeviceName;
  184. /**
  185. * The name of the fleet that the device belongs to.
  186. */
  187. DeviceFleetName: DeviceFleetName;
  188. }
  189. export interface GetDeploymentsResult {
  190. /**
  191. * Returns a list of the configurations of the active deployments on the device.
  192. */
  193. Deployments?: EdgeDeployments;
  194. }
  195. export interface GetDeviceRegistrationRequest {
  196. /**
  197. * The unique name of the device you want to get the registration status from.
  198. */
  199. DeviceName: DeviceName;
  200. /**
  201. * The name of the fleet that the device belongs to.
  202. */
  203. DeviceFleetName: DeviceFleetName;
  204. }
  205. export interface GetDeviceRegistrationResult {
  206. /**
  207. * Describes if the device is currently registered with SageMaker Edge Manager.
  208. */
  209. DeviceRegistration?: DeviceRegistration;
  210. /**
  211. * The amount of time, in seconds, that the registration status is stored on the device’s cache before it is refreshed.
  212. */
  213. CacheTTL?: CacheTTLSeconds;
  214. }
  215. export type Metric = string;
  216. export interface Model {
  217. /**
  218. * The name of the model.
  219. */
  220. ModelName?: ModelName;
  221. /**
  222. * The version of the model.
  223. */
  224. ModelVersion?: Version;
  225. /**
  226. * The timestamp of the last data sample taken.
  227. */
  228. LatestSampleTime?: Timestamp;
  229. /**
  230. * The timestamp of the last inference that was made.
  231. */
  232. LatestInference?: Timestamp;
  233. /**
  234. * Information required for model metrics.
  235. */
  236. ModelMetrics?: EdgeMetrics;
  237. }
  238. export type ModelName = string;
  239. export type ModelState = "DEPLOY"|"UNDEPLOY"|string;
  240. export type Models = Model[];
  241. export type S3Uri = string;
  242. export interface SendHeartbeatRequest {
  243. /**
  244. * For internal use. Returns a list of SageMaker Edge Manager agent operating metrics.
  245. */
  246. AgentMetrics?: EdgeMetrics;
  247. /**
  248. * Returns a list of models deployed on the the device.
  249. */
  250. Models?: Models;
  251. /**
  252. * Returns the version of the agent.
  253. */
  254. AgentVersion: Version;
  255. /**
  256. * The unique name of the device.
  257. */
  258. DeviceName: DeviceName;
  259. /**
  260. * The name of the fleet that the device belongs to.
  261. */
  262. DeviceFleetName: DeviceFleetName;
  263. /**
  264. * Returns the result of a deployment on the device.
  265. */
  266. DeploymentResult?: DeploymentResult;
  267. }
  268. export type String = string;
  269. export type Timestamp = Date;
  270. export type Value = number;
  271. export type Version = string;
  272. /**
  273. * 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.
  274. */
  275. export type apiVersion = "2020-09-23"|"latest"|string;
  276. export interface ClientApiVersions {
  277. /**
  278. * 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.
  279. */
  280. apiVersion?: apiVersion;
  281. }
  282. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  283. /**
  284. * Contains interfaces for use with the SagemakerEdge client.
  285. */
  286. export import Types = SagemakerEdge;
  287. }
  288. export = SagemakerEdge;