package aws

Import Path
	github.com/aws/aws-sdk-go/aws (on go.dev)

Dependency Relation
	imports 13 packages, and imported by 16 packages

Involved Source Files config.go context_1_9.go context_background_1_7.go context_sleep.go convert_types.go Package aws provides the core SDK's utilities and shared types. Use this package's utilities to simplify setting and reading API operations parameters. Value and Pointer Conversion Utilities This package includes a helper conversion utility for each scalar type the SDK's API use. These utilities make getting a pointer of the scalar, and dereferencing a pointer easier. Each conversion utility comes in two forms. Value to Pointer and Pointer to Value. The Pointer to value will safely dereference the pointer and return its value. If the pointer was nil, the scalar's zero value will be returned. The value to pointer functions will be named after the scalar type. So get a *string from a string value use the "String" function. This makes it easy to to get pointer of a literal string value, because getting the address of a literal requires assigning the value to a variable first. var strPtr *string // Without the SDK's conversion functions str := "my string" strPtr = &str // With the SDK's conversion functions strPtr = aws.String("my string") // Convert *string to string value str = aws.StringValue(strPtr) In addition to scalars the aws package also includes conversion utilities for map and slice for commonly types used in API parameters. The map and slice conversion functions use similar naming pattern as the scalar conversion functions. var strPtrs []*string var strs []string = []string{"Go", "Gophers", "Go"} // Convert []string to []*string strPtrs = aws.StringSlice(strs) // Convert []*string to []string strs = aws.StringValueSlice(strPtrs) SDK Default HTTP Client The SDK will use the http.DefaultClient if a HTTP client is not provided to the SDK's Session, or service client constructor. This means that if the http.DefaultClient is modified by other components of your application the modifications will be picked up by the SDK as well. In some cases this might be intended, but it is a better practice to create a custom HTTP Client to share explicitly through your application. You can configure the SDK to use the custom HTTP Client by setting the HTTPClient value of the SDK's Config type when creating a Session or service client. errors.go jsonvalue.go logger.go types.go url.go Package aws provides core functionality for making requests to AWS services.
Package-Level Type Names (total 12, in which 10 are exported)
/* sort exporteds by: | */
A Config provides service configuration for service clients. By default, all clients will use the defaults.DefaultConfig structure. // Create Session with MaxRetries configuration to be shared by multiple // service clients. sess := session.Must(session.NewSession(&aws.Config{ MaxRetries: aws.Int(3), })) // Create S3 service client with a specific Region. svc := s3.New(sess, &aws.Config{ Region: aws.String("us-west-2"), }) The credentials object to use when signing requests. Defaults to a chain of credential providers to search for credentials in environment variables, shared credential file, and EC2 Instance Roles. Enables verbose error printing of all credential chain errors. Should be used when wanting to see all errors while attempting to retrieve credentials. Disables the computation of request and response checksums, e.g., CRC32 checksums in Amazon DynamoDB. DisableEndpointHostPrefix will disable the SDK's behavior of prefixing request endpoint hosts with modeled information. Disabling this feature is useful when you want to use local endpoints for testing that do not support the modeled host prefix pattern. Disables semantic parameter validation, which validates input for missing required fields and/or other semantic request input errors. DisableRestProtocolURICleaning will not clean the URL path when making rest protocol requests. Will default to false. This would only be used for empty directory names in s3 requests. Example: sess := session.Must(session.NewSession(&aws.Config{ DisableRestProtocolURICleaning: aws.Bool(true), })) svc := s3.New(sess) out, err := svc.GetObject(&s3.GetObjectInput { Bucket: aws.String("bucketname"), Key: aws.String("//foo//bar//moo"), }) Set this to `true` to disable SSL when sending requests. Defaults to `false`. Set this to `true` to disable the EC2Metadata client from overriding the default http.Client's Timeout. This is helpful if you do not want the EC2Metadata client to create a new http.Client. This options is only meaningful if you're not already using a custom HTTP client with the SDK. Enabled by default. Must be set and provided to the session.NewSession() in order to disable the EC2Metadata overriding the timeout for default credentials chain. Example: sess := session.Must(session.NewSession(aws.NewConfig() .WithEC2MetadataDisableTimeoutOverride(true))) svc := s3.New(sess) EnableEndpointDiscovery will allow for endpoint discovery on operations that have the definition in its model. By default, endpoint discovery is off. To use EndpointDiscovery, Endpoint should be unset or set to an empty string. Example: sess := session.Must(session.NewSession(&aws.Config{ EnableEndpointDiscovery: aws.Bool(true), })) svc := s3.New(sess) out, err := svc.GetObject(&s3.GetObjectInput { Bucket: aws.String("bucketname"), Key: aws.String("/foo/bar/moo"), }) An optional endpoint URL (hostname only or fully qualified URI) that overrides the default generated endpoint for a client. Set this to `nil` or the value to `""` to use the default generated endpoint. Note: You must still provide a `Region` value when specifying an endpoint for a client. The resolver to use for looking up endpoints for AWS service clients to use based on region. EnforceShouldRetryCheck is used in the AfterRetryHandler to always call ShouldRetry regardless of whether or not if request.Retryable is set. This will utilize ShouldRetry method of custom retryers. If EnforceShouldRetryCheck is not set, then ShouldRetry will only be called if request.Retryable is nil. Proper handling of the request.Retryable field is important when setting this field. The HTTP client to use when sending requests. Defaults to `http.DefaultClient`. An integer value representing the logging level. The default log level is zero (LogOff), which represents no logging. To enable logging set to a LogLevel Value. The logger writer interface to write logging messages to. Defaults to standard out. Set this to `true` to enable the SDK to unmarshal API response header maps to normalized lower case map keys. For example S3's X-Amz-Meta prefixed header will be unmarshaled to lower case Metadata member's map keys. The value of the header in the map is unaffected. The maximum number of times that a request will be retried for failures. Defaults to -1, which defers the max retry setting to the service specific configuration. The region to send requests to. This parameter is required and must be configured globally or on a per-client basis unless otherwise noted. A full list of regions is found in the "Regions and Endpoints" document. See http://docs.aws.amazon.com/general/latest/gr/rande.html for AWS Regions and Endpoints. Retryer guides how HTTP requests should be retried in case of recoverable failures. When nil or the value does not implement the request.Retryer interface, the client.DefaultRetryer will be used. When both Retryer and MaxRetries are non-nil, the former is used and the latter ignored. To set the Retryer field in a type-safe manner and with chaining, use the request.WithRetryer helper function: cfg := request.WithRetryer(aws.NewConfig(), myRetryer) Set this to `true` to disable the SDK adding the `Expect: 100-Continue` header to PUT requests over 2MB of content. 100-Continue instructs the HTTP client not to send the body until the service responds with a `continue` status. This is useful to prevent sending the request body until after the request is authenticated, and validated. http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html 100-Continue is only enabled for Go 1.6 and above. See `http.Transport`'s `ExpectContinueTimeout` for information on adjusting the continue wait timeout. https://golang.org/pkg/net/http/#Transport You should use this flag to disable 100-Continue if you experience issues with proxies or third party S3 compatible services. S3DisableContentMD5Validation config option is temporarily disabled, For S3 GetObject API calls, #1837. Set this to `true` to disable the S3 service client from automatically adding the ContentMD5 to S3 Object Put and Upload API calls. This option will also disable the SDK from performing object ContentMD5 validation on GetObject API calls. Set this to `true` to force the request to use path-style addressing, i.e., `http://s3.amazonaws.com/BUCKET/KEY`. By default, the S3 client will use virtual hosted bucket addressing when possible (`http://BUCKET.s3.amazonaws.com/KEY`). Note: This configuration option is specific to the Amazon S3 service. See http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html for Amazon S3: Virtual Hosting of Buckets S3UsEast1RegionalEndpoint will enable regional or legacy endpoint resolving Set this to `true` to have the S3 service client to use the region specified in the ARN, when an ARN is provided as an argument to a bucket parameter. Set this to `true` to enable S3 Accelerate feature. For all operations compatible with S3 Accelerate will use the accelerate endpoint for requests. Requests not compatible will fall back to normal S3 requests. The bucket must be enable for accelerate to be used with S3 client with accelerate enabled. If the bucket is not enabled for accelerate an error will be returned. The bucket name must be DNS compatible to also work with accelerate. STSRegionalEndpoint will enable regional or legacy endpoint resolving SleepDelay is an override for the func the SDK will call when sleeping during the lifecycle of a request. Specifically this will be used for request delays. This value should only be used for testing. To adjust the delay of a request see the aws/client.DefaultRetryer and aws/request.Retryer. SleepDelay will prevent any Context from being used for canceling retry delay of an API operation. It is recommended to not use SleepDelay at all and specify a Retryer instead. Instructs the endpoint to be generated for a service client to be the dual stack endpoint. The dual stack endpoint will support both IPv4 and IPv6 addressing. Setting this for a service which does not support dual stack will fail to make requests. It is not recommended to set this value on the session as it will apply to all service clients created with the session. Even services which don't support dual stack endpoints. If the Endpoint config value is also provided the UseDualStack flag will be ignored. Only supported with. sess := session.Must(session.NewSession()) svc := s3.New(sess, &aws.Config{ UseDualStack: aws.Bool(true), }) Copy will return a shallow copy of the Config object. If any additional configurations are provided they will be merged into the new config returned. MergeIn merges the passed in configs into the existing config object. WithCredentials sets a config Credentials value returning a Config pointer for chaining. WithCredentialsChainVerboseErrors sets a config verbose errors boolean and returning a Config pointer. WithDisableComputeChecksums sets a config DisableComputeChecksums value returning a Config pointer for chaining. WithDisableEndpointHostPrefix will set whether or not to use modeled host prefix when making requests. WithDisableParamValidation sets a config DisableParamValidation value returning a Config pointer for chaining. WithDisableSSL sets a config DisableSSL value returning a Config pointer for chaining. WithEC2MetadataDisableTimeoutOverride sets a config EC2MetadataDisableTimeoutOverride value returning a Config pointer for chaining. WithEndpoint sets a config Endpoint value returning a Config pointer for chaining. WithEndpointDiscovery will set whether or not to use endpoint discovery. WithEndpointResolver sets a config EndpointResolver value returning a Config pointer for chaining. WithHTTPClient sets a config HTTPClient value returning a Config pointer for chaining. WithLogLevel sets a config LogLevel value returning a Config pointer for chaining. WithLogger sets a config Logger value returning a Config pointer for chaining. WithMaxRetries sets a config MaxRetries value returning a Config pointer for chaining. WithRegion sets a config Region value returning a Config pointer for chaining. WithS3Disable100Continue sets a config S3Disable100Continue value returning a Config pointer for chaining. WithS3DisableContentMD5Validation sets a config S3DisableContentMD5Validation value returning a Config pointer for chaining. WithS3ForcePathStyle sets a config S3ForcePathStyle value returning a Config pointer for chaining. WithS3UsEast1RegionalEndpoint will set whether or not to use regional endpoint flag when resolving the endpoint for a service WithS3UseARNRegion sets a config S3UseARNRegion value and returning a Config pointer for chaining WithS3UseAccelerate sets a config S3UseAccelerate value returning a Config pointer for chaining. WithSTSRegionalEndpoint will set whether or not to use regional endpoint flag when resolving the endpoint for a service WithSleepDelay overrides the function used to sleep while waiting for the next retry. Defaults to time.Sleep. WithUseDualStack sets a config UseDualStack value returning a Config pointer for chaining. func NewConfig() *Config func (*Config).Copy(cfgs ...*Config) *Config func (*Config).WithCredentials(creds *credentials.Credentials) *Config func (*Config).WithCredentialsChainVerboseErrors(verboseErrs bool) *Config func (*Config).WithDisableComputeChecksums(disable bool) *Config func (*Config).WithDisableEndpointHostPrefix(t bool) *Config func (*Config).WithDisableParamValidation(disable bool) *Config func (*Config).WithDisableSSL(disable bool) *Config func (*Config).WithEC2MetadataDisableTimeoutOverride(enable bool) *Config func (*Config).WithEndpoint(endpoint string) *Config func (*Config).WithEndpointDiscovery(t bool) *Config func (*Config).WithEndpointResolver(resolver endpoints.Resolver) *Config func (*Config).WithHTTPClient(client *http.Client) *Config func (*Config).WithLogger(logger Logger) *Config func (*Config).WithLogLevel(level LogLevelType) *Config func (*Config).WithMaxRetries(max int) *Config func (*Config).WithRegion(region string) *Config func (*Config).WithS3Disable100Continue(disable bool) *Config func (*Config).WithS3DisableContentMD5Validation(enable bool) *Config func (*Config).WithS3ForcePathStyle(force bool) *Config func (*Config).WithS3UseAccelerate(enable bool) *Config func (*Config).WithS3UseARNRegion(enable bool) *Config func (*Config).WithS3UsEast1RegionalEndpoint(sre endpoints.S3UsEast1RegionalEndpoint) *Config func (*Config).WithSleepDelay(fn func(time.Duration)) *Config func (*Config).WithSTSRegionalEndpoint(sre endpoints.STSRegionalEndpoint) *Config func (*Config).WithUseDualStack(enable bool) *Config func github.com/aws/aws-sdk-go/aws/defaults.Config() *Config func github.com/aws/aws-sdk-go/aws/request.WithRetryer(cfg *Config, retryer request.Retryer) *Config func (*Config).Copy(cfgs ...*Config) *Config func (*Config).MergeIn(cfgs ...*Config) func github.com/aws/aws-sdk-go/aws/client.New(cfg Config, info metadata.ClientInfo, handlers request.Handlers, options ...func(*client.Client)) *client.Client func github.com/aws/aws-sdk-go/aws/client.ConfigNoResolveEndpointProvider.ClientConfigNoResolveEndpoint(cfgs ...*Config) client.Config func github.com/aws/aws-sdk-go/aws/client.ConfigProvider.ClientConfig(serviceName string, cfgs ...*Config) client.Config func github.com/aws/aws-sdk-go/aws/credentials/endpointcreds.NewCredentialsClient(cfg Config, handlers request.Handlers, endpoint string, options ...func(*endpointcreds.Provider)) *credentials.Credentials func github.com/aws/aws-sdk-go/aws/credentials/endpointcreds.NewProviderClient(cfg Config, handlers request.Handlers, endpoint string, options ...func(*endpointcreds.Provider)) credentials.Provider func github.com/aws/aws-sdk-go/aws/defaults.CredChain(cfg *Config, handlers request.Handlers) *credentials.Credentials func github.com/aws/aws-sdk-go/aws/defaults.CredProviders(cfg *Config, handlers request.Handlers) []credentials.Provider func github.com/aws/aws-sdk-go/aws/defaults.RemoteCredProvider(cfg Config, handlers request.Handlers) credentials.Provider func github.com/aws/aws-sdk-go/aws/ec2metadata.New(p client.ConfigProvider, cfgs ...*Config) *ec2metadata.EC2Metadata func github.com/aws/aws-sdk-go/aws/ec2metadata.NewClient(cfg Config, handlers request.Handlers, endpoint, signingRegion string, opts ...func(*client.Client)) *ec2metadata.EC2Metadata func github.com/aws/aws-sdk-go/aws/request.New(cfg Config, clientInfo metadata.ClientInfo, handlers request.Handlers, retryer request.Retryer, operation *request.Operation, params interface{}, data interface{}) *request.Request func github.com/aws/aws-sdk-go/aws/request.WithRetryer(cfg *Config, retryer request.Retryer) *Config func github.com/aws/aws-sdk-go/aws/session.New(cfgs ...*Config) *session.Session func github.com/aws/aws-sdk-go/aws/session.NewSession(cfgs ...*Config) (*session.Session, error) func github.com/aws/aws-sdk-go/aws/session.(*Session).ClientConfig(service string, cfgs ...*Config) client.Config func github.com/aws/aws-sdk-go/aws/session.(*Session).ClientConfigNoResolveEndpoint(cfgs ...*Config) client.Config func github.com/aws/aws-sdk-go/aws/session.(*Session).Copy(cfgs ...*Config) *session.Session func github.com/aws/aws-sdk-go/service/sts.New(p client.ConfigProvider, cfgs ...*Config) *sts.STS
Context is an alias of the Go stdlib's context.Context interface. It can be used within the SDK's API operation "WithContext" methods. See https://golang.org/pkg/context on how to use contexts.
JSONValue is a representation of a grab bag type that will be marshaled into a json string. This type can be used just like any other map. Example: values := aws.JSONValue{ "Foo": "Bar", } values["Baz"] = "Qux" func github.com/aws/aws-sdk-go/private/protocol.DecodeJSONValue(v string, escape protocol.EscapeMode) (JSONValue, error) func github.com/aws/aws-sdk-go/private/protocol.EncodeJSONValue(v JSONValue, escape protocol.EscapeMode) (string, error)
A Logger is a minimalistic interface for the SDK to log messages to. Should be used to provide custom logging writers for the SDK to use. ( T) Log(...interface{}) LoggerFunc *testing.B *testing.T testing.TB (interface) func NewDefaultLogger() Logger func (*Config).WithLogger(logger Logger) *Config func github.com/aws/aws-sdk-go/aws/request.WithWaiterLogger(logger Logger) request.WaiterOption
A LoggerFunc is a convenience type to convert a function taking a variadic list of arguments and wrap it so the Logger interface can be used. Example: s3.New(sess, &aws.Config{Logger: aws.LoggerFunc(func(args ...interface{}) { fmt.Fprintln(os.Stdout, args...) })}) Log calls the wrapped function with the arguments provided T : Logger
A LogLevelType defines the level logging should be performed at. Used to instruct the SDK which statements should be logged. AtLeast returns true if this LogLevel is at least high enough to satisfies v. Is safe to use on nil value LogLevelTypes. If LogLevel is nil, will default to LogOff comparison. Matches returns true if the v LogLevel is enabled by this LogLevel. Should be used with logging sub levels. Is safe to use on nil value LogLevelTypes. If LogLevel is nil, will default to LogOff comparison. Value returns the LogLevel value or the default value LogOff if the LogLevel is nil. Safe to use on nil value LogLevelTypes. func LogLevel(l LogLevelType) *LogLevelType func (*LogLevelType).Value() LogLevelType func LogLevel(l LogLevelType) *LogLevelType func (*Config).WithLogLevel(level LogLevelType) *Config func (*LogLevelType).AtLeast(v LogLevelType) bool func (*LogLevelType).Matches(v LogLevelType) bool func github.com/aws/aws-sdk-go/aws/request.WithLogLevel(l LogLevelType) request.Option const LogDebug const LogDebugWithEventStreamBody const LogDebugWithHTTPBody const LogDebugWithRequestErrors const LogDebugWithRequestRetries const LogDebugWithSigning const LogOff
MultiCloser is a utility to close multiple io.Closers within a single statement. Close closes all of the io.Closers making up the MultiClosers. Any errors that occur while closing will be returned in the order they occur. T : io.Closer
ReaderSeekerCloser represents a reader that can also delegate io.Seeker and io.Closer interfaces to the underlying object if they are available. Close closes the ReaderSeekerCloser. If the ReaderSeekerCloser is not an io.Closer nothing will be done. GetLen returns the length of the bytes remaining in the underlying reader. Checks first for Len(), then io.Seeker to determine the size of the underlying reader. Will return -1 if the length cannot be determined. HasLen returns the length of the underlying reader if the value implements the Len() int method. IsSeeker returns if the underlying reader is also a seeker. Read reads from the reader up to size of p. The number of bytes read, and error if it occurred will be returned. If the reader is not an io.Reader zero bytes read, and nil error will be returned. Performs the same functionality as io.Reader Read Seek sets the offset for the next Read to offset, interpreted according to whence: 0 means relative to the origin of the file, 1 means relative to the current offset, and 2 means relative to the end. Seek returns the new offset and an error, if any. If the ReaderSeekerCloser is not an io.Seeker nothing will be done. T : github.com/jbenet/go-context/io.Reader T : io.Closer T : io.ReadCloser T : io.Reader T : io.ReadSeekCloser T : io.ReadSeeker T : io.Seeker func ReadSeekCloser(r io.Reader) ReaderSeekerCloser
RequestRetryer is an alias for a type that implements the request.Retryer interface.
A WriteAtBuffer provides a in memory buffer supporting the io.WriterAt interface Can be used with the s3manager.Downloader to download content to a buffer in memory. Safe to use concurrently. GrowthCoeff defines the growth rate of the internal buffer. By default, the growth rate is 1, where expanding the internal buffer will allocate only enough capacity to fit the new expected length. Bytes returns a slice of bytes written to the buffer. WriteAt writes a slice of bytes to a buffer starting at the position provided The number of bytes written will be returned, or error. Can overwrite previous written slices if the write ats overlap. *T : io.WriterAt func NewWriteAtBuffer(buf []byte) *WriteAtBuffer
Package-Level Functions (total 106, in which 104 are exported)
BackgroundContext returns a context that will never be canceled, has no values, and no deadline. This context is used by the SDK to provide backwards compatibility with non-context API operations and functionality. Go 1.6 and before: This context function is equivalent to context.Background in the Go stdlib. Go 1.7 and later: The context returned will be the value returned by context.Background() See https://golang.org/pkg/context for more information on Contexts.
Bool returns a pointer to the bool value passed in.
BoolMap converts a string map of bool values into a string map of bool pointers
BoolSlice converts a slice of bool values into a slice of bool pointers
BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.
BoolValueMap converts a string map of bool pointers into a string map of bool values
BoolValueSlice converts a slice of bool pointers into a slice of bool values
CopySeekableBody copies the seekable body to an io.Writer
Float32 returns a pointer to the float32 value passed in.
Float32Map converts a string map of float32 values into a string map of float32 pointers
Float32Slice converts a slice of float32 values into a slice of float32 pointers
Float32Value returns the value of the float32 pointer passed in or 0 if the pointer is nil.
Float32ValueMap converts a string map of float32 pointers into a string map of float32 values
Float32ValueSlice converts a slice of float32 pointers into a slice of float32 values
Float64 returns a pointer to the float64 value passed in.
Float64Map converts a string map of float64 values into a string map of float64 pointers
Float64Slice converts a slice of float64 values into a slice of float64 pointers
Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.
Float64ValueMap converts a string map of float64 pointers into a string map of float64 values
Float64ValueSlice converts a slice of float64 pointers into a slice of float64 values
Int returns a pointer to the int value passed in.
Int16 returns a pointer to the int16 value passed in.
Int16Map converts a string map of int16 values into a string map of int16 pointers
Int16Slice converts a slice of int16 values into a slice of int16 pointers
Int16Value returns the value of the int16 pointer passed in or 0 if the pointer is nil.
Int16ValueMap converts a string map of int16 pointers into a string map of int16 values
Int16ValueSlice converts a slice of int16 pointers into a slice of int16 values
Int32 returns a pointer to the int32 value passed in.
Int32Map converts a string map of int32 values into a string map of int32 pointers
Int32Slice converts a slice of int32 values into a slice of int32 pointers
Int32Value returns the value of the int32 pointer passed in or 0 if the pointer is nil.
Int32ValueMap converts a string map of int32 pointers into a string map of int32 values
Int32ValueSlice converts a slice of int32 pointers into a slice of int32 values
Int64 returns a pointer to the int64 value passed in.
Int64Map converts a string map of int64 values into a string map of int64 pointers
Int64Slice converts a slice of int64 values into a slice of int64 pointers
Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.
Int64ValueMap converts a string map of int64 pointers into a string map of int64 values
Int64ValueSlice converts a slice of int64 pointers into a slice of int64 values
Int8 returns a pointer to the int8 value passed in.
Int8Map converts a string map of int8 values into a string map of int8 pointers
Int8Slice converts a slice of int8 values into a slice of int8 pointers
Int8Value returns the value of the int8 pointer passed in or 0 if the pointer is nil.
Int8ValueMap converts a string map of int8 pointers into a string map of int8 values
Int8ValueSlice converts a slice of int8 pointers into a slice of int8 values
IntMap converts a string map of int values into a string map of int pointers
IntSlice converts a slice of int values into a slice of int pointers
IntValue returns the value of the int pointer passed in or 0 if the pointer is nil.
IntValueMap converts a string map of int pointers into a string map of int values
IntValueSlice converts a slice of int pointers into a slice of int values
IsReaderSeekable returns if the underlying reader type can be seeked. A io.Reader might not actually be seekable if it is the ReaderSeekerCloser type.
LogLevel returns the pointer to a LogLevel. Should be used to workaround not being able to take the address of a non-composite literal.
MillisecondsTimeValue converts an int64 pointer to a time.Time value representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.
NewConfig returns a new Config pointer that can be chained with builder methods to set multiple configuration values inline without using pointers. // Create Session with MaxRetries configuration to be shared by multiple // service clients. sess := session.Must(session.NewSession(aws.NewConfig(). WithMaxRetries(3), )) // Create S3 service client with a specific Region. svc := s3.New(sess, aws.NewConfig(). WithRegion("us-west-2"), )
NewDefaultLogger returns a Logger which will write log messages to stdout, and use same formatting runes as the stdlib log.Logger
NewWriteAtBuffer creates a WriteAtBuffer with an internal buffer provided by buf.
ReadSeekCloser wraps a io.Reader returning a ReaderSeekerCloser. Allows the SDK to accept an io.Reader that is not also an io.Seeker for unsigned streaming payload API operations. A ReadSeekCloser wrapping an nonseekable io.Reader used in an API operation's input will prevent that operation being retried in the case of network errors, and cause operation requests to fail if the operation requires payload signing. Note: If using With S3 PutObject to stream an object upload The SDK's S3 Upload manager (s3manager.Uploader) provides support for streaming with the ability to retry network errors.
SecondsTimeValue converts an int64 pointer to a time.Time value representing seconds since Epoch or time.Time{} if the pointer is nil.
SeekerLen attempts to get the number of bytes remaining at the seeker's current position. Returns the number of bytes remaining or error.
SleepWithContext will wait for the timer duration to expire, or the context is canceled. Which ever happens first. If the context is canceled the Context's error will be returned. Expects Context to always return a non-nil error if the Done channel is closed.
String returns a pointer to the string value passed in.
StringMap converts a string map of string values into a string map of string pointers
StringSlice converts a slice of string values into a slice of string pointers
StringValue returns the value of the string pointer passed in or "" if the pointer is nil.
StringValueMap converts a string map of string pointers into a string map of string values
StringValueSlice converts a slice of string pointers into a slice of string values
Time returns a pointer to the time.Time value passed in.
TimeMap converts a string map of time.Time values into a string map of time.Time pointers
TimeSlice converts a slice of time.Time values into a slice of time.Time pointers
TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". The result is undefined if the Unix time cannot be represented by an int64. Which includes calling TimeUnixMilli on a zero Time is undefined. This utility is useful for service API's such as CloudWatch Logs which require their unix time values to be in milliseconds. See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information.
TimeValue returns the value of the time.Time pointer passed in or time.Time{} if the pointer is nil.
TimeValueMap converts a string map of time.Time pointers into a string map of time.Time values
TimeValueSlice converts a slice of time.Time pointers into a slice of time.Time values
Uint returns a pointer to the uint value passed in.
Uint16 returns a pointer to the uint16 value passed in.
Uint16Map converts a string map of uint16 values into a string map of uint16 pointers
Uint16Slice converts a slice of uint16 values into a slice of uint16 pointers
Uint16Value returns the value of the uint16 pointer passed in or 0 if the pointer is nil.
Uint16ValueMap converts a string map of uint16 pointers into a string map of uint16 values
Uint16ValueSlice converts a slice of uint16 pointers into a slice of uint16 values
Uint32 returns a pointer to the uint32 value passed in.
Uint32Map converts a string map of uint32 values into a string map of uint32 pointers
Uint32Slice converts a slice of uint32 values into a slice of uint32 pointers
Uint32Value returns the value of the uint32 pointer passed in or 0 if the pointer is nil.
Uint32ValueMap converts a string map of uint32 pointers into a string map of uint32 values
Uint32ValueSlice converts a slice of uint32 pointers into a slice of uint32 values
Uint64 returns a pointer to the uint64 value passed in.
Uint64Map converts a string map of uint64 values into a string map of uint64 pointers
Uint64Slice converts a slice of uint64 values into a slice of uint64 pointers
Uint64Value returns the value of the uint64 pointer passed in or 0 if the pointer is nil.
Uint64ValueMap converts a string map of uint64 pointers into a string map of uint64 values
Uint64ValueSlice converts a slice of uint64 pointers into a slice of uint64 values
Uint8 returns a pointer to the uint8 value passed in.
Uint8Map converts a string map of uint8 values into a string map of uint8 pointers
Uint8Slice converts a slice of uint8 values into a slice of uint8 pointers
Uint8Value returns the value of the uint8 pointer passed in or 0 if the pointer is nil.
Uint8ValueMap converts a string map of uint8 pointers into a string map of uint8 values
Uint8ValueSlice converts a slice of uint8 pointers into a slice of uint8 values
UintMap converts a string map of uint values uinto a string map of uint pointers
UintSlice converts a slice of uint values uinto a slice of uint pointers
UintValue returns the value of the uint pointer passed in or 0 if the pointer is nil.
UintValueMap converts a string map of uint pointers uinto a string map of uint values
UintValueSlice converts a slice of uint pointers uinto a slice of uint values
URLHostname will extract the Hostname without port from the URL value. Wrapper of net/url#URL.Hostname for backwards Go version compatibility.
Package-Level Variables (total 2, both are exported)
ErrMissingEndpoint is an error that is returned if an endpoint cannot be resolved for a service.
ErrMissingRegion is an error that is returned if region configuration is not found.
Package-Level Constants (total 10, all are exported)
LogDebug state that debug output should be logged by the SDK. This should be used to inspect request made and responses received.
LogDebugWithEventStreamBody states the SDK should log EventStream request and response bodys. This should be used to log the EventStream wire unmarshaled message content of requests and responses made while using the SDK Will also enable LogDebug.
LogDebugWithHTTPBody states the SDK should log HTTP request and response HTTP bodys in addition to the headers and path. This should be used to see the body content of requests and responses made while using the SDK Will also enable LogDebug.
LogDebugWithRequestErrors states the SDK should log when service requests fail to build, send, validate, or unmarshal.
LogDebugWithRequestRetries states the SDK should log when service requests will be retried. This should be used to log when you want to log when service requests are being retried. Will also enable LogDebug.
LogDebugWithSigning states that the SDK should log request signing and presigning events. This should be used to log the signing details of requests for debugging. Will also enable LogDebug.
LogOff states that no logging should be performed by the SDK. This is the default state of the SDK, and should be use to disable all logging.
SDKName is the name of this AWS SDK
SDKVersion is the version of this SDK
UseServiceDefaultRetries instructs the config to use the service's own default number of retries. This will be the default action if Config.MaxRetries is nil also.