doc.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. // Package s3 provides the client and types for making API
  3. // requests to Amazon Simple Storage Service.
  4. //
  5. // See https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01 for more information on this service.
  6. //
  7. // See s3 package documentation for more information.
  8. // https://docs.aws.amazon.com/sdk-for-go/api/service/s3/
  9. //
  10. // Using the Client
  11. //
  12. // To use the client for Amazon Simple Storage Service you will first need
  13. // to create a new instance of it.
  14. //
  15. // When creating a client for an AWS service you'll first need to have a Session
  16. // already created. The Session provides configuration that can be shared
  17. // between multiple service clients. Additional configuration can be applied to
  18. // the Session and service's client when they are constructed. The aws package's
  19. // Config type contains several fields such as Region for the AWS Region the
  20. // client should make API requests too. The optional Config value can be provided
  21. // as the variadic argument for Sessions and client creation.
  22. //
  23. // Once the service's client is created you can use it to make API requests the
  24. // AWS service. These clients are safe to use concurrently.
  25. //
  26. // // Create a session to share configuration, and load external configuration.
  27. // sess := session.Must(session.NewSession())
  28. //
  29. // // Create the service's client with the session.
  30. // svc := s3.New(sess)
  31. //
  32. // See the SDK's documentation for more information on how to use service clients.
  33. // https://docs.aws.amazon.com/sdk-for-go/api/
  34. //
  35. // See aws package's Config type for more information on configuration options.
  36. // https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
  37. //
  38. // See the Amazon Simple Storage Service client S3 for more
  39. // information on creating the service's client.
  40. // https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#New
  41. //
  42. // Once the client is created you can make an API request to the service.
  43. // Each API method takes a input parameter, and returns the service response
  44. // and an error.
  45. //
  46. // The API method will document which error codes the service can be returned
  47. // by the operation if the service models the API operation's errors. These
  48. // errors will also be available as const strings prefixed with "ErrCode".
  49. //
  50. // result, err := svc.AbortMultipartUpload(params)
  51. // if err != nil {
  52. // // Cast err to awserr.Error to handle specific error codes.
  53. // aerr, ok := err.(awserr.Error)
  54. // if ok && aerr.Code() == <error code to check for> {
  55. // // Specific error code handling
  56. // }
  57. // return err
  58. // }
  59. //
  60. // fmt.Println("AbortMultipartUpload result:")
  61. // fmt.Println(result)
  62. //
  63. // Using the Client with Context
  64. //
  65. // The service's client also provides methods to make API requests with a Context
  66. // value. This allows you to control the timeout, and cancellation of pending
  67. // requests. These methods also take request Option as variadic parameter to apply
  68. // additional configuration to the API request.
  69. //
  70. // ctx := context.Background()
  71. //
  72. // result, err := svc.AbortMultipartUploadWithContext(ctx, params)
  73. //
  74. // See the request package documentation for more information on using Context pattern
  75. // with the SDK.
  76. // https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
  77. package s3