awsopt

package
v1.67.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package awsopt provides functions to configure common AWS options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options []config.LoadOptionsFunc

Options is a set of all AWS options to apply.

func (*Options) LoadDefaultConfig

func (c *Options) LoadDefaultConfig(ctx context.Context) (aws.Config, error)

LoadDefaultConfig populates an AWS Config with the values from the external configurations and set options.

func (*Options) WithAWSOption

func (c *Options) WithAWSOption(opt config.LoadOptionsFunc)

WithAWSOption allows to add an arbitrary AWS option.

func (*Options) WithEndpoint

func (c *Options) WithEndpoint(url string, isImmutable bool)

WithEndpoint overrides the AWS endpoint for the service.

func (*Options) WithRegion

func (c *Options) WithRegion(region string)

WithRegion allows to specify the AWS region.

func (*Options) WithRegionFromURL

func (c *Options) WithRegionFromURL(url, defaultRegion string)

WithRegionFromURL allows to specify the AWS region extracted from the provided URL. If the URL does not contain a region, a default one will be returned with the order of precedence:

  • the specified defaultRegion;
  • the AWS_REGION environment variable;
  • the AWS_DEFAULT_REGION environment variable;
  • the region set in the awsDefaultRegion constant.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL