Struct: aws.Config

import "../ibm-cos-sdk-go-v2/aws"

Overview

A Config provides service configuration for service clients.

Implemented Interfaces

types.AnalyticsFilter, v4.HTTPPresigner, s3.HTTPPresignerV4, types.MetricsFilter, s3.PresignPost, arn.S3ObjectLambdaARN, types.SelectObjectContentEventStream

Structure Field Summary collapse

Constructor Functions collapse

Method Summary collapse

Structure Field Details

AccountIDEndpointMode AccountIDEndpointMode

Controls how a resolved AWS account ID is handled for endpoint routing.

AppID string

AppId is an optional application specific identifier that can be set. When set it will be appended to the User-Agent header of every request in the form of App/AppId. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id. See docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html for more information on environment variables and shared config settings.

BaseEndpoint *string

BaseEndpoint is an intermediary transfer location to a service specific BaseEndpoint on a service’s Options.

BearerAuthTokenProvider smithybearer.TokenProvider

The Bearer Authentication token provider to use for authenticating API operation calls with a Bearer Authentication token. The API clients and operation must support Bearer Authentication scheme in order for the token provider to be used. API clients created with NewFromConfig will automatically be configured with this option, if the API client support Bearer Authentication.

The SDK’s config.LoadDefaultConfig can automatically populate this option for external configuration options such as SSO session. docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html

ClientLogMode ClientLogMode

Configures the events that will be sent to the configured logger. This can be used to configure the logging of signing, retries, request, and responses of the SDK clients.

See the ClientLogMode type documentation for the complete set of logging modes and available configuration.

ConfigSources []interface{}

ConfigSources are the sources that were used to construct the Config. Allows for additional configuration to be loaded by clients.

Credentials CredentialsProvider

The credentials object to use when signing requests. Use the LoadDefaultConfig to load configuration from all the SDK’s supported sources, and resolve credentials using the SDK’s default credential chain.

DefaultsMode DefaultsMode

The configured DefaultsMode. If not specified, service clients will default to legacy.

Supported modes are: auto, cross-region, in-region, legacy, mobile, standard

DisableRequestCompression bool

DisableRequestCompression toggles if an operation request could be compressed or not. Will be set to false by default. This variable is sourced from environment variable AWS_DISABLE_REQUEST_COMPRESSION or the shared config profile attribute disable_request_compression

EndpointResolver EndpointResolver

An endpoint resolver that can be used to provide or override an endpoint for the given service and region.

See the aws.EndpointResolver documentation for additional usage information.

Deprecated: See Config.EndpointResolverWithOptions

EndpointResolverWithOptions EndpointResolverWithOptions

An endpoint resolver that can be used to provide or override an endpoint for the given service and region.

When EndpointResolverWithOptions is specified, it will be used by a service client rather than using EndpointResolver if also specified.

See the aws.EndpointResolverWithOptions documentation for additional usage information.

Deprecated: with the release of endpoint resolution v2 in API clients, EndpointResolver and EndpointResolverWithOptions are deprecated. Providing a value for this field will likely prevent you from using newer endpoint-related service features. See API client options EndpointResolverV2 and BaseEndpoint.

HTTPClient HTTPClient

The HTTP Client the SDK’s API clients will use to invoke HTTP requests. The SDK defaults to a BuildableClient allowing API clients to create copies of the HTTP Client for service specific customizations.

Use a (*http.Client) for custom behavior. Using a custom http.Client will prevent the SDK from modifying the HTTP client.

Logger logging.Logger

The logger writer interface to write logging messages to. Defaults to standard error.

Region string

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 docs.aws.amazon.com/general/latest/gr/rande.html for information on AWS regions.

RequestChecksumCalculation RequestChecksumCalculation

RequestChecksumCalculation determines when request checksum calculation is performed.

There are two possible values for this setting:

  1. RequestChecksumCalculationWhenSupported (default): The checksum is always calculated if the operation supports it, regardless of whether the user sets an algorithm in the request.

  2. RequestChecksumCalculationWhenRequired: The checksum is only calculated if the user explicitly sets a checksum algorithm in the request.

This setting is sourced from the environment variable AWS_REQUEST_CHECKSUM_CALCULATION or the shared config profile attribute “request_checksum_calculation”.

RequestMinCompressSizeBytes int64

RequestMinCompressSizeBytes sets the inclusive min bytes of a request body that could be compressed. Will be set to 10240 by default and must be within 0 and 10485760 bytes inclusively. This variable is sourced from environment variable AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES or the shared config profile attribute request_min_compression_size_bytes

ResponseChecksumValidation ResponseChecksumValidation

ResponseChecksumValidation determines when response checksum validation is performed

There are two possible values for this setting:

  1. ResponseChecksumValidationWhenSupported (default): The checksum is always validated if the operation supports it, regardless of whether the user sets the validation mode to ENABLED in request.

  2. ResponseChecksumValidationWhenRequired: The checksum is only validated if the user explicitly sets the validation mode to ENABLED in the request This variable is sourced from environment variable AWS_RESPONSE_CHECKSUM_VALIDATION or the shared config profile attribute "response_checksum_validation".

RetryMaxAttempts int

RetryMaxAttempts specifies the maximum number attempts an API client will call an operation that fails with a retryable error.

API Clients will only use this value to construct a retryer if the Config.Retryer member is not nil. This value will be ignored if Retryer is not nil.

RetryMode RetryMode

RetryMode specifies the retry model the API client will be created with.

API Clients will only use this value to construct a retryer if the Config.Retryer member is not nil. This value will be ignored if Retryer is not nil.

RuntimeEnvironment RuntimeEnvironment

The RuntimeEnvironment configuration, only populated if the DefaultsMode is set to DefaultsModeAuto and is initialized by config.LoadDefaultConfig. You should not populate this structure programmatically, or rely on the values here within your applications.

Function Details

func NewConfig() *Config

NewConfig returns a new Config pointer that can be chained with builder methods to set multiple configuration values inline without using pointers.



198
199
200
// File 'aws/config.go', line 198

func NewConfig() *Config { return &Config{} }

Method Details

func (c Config) Copy() Config

Copy will return a shallow copy of the Config object.



203
204
205
206
// File 'aws/config.go', line 203

func (c Config) Copy() Config { cp := c return cp }