service.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package support
  3. import (
  4. "github.com/aws/aws-sdk-go/aws"
  5. "github.com/aws/aws-sdk-go/aws/defaults"
  6. "github.com/aws/aws-sdk-go/aws/request"
  7. "github.com/aws/aws-sdk-go/aws/service"
  8. "github.com/aws/aws-sdk-go/aws/service/serviceinfo"
  9. "github.com/aws/aws-sdk-go/internal/protocol/jsonrpc"
  10. "github.com/aws/aws-sdk-go/internal/signer/v4"
  11. )
  12. // The AWS Support API reference is intended for programmers who need detailed
  13. // information about the AWS Support operations and data types. This service
  14. // enables you to manage your AWS Support cases programmatically. It uses HTTP
  15. // methods that return results in JSON format.
  16. //
  17. // The AWS Support service also exposes a set of Trusted Advisor (https://aws.amazon.com/premiumsupport/trustedadvisor/)
  18. // features. You can retrieve a list of checks and their descriptions, get check
  19. // results, specify checks to refresh, and get the refresh status of checks.
  20. //
  21. // The following list describes the AWS Support case management operations:
  22. //
  23. // Service names, issue categories, and available severity levels. The DescribeServices
  24. // and DescribeSeverityLevels operations return AWS service names, service codes,
  25. // service categories, and problem severity levels. You use these values when
  26. // you call the CreateCase operation. Case creation, case details, and case
  27. // resolution. The CreateCase, DescribeCases, DescribeAttachment, and ResolveCase
  28. // operations create AWS Support cases, retrieve information about cases, and
  29. // resolve cases. Case communication. The DescribeCommunications, AddCommunicationToCase,
  30. // and AddAttachmentsToSet operations retrieve and add communications and attachments
  31. // to AWS Support cases. The following list describes the operations available
  32. // from the AWS Support service for Trusted Advisor:
  33. //
  34. // DescribeTrustedAdvisorChecks returns the list of checks that run against
  35. // your AWS resources. Using the CheckId for a specific check returned by DescribeTrustedAdvisorChecks,
  36. // you can call DescribeTrustedAdvisorCheckResult to obtain the results for
  37. // the check you specified. DescribeTrustedAdvisorCheckSummaries returns summarized
  38. // results for one or more Trusted Advisor checks. RefreshTrustedAdvisorCheck
  39. // requests that Trusted Advisor rerun a specified check. DescribeTrustedAdvisorCheckRefreshStatuses
  40. // reports the refresh status of one or more checks. For authentication of
  41. // requests, AWS Support uses Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
  42. //
  43. // See About the AWS Support API (http://docs.aws.amazon.com/awssupport/latest/user/Welcome.html)
  44. // in the AWS Support User Guide for information about how to use this service
  45. // to create and manage your support cases, and how to call Trusted Advisor
  46. // for results of checks on your resources.
  47. type Support struct {
  48. *service.Service
  49. }
  50. // Used for custom service initialization logic
  51. var initService func(*service.Service)
  52. // Used for custom request initialization logic
  53. var initRequest func(*request.Request)
  54. // New returns a new Support client.
  55. func New(config *aws.Config) *Support {
  56. service := &service.Service{
  57. ServiceInfo: serviceinfo.ServiceInfo{
  58. Config: defaults.DefaultConfig.Merge(config),
  59. ServiceName: "support",
  60. APIVersion: "2013-04-15",
  61. JSONVersion: "1.1",
  62. TargetPrefix: "AWSSupport_20130415",
  63. },
  64. }
  65. service.Initialize()
  66. // Handlers
  67. service.Handlers.Sign.PushBack(v4.Sign)
  68. service.Handlers.Build.PushBack(jsonrpc.Build)
  69. service.Handlers.Unmarshal.PushBack(jsonrpc.Unmarshal)
  70. service.Handlers.UnmarshalMeta.PushBack(jsonrpc.UnmarshalMeta)
  71. service.Handlers.UnmarshalError.PushBack(jsonrpc.UnmarshalError)
  72. // Run custom service initialization if present
  73. if initService != nil {
  74. initService(service)
  75. }
  76. return &Support{service}
  77. }
  78. // newRequest creates a new request for a Support operation and runs any
  79. // custom request initialization.
  80. func (c *Support) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  81. req := c.NewRequest(op, params, data)
  82. // Run custom request initialization if present
  83. if initRequest != nil {
  84. initRequest(req)
  85. }
  86. return req
  87. }