service.go 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package applicationdiscoveryservice
  3. import (
  4. "github.com/aws/aws-sdk-go/aws"
  5. "github.com/aws/aws-sdk-go/aws/client"
  6. "github.com/aws/aws-sdk-go/aws/client/metadata"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/aws/signer/v4"
  9. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  10. )
  11. // The AWS Application Discovery Service helps Systems Integrators quickly and
  12. // reliably plan application migration projects by automatically identifying
  13. // applications running in on-premises data centers, their associated dependencies,
  14. // and their performance profile.
  15. //
  16. // Planning data center migrations can involve thousands of workloads that
  17. // are often deeply interdependent. Application discovery and dependency mapping
  18. // are important early first steps in the migration process, but difficult to
  19. // perform at scale due to the lack of automated tools.
  20. //
  21. // The AWS Application Discovery Service automatically collects configuration
  22. // and usage data from servers to develop a list of applications, how they perform,
  23. // and how they are interdependent. This information is securely retained in
  24. // an AWS Application Discovery Service database which you can export as a CSV
  25. // file into your preferred visualization tool or cloud migration solution to
  26. // help reduce the complexity and time in planning your cloud migration.
  27. //
  28. // The Application Discovery Service is currently available for preview. Only
  29. // customers who are engaged with AWS Professional Services (https://aws.amazon.com/professional-services/)
  30. // or a certified AWS partner can use the service. To see the list of certified
  31. // partners and request access to the Application Discovery Service, complete
  32. // the following preview form (http://aws.amazon.com/application-discovery/preview/).
  33. //
  34. // This API reference provides descriptions, syntax, and usage examples for
  35. // each of the actions and data types for the Discovery Service. The topic for
  36. // each action shows the API request parameters and the response. Alternatively,
  37. // you can use one of the AWS SDKs to access an API that is tailored to the
  38. // programming language or platform that you're using. For more information,
  39. // see AWS SDKs (http://aws.amazon.com/tools/#SDKs).
  40. //
  41. // This guide is intended for use with the AWS Discovery Service User Guide
  42. // (http://docs.aws.amazon.com/application-discovery/latest/userguide/what-is-appdiscovery.html).
  43. //
  44. // The following are short descriptions of each API action, organized by function.
  45. //
  46. // Managing AWS Agents Using the Application Discovery Service
  47. //
  48. // An AWS agent is software that you install on on-premises servers and virtual
  49. // machines that are targeted for discovery and migration. Agents run on Linux
  50. // and Windows Server and collect server configuration and activity information
  51. // about your applications and infrastructure. Specifically, agents collect
  52. // the following information and send it to the Application Discovery Service
  53. // using Secure Sockets Layer (SSL) encryption:
  54. //
  55. // User information (user name, home directory)
  56. //
  57. // Group information (name)
  58. //
  59. // List of installed packages
  60. //
  61. // List of kernel modules
  62. //
  63. // All create and stop process events
  64. //
  65. // DNS queries
  66. //
  67. // NIC information
  68. //
  69. // TCP/UDP process listening ports
  70. //
  71. // TCPV4/V6 connections
  72. //
  73. // Operating system information
  74. //
  75. // System performance
  76. //
  77. // Process performance
  78. //
  79. // The Application Discovery Service API includes the following actions to
  80. // manage AWS agents:
  81. //
  82. // StartDataCollectionByAgentIds: Instructs the specified agents to start
  83. // collecting data. The Application Discovery Service takes several minutes
  84. // to receive and process data after you initiate data collection.
  85. //
  86. // StopDataCollectionByAgentIds: Instructs the specified agents to stop
  87. // collecting data.
  88. //
  89. // DescribeAgents: Lists AWS agents by ID or lists all agents associated
  90. // with your user account if you did not specify an agent ID. The output includes
  91. // agent IDs, IP addresses, media access control (MAC) addresses, agent health,
  92. // host name where the agent resides, and the version number of each agent.
  93. //
  94. // Querying Configuration Items
  95. //
  96. // A configuration item is an IT asset that was discovered in your data center
  97. // by an AWS agent. When you use the Application Discovery Service, you can
  98. // specify filters and query specific configuration items. The service supports
  99. // Server, Process, and Connection configuration items. This means you can specify
  100. // a value for the following keys and query your IT assets:
  101. //
  102. // Server server.HostName
  103. //
  104. // server.osName
  105. //
  106. // server.osVersion
  107. //
  108. // server.configurationId
  109. //
  110. // server.agentId
  111. //
  112. // Process process.name
  113. //
  114. // process.CommandLine
  115. //
  116. // process.configurationId
  117. //
  118. // server.hostName
  119. //
  120. // server.osName
  121. //
  122. // server.osVersion
  123. //
  124. // server.configurationId
  125. //
  126. // server.agentId
  127. //
  128. // Connection connection.sourceIp
  129. //
  130. // connection.sourcePort
  131. //
  132. // connection.destinationIp
  133. //
  134. // connection.destinationPort
  135. //
  136. // sourceProcess.configurationId
  137. //
  138. // sourceProcess.commandLine
  139. //
  140. // sourceProcess.name
  141. //
  142. // destinationProcessId.configurationId
  143. //
  144. // destinationProcess.commandLine
  145. //
  146. // destinationProcess.name
  147. //
  148. // sourceServer.configurationId
  149. //
  150. // sourceServer.hostName
  151. //
  152. // sourceServer.osName
  153. //
  154. // sourceServer.osVersion
  155. //
  156. // destinationServer.configurationId
  157. //
  158. // destinationServer.hostName
  159. //
  160. // destinationServer.osName
  161. //
  162. // destinationServer.osVersion
  163. //
  164. // The Application Discovery Service includes the following actions for querying
  165. // configuration items.
  166. //
  167. // DescribeConfigurations: Retrieves a list of attributes for a specific
  168. // configuration ID. For example, the output for a server configuration item
  169. // includes a list of attributes about the server, including host name, operating
  170. // system, number of network cards, etc.
  171. //
  172. // ListConfigurations: Retrieves a list of configuration items according
  173. // to the criteria you specify in a filter. The filter criteria identify relationship
  174. // requirements. For example, you can specify filter criteria of process.name
  175. // with values of nginx and apache.
  176. //
  177. // Tagging Discovered Configuration Items
  178. //
  179. // You can tag discovered configuration items. Tags are metadata that help
  180. // you categorize IT assets in your data center. Tags use a key-value format.
  181. // For example, {"key": "serverType", "value": "webServer"}.
  182. //
  183. // CreateTags: Creates one or more tags for a configuration items.
  184. //
  185. // DescribeTags: Retrieves a list of configuration items that are tagged
  186. // with a specific tag. Or, retrieves a list of all tags assigned to a specific
  187. // configuration item.
  188. //
  189. // DeleteTags: Deletes the association between a configuration item and
  190. // one or more tags.
  191. //
  192. // Exporting Data
  193. //
  194. // You can export data as a CSV file to an Amazon S3 bucket or into your preferred
  195. // visualization tool or cloud migration solution to help reduce the complexity
  196. // and time in planning your cloud migration.
  197. //
  198. // ExportConfigurations: Exports all discovered configuration data to an
  199. // Amazon S3 bucket. Data includes tags and tag associations, processes, connections,
  200. // servers, and system performance. This API returns an export ID which you
  201. // can query using the GetExportStatus API.
  202. //
  203. // DescribeExportConfigurations: Gets the status of the data export. When
  204. // the export is complete, the service returns an Amazon S3 URL where you can
  205. // download CSV files that include the data.
  206. //The service client's operations are safe to be used concurrently.
  207. // It is not safe to mutate any of the client's properties though.
  208. type ApplicationDiscoveryService struct {
  209. *client.Client
  210. }
  211. // Used for custom client initialization logic
  212. var initClient func(*client.Client)
  213. // Used for custom request initialization logic
  214. var initRequest func(*request.Request)
  215. // A ServiceName is the name of the service the client will make API calls to.
  216. const ServiceName = "discovery"
  217. // New creates a new instance of the ApplicationDiscoveryService client with a session.
  218. // If additional configuration is needed for the client instance use the optional
  219. // aws.Config parameter to add your extra config.
  220. //
  221. // Example:
  222. // // Create a ApplicationDiscoveryService client from just a session.
  223. // svc := applicationdiscoveryservice.New(mySession)
  224. //
  225. // // Create a ApplicationDiscoveryService client with additional configuration
  226. // svc := applicationdiscoveryservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  227. func New(p client.ConfigProvider, cfgs ...*aws.Config) *ApplicationDiscoveryService {
  228. c := p.ClientConfig(ServiceName, cfgs...)
  229. return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  230. }
  231. // newClient creates, initializes and returns a new service client instance.
  232. func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *ApplicationDiscoveryService {
  233. svc := &ApplicationDiscoveryService{
  234. Client: client.New(
  235. cfg,
  236. metadata.ClientInfo{
  237. ServiceName: ServiceName,
  238. SigningRegion: signingRegion,
  239. Endpoint: endpoint,
  240. APIVersion: "2015-11-01",
  241. JSONVersion: "1.1",
  242. TargetPrefix: "AWSPoseidonService_V2015_11_01",
  243. },
  244. handlers,
  245. ),
  246. }
  247. // Handlers
  248. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  249. svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
  250. svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
  251. svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
  252. svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
  253. // Run custom client initialization if present
  254. if initClient != nil {
  255. initClient(svc.Client)
  256. }
  257. return svc
  258. }
  259. // newRequest creates a new request for a ApplicationDiscoveryService operation and runs any
  260. // custom request initialization.
  261. func (c *ApplicationDiscoveryService) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  262. req := c.NewRequest(op, params, data)
  263. // Run custom request initialization if present
  264. if initRequest != nil {
  265. initRequest(req)
  266. }
  267. return req
  268. }