apigatewaymanagementapi.d.ts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 ApiGatewayManagementApi extends Service {
  9. /**
  10. * Constructs a service object. This object has one method for each API operation.
  11. */
  12. constructor(options?: ApiGatewayManagementApi.Types.ClientConfiguration)
  13. config: Config & ApiGatewayManagementApi.Types.ClientConfiguration;
  14. /**
  15. * Delete the connection with the provided id.
  16. */
  17. deleteConnection(params: ApiGatewayManagementApi.Types.DeleteConnectionRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  18. /**
  19. * Delete the connection with the provided id.
  20. */
  21. deleteConnection(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  22. /**
  23. * Get information about the connection with the provided id.
  24. */
  25. getConnection(params: ApiGatewayManagementApi.Types.GetConnectionRequest, callback?: (err: AWSError, data: ApiGatewayManagementApi.Types.GetConnectionResponse) => void): Request<ApiGatewayManagementApi.Types.GetConnectionResponse, AWSError>;
  26. /**
  27. * Get information about the connection with the provided id.
  28. */
  29. getConnection(callback?: (err: AWSError, data: ApiGatewayManagementApi.Types.GetConnectionResponse) => void): Request<ApiGatewayManagementApi.Types.GetConnectionResponse, AWSError>;
  30. /**
  31. * Sends the provided data to the specified connection.
  32. */
  33. postToConnection(params: ApiGatewayManagementApi.Types.PostToConnectionRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  34. /**
  35. * Sends the provided data to the specified connection.
  36. */
  37. postToConnection(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  38. }
  39. declare namespace ApiGatewayManagementApi {
  40. export type Data = Buffer|Uint8Array|Blob|string;
  41. export interface DeleteConnectionRequest {
  42. ConnectionId: __string;
  43. }
  44. export interface GetConnectionRequest {
  45. ConnectionId: __string;
  46. }
  47. export interface GetConnectionResponse {
  48. /**
  49. * The time in ISO 8601 format for when the connection was established.
  50. */
  51. ConnectedAt?: __timestampIso8601;
  52. Identity?: Identity;
  53. /**
  54. * The time in ISO 8601 format for when the connection was last active.
  55. */
  56. LastActiveAt?: __timestampIso8601;
  57. }
  58. export interface Identity {
  59. /**
  60. * The source IP address of the TCP connection making the request to API Gateway.
  61. */
  62. SourceIp: __string;
  63. /**
  64. * The User Agent of the API caller.
  65. */
  66. UserAgent: __string;
  67. }
  68. export interface PostToConnectionRequest {
  69. /**
  70. * The data to be sent to the client specified by its connection id.
  71. */
  72. Data: Data;
  73. /**
  74. * The identifier of the connection that a specific client is using.
  75. */
  76. ConnectionId: __string;
  77. }
  78. export type __string = string;
  79. export type __timestampIso8601 = Date;
  80. /**
  81. * 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.
  82. */
  83. export type apiVersion = "2018-11-29"|"latest"|string;
  84. export interface ClientApiVersions {
  85. /**
  86. * 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.
  87. */
  88. apiVersion?: apiVersion;
  89. }
  90. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  91. /**
  92. * Contains interfaces for use with the ApiGatewayManagementApi client.
  93. */
  94. export import Types = ApiGatewayManagementApi;
  95. }
  96. export = ApiGatewayManagementApi;