build(deps): bump github.com/aws/aws-sdk-go from 1.40.49 to 1.42.25
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.40.49 to 1.42.25. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.40.49...v1.42.25) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
885fe3d2b4
commit
8b66e64893
54 changed files with 42469 additions and 6987 deletions
13
vendor/github.com/aws/aws-sdk-go/aws/client/client.go
generated
vendored
13
vendor/github.com/aws/aws-sdk-go/aws/client/client.go
generated
vendored
|
|
@ -10,12 +10,13 @@ import (
|
|||
|
||||
// A Config provides configuration to a service client instance.
|
||||
type Config struct {
|
||||
Config *aws.Config
|
||||
Handlers request.Handlers
|
||||
PartitionID string
|
||||
Endpoint string
|
||||
SigningRegion string
|
||||
SigningName string
|
||||
Config *aws.Config
|
||||
Handlers request.Handlers
|
||||
PartitionID string
|
||||
Endpoint string
|
||||
SigningRegion string
|
||||
SigningName string
|
||||
ResolvedRegion string
|
||||
|
||||
// States that the signing name did not come from a modeled source but
|
||||
// was derived based on other data. Used by service client constructors
|
||||
|
|
|
|||
19
vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
generated
vendored
19
vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
generated
vendored
|
|
@ -2,13 +2,14 @@ package metadata
|
|||
|
||||
// ClientInfo wraps immutable data from the client.Client structure.
|
||||
type ClientInfo struct {
|
||||
ServiceName string
|
||||
ServiceID string
|
||||
APIVersion string
|
||||
PartitionID string
|
||||
Endpoint string
|
||||
SigningName string
|
||||
SigningRegion string
|
||||
JSONVersion string
|
||||
TargetPrefix string
|
||||
ServiceName string
|
||||
ServiceID string
|
||||
APIVersion string
|
||||
PartitionID string
|
||||
Endpoint string
|
||||
SigningName string
|
||||
SigningRegion string
|
||||
JSONVersion string
|
||||
TargetPrefix string
|
||||
ResolvedRegion string
|
||||
}
|
||||
|
|
|
|||
23
vendor/github.com/aws/aws-sdk-go/aws/config.go
generated
vendored
23
vendor/github.com/aws/aws-sdk-go/aws/config.go
generated
vendored
|
|
@ -208,8 +208,19 @@ type Config struct {
|
|||
// svc := s3.New(sess, &aws.Config{
|
||||
// UseDualStack: aws.Bool(true),
|
||||
// })
|
||||
//
|
||||
// Deprecated: This option will continue to function for S3 and S3 Control for backwards compatibility.
|
||||
// UseDualStackEndpoint should be used to enable usage of a service's dual-stack endpoint for all service clients
|
||||
// moving forward. For S3 and S3 Control, when UseDualStackEndpoint is set to a non-zero value it takes higher
|
||||
// precedence then this option.
|
||||
UseDualStack *bool
|
||||
|
||||
// Sets the resolver to resolve a dual-stack endpoint for the service.
|
||||
UseDualStackEndpoint endpoints.DualStackEndpointState
|
||||
|
||||
// UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
|
||||
UseFIPSEndpoint endpoints.FIPSEndpointState
|
||||
|
||||
// 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
|
||||
|
|
@ -554,6 +565,10 @@ func mergeInConfig(dst *Config, other *Config) {
|
|||
dst.UseDualStack = other.UseDualStack
|
||||
}
|
||||
|
||||
if other.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset {
|
||||
dst.UseDualStackEndpoint = other.UseDualStackEndpoint
|
||||
}
|
||||
|
||||
if other.EC2MetadataDisableTimeoutOverride != nil {
|
||||
dst.EC2MetadataDisableTimeoutOverride = other.EC2MetadataDisableTimeoutOverride
|
||||
}
|
||||
|
|
@ -589,6 +604,14 @@ func mergeInConfig(dst *Config, other *Config) {
|
|||
if other.LowerCaseHeaderMaps != nil {
|
||||
dst.LowerCaseHeaderMaps = other.LowerCaseHeaderMaps
|
||||
}
|
||||
|
||||
if other.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset {
|
||||
dst.UseDualStackEndpoint = other.UseDualStackEndpoint
|
||||
}
|
||||
|
||||
if other.UseFIPSEndpoint != endpoints.FIPSEndpointStateUnset {
|
||||
dst.UseFIPSEndpoint = other.UseFIPSEndpoint
|
||||
}
|
||||
}
|
||||
|
||||
// Copy will return a shallow copy of the Config object. If any additional
|
||||
|
|
|
|||
59
vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
generated
vendored
59
vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
generated
vendored
|
|
@ -81,7 +81,6 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol
|
|||
// Customization
|
||||
for i := 0; i < len(ps); i++ {
|
||||
p := &ps[i]
|
||||
custAddS3DualStack(p)
|
||||
custRegionalS3(p)
|
||||
custRmIotDataService(p)
|
||||
custFixAppAutoscalingChina(p)
|
||||
|
|
@ -91,15 +90,6 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol
|
|||
return ps, nil
|
||||
}
|
||||
|
||||
func custAddS3DualStack(p *partition) {
|
||||
if !(p.ID == "aws" || p.ID == "aws-cn" || p.ID == "aws-us-gov") {
|
||||
return
|
||||
}
|
||||
|
||||
custAddDualstack(p, "s3")
|
||||
custAddDualstack(p, "s3-control")
|
||||
}
|
||||
|
||||
func custRegionalS3(p *partition) {
|
||||
if p.ID != "aws" {
|
||||
return
|
||||
|
|
@ -110,35 +100,28 @@ func custRegionalS3(p *partition) {
|
|||
return
|
||||
}
|
||||
|
||||
const awsGlobal = "aws-global"
|
||||
const usEast1 = "us-east-1"
|
||||
|
||||
// If global endpoint already exists no customization needed.
|
||||
if _, ok := service.Endpoints["aws-global"]; ok {
|
||||
if _, ok := service.Endpoints[endpointKey{Region: awsGlobal}]; ok {
|
||||
return
|
||||
}
|
||||
|
||||
service.PartitionEndpoint = "aws-global"
|
||||
service.Endpoints["us-east-1"] = endpoint{}
|
||||
service.Endpoints["aws-global"] = endpoint{
|
||||
service.PartitionEndpoint = awsGlobal
|
||||
if _, ok := service.Endpoints[endpointKey{Region: usEast1}]; !ok {
|
||||
service.Endpoints[endpointKey{Region: usEast1}] = endpoint{}
|
||||
}
|
||||
service.Endpoints[endpointKey{Region: awsGlobal}] = endpoint{
|
||||
Hostname: "s3.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-east-1",
|
||||
Region: usEast1,
|
||||
},
|
||||
}
|
||||
|
||||
p.Services["s3"] = service
|
||||
}
|
||||
|
||||
func custAddDualstack(p *partition, svcName string) {
|
||||
s, ok := p.Services[svcName]
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
s.Defaults.HasDualStack = boxedTrue
|
||||
s.Defaults.DualStackHostname = "{service}.dualstack.{region}.{dnsSuffix}"
|
||||
|
||||
p.Services[svcName] = s
|
||||
}
|
||||
|
||||
func custRmIotDataService(p *partition) {
|
||||
delete(p.Services, "data.iot")
|
||||
}
|
||||
|
|
@ -155,12 +138,13 @@ func custFixAppAutoscalingChina(p *partition) {
|
|||
}
|
||||
|
||||
const expectHostname = `autoscaling.{region}.amazonaws.com`
|
||||
if e, a := s.Defaults.Hostname, expectHostname; e != a {
|
||||
serviceDefault := s.Defaults[defaultKey{}]
|
||||
if e, a := expectHostname, serviceDefault.Hostname; e != a {
|
||||
fmt.Printf("custFixAppAutoscalingChina: ignoring customization, expected %s, got %s\n", e, a)
|
||||
return
|
||||
}
|
||||
|
||||
s.Defaults.Hostname = expectHostname + ".cn"
|
||||
serviceDefault.Hostname = expectHostname + ".cn"
|
||||
s.Defaults[defaultKey{}] = serviceDefault
|
||||
p.Services[serviceName] = s
|
||||
}
|
||||
|
||||
|
|
@ -175,18 +159,25 @@ func custFixAppAutoscalingUsGov(p *partition) {
|
|||
return
|
||||
}
|
||||
|
||||
if a := s.Defaults.CredentialScope.Service; a != "" {
|
||||
serviceDefault := s.Defaults[defaultKey{}]
|
||||
if a := serviceDefault.CredentialScope.Service; a != "" {
|
||||
fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty credential scope service, got %s\n", a)
|
||||
return
|
||||
}
|
||||
|
||||
if a := s.Defaults.Hostname; a != "" {
|
||||
if a := serviceDefault.Hostname; a != "" {
|
||||
fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty hostname, got %s\n", a)
|
||||
return
|
||||
}
|
||||
|
||||
s.Defaults.CredentialScope.Service = "application-autoscaling"
|
||||
s.Defaults.Hostname = "autoscaling.{region}.amazonaws.com"
|
||||
serviceDefault.CredentialScope.Service = "application-autoscaling"
|
||||
serviceDefault.Hostname = "autoscaling.{region}.amazonaws.com"
|
||||
|
||||
if s.Defaults == nil {
|
||||
s.Defaults = make(endpointDefaults)
|
||||
}
|
||||
|
||||
s.Defaults[defaultKey{}] = serviceDefault
|
||||
|
||||
p.Services[serviceName] = s
|
||||
}
|
||||
|
|
|
|||
27914
vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
generated
vendored
27914
vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
generated
vendored
File diff suppressed because it is too large
Load diff
103
vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
generated
vendored
103
vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
generated
vendored
|
|
@ -8,6 +8,41 @@ import (
|
|||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
)
|
||||
|
||||
// A Logger is a minimalistic interface for the SDK to log messages to.
|
||||
type Logger interface {
|
||||
Log(...interface{})
|
||||
}
|
||||
|
||||
// DualStackEndpointState is a constant to describe the dual-stack endpoint resolution
|
||||
// behavior.
|
||||
type DualStackEndpointState uint
|
||||
|
||||
const (
|
||||
// DualStackEndpointStateUnset is the default value behavior for dual-stack endpoint
|
||||
// resolution.
|
||||
DualStackEndpointStateUnset DualStackEndpointState = iota
|
||||
|
||||
// DualStackEndpointStateEnabled enable dual-stack endpoint resolution for endpoints.
|
||||
DualStackEndpointStateEnabled
|
||||
|
||||
// DualStackEndpointStateDisabled disables dual-stack endpoint resolution for endpoints.
|
||||
DualStackEndpointStateDisabled
|
||||
)
|
||||
|
||||
// FIPSEndpointState is a constant to describe the FIPS endpoint resolution behavior.
|
||||
type FIPSEndpointState uint
|
||||
|
||||
const (
|
||||
// FIPSEndpointStateUnset is the default value behavior for FIPS endpoint resolution.
|
||||
FIPSEndpointStateUnset FIPSEndpointState = iota
|
||||
|
||||
// FIPSEndpointStateEnabled enables FIPS endpoint resolution for service endpoints.
|
||||
FIPSEndpointStateEnabled
|
||||
|
||||
// FIPSEndpointStateDisabled disables FIPS endpoint resolution for endpoints.
|
||||
FIPSEndpointStateDisabled
|
||||
)
|
||||
|
||||
// Options provide the configuration needed to direct how the
|
||||
// endpoints will be resolved.
|
||||
type Options struct {
|
||||
|
|
@ -21,8 +56,19 @@ type Options struct {
|
|||
// be returned. This endpoint may not be valid. If StrictMatching is
|
||||
// enabled only services that are known to support dualstack will return
|
||||
// dualstack endpoints.
|
||||
//
|
||||
// Deprecated: This option will continue to function for S3 and S3 Control for backwards compatibility.
|
||||
// UseDualStackEndpoint should be used to enable usage of a service's dual-stack endpoint for all service clients
|
||||
// moving forward. For S3 and S3 Control, when UseDualStackEndpoint is set to a non-zero value it takes higher
|
||||
// precedence then this option.
|
||||
UseDualStack bool
|
||||
|
||||
// Sets the resolver to resolve a dual-stack endpoint for the service.
|
||||
UseDualStackEndpoint DualStackEndpointState
|
||||
|
||||
// UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
|
||||
UseFIPSEndpoint FIPSEndpointState
|
||||
|
||||
// Enables strict matching of services and regions resolved endpoints.
|
||||
// If the partition doesn't enumerate the exact service and region an
|
||||
// error will be returned. This option will prevent returning endpoints
|
||||
|
|
@ -56,6 +102,30 @@ type Options struct {
|
|||
|
||||
// S3 Regional Endpoint flag helps with resolving the S3 endpoint
|
||||
S3UsEast1RegionalEndpoint S3UsEast1RegionalEndpoint
|
||||
|
||||
// ResolvedRegion is the resolved region string. If provided (non-zero length) it takes priority
|
||||
// over the region name passed to the ResolveEndpoint call.
|
||||
ResolvedRegion string
|
||||
|
||||
// Logger is the logger that will be used to log messages.
|
||||
Logger Logger
|
||||
|
||||
// Determines whether logging of deprecated endpoints usage is enabled.
|
||||
LogDeprecated bool
|
||||
}
|
||||
|
||||
func (o Options) getEndpointVariant(service string) (v endpointVariant) {
|
||||
const s3 = "s3"
|
||||
const s3Control = "s3-control"
|
||||
|
||||
if (o.UseDualStackEndpoint == DualStackEndpointStateEnabled) ||
|
||||
((service == s3 || service == s3Control) && (o.UseDualStackEndpoint == DualStackEndpointStateUnset && o.UseDualStack)) {
|
||||
v |= dualStackVariant
|
||||
}
|
||||
if o.UseFIPSEndpoint == FIPSEndpointStateEnabled {
|
||||
v |= fipsVariant
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
// EC2IMDSEndpointModeState is an enum configuration variable describing the client endpoint mode.
|
||||
|
|
@ -196,10 +266,25 @@ func DisableSSLOption(o *Options) {
|
|||
|
||||
// UseDualStackOption sets the UseDualStack option. Can be used as a functional
|
||||
// option when resolving endpoints.
|
||||
//
|
||||
// Deprecated: UseDualStackEndpointOption should be used to enable usage of a service's dual-stack endpoint.
|
||||
// When DualStackEndpointState is set to a non-zero value it takes higher precedence then this option.
|
||||
func UseDualStackOption(o *Options) {
|
||||
o.UseDualStack = true
|
||||
}
|
||||
|
||||
// UseDualStackEndpointOption sets the UseDualStackEndpoint option to enabled. Can be used as a functional
|
||||
// option when resolving endpoints.
|
||||
func UseDualStackEndpointOption(o *Options) {
|
||||
o.UseDualStackEndpoint = DualStackEndpointStateEnabled
|
||||
}
|
||||
|
||||
// UseFIPSEndpointOption sets the UseFIPSEndpoint option to enabled. Can be used as a functional
|
||||
// option when resolving endpoints.
|
||||
func UseFIPSEndpointOption(o *Options) {
|
||||
o.UseFIPSEndpoint = FIPSEndpointStateEnabled
|
||||
}
|
||||
|
||||
// StrictMatchingOption sets the StrictMatching option. Can be used as a functional
|
||||
// option when resolving endpoints.
|
||||
func StrictMatchingOption(o *Options) {
|
||||
|
|
@ -407,7 +492,7 @@ func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (Resolve
|
|||
func (r Region) Services() map[string]Service {
|
||||
ss := map[string]Service{}
|
||||
for id, s := range r.p.Services {
|
||||
if _, ok := s.Endpoints[r.id]; ok {
|
||||
if _, ok := s.Endpoints[endpointKey{Region: r.id}]; ok {
|
||||
ss[id] = Service{
|
||||
id: id,
|
||||
p: r.p,
|
||||
|
|
@ -452,9 +537,12 @@ func (s Service) Regions() map[string]Region {
|
|||
}
|
||||
|
||||
for id := range service.Endpoints {
|
||||
if r, ok := s.p.Regions[id]; ok {
|
||||
rs[id] = Region{
|
||||
id: id,
|
||||
if id.Variant != 0 {
|
||||
continue
|
||||
}
|
||||
if r, ok := s.p.Regions[id.Region]; ok {
|
||||
rs[id.Region] = Region{
|
||||
id: id.Region,
|
||||
desc: r.Description,
|
||||
p: s.p,
|
||||
}
|
||||
|
|
@ -472,8 +560,11 @@ func (s Service) Regions() map[string]Region {
|
|||
func (s Service) Endpoints() map[string]Endpoint {
|
||||
es := make(map[string]Endpoint, len(s.p.Services[s.id].Endpoints))
|
||||
for id := range s.p.Services[s.id].Endpoints {
|
||||
es[id] = Endpoint{
|
||||
id: id,
|
||||
if id.Variant != 0 {
|
||||
continue
|
||||
}
|
||||
es[id.Region] = Endpoint{
|
||||
id: id.Region,
|
||||
serviceID: s.id,
|
||||
p: s.p,
|
||||
}
|
||||
|
|
|
|||
297
vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
generated
vendored
297
vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
generated
vendored
|
|
@ -1,6 +1,7 @@
|
|||
package endpoints
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
|
|
@ -12,6 +13,34 @@ const (
|
|||
ec2MetadataEndpointIPv4 = "http://169.254.169.254/latest"
|
||||
)
|
||||
|
||||
const dnsSuffixTemplateKey = "{dnsSuffix}"
|
||||
|
||||
// defaultKey is a compound map key of a variant and other values.
|
||||
type defaultKey struct {
|
||||
Variant endpointVariant
|
||||
ServiceVariant serviceVariant
|
||||
}
|
||||
|
||||
// endpointKey is a compound map key of a region and associated variant value.
|
||||
type endpointKey struct {
|
||||
Region string
|
||||
Variant endpointVariant
|
||||
}
|
||||
|
||||
// endpointVariant is a bit field to describe the endpoints attributes.
|
||||
type endpointVariant uint64
|
||||
|
||||
// serviceVariant is a bit field to describe the service endpoint attributes.
|
||||
type serviceVariant uint64
|
||||
|
||||
const (
|
||||
// fipsVariant indicates that the endpoint is FIPS capable.
|
||||
fipsVariant endpointVariant = 1 << (64 - 1 - iota)
|
||||
|
||||
// dualStackVariant indicates that the endpoint is DualStack capable.
|
||||
dualStackVariant
|
||||
)
|
||||
|
||||
var regionValidationRegex = regexp.MustCompile(`^[[:alnum:]]([[:alnum:]\-]*[[:alnum:]])?$`)
|
||||
|
||||
type partitions []partition
|
||||
|
|
@ -20,8 +49,12 @@ func (ps partitions) EndpointFor(service, region string, opts ...func(*Options))
|
|||
var opt Options
|
||||
opt.Set(opts...)
|
||||
|
||||
if len(opt.ResolvedRegion) > 0 {
|
||||
region = opt.ResolvedRegion
|
||||
}
|
||||
|
||||
for i := 0; i < len(ps); i++ {
|
||||
if !ps[i].canResolveEndpoint(service, region, opt.StrictMatching) {
|
||||
if !ps[i].canResolveEndpoint(service, region, opt) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
@ -49,14 +82,76 @@ func (ps partitions) Partitions() []Partition {
|
|||
return parts
|
||||
}
|
||||
|
||||
type endpointWithVariants struct {
|
||||
endpoint
|
||||
Variants []endpointWithTags `json:"variants"`
|
||||
}
|
||||
|
||||
type endpointWithTags struct {
|
||||
endpoint
|
||||
Tags []string `json:"tags"`
|
||||
}
|
||||
|
||||
type endpointDefaults map[defaultKey]endpoint
|
||||
|
||||
func (p *endpointDefaults) UnmarshalJSON(data []byte) error {
|
||||
if *p == nil {
|
||||
*p = make(endpointDefaults)
|
||||
}
|
||||
|
||||
var e endpointWithVariants
|
||||
if err := json.Unmarshal(data, &e); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
(*p)[defaultKey{Variant: 0}] = e.endpoint
|
||||
|
||||
e.Hostname = ""
|
||||
e.DNSSuffix = ""
|
||||
|
||||
for _, variant := range e.Variants {
|
||||
endpointVariant, unknown := parseVariantTags(variant.Tags)
|
||||
if unknown {
|
||||
continue
|
||||
}
|
||||
|
||||
var ve endpoint
|
||||
ve.mergeIn(e.endpoint)
|
||||
ve.mergeIn(variant.endpoint)
|
||||
|
||||
(*p)[defaultKey{Variant: endpointVariant}] = ve
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func parseVariantTags(tags []string) (ev endpointVariant, unknown bool) {
|
||||
if len(tags) == 0 {
|
||||
unknown = true
|
||||
return
|
||||
}
|
||||
|
||||
for _, tag := range tags {
|
||||
switch {
|
||||
case strings.EqualFold("fips", tag):
|
||||
ev |= fipsVariant
|
||||
case strings.EqualFold("dualstack", tag):
|
||||
ev |= dualStackVariant
|
||||
default:
|
||||
unknown = true
|
||||
}
|
||||
}
|
||||
return ev, unknown
|
||||
}
|
||||
|
||||
type partition struct {
|
||||
ID string `json:"partition"`
|
||||
Name string `json:"partitionName"`
|
||||
DNSSuffix string `json:"dnsSuffix"`
|
||||
RegionRegex regionRegex `json:"regionRegex"`
|
||||
Defaults endpoint `json:"defaults"`
|
||||
Regions regions `json:"regions"`
|
||||
Services services `json:"services"`
|
||||
ID string `json:"partition"`
|
||||
Name string `json:"partitionName"`
|
||||
DNSSuffix string `json:"dnsSuffix"`
|
||||
RegionRegex regionRegex `json:"regionRegex"`
|
||||
Defaults endpointDefaults `json:"defaults"`
|
||||
Regions regions `json:"regions"`
|
||||
Services services `json:"services"`
|
||||
}
|
||||
|
||||
func (p partition) Partition() Partition {
|
||||
|
|
@ -67,15 +162,18 @@ func (p partition) Partition() Partition {
|
|||
}
|
||||
}
|
||||
|
||||
func (p partition) canResolveEndpoint(service, region string, strictMatch bool) bool {
|
||||
func (p partition) canResolveEndpoint(service, region string, options Options) bool {
|
||||
s, hasService := p.Services[service]
|
||||
_, hasEndpoint := s.Endpoints[region]
|
||||
_, hasEndpoint := s.Endpoints[endpointKey{
|
||||
Region: region,
|
||||
Variant: options.getEndpointVariant(service),
|
||||
}]
|
||||
|
||||
if hasEndpoint && hasService {
|
||||
return true
|
||||
}
|
||||
|
||||
if strictMatch {
|
||||
if options.StrictMatching {
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
@ -106,6 +204,10 @@ func (p partition) EndpointFor(service, region string, opts ...func(*Options)) (
|
|||
var opt Options
|
||||
opt.Set(opts...)
|
||||
|
||||
if len(opt.ResolvedRegion) > 0 {
|
||||
region = opt.ResolvedRegion
|
||||
}
|
||||
|
||||
s, hasService := p.Services[service]
|
||||
|
||||
if service == Ec2metadataServiceID && !hasService {
|
||||
|
|
@ -123,21 +225,44 @@ func (p partition) EndpointFor(service, region string, opts ...func(*Options)) (
|
|||
region = s.PartitionEndpoint
|
||||
}
|
||||
|
||||
if (service == "sts" && opt.STSRegionalEndpoint != RegionalSTSEndpoint) ||
|
||||
(service == "s3" && opt.S3UsEast1RegionalEndpoint != RegionalS3UsEast1Endpoint) {
|
||||
if _, ok := legacyGlobalRegions[service][region]; ok {
|
||||
region = "aws-global"
|
||||
}
|
||||
if r, ok := isLegacyGlobalRegion(service, region, opt); ok {
|
||||
region = r
|
||||
}
|
||||
|
||||
e, hasEndpoint := s.endpointForRegion(region)
|
||||
if len(region) == 0 || (!hasEndpoint && opt.StrictMatching) {
|
||||
return resolved, NewUnknownEndpointError(p.ID, service, region, endpointList(s.Endpoints))
|
||||
variant := opt.getEndpointVariant(service)
|
||||
|
||||
endpoints := s.Endpoints
|
||||
|
||||
serviceDefaults, hasServiceDefault := s.Defaults[defaultKey{Variant: variant}]
|
||||
// If we searched for a variant which may have no explicit service defaults,
|
||||
// then we need to inherit the standard service defaults except the hostname and dnsSuffix
|
||||
if variant != 0 && !hasServiceDefault {
|
||||
serviceDefaults = s.Defaults[defaultKey{}]
|
||||
serviceDefaults.Hostname = ""
|
||||
serviceDefaults.DNSSuffix = ""
|
||||
}
|
||||
|
||||
defs := []endpoint{p.Defaults, s.Defaults}
|
||||
partitionDefaults, hasPartitionDefault := p.Defaults[defaultKey{Variant: variant}]
|
||||
|
||||
return e.resolve(service, p.ID, region, p.DNSSuffix, defs, opt)
|
||||
var dnsSuffix string
|
||||
if len(serviceDefaults.DNSSuffix) > 0 {
|
||||
dnsSuffix = serviceDefaults.DNSSuffix
|
||||
} else if variant == 0 {
|
||||
// For legacy reasons the partition dnsSuffix is not in the defaults, so if we looked for
|
||||
// a non-variant endpoint then we need to set the dnsSuffix.
|
||||
dnsSuffix = p.DNSSuffix
|
||||
}
|
||||
|
||||
noDefaults := !hasServiceDefault && !hasPartitionDefault
|
||||
|
||||
e, hasEndpoint := s.endpointForRegion(region, endpoints, variant)
|
||||
if len(region) == 0 || (!hasEndpoint && (opt.StrictMatching || noDefaults)) {
|
||||
return resolved, NewUnknownEndpointError(p.ID, service, region, endpointList(endpoints, variant))
|
||||
}
|
||||
|
||||
defs := []endpoint{partitionDefaults, serviceDefaults}
|
||||
|
||||
return e.resolve(service, p.ID, region, dnsSuffixTemplateKey, dnsSuffix, defs, opt)
|
||||
}
|
||||
|
||||
func getEC2MetadataEndpoint(partitionID, service string, mode EC2IMDSEndpointModeState) ResolvedEndpoint {
|
||||
|
|
@ -165,6 +290,31 @@ func getEC2MetadataEndpoint(partitionID, service string, mode EC2IMDSEndpointMod
|
|||
}
|
||||
}
|
||||
|
||||
func isLegacyGlobalRegion(service string, region string, opt Options) (string, bool) {
|
||||
if opt.getEndpointVariant(service) != 0 {
|
||||
return "", false
|
||||
}
|
||||
|
||||
const (
|
||||
sts = "sts"
|
||||
s3 = "s3"
|
||||
awsGlobal = "aws-global"
|
||||
)
|
||||
|
||||
switch {
|
||||
case service == sts && opt.STSRegionalEndpoint == RegionalSTSEndpoint:
|
||||
return region, false
|
||||
case service == s3 && opt.S3UsEast1RegionalEndpoint == RegionalS3UsEast1Endpoint:
|
||||
return region, false
|
||||
default:
|
||||
if _, ok := legacyGlobalRegions[service][region]; ok {
|
||||
return awsGlobal, true
|
||||
}
|
||||
}
|
||||
|
||||
return region, false
|
||||
}
|
||||
|
||||
func serviceList(ss services) []string {
|
||||
list := make([]string, 0, len(ss))
|
||||
for k := range ss {
|
||||
|
|
@ -172,10 +322,13 @@ func serviceList(ss services) []string {
|
|||
}
|
||||
return list
|
||||
}
|
||||
func endpointList(es endpoints) []string {
|
||||
func endpointList(es serviceEndpoints, variant endpointVariant) []string {
|
||||
list := make([]string, 0, len(es))
|
||||
for k := range es {
|
||||
list = append(list, k)
|
||||
if k.Variant != variant {
|
||||
continue
|
||||
}
|
||||
list = append(list, k.Region)
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
|
@ -207,19 +360,19 @@ type region struct {
|
|||
type services map[string]service
|
||||
|
||||
type service struct {
|
||||
PartitionEndpoint string `json:"partitionEndpoint"`
|
||||
IsRegionalized boxedBool `json:"isRegionalized,omitempty"`
|
||||
Defaults endpoint `json:"defaults"`
|
||||
Endpoints endpoints `json:"endpoints"`
|
||||
PartitionEndpoint string `json:"partitionEndpoint"`
|
||||
IsRegionalized boxedBool `json:"isRegionalized,omitempty"`
|
||||
Defaults endpointDefaults `json:"defaults"`
|
||||
Endpoints serviceEndpoints `json:"endpoints"`
|
||||
}
|
||||
|
||||
func (s *service) endpointForRegion(region string) (endpoint, bool) {
|
||||
if e, ok := s.Endpoints[region]; ok {
|
||||
func (s *service) endpointForRegion(region string, endpoints serviceEndpoints, variant endpointVariant) (endpoint, bool) {
|
||||
if e, ok := endpoints[endpointKey{Region: region, Variant: variant}]; ok {
|
||||
return e, true
|
||||
}
|
||||
|
||||
if s.IsRegionalized == boxedFalse {
|
||||
return s.Endpoints[s.PartitionEndpoint], region == s.PartitionEndpoint
|
||||
return endpoints[endpointKey{Region: s.PartitionEndpoint, Variant: variant}], region == s.PartitionEndpoint
|
||||
}
|
||||
|
||||
// Unable to find any matching endpoint, return
|
||||
|
|
@ -227,22 +380,73 @@ func (s *service) endpointForRegion(region string) (endpoint, bool) {
|
|||
return endpoint{}, false
|
||||
}
|
||||
|
||||
type endpoints map[string]endpoint
|
||||
type serviceEndpoints map[endpointKey]endpoint
|
||||
|
||||
func (s *serviceEndpoints) UnmarshalJSON(data []byte) error {
|
||||
if *s == nil {
|
||||
*s = make(serviceEndpoints)
|
||||
}
|
||||
|
||||
var regionToEndpoint map[string]endpointWithVariants
|
||||
|
||||
if err := json.Unmarshal(data, ®ionToEndpoint); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for region, e := range regionToEndpoint {
|
||||
(*s)[endpointKey{Region: region}] = e.endpoint
|
||||
|
||||
e.Hostname = ""
|
||||
e.DNSSuffix = ""
|
||||
|
||||
for _, variant := range e.Variants {
|
||||
endpointVariant, unknown := parseVariantTags(variant.Tags)
|
||||
if unknown {
|
||||
continue
|
||||
}
|
||||
|
||||
var ve endpoint
|
||||
ve.mergeIn(e.endpoint)
|
||||
ve.mergeIn(variant.endpoint)
|
||||
|
||||
(*s)[endpointKey{Region: region, Variant: endpointVariant}] = ve
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type endpoint struct {
|
||||
Hostname string `json:"hostname"`
|
||||
Protocols []string `json:"protocols"`
|
||||
CredentialScope credentialScope `json:"credentialScope"`
|
||||
|
||||
// Custom fields not modeled
|
||||
HasDualStack boxedBool `json:"-"`
|
||||
DualStackHostname string `json:"-"`
|
||||
DNSSuffix string `json:"dnsSuffix"`
|
||||
|
||||
// Signature Version not used
|
||||
SignatureVersions []string `json:"signatureVersions"`
|
||||
|
||||
// SSLCommonName not used.
|
||||
SSLCommonName string `json:"sslCommonName"`
|
||||
|
||||
Deprecated boxedBool `json:"deprecated"`
|
||||
}
|
||||
|
||||
// isZero returns whether the endpoint structure is an empty (zero) value.
|
||||
func (e endpoint) isZero() bool {
|
||||
switch {
|
||||
case len(e.Hostname) != 0:
|
||||
return false
|
||||
case len(e.Protocols) != 0:
|
||||
return false
|
||||
case e.CredentialScope != (credentialScope{}):
|
||||
return false
|
||||
case len(e.SignatureVersions) != 0:
|
||||
return false
|
||||
case len(e.SSLCommonName) != 0:
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
@ -271,7 +475,7 @@ func getByPriority(s []string, p []string, def string) string {
|
|||
return s[0]
|
||||
}
|
||||
|
||||
func (e endpoint) resolve(service, partitionID, region, dnsSuffix string, defs []endpoint, opts Options) (ResolvedEndpoint, error) {
|
||||
func (e endpoint) resolve(service, partitionID, region, dnsSuffixTemplateVariable, dnsSuffix string, defs []endpoint, opts Options) (ResolvedEndpoint, error) {
|
||||
var merged endpoint
|
||||
for _, def := range defs {
|
||||
merged.mergeIn(def)
|
||||
|
|
@ -292,23 +496,26 @@ func (e endpoint) resolve(service, partitionID, region, dnsSuffix string, defs [
|
|||
}
|
||||
|
||||
hostname := e.Hostname
|
||||
// Offset the hostname for dualstack if enabled
|
||||
if opts.UseDualStack && e.HasDualStack == boxedTrue {
|
||||
hostname = e.DualStackHostname
|
||||
region = signingRegion
|
||||
}
|
||||
|
||||
if !validateInputRegion(region) {
|
||||
return ResolvedEndpoint{}, fmt.Errorf("invalid region identifier format provided")
|
||||
}
|
||||
|
||||
if len(merged.DNSSuffix) > 0 {
|
||||
dnsSuffix = merged.DNSSuffix
|
||||
}
|
||||
|
||||
u := strings.Replace(hostname, "{service}", service, 1)
|
||||
u = strings.Replace(u, "{region}", region, 1)
|
||||
u = strings.Replace(u, "{dnsSuffix}", dnsSuffix, 1)
|
||||
u = strings.Replace(u, dnsSuffixTemplateVariable, dnsSuffix, 1)
|
||||
|
||||
scheme := getEndpointScheme(e.Protocols, opts.DisableSSL)
|
||||
u = fmt.Sprintf("%s://%s", scheme, u)
|
||||
|
||||
if e.Deprecated == boxedTrue && opts.LogDeprecated && opts.Logger != nil {
|
||||
opts.Logger.Log(fmt.Sprintf("endpoint identifier %q, url %q marked as deprecated", region, u))
|
||||
}
|
||||
|
||||
return ResolvedEndpoint{
|
||||
URL: u,
|
||||
PartitionID: partitionID,
|
||||
|
|
@ -346,11 +553,11 @@ func (e *endpoint) mergeIn(other endpoint) {
|
|||
if len(other.SSLCommonName) > 0 {
|
||||
e.SSLCommonName = other.SSLCommonName
|
||||
}
|
||||
if other.HasDualStack != boxedBoolUnset {
|
||||
e.HasDualStack = other.HasDualStack
|
||||
if len(other.DNSSuffix) > 0 {
|
||||
e.DNSSuffix = other.DNSSuffix
|
||||
}
|
||||
if len(other.DualStackHostname) > 0 {
|
||||
e.DualStackHostname = other.DualStackHostname
|
||||
if other.Deprecated != boxedBoolUnset {
|
||||
e.Deprecated = other.Deprecated
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
106
vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
generated
vendored
106
vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
generated
vendored
|
|
@ -155,18 +155,71 @@ func serviceSet(ps partitions) map[string]struct{} {
|
|||
return set
|
||||
}
|
||||
|
||||
func endpointVariantSetter(variant endpointVariant) (string, error) {
|
||||
if variant == 0 {
|
||||
return "0", nil
|
||||
}
|
||||
|
||||
if variant > (fipsVariant | dualStackVariant) {
|
||||
return "", fmt.Errorf("unknown endpoint variant")
|
||||
}
|
||||
|
||||
var symbols []string
|
||||
if variant&fipsVariant != 0 {
|
||||
symbols = append(symbols, "fipsVariant")
|
||||
}
|
||||
if variant&dualStackVariant != 0 {
|
||||
symbols = append(symbols, "dualStackVariant")
|
||||
}
|
||||
v := strings.Join(symbols, "|")
|
||||
|
||||
return v, nil
|
||||
}
|
||||
|
||||
func endpointKeySetter(e endpointKey) (string, error) {
|
||||
var sb strings.Builder
|
||||
sb.WriteString("endpointKey{\n")
|
||||
sb.WriteString(fmt.Sprintf("Region: %q,\n", e.Region))
|
||||
if e.Variant != 0 {
|
||||
variantSetter, err := endpointVariantSetter(e.Variant)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
sb.WriteString(fmt.Sprintf("Variant: %s,\n", variantSetter))
|
||||
}
|
||||
sb.WriteString("}")
|
||||
return sb.String(), nil
|
||||
}
|
||||
|
||||
func defaultKeySetter(e defaultKey) (string, error) {
|
||||
var sb strings.Builder
|
||||
sb.WriteString("defaultKey{\n")
|
||||
if e.Variant != 0 {
|
||||
variantSetter, err := endpointVariantSetter(e.Variant)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
sb.WriteString(fmt.Sprintf("Variant: %s,\n", variantSetter))
|
||||
}
|
||||
sb.WriteString("}")
|
||||
return sb.String(), nil
|
||||
}
|
||||
|
||||
var funcMap = template.FuncMap{
|
||||
"ToSymbol": toSymbol,
|
||||
"QuoteString": quoteString,
|
||||
"RegionConst": regionConstName,
|
||||
"PartitionGetter": partitionGetter,
|
||||
"PartitionVarName": partitionVarName,
|
||||
"ListPartitionNames": listPartitionNames,
|
||||
"BoxedBoolIfSet": boxedBoolIfSet,
|
||||
"StringIfSet": stringIfSet,
|
||||
"StringSliceIfSet": stringSliceIfSet,
|
||||
"EndpointIsSet": endpointIsSet,
|
||||
"ServicesSet": serviceSet,
|
||||
"ToSymbol": toSymbol,
|
||||
"QuoteString": quoteString,
|
||||
"RegionConst": regionConstName,
|
||||
"PartitionGetter": partitionGetter,
|
||||
"PartitionVarName": partitionVarName,
|
||||
"ListPartitionNames": listPartitionNames,
|
||||
"BoxedBoolIfSet": boxedBoolIfSet,
|
||||
"StringIfSet": stringIfSet,
|
||||
"StringSliceIfSet": stringSliceIfSet,
|
||||
"EndpointIsSet": endpointIsSet,
|
||||
"ServicesSet": serviceSet,
|
||||
"EndpointVariantSetter": endpointVariantSetter,
|
||||
"EndpointKeySetter": endpointKeySetter,
|
||||
"DefaultKeySetter": defaultKeySetter,
|
||||
}
|
||||
|
||||
const v3Tmpl = `
|
||||
|
|
@ -272,9 +325,9 @@ partition{
|
|||
{{ StringIfSet "Name: %q,\n" .Name -}}
|
||||
{{ StringIfSet "DNSSuffix: %q,\n" .DNSSuffix -}}
|
||||
RegionRegex: {{ template "gocode RegionRegex" .RegionRegex }},
|
||||
{{ if EndpointIsSet .Defaults -}}
|
||||
Defaults: {{ template "gocode Endpoint" .Defaults }},
|
||||
{{- end }}
|
||||
{{ if (gt (len .Defaults) 0) -}}
|
||||
Defaults: {{ template "gocode Defaults" .Defaults -}},
|
||||
{{ end -}}
|
||||
Regions: {{ template "gocode Regions" .Regions }},
|
||||
Services: {{ template "gocode Services" .Services }},
|
||||
}
|
||||
|
|
@ -315,19 +368,27 @@ services{
|
|||
service{
|
||||
{{ StringIfSet "PartitionEndpoint: %q,\n" .PartitionEndpoint -}}
|
||||
{{ BoxedBoolIfSet "IsRegionalized: %s,\n" .IsRegionalized -}}
|
||||
{{ if EndpointIsSet .Defaults -}}
|
||||
Defaults: {{ template "gocode Endpoint" .Defaults -}},
|
||||
{{- end }}
|
||||
{{ if (gt (len .Defaults) 0) -}}
|
||||
Defaults: {{ template "gocode Defaults" .Defaults -}},
|
||||
{{ end -}}
|
||||
{{ if .Endpoints -}}
|
||||
Endpoints: {{ template "gocode Endpoints" .Endpoints }},
|
||||
{{- end }}
|
||||
}
|
||||
{{- end }}
|
||||
|
||||
{{ define "gocode Endpoints" -}}
|
||||
endpoints{
|
||||
{{ define "gocode Defaults" -}}
|
||||
endpointDefaults{
|
||||
{{ range $id, $endpoint := . -}}
|
||||
"{{ $id }}": {{ template "gocode Endpoint" $endpoint }},
|
||||
{{ DefaultKeySetter $id }}: {{ template "gocode Endpoint" $endpoint }},
|
||||
{{ end }}
|
||||
}
|
||||
{{- end }}
|
||||
|
||||
{{ define "gocode Endpoints" -}}
|
||||
serviceEndpoints{
|
||||
{{ range $id, $endpoint := . -}}
|
||||
{{ EndpointKeySetter $id }}: {{ template "gocode Endpoint" $endpoint }},
|
||||
{{ end }}
|
||||
}
|
||||
{{- end }}
|
||||
|
|
@ -335,6 +396,7 @@ endpoints{
|
|||
{{ define "gocode Endpoint" -}}
|
||||
endpoint{
|
||||
{{ StringIfSet "Hostname: %q,\n" .Hostname -}}
|
||||
{{ StringIfSet "DNSSuffix: %q,\n" .DNSSuffix -}}
|
||||
{{ StringIfSet "SSLCommonName: %q,\n" .SSLCommonName -}}
|
||||
{{ StringSliceIfSet "Protocols: []string{%s},\n" .Protocols -}}
|
||||
{{ StringSliceIfSet "SignatureVersions: []string{%s},\n" .SignatureVersions -}}
|
||||
|
|
@ -344,9 +406,7 @@ endpoint{
|
|||
{{ StringIfSet "Service: %q,\n" .CredentialScope.Service -}}
|
||||
},
|
||||
{{- end }}
|
||||
{{ BoxedBoolIfSet "HasDualStack: %s,\n" .HasDualStack -}}
|
||||
{{ StringIfSet "DualStackHostname: %q,\n" .DualStackHostname -}}
|
||||
|
||||
{{ BoxedBoolIfSet "Deprecated: %s,\n" .Deprecated -}}
|
||||
}
|
||||
{{- end }}
|
||||
`
|
||||
|
|
|
|||
3
vendor/github.com/aws/aws-sdk-go/aws/logger.go
generated
vendored
3
vendor/github.com/aws/aws-sdk-go/aws/logger.go
generated
vendored
|
|
@ -77,6 +77,9 @@ const (
|
|||
// wire unmarshaled message content of requests and responses made while
|
||||
// using the SDK Will also enable LogDebug.
|
||||
LogDebugWithEventStreamBody
|
||||
|
||||
// LogDebugWithDeprecated states the SDK should log details about deprecated functionality.
|
||||
LogDebugWithDeprecated
|
||||
)
|
||||
|
||||
// A Logger is a minimalistic interface for the SDK to log messages to. Should
|
||||
|
|
|
|||
78
vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
generated
vendored
78
vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
generated
vendored
|
|
@ -285,5 +285,83 @@ The custom EC2 IMDS endpoint can also be specified via the Session options.
|
|||
sess, err := session.NewSessionWithOptions(session.Options{
|
||||
EC2MetadataEndpoint: "http://[::1]",
|
||||
})
|
||||
|
||||
FIPS and DualStack Endpoints
|
||||
|
||||
The SDK can be configured to resolve an endpoint with certain capabilities such as FIPS and DualStack.
|
||||
|
||||
You can configure a FIPS endpoint using an environment variable, shared config ($HOME/.aws/config),
|
||||
or programmatically.
|
||||
|
||||
To configure a FIPS endpoint set the environment variable set the AWS_USE_FIPS_ENDPOINT to true or false to enable
|
||||
or disable FIPS endpoint resolution.
|
||||
|
||||
AWS_USE_FIPS_ENDPOINT=true
|
||||
|
||||
To configure a FIPS endpoint using shared config, set use_fips_endpoint to true or false to enable
|
||||
or disable FIPS endpoint resolution.
|
||||
|
||||
[profile myprofile]
|
||||
region=us-west-2
|
||||
use_fips_endpoint=true
|
||||
|
||||
To configure a FIPS endpoint programmatically
|
||||
|
||||
// Option 1: Configure it on a session for all clients
|
||||
sess, err := session.NewSessionWithOptions(session.Options{
|
||||
UseFIPSEndpoint: endpoints.FIPSEndpointStateEnabled,
|
||||
})
|
||||
if err != nil {
|
||||
// handle error
|
||||
}
|
||||
|
||||
client := s3.New(sess)
|
||||
|
||||
// Option 2: Configure it per client
|
||||
sess, err := session.NewSession()
|
||||
if err != nil {
|
||||
// handle error
|
||||
}
|
||||
|
||||
client := s3.New(sess, &aws.Config{
|
||||
UseFIPSEndpoint: endpoints.FIPSEndpointStateEnabled,
|
||||
})
|
||||
|
||||
You can configure a DualStack endpoint using an environment variable, shared config ($HOME/.aws/config),
|
||||
or programmatically.
|
||||
|
||||
To configure a DualStack endpoint set the environment variable set the AWS_USE_DUALSTACK_ENDPOINT to true or false to
|
||||
enable or disable DualStack endpoint resolution.
|
||||
|
||||
AWS_USE_DUALSTACK_ENDPOINT=true
|
||||
|
||||
To configure a DualStack endpoint using shared config, set use_dualstack_endpoint to true or false to enable
|
||||
or disable DualStack endpoint resolution.
|
||||
|
||||
[profile myprofile]
|
||||
region=us-west-2
|
||||
use_dualstack_endpoint=true
|
||||
|
||||
To configure a DualStack endpoint programmatically
|
||||
|
||||
// Option 1: Configure it on a session for all clients
|
||||
sess, err := session.NewSessionWithOptions(session.Options{
|
||||
UseDualStackEndpoint: endpoints.DualStackEndpointStateEnabled,
|
||||
})
|
||||
if err != nil {
|
||||
// handle error
|
||||
}
|
||||
|
||||
client := s3.New(sess)
|
||||
|
||||
// Option 2: Configure it per client
|
||||
sess, err := session.NewSession()
|
||||
if err != nil {
|
||||
// handle error
|
||||
}
|
||||
|
||||
client := s3.New(sess, &aws.Config{
|
||||
UseDualStackEndpoint: endpoints.DualStackEndpointStateEnabled,
|
||||
})
|
||||
*/
|
||||
package session
|
||||
|
|
|
|||
68
vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
generated
vendored
68
vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
generated
vendored
|
|
@ -170,6 +170,18 @@ type envConfig struct {
|
|||
//
|
||||
// AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6
|
||||
EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState
|
||||
|
||||
// Specifies that SDK clients must resolve a dual-stack endpoint for
|
||||
// services.
|
||||
//
|
||||
// AWS_USE_DUALSTACK_ENDPOINT=true
|
||||
UseDualStackEndpoint endpoints.DualStackEndpointState
|
||||
|
||||
// Specifies that SDK clients must resolve a FIPS endpoint for
|
||||
// services.
|
||||
//
|
||||
// AWS_USE_FIPS_ENDPOINT=true
|
||||
UseFIPSEndpoint endpoints.FIPSEndpointState
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -248,6 +260,12 @@ var (
|
|||
useClientTLSKey = []string{
|
||||
"AWS_SDK_GO_CLIENT_TLS_KEY",
|
||||
}
|
||||
awsUseDualStackEndpoint = []string{
|
||||
"AWS_USE_DUALSTACK_ENDPOINT",
|
||||
}
|
||||
awsUseFIPSEndpoint = []string{
|
||||
"AWS_USE_FIPS_ENDPOINT",
|
||||
}
|
||||
)
|
||||
|
||||
// loadEnvConfig retrieves the SDK's environment configuration.
|
||||
|
|
@ -376,6 +394,14 @@ func envConfigLoad(enableSharedConfig bool) (envConfig, error) {
|
|||
return envConfig{}, err
|
||||
}
|
||||
|
||||
if err := setUseDualStackEndpointFromEnvVal(&cfg.UseDualStackEndpoint, awsUseDualStackEndpoint); err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
if err := setUseFIPSEndpointFromEnvVal(&cfg.UseFIPSEndpoint, awsUseFIPSEndpoint); err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
|
|
@ -401,3 +427,45 @@ func setEC2IMDSEndpointMode(mode *endpoints.EC2IMDSEndpointModeState, keys []str
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func setUseDualStackEndpointFromEnvVal(dst *endpoints.DualStackEndpointState, keys []string) error {
|
||||
for _, k := range keys {
|
||||
value := os.Getenv(k)
|
||||
if len(value) == 0 {
|
||||
continue // skip if empty
|
||||
}
|
||||
|
||||
switch {
|
||||
case strings.EqualFold(value, "true"):
|
||||
*dst = endpoints.DualStackEndpointStateEnabled
|
||||
case strings.EqualFold(value, "false"):
|
||||
*dst = endpoints.DualStackEndpointStateDisabled
|
||||
default:
|
||||
return fmt.Errorf(
|
||||
"invalid value for environment variable, %s=%s, need true, false",
|
||||
k, value)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func setUseFIPSEndpointFromEnvVal(dst *endpoints.FIPSEndpointState, keys []string) error {
|
||||
for _, k := range keys {
|
||||
value := os.Getenv(k)
|
||||
if len(value) == 0 {
|
||||
continue // skip if empty
|
||||
}
|
||||
|
||||
switch {
|
||||
case strings.EqualFold(value, "true"):
|
||||
*dst = endpoints.FIPSEndpointStateEnabled
|
||||
case strings.EqualFold(value, "false"):
|
||||
*dst = endpoints.FIPSEndpointStateDisabled
|
||||
default:
|
||||
return fmt.Errorf(
|
||||
"invalid value for environment variable, %s=%s, need true, false",
|
||||
k, value)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
55
vendor/github.com/aws/aws-sdk-go/aws/session/session.go
generated
vendored
55
vendor/github.com/aws/aws-sdk-go/aws/session/session.go
generated
vendored
|
|
@ -8,6 +8,7 @@ import (
|
|||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
|
|
@ -792,6 +793,20 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config,
|
|||
cfg.S3UseARNRegion = &sharedCfg.S3UseARNRegion
|
||||
}
|
||||
|
||||
for _, v := range []endpoints.DualStackEndpointState{userCfg.UseDualStackEndpoint, envCfg.UseDualStackEndpoint, sharedCfg.UseDualStackEndpoint} {
|
||||
if v != endpoints.DualStackEndpointStateUnset {
|
||||
cfg.UseDualStackEndpoint = v
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
for _, v := range []endpoints.FIPSEndpointState{userCfg.UseFIPSEndpoint, envCfg.UseFIPSEndpoint, sharedCfg.UseFIPSEndpoint} {
|
||||
if v != endpoints.FIPSEndpointStateUnset {
|
||||
cfg.UseFIPSEndpoint = v
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -845,8 +860,10 @@ func (s *Session) Copy(cfgs ...*aws.Config) *Session {
|
|||
func (s *Session) ClientConfig(service string, cfgs ...*aws.Config) client.Config {
|
||||
s = s.Copy(cfgs...)
|
||||
|
||||
resolvedRegion := normalizeRegion(s.Config)
|
||||
|
||||
region := aws.StringValue(s.Config.Region)
|
||||
resolved, err := s.resolveEndpoint(service, region, s.Config)
|
||||
resolved, err := s.resolveEndpoint(service, region, resolvedRegion, s.Config)
|
||||
if err != nil {
|
||||
s.Handlers.Validate.PushBack(func(r *request.Request) {
|
||||
if len(r.ClientInfo.Endpoint) != 0 {
|
||||
|
|
@ -867,12 +884,13 @@ func (s *Session) ClientConfig(service string, cfgs ...*aws.Config) client.Confi
|
|||
SigningRegion: resolved.SigningRegion,
|
||||
SigningNameDerived: resolved.SigningNameDerived,
|
||||
SigningName: resolved.SigningName,
|
||||
ResolvedRegion: resolvedRegion,
|
||||
}
|
||||
}
|
||||
|
||||
const ec2MetadataServiceID = "ec2metadata"
|
||||
|
||||
func (s *Session) resolveEndpoint(service, region string, cfg *aws.Config) (endpoints.ResolvedEndpoint, error) {
|
||||
func (s *Session) resolveEndpoint(service, region, resolvedRegion string, cfg *aws.Config) (endpoints.ResolvedEndpoint, error) {
|
||||
|
||||
if ep := aws.StringValue(cfg.Endpoint); len(ep) != 0 {
|
||||
return endpoints.ResolvedEndpoint{
|
||||
|
|
@ -884,7 +902,12 @@ func (s *Session) resolveEndpoint(service, region string, cfg *aws.Config) (endp
|
|||
resolved, err := cfg.EndpointResolver.EndpointFor(service, region,
|
||||
func(opt *endpoints.Options) {
|
||||
opt.DisableSSL = aws.BoolValue(cfg.DisableSSL)
|
||||
|
||||
opt.UseDualStack = aws.BoolValue(cfg.UseDualStack)
|
||||
opt.UseDualStackEndpoint = cfg.UseDualStackEndpoint
|
||||
|
||||
opt.UseFIPSEndpoint = cfg.UseFIPSEndpoint
|
||||
|
||||
// Support for STSRegionalEndpoint where the STSRegionalEndpoint is
|
||||
// provided in envConfig or sharedConfig with envConfig getting
|
||||
// precedence.
|
||||
|
|
@ -898,6 +921,11 @@ func (s *Session) resolveEndpoint(service, region string, cfg *aws.Config) (endp
|
|||
// Support the condition where the service is modeled but its
|
||||
// endpoint metadata is not available.
|
||||
opt.ResolveUnknownService = true
|
||||
|
||||
opt.ResolvedRegion = resolvedRegion
|
||||
|
||||
opt.Logger = cfg.Logger
|
||||
opt.LogDeprecated = cfg.LogLevel.Matches(aws.LogDebugWithDeprecated)
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
|
@ -913,6 +941,8 @@ func (s *Session) resolveEndpoint(service, region string, cfg *aws.Config) (endp
|
|||
func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Config {
|
||||
s = s.Copy(cfgs...)
|
||||
|
||||
resolvedRegion := normalizeRegion(s.Config)
|
||||
|
||||
var resolved endpoints.ResolvedEndpoint
|
||||
if ep := aws.StringValue(s.Config.Endpoint); len(ep) > 0 {
|
||||
resolved.URL = endpoints.AddScheme(ep, aws.BoolValue(s.Config.DisableSSL))
|
||||
|
|
@ -926,6 +956,7 @@ func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Conf
|
|||
SigningRegion: resolved.SigningRegion,
|
||||
SigningNameDerived: resolved.SigningNameDerived,
|
||||
SigningName: resolved.SigningName,
|
||||
ResolvedRegion: resolvedRegion,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -939,3 +970,23 @@ func (s *Session) logDeprecatedNewSessionError(msg string, err error, cfgs []*aw
|
|||
r.Error = err
|
||||
})
|
||||
}
|
||||
|
||||
// normalizeRegion resolves / normalizes the configured region (converts pseudo fips regions), and modifies the provided
|
||||
// config to have the equivalent options for resolution and returns the resolved region name.
|
||||
func normalizeRegion(cfg *aws.Config) (resolved string) {
|
||||
const fipsInfix = "-fips-"
|
||||
const fipsPrefix = "-fips"
|
||||
const fipsSuffix = "fips-"
|
||||
|
||||
region := aws.StringValue(cfg.Region)
|
||||
|
||||
if strings.Contains(region, fipsInfix) ||
|
||||
strings.Contains(region, fipsPrefix) ||
|
||||
strings.Contains(region, fipsSuffix) {
|
||||
resolved = strings.Replace(strings.Replace(strings.Replace(
|
||||
region, fipsInfix, "-", -1), fipsPrefix, "", -1), fipsSuffix, "", -1)
|
||||
cfg.UseFIPSEndpoint = endpoints.FIPSEndpointStateEnabled
|
||||
}
|
||||
|
||||
return resolved
|
||||
}
|
||||
|
|
|
|||
54
vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
generated
vendored
54
vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
generated
vendored
|
|
@ -72,6 +72,12 @@ const (
|
|||
|
||||
// EC2 IMDS Endpoint
|
||||
ec2MetadataServiceEndpointKey = "ec2_metadata_service_endpoint"
|
||||
|
||||
// Use DualStack Endpoint Resolution
|
||||
useDualStackEndpoint = "use_dualstack_endpoint"
|
||||
|
||||
// Use FIPS Endpoint Resolution
|
||||
useFIPSEndpointKey = "use_fips_endpoint"
|
||||
)
|
||||
|
||||
// sharedConfig represents the configuration fields of the SDK config files.
|
||||
|
|
@ -161,6 +167,18 @@ type sharedConfig struct {
|
|||
//
|
||||
// ec2_metadata_service_endpoint=http://fd00:ec2::254
|
||||
EC2IMDSEndpoint string
|
||||
|
||||
// Specifies that SDK clients must resolve a dual-stack endpoint for
|
||||
// services.
|
||||
//
|
||||
// use_dualstack_endpoint=true
|
||||
UseDualStackEndpoint endpoints.DualStackEndpointState
|
||||
|
||||
// Specifies that SDK clients must resolve a FIPS endpoint for
|
||||
// services.
|
||||
//
|
||||
// use_fips_endpoint=true
|
||||
UseFIPSEndpoint endpoints.FIPSEndpointState
|
||||
}
|
||||
|
||||
type sharedConfigFile struct {
|
||||
|
|
@ -356,6 +374,10 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, e
|
|||
ec2MetadataServiceEndpointModeKey, file.Filename, err)
|
||||
}
|
||||
updateString(&cfg.EC2IMDSEndpoint, section, ec2MetadataServiceEndpointKey)
|
||||
|
||||
updateUseDualStackEndpoint(&cfg.UseDualStackEndpoint, section, useDualStackEndpoint)
|
||||
|
||||
updateUseFIPSEndpoint(&cfg.UseFIPSEndpoint, section, useFIPSEndpointKey)
|
||||
}
|
||||
|
||||
updateString(&cfg.CredentialProcess, section, credentialProcessKey)
|
||||
|
|
@ -673,3 +695,35 @@ func (e CredentialRequiresARNError) OrigErr() error {
|
|||
func (e CredentialRequiresARNError) Error() string {
|
||||
return awserr.SprintError(e.Code(), e.Message(), "", nil)
|
||||
}
|
||||
|
||||
// updateEndpointDiscoveryType will only update the dst with the value in the section, if
|
||||
// a valid key and corresponding EndpointDiscoveryType is found.
|
||||
func updateUseDualStackEndpoint(dst *endpoints.DualStackEndpointState, section ini.Section, key string) {
|
||||
if !section.Has(key) {
|
||||
return
|
||||
}
|
||||
|
||||
if section.Bool(key) {
|
||||
*dst = endpoints.DualStackEndpointStateEnabled
|
||||
} else {
|
||||
*dst = endpoints.DualStackEndpointStateDisabled
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// updateEndpointDiscoveryType will only update the dst with the value in the section, if
|
||||
// a valid key and corresponding EndpointDiscoveryType is found.
|
||||
func updateUseFIPSEndpoint(dst *endpoints.FIPSEndpointState, section ini.Section, key string) {
|
||||
if !section.Has(key) {
|
||||
return
|
||||
}
|
||||
|
||||
if section.Bool(key) {
|
||||
*dst = endpoints.FIPSEndpointStateEnabled
|
||||
} else {
|
||||
*dst = endpoints.FIPSEndpointStateDisabled
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
18
vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
generated
vendored
18
vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
generated
vendored
|
|
@ -634,21 +634,25 @@ func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) {
|
|||
ctx.Query.Set("X-Amz-SignedHeaders", ctx.signedHeaders)
|
||||
}
|
||||
|
||||
headerValues := make([]string, len(headers))
|
||||
headerItems := make([]string, len(headers))
|
||||
for i, k := range headers {
|
||||
if k == "host" {
|
||||
if ctx.Request.Host != "" {
|
||||
headerValues[i] = "host:" + ctx.Request.Host
|
||||
headerItems[i] = "host:" + ctx.Request.Host
|
||||
} else {
|
||||
headerValues[i] = "host:" + ctx.Request.URL.Host
|
||||
headerItems[i] = "host:" + ctx.Request.URL.Host
|
||||
}
|
||||
} else {
|
||||
headerValues[i] = k + ":" +
|
||||
strings.Join(ctx.SignedHeaderVals[k], ",")
|
||||
headerValues := make([]string, len(ctx.SignedHeaderVals[k]))
|
||||
for i, v := range ctx.SignedHeaderVals[k] {
|
||||
headerValues[i] = strings.TrimSpace(v)
|
||||
}
|
||||
headerItems[i] = k + ":" +
|
||||
strings.Join(headerValues, ",")
|
||||
}
|
||||
}
|
||||
stripExcessSpaces(headerValues)
|
||||
ctx.canonicalHeaders = strings.Join(headerValues, "\n")
|
||||
stripExcessSpaces(headerItems)
|
||||
ctx.canonicalHeaders = strings.Join(headerItems, "\n")
|
||||
}
|
||||
|
||||
func (ctx *signingCtx) buildCanonicalString() {
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go/aws/version.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go/aws/version.go
generated
vendored
|
|
@ -5,4 +5,4 @@ package aws
|
|||
const SDKName = "aws-sdk-go"
|
||||
|
||||
// SDKVersion is the version of this SDK
|
||||
const SDKVersion = "1.40.49"
|
||||
const SDKVersion = "1.42.25"
|
||||
|
|
|
|||
20
vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go
generated
vendored
20
vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go
generated
vendored
|
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -18,7 +19,7 @@ var literalValues = [][]rune{
|
|||
|
||||
func isBoolValue(b []rune) bool {
|
||||
for _, lv := range literalValues {
|
||||
if isLitValue(lv, b) {
|
||||
if isCaselessLitValue(lv, b) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -39,6 +40,21 @@ func isLitValue(want, have []rune) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// isCaselessLitValue is a caseless value comparison, assumes want is already lower-cased for efficiency.
|
||||
func isCaselessLitValue(want, have []rune) bool {
|
||||
if len(have) < len(want) {
|
||||
return false
|
||||
}
|
||||
|
||||
for i := 0; i < len(want); i++ {
|
||||
if want[i] != unicode.ToLower(have[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// isNumberValue will return whether not the leading characters in
|
||||
// a byte slice is a number. A number is delimited by whitespace or
|
||||
// the newline token.
|
||||
|
|
@ -177,7 +193,7 @@ func newValue(t ValueType, base int, raw []rune) (Value, error) {
|
|||
case QuotedStringType:
|
||||
v.str = string(raw[1 : len(raw)-1])
|
||||
case BoolType:
|
||||
v.boolean = runeCompare(v.raw, runesTrue)
|
||||
v.boolean = isCaselessLitValue(runesTrue, v.raw)
|
||||
}
|
||||
|
||||
// issue 2253
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go
generated
vendored
|
|
@ -57,7 +57,7 @@ func getBoolValue(b []rune) (int, error) {
|
|||
continue
|
||||
}
|
||||
|
||||
if isLitValue(lv, b) {
|
||||
if isCaselessLitValue(lv, b) {
|
||||
n = len(lv)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
19
vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go
generated
vendored
19
vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go
generated
vendored
|
|
@ -1,8 +1,6 @@
|
|||
package s3shared
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
awsarn "github.com/aws/aws-sdk-go/aws/arn"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
|
|
@ -25,18 +23,6 @@ func (r ResourceRequest) AllowCrossRegion() bool {
|
|||
return aws.BoolValue(r.Request.Config.S3UseARNRegion)
|
||||
}
|
||||
|
||||
// UseFIPS returns true if request config region is FIPS
|
||||
func (r ResourceRequest) UseFIPS() bool {
|
||||
return IsFIPS(aws.StringValue(r.Request.Config.Region))
|
||||
}
|
||||
|
||||
// ResourceConfiguredForFIPS returns true if resource ARNs region is FIPS
|
||||
//
|
||||
// Deprecated: FIPS pseudo-regions will not be in the ARN
|
||||
func (r ResourceRequest) ResourceConfiguredForFIPS() bool {
|
||||
return IsFIPS(r.ARN().Region)
|
||||
}
|
||||
|
||||
// IsCrossPartition returns true if client is configured for another partition, than
|
||||
// the partition that resource ARN region resolves to.
|
||||
func (r ResourceRequest) IsCrossPartition() bool {
|
||||
|
|
@ -53,11 +39,6 @@ func (r ResourceRequest) HasCustomEndpoint() bool {
|
|||
return len(aws.StringValue(r.Request.Config.Endpoint)) > 0
|
||||
}
|
||||
|
||||
// IsFIPS returns true if region is a fips region
|
||||
func IsFIPS(clientRegion string) bool {
|
||||
return strings.HasPrefix(clientRegion, "fips-") || strings.HasSuffix(clientRegion, "-fips")
|
||||
}
|
||||
|
||||
// IsCrossRegion returns true if request signing region is not same as configured region
|
||||
func IsCrossRegion(req *request.Request, otherRegion string) bool {
|
||||
return req.ClientInfo.SigningRegion != otherRegion
|
||||
|
|
|
|||
10
vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go
generated
vendored
10
vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go
generated
vendored
|
|
@ -82,13 +82,17 @@ func buildStruct(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag)
|
|||
field, _ := value.Type().FieldByName(payload)
|
||||
tag = field.Tag
|
||||
value = elemOf(value.FieldByName(payload))
|
||||
|
||||
if !value.IsValid() {
|
||||
if !value.IsValid() && tag.Get("type") != "structure" {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
buf.WriteByte('{')
|
||||
defer buf.WriteString("}")
|
||||
|
||||
if !value.IsValid() {
|
||||
return nil
|
||||
}
|
||||
|
||||
t := value.Type()
|
||||
first := true
|
||||
|
|
@ -144,8 +148,6 @@ func buildStruct(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag)
|
|||
|
||||
}
|
||||
|
||||
buf.WriteString("}")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
5
vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
generated
vendored
5
vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
generated
vendored
|
|
@ -49,9 +49,8 @@ func Build(req *request.Request) {
|
|||
buf = emptyJSON
|
||||
}
|
||||
|
||||
if req.ClientInfo.TargetPrefix != "" || string(buf) != "{}" {
|
||||
req.SetBufferBody(buf)
|
||||
}
|
||||
// Always serialize the body, don't suppress it.
|
||||
req.SetBufferBody(buf)
|
||||
|
||||
if req.ClientInfo.TargetPrefix != "" {
|
||||
target := req.ClientInfo.TargetPrefix + "." + req.Operation.Name
|
||||
|
|
|
|||
11
vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go
generated
vendored
11
vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go
generated
vendored
|
|
@ -28,18 +28,27 @@ func PayloadMember(i interface{}) interface{} {
|
|||
return nil
|
||||
}
|
||||
|
||||
// PayloadType returns the type of a payload field member of i if there is one, or "".
|
||||
const nopayloadPayloadType = "nopayload"
|
||||
|
||||
// PayloadType returns the type of a payload field member of i if there is one,
|
||||
// or "".
|
||||
func PayloadType(i interface{}) string {
|
||||
v := reflect.Indirect(reflect.ValueOf(i))
|
||||
if !v.IsValid() {
|
||||
return ""
|
||||
}
|
||||
|
||||
if field, ok := v.Type().FieldByName("_"); ok {
|
||||
if noPayload := field.Tag.Get(nopayloadPayloadType); noPayload != "" {
|
||||
return nopayloadPayloadType
|
||||
}
|
||||
|
||||
if payloadName := field.Tag.Get("payload"); payloadName != "" {
|
||||
if member, ok := v.Type().FieldByName(payloadName); ok {
|
||||
return member.Tag.Get("type")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
generated
vendored
|
|
@ -140,7 +140,7 @@ func unmarshalLocationElements(resp *http.Response, v reflect.Value, lowerCaseHe
|
|||
prefix := field.Tag.Get("locationName")
|
||||
err := unmarshalHeaderMap(m, resp.Header, prefix, lowerCaseHeaderMaps)
|
||||
if err != nil {
|
||||
awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
|
||||
return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
17941
vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
generated
vendored
17941
vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
generated
vendored
File diff suppressed because it is too large
Load diff
4
vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go
generated
vendored
4
vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go
generated
vendored
|
|
@ -68,6 +68,10 @@ func fillPresignedURL(r *request.Request) {
|
|||
func(opt *endpoints.Options) {
|
||||
opt.DisableSSL = aws.BoolValue(cfg.DisableSSL)
|
||||
opt.UseDualStack = aws.BoolValue(cfg.UseDualStack)
|
||||
opt.UseDualStackEndpoint = cfg.UseDualStackEndpoint
|
||||
opt.UseFIPSEndpoint = cfg.UseFIPSEndpoint
|
||||
opt.Logger = r.Config.Logger
|
||||
opt.LogDeprecated = r.Config.LogLevel.Matches(aws.LogDebugWithDeprecated)
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
|
|
|||
19
vendor/github.com/aws/aws-sdk-go/service/ec2/service.go
generated
vendored
19
vendor/github.com/aws/aws-sdk-go/service/ec2/service.go
generated
vendored
|
|
@ -48,22 +48,23 @@ const (
|
|||
// svc := ec2.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *EC2 {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *EC2 {
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *EC2 {
|
||||
svc := &EC2{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
PartitionID: partitionID,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2016-11-15",
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
PartitionID: partitionID,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2016-11-15",
|
||||
ResolvedRegion: resolvedRegion,
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
|
|
|
|||
56
vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
generated
vendored
56
vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
generated
vendored
|
|
@ -738,6 +738,57 @@ func (c *EC2) WaitUntilInstanceTerminatedWithContext(ctx aws.Context, input *Des
|
|||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilInternetGatewayExists uses the Amazon EC2 API operation
|
||||
// DescribeInternetGateways to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *EC2) WaitUntilInternetGatewayExists(input *DescribeInternetGatewaysInput) error {
|
||||
return c.WaitUntilInternetGatewayExistsWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilInternetGatewayExistsWithContext is an extended version of WaitUntilInternetGatewayExists.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *EC2) WaitUntilInternetGatewayExistsWithContext(ctx aws.Context, input *DescribeInternetGatewaysInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilInternetGatewayExists",
|
||||
MaxAttempts: 6,
|
||||
Delay: request.ConstantWaiterDelay(5 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "length(InternetGateways[].InternetGatewayId) > `0`",
|
||||
Expected: true,
|
||||
},
|
||||
{
|
||||
State: request.RetryWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "InvalidInternetGateway.NotFound",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeInternetGatewaysInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeInternetGatewaysRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilKeyPairExists uses the Amazon EC2 API operation
|
||||
// DescribeKeyPairs to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
|
|
@ -1030,6 +1081,11 @@ func (c *EC2) WaitUntilSnapshotCompletedWithContext(ctx aws.Context, input *Desc
|
|||
Matcher: request.PathAllWaiterMatch, Argument: "Snapshots[].State",
|
||||
Expected: "completed",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Snapshots[].State",
|
||||
Expected: "error",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
|
|
|
|||
430
vendor/github.com/aws/aws-sdk-go/service/s3/api.go
generated
vendored
430
vendor/github.com/aws/aws-sdk-go/service/s3/api.go
generated
vendored
|
|
@ -196,6 +196,10 @@ func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput)
|
|||
// to retry the failed requests. For more information, see Amazon S3 Error Best
|
||||
// Practices (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html).
|
||||
//
|
||||
// You cannot use Content-Type: application/x-www-form-urlencoded with Complete
|
||||
// Multipart Upload requests. Also, if you do not provide a Content-Type header,
|
||||
// CompleteMultipartUpload returns a 200 OK response.
|
||||
//
|
||||
// For more information about multipart uploads, see Uploading Objects Using
|
||||
// Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
|
||||
//
|
||||
|
|
@ -416,6 +420,21 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou
|
|||
// see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
|
||||
// and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html).
|
||||
//
|
||||
// If the bucket that you're copying objects to uses the bucket owner enforced
|
||||
// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions.
|
||||
// Buckets that use this setting only accept PUT requests that don't specify
|
||||
// an ACL or PUT requests that specify bucket owner full control ACLs, such
|
||||
// as the bucket-owner-full-control canned ACL or an equivalent form of this
|
||||
// ACL expressed in the XML format.
|
||||
//
|
||||
// For more information, see Controlling ownership of objects and disabling
|
||||
// ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// If your bucket uses the bucket owner enforced setting for Object Ownership,
|
||||
// all objects written to the bucket by any account will be owned by the bucket
|
||||
// owner.
|
||||
//
|
||||
// Storage Class Options
|
||||
//
|
||||
// You can use the CopyObject action to change the storage class of an object
|
||||
|
|
@ -554,8 +573,19 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request
|
|||
// your application must be able to handle 307 redirect. For more information,
|
||||
// see Virtual hosting of buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html).
|
||||
//
|
||||
// When creating a bucket using this operation, you can optionally specify the
|
||||
// accounts or groups that should be granted specific permissions on the bucket.
|
||||
// Access control lists (ACLs)
|
||||
//
|
||||
// When creating a bucket using this operation, you can optionally configure
|
||||
// the bucket ACL to specify the accounts or groups that should be granted specific
|
||||
// permissions on the bucket.
|
||||
//
|
||||
// If your CreateBucket request includes the BucketOwnerEnforced value for the
|
||||
// x-amz-object-ownership header, your request can either not specify an ACL
|
||||
// or specify bucket owner full control ACLs, such as the bucket-owner-full-control
|
||||
// canned ACL or an equivalent ACL expressed in the XML format. For more information,
|
||||
// see Controlling object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// There are two ways to grant the appropriate permissions using the request
|
||||
// headers.
|
||||
//
|
||||
|
|
@ -568,11 +598,11 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request
|
|||
// x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control
|
||||
// headers. These headers map to the set of permissions Amazon S3 supports
|
||||
// in an ACL. For more information, see Access control list (ACL) overview
|
||||
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). You
|
||||
// specify each grantee as a type=value pair, where the type is one of the
|
||||
// following: id – if the value specified is the canonical user ID of an
|
||||
// Amazon Web Services account uri – if you are granting permissions to
|
||||
// a predefined group emailAddress – if the value specified is the email
|
||||
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html).
|
||||
// You specify each grantee as a type=value pair, where the type is one of
|
||||
// the following: id – if the value specified is the canonical user ID
|
||||
// of an Amazon Web Services account uri – if you are granting permissions
|
||||
// to a predefined group emailAddress – if the value specified is the email
|
||||
// address of an Amazon Web Services account Using email addresses to specify
|
||||
// a grantee is only supported in the following Amazon Web Services Regions:
|
||||
// US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific
|
||||
|
|
@ -589,15 +619,23 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request
|
|||
//
|
||||
// Permissions
|
||||
//
|
||||
// If your CreateBucket request specifies ACL permissions and the ACL is public-read,
|
||||
// public-read-write, authenticated-read, or if you specify access permissions
|
||||
// explicitly through any other ACL, both s3:CreateBucket and s3:PutBucketAcl
|
||||
// permissions are needed. If the ACL the CreateBucket request is private, only
|
||||
// s3:CreateBucket permission is needed.
|
||||
// In addition to s3:CreateBucket, the following permissions are required when
|
||||
// your CreateBucket includes specific headers:
|
||||
//
|
||||
// If ObjectLockEnabledForBucket is set to true in your CreateBucket request,
|
||||
// s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning permissions
|
||||
// are required.
|
||||
// * ACLs - If your CreateBucket request specifies ACL permissions and the
|
||||
// ACL is public-read, public-read-write, authenticated-read, or if you specify
|
||||
// access permissions explicitly through any other ACL, both s3:CreateBucket
|
||||
// and s3:PutBucketAcl permissions are needed. If the ACL the CreateBucket
|
||||
// request is private or doesn't specify any ACLs, only s3:CreateBucket permission
|
||||
// is needed.
|
||||
//
|
||||
// * Object Lock - If ObjectLockEnabledForBucket is set to true in your CreateBucket
|
||||
// request, s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning
|
||||
// permissions are required.
|
||||
//
|
||||
// * S3 Object Ownership - If your CreateBucket request includes the the
|
||||
// x-amz-object-ownership header, s3:PutBucketOwnershipControls permission
|
||||
// is required.
|
||||
//
|
||||
// The following operations are related to CreateBucket:
|
||||
//
|
||||
|
|
@ -1277,17 +1315,16 @@ func (c *S3) DeleteBucketIntelligentTieringConfigurationRequest(input *DeleteBuc
|
|||
// The S3 Intelligent-Tiering storage class is designed to optimize storage
|
||||
// costs by automatically moving data to the most cost-effective storage access
|
||||
// tier, without performance impact or operational overhead. S3 Intelligent-Tiering
|
||||
// delivers automatic cost savings in two low latency and high throughput access
|
||||
// tiers. For data that can be accessed asynchronously, you can choose to activate
|
||||
// automatic archiving capabilities within the S3 Intelligent-Tiering storage
|
||||
// class.
|
||||
// delivers automatic cost savings in three low latency and high throughput
|
||||
// access tiers. To get the lowest storage cost on data that can be accessed
|
||||
// in minutes to hours, you can choose to activate additional archiving capabilities.
|
||||
//
|
||||
// The S3 Intelligent-Tiering storage class is the ideal storage class for data
|
||||
// with unknown, changing, or unpredictable access patterns, independent of
|
||||
// object size or retention period. If the size of an object is less than 128
|
||||
// KB, it is not eligible for auto-tiering. Smaller objects can be stored, but
|
||||
// they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering
|
||||
// storage class.
|
||||
// KB, it is not monitored and not eligible for auto-tiering. Smaller objects
|
||||
// can be stored, but they are always charged at the Frequent Access tier rates
|
||||
// in the S3 Intelligent-Tiering storage class.
|
||||
//
|
||||
// For more information, see Storage class for automatically optimizing frequently
|
||||
// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
|
||||
|
|
@ -2614,6 +2651,12 @@ func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request
|
|||
// is granted to the anonymous user, you can return the ACL of the bucket without
|
||||
// using an authorization header.
|
||||
//
|
||||
// If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
|
||||
// requests to read ACLs are still supported and return the bucket-owner-full-control
|
||||
// ACL with the owner being the account that created the bucket. For more information,
|
||||
// see Controlling object ownership and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// Related Resources
|
||||
//
|
||||
// * ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
|
||||
|
|
@ -2967,17 +3010,16 @@ func (c *S3) GetBucketIntelligentTieringConfigurationRequest(input *GetBucketInt
|
|||
// The S3 Intelligent-Tiering storage class is designed to optimize storage
|
||||
// costs by automatically moving data to the most cost-effective storage access
|
||||
// tier, without performance impact or operational overhead. S3 Intelligent-Tiering
|
||||
// delivers automatic cost savings in two low latency and high throughput access
|
||||
// tiers. For data that can be accessed asynchronously, you can choose to activate
|
||||
// automatic archiving capabilities within the S3 Intelligent-Tiering storage
|
||||
// class.
|
||||
// delivers automatic cost savings in three low latency and high throughput
|
||||
// access tiers. To get the lowest storage cost on data that can be accessed
|
||||
// in minutes to hours, you can choose to activate additional archiving capabilities.
|
||||
//
|
||||
// The S3 Intelligent-Tiering storage class is the ideal storage class for data
|
||||
// with unknown, changing, or unpredictable access patterns, independent of
|
||||
// object size or retention period. If the size of an object is less than 128
|
||||
// KB, it is not eligible for auto-tiering. Smaller objects can be stored, but
|
||||
// they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering
|
||||
// storage class.
|
||||
// KB, it is not monitored and not eligible for auto-tiering. Smaller objects
|
||||
// can be stored, but they are always charged at the Frequent Access tier rates
|
||||
// in the S3 Intelligent-Tiering storage class.
|
||||
//
|
||||
// For more information, see Storage class for automatically optimizing frequently
|
||||
// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
|
||||
|
|
@ -3805,10 +3847,10 @@ func (c *S3) GetBucketOwnershipControlsRequest(input *GetBucketOwnershipControls
|
|||
//
|
||||
// Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation,
|
||||
// you must have the s3:GetBucketOwnershipControls permission. For more information
|
||||
// about Amazon S3 permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
|
||||
// about Amazon S3 permissions, see Specifying permissions in a policy (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html).
|
||||
//
|
||||
// For information about Amazon S3 Object Ownership, see Using Object Ownership
|
||||
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
|
||||
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html).
|
||||
//
|
||||
// The following operations are related to GetBucketOwnershipControls:
|
||||
//
|
||||
|
|
@ -4586,8 +4628,9 @@ func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, outp
|
|||
// By default, the GET action returns the current version of an object. To return
|
||||
// a different version, use the versionId subresource.
|
||||
//
|
||||
// * You need the s3:GetObjectVersion permission to access a specific version
|
||||
// of an object.
|
||||
// * If you supply a versionId, you need the s3:GetObjectVersion permission
|
||||
// to access a specific version of an object. If you request a specific version,
|
||||
// you do not need to have the s3:GetObject permission.
|
||||
//
|
||||
// * If the current version of the object is a delete marker, Amazon S3 behaves
|
||||
// as if the object was deleted and includes x-amz-delete-marker: true in
|
||||
|
|
@ -4734,6 +4777,12 @@ func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request
|
|||
// By default, GET returns ACL information about the current version of an object.
|
||||
// To return ACL information about a different version, use the versionId subresource.
|
||||
//
|
||||
// If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
|
||||
// requests to read ACLs are still supported and return the bucket-owner-full-control
|
||||
// ACL with the owner being the account that created the bucket. For more information,
|
||||
// see Controlling object ownership and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// The following operations are related to GetObjectAcl:
|
||||
//
|
||||
// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
|
||||
|
|
@ -5675,17 +5724,16 @@ func (c *S3) ListBucketIntelligentTieringConfigurationsRequest(input *ListBucket
|
|||
// The S3 Intelligent-Tiering storage class is designed to optimize storage
|
||||
// costs by automatically moving data to the most cost-effective storage access
|
||||
// tier, without performance impact or operational overhead. S3 Intelligent-Tiering
|
||||
// delivers automatic cost savings in two low latency and high throughput access
|
||||
// tiers. For data that can be accessed asynchronously, you can choose to activate
|
||||
// automatic archiving capabilities within the S3 Intelligent-Tiering storage
|
||||
// class.
|
||||
// delivers automatic cost savings in three low latency and high throughput
|
||||
// access tiers. To get the lowest storage cost on data that can be accessed
|
||||
// in minutes to hours, you can choose to activate additional archiving capabilities.
|
||||
//
|
||||
// The S3 Intelligent-Tiering storage class is the ideal storage class for data
|
||||
// with unknown, changing, or unpredictable access patterns, independent of
|
||||
// object size or retention period. If the size of an object is less than 128
|
||||
// KB, it is not eligible for auto-tiering. Smaller objects can be stored, but
|
||||
// they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering
|
||||
// storage class.
|
||||
// KB, it is not monitored and not eligible for auto-tiering. Smaller objects
|
||||
// can be stored, but they are always charged at the Frequent Access tier rates
|
||||
// in the S3 Intelligent-Tiering storage class.
|
||||
//
|
||||
// For more information, see Storage class for automatically optimizing frequently
|
||||
// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
|
||||
|
|
@ -6980,6 +7028,14 @@ func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request
|
|||
// existing application that updates a bucket ACL using the request body, then
|
||||
// you can continue to use that approach.
|
||||
//
|
||||
// If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
|
||||
// ACLs are disabled and no longer affect permissions. You must use policies
|
||||
// to grant access to your bucket and the objects in it. Requests to set ACLs
|
||||
// or update ACLs fail and return the AccessControlListNotSupported error code.
|
||||
// Requests to read ACLs are still supported. For more information, see Controlling
|
||||
// object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// Access Permissions
|
||||
//
|
||||
// You can set access permissions using one of the following methods:
|
||||
|
|
@ -7474,17 +7530,16 @@ func (c *S3) PutBucketIntelligentTieringConfigurationRequest(input *PutBucketInt
|
|||
// The S3 Intelligent-Tiering storage class is designed to optimize storage
|
||||
// costs by automatically moving data to the most cost-effective storage access
|
||||
// tier, without performance impact or operational overhead. S3 Intelligent-Tiering
|
||||
// delivers automatic cost savings in two low latency and high throughput access
|
||||
// tiers. For data that can be accessed asynchronously, you can choose to activate
|
||||
// automatic archiving capabilities within the S3 Intelligent-Tiering storage
|
||||
// class.
|
||||
// delivers automatic cost savings in three low latency and high throughput
|
||||
// access tiers. To get the lowest storage cost on data that can be accessed
|
||||
// in minutes to hours, you can choose to activate additional archiving capabilities.
|
||||
//
|
||||
// The S3 Intelligent-Tiering storage class is the ideal storage class for data
|
||||
// with unknown, changing, or unpredictable access patterns, independent of
|
||||
// object size or retention period. If the size of an object is less than 128
|
||||
// KB, it is not eligible for auto-tiering. Smaller objects can be stored, but
|
||||
// they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering
|
||||
// storage class.
|
||||
// KB, it is not monitored and not eligible for auto-tiering. Smaller objects
|
||||
// can be stored, but they are always charged at the Frequent Access tier rates
|
||||
// in the S3 Intelligent-Tiering storage class.
|
||||
//
|
||||
// For more information, see Storage class for automatically optimizing frequently
|
||||
// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
|
||||
|
|
@ -7998,6 +8053,12 @@ func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request
|
|||
// the Grantee request element to grant access to other people. The Permissions
|
||||
// request element specifies the kind of access the grantee has to the logs.
|
||||
//
|
||||
// If the target bucket for log delivery uses the bucket owner enforced setting
|
||||
// for S3 Object Ownership, you can't use the Grantee request element to grant
|
||||
// access to others. Permissions can only be granted using policies. For more
|
||||
// information, see Permissions for server access log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// Grantee Values
|
||||
//
|
||||
// You can specify the person (grantee) to whom you're assigning access rights
|
||||
|
|
@ -8021,7 +8082,8 @@ func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request
|
|||
// <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" />
|
||||
//
|
||||
// For more information about server access logging, see Server Access Logging
|
||||
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html).
|
||||
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html) in
|
||||
// the Amazon S3 User Guide.
|
||||
//
|
||||
// For more information about creating a bucket, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html).
|
||||
// For more information about returning the logging status of a bucket, see
|
||||
|
|
@ -8430,11 +8492,11 @@ func (c *S3) PutBucketOwnershipControlsRequest(input *PutBucketOwnershipControls
|
|||
//
|
||||
// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this
|
||||
// operation, you must have the s3:PutBucketOwnershipControls permission. For
|
||||
// more information about Amazon S3 permissions, see Specifying Permissions
|
||||
// in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
|
||||
// more information about Amazon S3 permissions, see Specifying permissions
|
||||
// in a policy (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/using-with-s3-actions.html).
|
||||
//
|
||||
// For information about Amazon S3 Object Ownership, see Using Object Ownership
|
||||
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
|
||||
// For information about Amazon S3 Object Ownership, see Using object ownership
|
||||
// (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/about-object-ownership.html).
|
||||
//
|
||||
// The following operations are related to PutBucketOwnershipControls:
|
||||
//
|
||||
|
|
@ -9272,6 +9334,23 @@ func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, outp
|
|||
// Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
|
||||
// and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html).
|
||||
//
|
||||
// If the bucket that you're uploading objects to uses the bucket owner enforced
|
||||
// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions.
|
||||
// Buckets that use this setting only accept PUT requests that don't specify
|
||||
// an ACL or PUT requests that specify bucket owner full control ACLs, such
|
||||
// as the bucket-owner-full-control canned ACL or an equivalent form of this
|
||||
// ACL expressed in the XML format. PUT requests that contain other ACLs (for
|
||||
// example, custom grants to certain Amazon Web Services accounts) fail and
|
||||
// return a 400 error with the error code AccessControlListNotSupported.
|
||||
//
|
||||
// For more information, see Controlling ownership of objects and disabling
|
||||
// ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// If your bucket uses the bucket owner enforced setting for Object Ownership,
|
||||
// all objects written to the bucket by any account will be owned by the bucket
|
||||
// owner.
|
||||
//
|
||||
// Storage Class Options
|
||||
//
|
||||
// By default, Amazon S3 uses the STANDARD Storage Class to store newly created
|
||||
|
|
@ -9391,6 +9470,14 @@ func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request
|
|||
// Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
|
||||
// ACLs are disabled and no longer affect permissions. You must use policies
|
||||
// to grant access to your bucket and the objects in it. Requests to set ACLs
|
||||
// or update ACLs fail and return the AccessControlListNotSupported error code.
|
||||
// Requests to read ACLs are still supported. For more information, see Controlling
|
||||
// object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// Access Permissions
|
||||
//
|
||||
// You can set access permissions using one of the following methods:
|
||||
|
|
@ -12687,6 +12774,9 @@ type CompletedMultipartUpload struct {
|
|||
_ struct{} `type:"structure"`
|
||||
|
||||
// Array of CompletedPart data types.
|
||||
//
|
||||
// If you do not supply a valid Part with your request, the service sends back
|
||||
// an HTTP 400 response.
|
||||
Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
|
||||
}
|
||||
|
||||
|
|
@ -13726,6 +13816,22 @@ type CreateBucketInput struct {
|
|||
|
||||
// Specifies whether you want S3 Object Lock to be enabled for the new bucket.
|
||||
ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"`
|
||||
|
||||
// The container element for object ownership for a bucket's ownership controls.
|
||||
//
|
||||
// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to
|
||||
// the bucket owner if the objects are uploaded with the bucket-owner-full-control
|
||||
// canned ACL.
|
||||
//
|
||||
// ObjectWriter - The uploading account will own the object if the object is
|
||||
// uploaded with the bucket-owner-full-control canned ACL.
|
||||
//
|
||||
// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
|
||||
// affect permissions. The bucket owner automatically owns and has full control
|
||||
// over every object in the bucket. The bucket only accepts PUT requests that
|
||||
// don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control
|
||||
// canned ACL or an equivalent form of this ACL expressed in the XML format.
|
||||
ObjectOwnership *string `location:"header" locationName:"x-amz-object-ownership" type:"string" enum:"ObjectOwnership"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
|
|
@ -13823,6 +13929,12 @@ func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketI
|
|||
return s
|
||||
}
|
||||
|
||||
// SetObjectOwnership sets the ObjectOwnership field's value.
|
||||
func (s *CreateBucketInput) SetObjectOwnership(v string) *CreateBucketInput {
|
||||
s.ObjectOwnership = &v
|
||||
return s
|
||||
}
|
||||
|
||||
type CreateBucketOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
|
|
@ -17813,6 +17925,29 @@ func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
|
|||
return s
|
||||
}
|
||||
|
||||
// A container for specifying the configuration for Amazon EventBridge.
|
||||
type EventBridgeConfiguration struct {
|
||||
_ struct{} `type:"structure"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s EventBridgeConfiguration) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s EventBridgeConfiguration) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// Optional configuration to replicate existing source bucket objects. For more
|
||||
// information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication)
|
||||
// in the Amazon S3 User Guide.
|
||||
|
|
@ -19659,8 +19794,8 @@ func (s GetBucketOwnershipControlsInput) updateArnableField(v string) (interface
|
|||
type GetBucketOwnershipControlsOutput struct {
|
||||
_ struct{} `type:"structure" payload:"OwnershipControls"`
|
||||
|
||||
// The OwnershipControls (BucketOwnerPreferred or ObjectWriter) currently in
|
||||
// effect for this Amazon S3 bucket.
|
||||
// The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter)
|
||||
// currently in effect for this Amazon S3 bucket.
|
||||
OwnershipControls *OwnershipControls `type:"structure"`
|
||||
}
|
||||
|
||||
|
|
@ -24692,6 +24827,12 @@ func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
|
|||
type LifecycleRuleAndOperator struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// Minimum object size to which the rule applies.
|
||||
ObjectSizeGreaterThan *int64 `type:"long"`
|
||||
|
||||
// Maximum object size to which the rule applies.
|
||||
ObjectSizeLessThan *int64 `type:"long"`
|
||||
|
||||
// Prefix identifying one or more objects to which the rule applies.
|
||||
Prefix *string `type:"string"`
|
||||
|
||||
|
|
@ -24738,6 +24879,18 @@ func (s *LifecycleRuleAndOperator) Validate() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// SetObjectSizeGreaterThan sets the ObjectSizeGreaterThan field's value.
|
||||
func (s *LifecycleRuleAndOperator) SetObjectSizeGreaterThan(v int64) *LifecycleRuleAndOperator {
|
||||
s.ObjectSizeGreaterThan = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetObjectSizeLessThan sets the ObjectSizeLessThan field's value.
|
||||
func (s *LifecycleRuleAndOperator) SetObjectSizeLessThan(v int64) *LifecycleRuleAndOperator {
|
||||
s.ObjectSizeLessThan = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetPrefix sets the Prefix field's value.
|
||||
func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
|
||||
s.Prefix = &v
|
||||
|
|
@ -24760,6 +24913,12 @@ type LifecycleRuleFilter struct {
|
|||
// of the predicates configured inside the And operator.
|
||||
And *LifecycleRuleAndOperator `type:"structure"`
|
||||
|
||||
// Minimum object size to which the rule applies.
|
||||
ObjectSizeGreaterThan *int64 `type:"long"`
|
||||
|
||||
// Maximum object size to which the rule applies.
|
||||
ObjectSizeLessThan *int64 `type:"long"`
|
||||
|
||||
// Prefix identifying one or more objects to which the rule applies.
|
||||
//
|
||||
// Replacement must be made for object keys containing special characters (such
|
||||
|
|
@ -24815,6 +24974,18 @@ func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRule
|
|||
return s
|
||||
}
|
||||
|
||||
// SetObjectSizeGreaterThan sets the ObjectSizeGreaterThan field's value.
|
||||
func (s *LifecycleRuleFilter) SetObjectSizeGreaterThan(v int64) *LifecycleRuleFilter {
|
||||
s.ObjectSizeGreaterThan = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetObjectSizeLessThan sets the ObjectSizeLessThan field's value.
|
||||
func (s *LifecycleRuleFilter) SetObjectSizeLessThan(v int64) *LifecycleRuleFilter {
|
||||
s.ObjectSizeLessThan = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetPrefix sets the Prefix field's value.
|
||||
func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
|
||||
s.Prefix = &v
|
||||
|
|
@ -27410,6 +27581,11 @@ type LoggingEnabled struct {
|
|||
TargetBucket *string `type:"string" required:"true"`
|
||||
|
||||
// Container for granting information.
|
||||
//
|
||||
// Buckets that use the bucket owner enforced setting for Object Ownership don't
|
||||
// support target grants. For more information, see Permissions for server access
|
||||
// log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
|
||||
// in the Amazon S3 User Guide.
|
||||
TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
|
||||
|
||||
// A prefix for all log object keys. If you store log files from multiple Amazon
|
||||
|
|
@ -27890,6 +28066,13 @@ func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
|
|||
type NoncurrentVersionExpiration struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// Specifies how many noncurrent versions Amazon S3 will retain. If there are
|
||||
// this many more recent noncurrent versions, Amazon S3 will take the associated
|
||||
// action. For more information about noncurrent versions, see Lifecycle configuration
|
||||
// elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
NewerNoncurrentVersions *int64 `type:"integer"`
|
||||
|
||||
// Specifies the number of days an object is noncurrent before Amazon S3 can
|
||||
// perform the associated action. For information about the noncurrent days
|
||||
// calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
|
||||
|
|
@ -27916,6 +28099,12 @@ func (s NoncurrentVersionExpiration) GoString() string {
|
|||
return s.String()
|
||||
}
|
||||
|
||||
// SetNewerNoncurrentVersions sets the NewerNoncurrentVersions field's value.
|
||||
func (s *NoncurrentVersionExpiration) SetNewerNoncurrentVersions(v int64) *NoncurrentVersionExpiration {
|
||||
s.NewerNoncurrentVersions = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetNoncurrentDays sets the NoncurrentDays field's value.
|
||||
func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
|
||||
s.NoncurrentDays = &v
|
||||
|
|
@ -27923,15 +28112,22 @@ func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVers
|
|||
}
|
||||
|
||||
// Container for the transition rule that describes when noncurrent objects
|
||||
// transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER,
|
||||
// or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled (or versioning
|
||||
// is suspended), you can set this action to request that Amazon S3 transition
|
||||
// noncurrent object versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,
|
||||
// GLACIER, or DEEP_ARCHIVE storage class at a specific period in the object's
|
||||
// lifetime.
|
||||
// transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR,
|
||||
// GLACIER, or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled
|
||||
// (or versioning is suspended), you can set this action to request that Amazon
|
||||
// S3 transition noncurrent object versions to the STANDARD_IA, ONEZONE_IA,
|
||||
// INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at
|
||||
// a specific period in the object's lifetime.
|
||||
type NoncurrentVersionTransition struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// Specifies how many noncurrent versions Amazon S3 will retain. If there are
|
||||
// this many more recent noncurrent versions, Amazon S3 will take the associated
|
||||
// action. For more information about noncurrent versions, see Lifecycle configuration
|
||||
// elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
NewerNoncurrentVersions *int64 `type:"integer"`
|
||||
|
||||
// Specifies the number of days an object is noncurrent before Amazon S3 can
|
||||
// perform the associated action. For information about the noncurrent days
|
||||
// calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent
|
||||
|
|
@ -27961,6 +28157,12 @@ func (s NoncurrentVersionTransition) GoString() string {
|
|||
return s.String()
|
||||
}
|
||||
|
||||
// SetNewerNoncurrentVersions sets the NewerNoncurrentVersions field's value.
|
||||
func (s *NoncurrentVersionTransition) SetNewerNoncurrentVersions(v int64) *NoncurrentVersionTransition {
|
||||
s.NewerNoncurrentVersions = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetNoncurrentDays sets the NoncurrentDays field's value.
|
||||
func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
|
||||
s.NoncurrentDays = &v
|
||||
|
|
@ -27978,6 +28180,9 @@ func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersi
|
|||
type NotificationConfiguration struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// Enables delivery of events to Amazon EventBridge.
|
||||
EventBridgeConfiguration *EventBridgeConfiguration `type:"structure"`
|
||||
|
||||
// Describes the Lambda functions to invoke and the events for which to invoke
|
||||
// them.
|
||||
LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
|
||||
|
|
@ -28049,6 +28254,12 @@ func (s *NotificationConfiguration) Validate() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// SetEventBridgeConfiguration sets the EventBridgeConfiguration field's value.
|
||||
func (s *NotificationConfiguration) SetEventBridgeConfiguration(v *EventBridgeConfiguration) *NotificationConfiguration {
|
||||
s.EventBridgeConfiguration = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
|
||||
func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
|
||||
s.LambdaFunctionConfigurations = v
|
||||
|
|
@ -28760,6 +28971,12 @@ type OwnershipControlsRule struct {
|
|||
// ObjectWriter - The uploading account will own the object if the object is
|
||||
// uploaded with the bucket-owner-full-control canned ACL.
|
||||
//
|
||||
// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
|
||||
// affect permissions. The bucket owner automatically owns and has full control
|
||||
// over every object in the bucket. The bucket only accepts PUT requests that
|
||||
// don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control
|
||||
// canned ACL or an equivalent form of this ACL expressed in the XML format.
|
||||
//
|
||||
// ObjectOwnership is a required field
|
||||
ObjectOwnership *string `type:"string" required:"true" enum:"ObjectOwnership"`
|
||||
}
|
||||
|
|
@ -30710,6 +30927,10 @@ type PutBucketNotificationConfigurationInput struct {
|
|||
//
|
||||
// NotificationConfiguration is a required field
|
||||
NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
|
||||
|
||||
// Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations. True
|
||||
// or false value.
|
||||
SkipDestinationValidation *bool `location:"header" locationName:"x-amz-skip-destination-validation" type:"boolean"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
|
|
@ -30779,6 +31000,12 @@ func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v
|
|||
return s
|
||||
}
|
||||
|
||||
// SetSkipDestinationValidation sets the SkipDestinationValidation field's value.
|
||||
func (s *PutBucketNotificationConfigurationInput) SetSkipDestinationValidation(v bool) *PutBucketNotificationConfigurationInput {
|
||||
s.SkipDestinationValidation = &v
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *PutBucketNotificationConfigurationInput) getEndpointARN() (arn.Resource, error) {
|
||||
if s.Bucket == nil {
|
||||
return nil, fmt.Errorf("member Bucket is nil")
|
||||
|
|
@ -30971,8 +31198,8 @@ type PutBucketOwnershipControlsInput struct {
|
|||
// error.
|
||||
ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
|
||||
|
||||
// The OwnershipControls (BucketOwnerPreferred or ObjectWriter) that you want
|
||||
// to apply to this Amazon S3 bucket.
|
||||
// The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter)
|
||||
// that you want to apply to this Amazon S3 bucket.
|
||||
//
|
||||
// OwnershipControls is a required field
|
||||
OwnershipControls *OwnershipControls `locationName:"OwnershipControls" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
|
||||
|
|
@ -35092,12 +35319,12 @@ type Rule struct {
|
|||
NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
|
||||
|
||||
// Container for the transition rule that describes when noncurrent objects
|
||||
// transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER,
|
||||
// or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled (or versioning
|
||||
// is suspended), you can set this action to request that Amazon S3 transition
|
||||
// noncurrent object versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,
|
||||
// GLACIER, or DEEP_ARCHIVE storage class at a specific period in the object's
|
||||
// lifetime.
|
||||
// transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR,
|
||||
// GLACIER, or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled
|
||||
// (or versioning is suspended), you can set this action to request that Amazon
|
||||
// S3 transition noncurrent object versions to the STANDARD_IA, ONEZONE_IA,
|
||||
// INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at
|
||||
// a specific period in the object's lifetime.
|
||||
NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
|
||||
|
||||
// Object key prefix that identifies one or more objects to which this rule
|
||||
|
|
@ -36553,6 +36780,11 @@ func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
|
|||
}
|
||||
|
||||
// Container for granting information.
|
||||
//
|
||||
// Buckets that use the bucket owner enforced setting for Object Ownership don't
|
||||
// support target grants. For more information, see Permissions server access
|
||||
// log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
|
||||
// in the Amazon S3 User Guide.
|
||||
type TargetGrant struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
|
|
@ -38621,6 +38853,36 @@ const (
|
|||
|
||||
// EventS3ReplicationOperationReplicatedAfterThreshold is a Event enum value
|
||||
EventS3ReplicationOperationReplicatedAfterThreshold = "s3:Replication:OperationReplicatedAfterThreshold"
|
||||
|
||||
// EventS3ObjectRestoreDelete is a Event enum value
|
||||
EventS3ObjectRestoreDelete = "s3:ObjectRestore:Delete"
|
||||
|
||||
// EventS3LifecycleTransition is a Event enum value
|
||||
EventS3LifecycleTransition = "s3:LifecycleTransition"
|
||||
|
||||
// EventS3IntelligentTiering is a Event enum value
|
||||
EventS3IntelligentTiering = "s3:IntelligentTiering"
|
||||
|
||||
// EventS3ObjectAclPut is a Event enum value
|
||||
EventS3ObjectAclPut = "s3:ObjectAcl:Put"
|
||||
|
||||
// EventS3LifecycleExpiration is a Event enum value
|
||||
EventS3LifecycleExpiration = "s3:LifecycleExpiration:*"
|
||||
|
||||
// EventS3LifecycleExpirationDelete is a Event enum value
|
||||
EventS3LifecycleExpirationDelete = "s3:LifecycleExpiration:Delete"
|
||||
|
||||
// EventS3LifecycleExpirationDeleteMarkerCreated is a Event enum value
|
||||
EventS3LifecycleExpirationDeleteMarkerCreated = "s3:LifecycleExpiration:DeleteMarkerCreated"
|
||||
|
||||
// EventS3ObjectTagging is a Event enum value
|
||||
EventS3ObjectTagging = "s3:ObjectTagging:*"
|
||||
|
||||
// EventS3ObjectTaggingPut is a Event enum value
|
||||
EventS3ObjectTaggingPut = "s3:ObjectTagging:Put"
|
||||
|
||||
// EventS3ObjectTaggingDelete is a Event enum value
|
||||
EventS3ObjectTaggingDelete = "s3:ObjectTagging:Delete"
|
||||
)
|
||||
|
||||
// Event_Values returns all elements of the Event enum
|
||||
|
|
@ -38643,6 +38905,16 @@ func Event_Values() []string {
|
|||
EventS3ReplicationOperationNotTracked,
|
||||
EventS3ReplicationOperationMissedThreshold,
|
||||
EventS3ReplicationOperationReplicatedAfterThreshold,
|
||||
EventS3ObjectRestoreDelete,
|
||||
EventS3LifecycleTransition,
|
||||
EventS3IntelligentTiering,
|
||||
EventS3ObjectAclPut,
|
||||
EventS3LifecycleExpiration,
|
||||
EventS3LifecycleExpirationDelete,
|
||||
EventS3LifecycleExpirationDeleteMarkerCreated,
|
||||
EventS3ObjectTagging,
|
||||
EventS3ObjectTaggingPut,
|
||||
EventS3ObjectTaggingDelete,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -39050,12 +39322,21 @@ func ObjectLockRetentionMode_Values() []string {
|
|||
//
|
||||
// ObjectWriter - The uploading account will own the object if the object is
|
||||
// uploaded with the bucket-owner-full-control canned ACL.
|
||||
//
|
||||
// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
|
||||
// affect permissions. The bucket owner automatically owns and has full control
|
||||
// over every object in the bucket. The bucket only accepts PUT requests that
|
||||
// don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control
|
||||
// canned ACL or an equivalent form of this ACL expressed in the XML format.
|
||||
const (
|
||||
// ObjectOwnershipBucketOwnerPreferred is a ObjectOwnership enum value
|
||||
ObjectOwnershipBucketOwnerPreferred = "BucketOwnerPreferred"
|
||||
|
||||
// ObjectOwnershipObjectWriter is a ObjectOwnership enum value
|
||||
ObjectOwnershipObjectWriter = "ObjectWriter"
|
||||
|
||||
// ObjectOwnershipBucketOwnerEnforced is a ObjectOwnership enum value
|
||||
ObjectOwnershipBucketOwnerEnforced = "BucketOwnerEnforced"
|
||||
)
|
||||
|
||||
// ObjectOwnership_Values returns all elements of the ObjectOwnership enum
|
||||
|
|
@ -39063,6 +39344,7 @@ func ObjectOwnership_Values() []string {
|
|||
return []string{
|
||||
ObjectOwnershipBucketOwnerPreferred,
|
||||
ObjectOwnershipObjectWriter,
|
||||
ObjectOwnershipBucketOwnerEnforced,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -39090,6 +39372,9 @@ const (
|
|||
|
||||
// ObjectStorageClassOutposts is a ObjectStorageClass enum value
|
||||
ObjectStorageClassOutposts = "OUTPOSTS"
|
||||
|
||||
// ObjectStorageClassGlacierIr is a ObjectStorageClass enum value
|
||||
ObjectStorageClassGlacierIr = "GLACIER_IR"
|
||||
)
|
||||
|
||||
// ObjectStorageClass_Values returns all elements of the ObjectStorageClass enum
|
||||
|
|
@ -39103,6 +39388,7 @@ func ObjectStorageClass_Values() []string {
|
|||
ObjectStorageClassIntelligentTiering,
|
||||
ObjectStorageClassDeepArchive,
|
||||
ObjectStorageClassOutposts,
|
||||
ObjectStorageClassGlacierIr,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -39377,6 +39663,9 @@ const (
|
|||
|
||||
// StorageClassOutposts is a StorageClass enum value
|
||||
StorageClassOutposts = "OUTPOSTS"
|
||||
|
||||
// StorageClassGlacierIr is a StorageClass enum value
|
||||
StorageClassGlacierIr = "GLACIER_IR"
|
||||
)
|
||||
|
||||
// StorageClass_Values returns all elements of the StorageClass enum
|
||||
|
|
@ -39390,6 +39679,7 @@ func StorageClass_Values() []string {
|
|||
StorageClassGlacier,
|
||||
StorageClassDeepArchive,
|
||||
StorageClassOutposts,
|
||||
StorageClassGlacierIr,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -39456,6 +39746,9 @@ const (
|
|||
|
||||
// TransitionStorageClassDeepArchive is a TransitionStorageClass enum value
|
||||
TransitionStorageClassDeepArchive = "DEEP_ARCHIVE"
|
||||
|
||||
// TransitionStorageClassGlacierIr is a TransitionStorageClass enum value
|
||||
TransitionStorageClassGlacierIr = "GLACIER_IR"
|
||||
)
|
||||
|
||||
// TransitionStorageClass_Values returns all elements of the TransitionStorageClass enum
|
||||
|
|
@ -39466,6 +39759,7 @@ func TransitionStorageClass_Values() []string {
|
|||
TransitionStorageClassOnezoneIa,
|
||||
TransitionStorageClassIntelligentTiering,
|
||||
TransitionStorageClassDeepArchive,
|
||||
TransitionStorageClassGlacierIr,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
10
vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
generated
vendored
10
vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
generated
vendored
|
|
@ -1,7 +1,9 @@
|
|||
package s3
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/endpoints"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/internal/s3shared/arn"
|
||||
"github.com/aws/aws-sdk-go/internal/s3shared/s3err"
|
||||
|
|
@ -13,6 +15,14 @@ func init() {
|
|||
}
|
||||
|
||||
func defaultInitClientFn(c *client.Client) {
|
||||
if c.Config.UseDualStackEndpoint == endpoints.DualStackEndpointStateUnset {
|
||||
if aws.BoolValue(c.Config.UseDualStack) {
|
||||
c.Config.UseDualStackEndpoint = endpoints.DualStackEndpointStateEnabled
|
||||
} else {
|
||||
c.Config.UseDualStackEndpoint = endpoints.DualStackEndpointStateDisabled
|
||||
}
|
||||
}
|
||||
|
||||
// Support building custom endpoints based on config
|
||||
c.Handlers.Build.PushFront(endpointHandler)
|
||||
|
||||
|
|
|
|||
18
vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go
generated
vendored
18
vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package s3
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/aws/endpoints"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
|
|
@ -155,7 +156,7 @@ func endpointHandler(req *request.Request) {
|
|||
}
|
||||
case arn.OutpostAccessPointARN:
|
||||
// outposts does not support FIPS regions
|
||||
if resReq.UseFIPS() {
|
||||
if req.Config.UseFIPSEndpoint == endpoints.FIPSEndpointStateEnabled {
|
||||
req.Error = s3shared.NewFIPSConfigurationError(resource, req.ClientInfo.PartitionID,
|
||||
aws.StringValue(req.Config.Region), nil)
|
||||
return
|
||||
|
|
@ -202,7 +203,7 @@ func updateRequestAccessPointEndpoint(req *request.Request, accessPoint arn.Acce
|
|||
|
||||
func updateRequestS3ObjectLambdaAccessPointEndpoint(req *request.Request, accessPoint arn.S3ObjectLambdaAccessPointARN) error {
|
||||
// DualStack not supported
|
||||
if aws.BoolValue(req.Config.UseDualStack) {
|
||||
if isUseDualStackEndpoint(req) {
|
||||
return s3shared.NewClientConfiguredForDualStackError(accessPoint,
|
||||
req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
|
||||
}
|
||||
|
|
@ -233,7 +234,7 @@ func updateRequestOutpostAccessPointEndpoint(req *request.Request, accessPoint a
|
|||
}
|
||||
|
||||
// Dualstack not supported
|
||||
if aws.BoolValue(req.Config.UseDualStack) {
|
||||
if isUseDualStackEndpoint(req) {
|
||||
return s3shared.NewClientConfiguredForDualStackError(accessPoint,
|
||||
req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
|
||||
}
|
||||
|
|
@ -258,7 +259,7 @@ func removeBucketFromPath(u *url.URL) {
|
|||
|
||||
func buildWriteGetObjectResponseEndpoint(req *request.Request) {
|
||||
// DualStack not supported
|
||||
if aws.BoolValue(req.Config.UseDualStack) {
|
||||
if isUseDualStackEndpoint(req) {
|
||||
req.Error = awserr.New("ConfigurationError", "client configured for dualstack but not supported for operation", nil)
|
||||
return
|
||||
}
|
||||
|
|
@ -273,7 +274,7 @@ func buildWriteGetObjectResponseEndpoint(req *request.Request) {
|
|||
signingRegion := req.ClientInfo.SigningRegion
|
||||
|
||||
if !hasCustomEndpoint(req) {
|
||||
endpoint, err := resolveRegionalEndpoint(req, aws.StringValue(req.Config.Region), EndpointsID)
|
||||
endpoint, err := resolveRegionalEndpoint(req, aws.StringValue(req.Config.Region), req.ClientInfo.ResolvedRegion, EndpointsID)
|
||||
if err != nil {
|
||||
req.Error = awserr.New(request.ErrCodeSerialization, "failed to resolve endpoint", err)
|
||||
return
|
||||
|
|
@ -289,3 +290,10 @@ func buildWriteGetObjectResponseEndpoint(req *request.Request) {
|
|||
|
||||
redirectSigner(req, signingName, signingRegion)
|
||||
}
|
||||
|
||||
func isUseDualStackEndpoint(req *request.Request) bool {
|
||||
if req.Config.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset {
|
||||
return req.Config.UseDualStackEndpoint == endpoints.DualStackEndpointStateEnabled
|
||||
}
|
||||
return aws.BoolValue(req.Config.UseDualStack)
|
||||
}
|
||||
|
|
|
|||
41
vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go
generated
vendored
41
vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go
generated
vendored
|
|
@ -41,23 +41,11 @@ type accessPointEndpointBuilder arn.AccessPointARN
|
|||
func (a accessPointEndpointBuilder) build(req *request.Request) error {
|
||||
resolveService := arn.AccessPointARN(a).Service
|
||||
resolveRegion := arn.AccessPointARN(a).Region
|
||||
cfgRegion := aws.StringValue(req.Config.Region)
|
||||
|
||||
if s3shared.IsFIPS(cfgRegion) {
|
||||
if aws.BoolValue(req.Config.S3UseARNRegion) && s3shared.IsCrossRegion(req, resolveRegion) {
|
||||
// FIPS with cross region is not supported, the SDK must fail
|
||||
// because there is no well defined method for SDK to construct a
|
||||
// correct FIPS endpoint.
|
||||
return s3shared.NewClientConfiguredForCrossRegionFIPSError(arn.AccessPointARN(a),
|
||||
req.ClientInfo.PartitionID, cfgRegion, nil)
|
||||
}
|
||||
resolveRegion = cfgRegion
|
||||
}
|
||||
|
||||
endpoint, err := resolveRegionalEndpoint(req, resolveRegion, resolveService)
|
||||
endpoint, err := resolveRegionalEndpoint(req, resolveRegion, "", resolveService)
|
||||
if err != nil {
|
||||
return s3shared.NewFailedToResolveEndpointError(arn.AccessPointARN(a),
|
||||
req.ClientInfo.PartitionID, cfgRegion, err)
|
||||
req.ClientInfo.PartitionID, resolveRegion, err)
|
||||
}
|
||||
|
||||
endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL))
|
||||
|
|
@ -107,23 +95,11 @@ type s3ObjectLambdaAccessPointEndpointBuilder arn.S3ObjectLambdaAccessPointARN
|
|||
//
|
||||
func (a s3ObjectLambdaAccessPointEndpointBuilder) build(req *request.Request) error {
|
||||
resolveRegion := arn.S3ObjectLambdaAccessPointARN(a).Region
|
||||
cfgRegion := aws.StringValue(req.Config.Region)
|
||||
|
||||
if s3shared.IsFIPS(cfgRegion) {
|
||||
if aws.BoolValue(req.Config.S3UseARNRegion) && s3shared.IsCrossRegion(req, resolveRegion) {
|
||||
// FIPS with cross region is not supported, the SDK must fail
|
||||
// because there is no well defined method for SDK to construct a
|
||||
// correct FIPS endpoint.
|
||||
return s3shared.NewClientConfiguredForCrossRegionFIPSError(arn.S3ObjectLambdaAccessPointARN(a),
|
||||
req.ClientInfo.PartitionID, cfgRegion, nil)
|
||||
}
|
||||
resolveRegion = cfgRegion
|
||||
}
|
||||
|
||||
endpoint, err := resolveRegionalEndpoint(req, resolveRegion, EndpointsID)
|
||||
endpoint, err := resolveRegionalEndpoint(req, resolveRegion, "", EndpointsID)
|
||||
if err != nil {
|
||||
return s3shared.NewFailedToResolveEndpointError(arn.S3ObjectLambdaAccessPointARN(a),
|
||||
req.ClientInfo.PartitionID, cfgRegion, err)
|
||||
req.ClientInfo.PartitionID, resolveRegion, err)
|
||||
}
|
||||
|
||||
endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL))
|
||||
|
|
@ -181,7 +157,7 @@ func (o outpostAccessPointEndpointBuilder) build(req *request.Request) error {
|
|||
endpointsID = "s3"
|
||||
}
|
||||
|
||||
endpoint, err := resolveRegionalEndpoint(req, resolveRegion, endpointsID)
|
||||
endpoint, err := resolveRegionalEndpoint(req, resolveRegion, "", endpointsID)
|
||||
if err != nil {
|
||||
return s3shared.NewFailedToResolveEndpointError(o,
|
||||
req.ClientInfo.PartitionID, resolveRegion, err)
|
||||
|
|
@ -220,11 +196,16 @@ func (o outpostAccessPointEndpointBuilder) hostPrefixLabelValues() map[string]st
|
|||
}
|
||||
}
|
||||
|
||||
func resolveRegionalEndpoint(r *request.Request, region string, endpointsID string) (endpoints.ResolvedEndpoint, error) {
|
||||
func resolveRegionalEndpoint(r *request.Request, region, resolvedRegion, endpointsID string) (endpoints.ResolvedEndpoint, error) {
|
||||
return r.Config.EndpointResolver.EndpointFor(endpointsID, region, func(opts *endpoints.Options) {
|
||||
opts.DisableSSL = aws.BoolValue(r.Config.DisableSSL)
|
||||
opts.UseDualStack = aws.BoolValue(r.Config.UseDualStack)
|
||||
opts.UseDualStackEndpoint = r.Config.UseDualStackEndpoint
|
||||
opts.UseFIPSEndpoint = r.Config.UseFIPSEndpoint
|
||||
opts.S3UsEast1RegionalEndpoint = endpoints.RegionalS3UsEast1Endpoint
|
||||
opts.ResolvedRegion = resolvedRegion
|
||||
opts.Logger = r.Config.Logger
|
||||
opts.LogDeprecated = r.Config.LogLevel.Matches(aws.LogDebugWithDeprecated)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
19
vendor/github.com/aws/aws-sdk-go/service/s3/service.go
generated
vendored
19
vendor/github.com/aws/aws-sdk-go/service/s3/service.go
generated
vendored
|
|
@ -51,22 +51,23 @@ func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3 {
|
|||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = "s3"
|
||||
}
|
||||
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *S3 {
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *S3 {
|
||||
svc := &S3{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
PartitionID: partitionID,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2006-03-01",
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
PartitionID: partitionID,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2006-03-01",
|
||||
ResolvedRegion: resolvedRegion,
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
|
|
|
|||
8
vendor/github.com/aws/aws-sdk-go/service/sso/api.go
generated
vendored
8
vendor/github.com/aws/aws-sdk-go/service/sso/api.go
generated
vendored
|
|
@ -550,7 +550,7 @@ func (s *AccountInfo) SetEmailAddress(v string) *AccountInfo {
|
|||
}
|
||||
|
||||
type GetRoleCredentialsInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
_ struct{} `type:"structure" nopayload:"true"`
|
||||
|
||||
// The token issued by the CreateToken API call. For more information, see CreateToken
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
|
||||
|
|
@ -726,7 +726,7 @@ func (s *InvalidRequestException) RequestID() string {
|
|||
}
|
||||
|
||||
type ListAccountRolesInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
_ struct{} `type:"structure" nopayload:"true"`
|
||||
|
||||
// The token issued by the CreateToken API call. For more information, see CreateToken
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
|
||||
|
|
@ -855,7 +855,7 @@ func (s *ListAccountRolesOutput) SetRoleList(v []*RoleInfo) *ListAccountRolesOut
|
|||
}
|
||||
|
||||
type ListAccountsInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
_ struct{} `type:"structure" nopayload:"true"`
|
||||
|
||||
// The token issued by the CreateToken API call. For more information, see CreateToken
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
|
||||
|
|
@ -970,7 +970,7 @@ func (s *ListAccountsOutput) SetNextToken(v string) *ListAccountsOutput {
|
|||
}
|
||||
|
||||
type LogoutInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
_ struct{} `type:"structure" nopayload:"true"`
|
||||
|
||||
// The token issued by the CreateToken API call. For more information, see CreateToken
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
|
||||
|
|
|
|||
19
vendor/github.com/aws/aws-sdk-go/service/sso/service.go
generated
vendored
19
vendor/github.com/aws/aws-sdk-go/service/sso/service.go
generated
vendored
|
|
@ -52,22 +52,23 @@ func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSO {
|
|||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = "awsssoportal"
|
||||
}
|
||||
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *SSO {
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *SSO {
|
||||
svc := &SSO{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
PartitionID: partitionID,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2019-06-10",
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
PartitionID: partitionID,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2019-06-10",
|
||||
ResolvedRegion: resolvedRegion,
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
|
|
|
|||
168
vendor/github.com/aws/aws-sdk-go/service/sts/api.go
generated
vendored
168
vendor/github.com/aws/aws-sdk-go/service/sts/api.go
generated
vendored
|
|
@ -63,14 +63,15 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
|
|||
// or for cross-account access. For a comparison of AssumeRole with other API
|
||||
// operations that produce temporary credentials, see Requesting Temporary Security
|
||||
// Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// Permissions
|
||||
//
|
||||
// The temporary security credentials created by AssumeRole can be used to make
|
||||
// API calls to any Amazon Web Services service with the following exception:
|
||||
// You cannot call the STS GetFederationToken or GetSessionToken API operations.
|
||||
// You cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken
|
||||
// API operations.
|
||||
//
|
||||
// (Optional) You can pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
|
|
@ -86,26 +87,33 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
|
|||
// For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// To assume a role from a different account, your account must be trusted by
|
||||
// the role. The trust relationship is defined in the role's trust policy when
|
||||
// the role is created. That trust policy states which accounts are allowed
|
||||
// to delegate that access to users in the account.
|
||||
// When you create a role, you create two policies: A role trust policy that
|
||||
// specifies who can assume the role and a permissions policy that specifies
|
||||
// what can be done with the role. You specify the trusted principal who is
|
||||
// allowed to assume the role in the role trust policy.
|
||||
//
|
||||
// To assume a role from a different account, your Amazon Web Services account
|
||||
// must be trusted by the role. The trust relationship is defined in the role's
|
||||
// trust policy when the role is created. That trust policy states which accounts
|
||||
// are allowed to delegate that access to users in the account.
|
||||
//
|
||||
// A user who wants to access a role in a different account must also have permissions
|
||||
// that are delegated from the user account administrator. The administrator
|
||||
// must attach a policy that allows the user to call AssumeRole for the ARN
|
||||
// of the role in the other account. If the user is in the same account as the
|
||||
// role, then you can do either of the following:
|
||||
// of the role in the other account.
|
||||
//
|
||||
// * Attach a policy to the user (identical to the previous user in a different
|
||||
// account).
|
||||
// To allow a user to assume a role in the same account, you can do either of
|
||||
// the following:
|
||||
//
|
||||
// * Attach a policy to the user that allows the user to call AssumeRole
|
||||
// (as long as the role's trust policy trusts the account).
|
||||
//
|
||||
// * Add the user as a principal directly in the role's trust policy.
|
||||
//
|
||||
// In this case, the trust policy acts as an IAM resource-based policy. Users
|
||||
// in the same account as the role do not need explicit permission to assume
|
||||
// the role. For more information about trust policies and resource-based policies,
|
||||
// see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
|
||||
// You can do either because the role’s trust policy acts as an IAM resource-based
|
||||
// policy. When a resource-based policy grants access to a principal in the
|
||||
// same account, no additional identity-based policy is required. For more information
|
||||
// about trust policies and resource-based policies, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// Tags
|
||||
|
|
@ -170,7 +178,7 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
|
|||
//
|
||||
// You could receive this error even though you meet other defined session policy
|
||||
// and session tag limits. For more information, see IAM and STS Entity Character
|
||||
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
|
||||
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// * ErrCodeRegionDisabledException "RegionDisabledException"
|
||||
|
|
@ -258,7 +266,7 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
|
|||
// Services access without user-specific credentials or configuration. For a
|
||||
// comparison of AssumeRoleWithSAML with the other API operations that produce
|
||||
// temporary credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// The temporary security credentials returned by this operation consist of
|
||||
|
|
@ -403,7 +411,7 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
|
|||
//
|
||||
// You could receive this error even though you meet other defined session policy
|
||||
// and session tag limits. For more information, see IAM and STS Entity Character
|
||||
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
|
||||
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// * ErrCodeIDPRejectedClaimException "IDPRejectedClaim"
|
||||
|
|
@ -523,7 +531,7 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
|
|||
// by using a token from the web identity provider. For a comparison of AssumeRoleWithWebIdentity
|
||||
// with the other API operations that produce temporary credentials, see Requesting
|
||||
// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// The temporary security credentials returned by this API consist of an access
|
||||
|
|
@ -661,7 +669,7 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
|
|||
//
|
||||
// You could receive this error even though you meet other defined session policy
|
||||
// and session tag limits. For more information, see IAM and STS Entity Character
|
||||
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
|
||||
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// * ErrCodeIDPRejectedClaimException "IDPRejectedClaim"
|
||||
|
|
@ -776,10 +784,11 @@ func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessag
|
|||
// code.
|
||||
//
|
||||
// The message is encoded because the details of the authorization status can
|
||||
// constitute privileged information that the user who requested the operation
|
||||
// contain privileged information that the user who requested the operation
|
||||
// should not see. To decode an authorization status message, a user must be
|
||||
// granted permissions via an IAM policy to request the DecodeAuthorizationMessage
|
||||
// (sts:DecodeAuthorizationMessage) action.
|
||||
// granted permissions through an IAM policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
|
||||
// to request the DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage)
|
||||
// action.
|
||||
//
|
||||
// The decoded message includes the following type of information:
|
||||
//
|
||||
|
|
@ -1065,7 +1074,7 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
|
|||
// For a comparison of GetFederationToken with the other API operations that
|
||||
// produce temporary credentials, see Requesting Temporary Security Credentials
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// You can create a mobile-based or browser-based app that can authenticate
|
||||
|
|
@ -1088,9 +1097,9 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
|
|||
//
|
||||
// The temporary credentials are valid for the specified duration, from 900
|
||||
// seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default
|
||||
// session duration is 43,200 seconds (12 hours). Temporary credentials that
|
||||
// are obtained by using Amazon Web Services account root user credentials have
|
||||
// a maximum duration of 3,600 seconds (1 hour).
|
||||
// session duration is 43,200 seconds (12 hours). Temporary credentials obtained
|
||||
// by using the Amazon Web Services account root user credentials have a maximum
|
||||
// duration of 3,600 seconds (1 hour).
|
||||
//
|
||||
// Permissions
|
||||
//
|
||||
|
|
@ -1141,63 +1150,6 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
|
|||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// You can also call GetFederationToken using the security credentials of an
|
||||
// Amazon Web Services account root user, but we do not recommend it. Instead,
|
||||
// we recommend that you create an IAM user for the purpose of the proxy application.
|
||||
// Then attach a policy to the IAM user that limits federated users to only
|
||||
// the actions and resources that they need to access. For more information,
|
||||
// see IAM Best Practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// Session duration
|
||||
//
|
||||
// The temporary credentials are valid for the specified duration, from 900
|
||||
// seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default
|
||||
// session duration is 43,200 seconds (12 hours). Temporary credentials that
|
||||
// are obtained by using Amazon Web Services account root user credentials have
|
||||
// a maximum duration of 3,600 seconds (1 hour).
|
||||
//
|
||||
// Permissions
|
||||
//
|
||||
// You can use the temporary credentials created by GetFederationToken in any
|
||||
// Amazon Web Services service except the following:
|
||||
//
|
||||
// * You cannot call any IAM operations using the CLI or the Amazon Web Services
|
||||
// API.
|
||||
//
|
||||
// * You cannot call any STS operations except GetCallerIdentity.
|
||||
//
|
||||
// You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
// inline session policy. You can also specify up to 10 managed policies to
|
||||
// use as managed session policies. The plain text that you use for both inline
|
||||
// and managed session policies can't exceed 2,048 characters.
|
||||
//
|
||||
// Though the session policy parameters are optional, if you do not pass a policy,
|
||||
// then the resulting federated user session has no permissions. When you pass
|
||||
// session policies, the session permissions are the intersection of the IAM
|
||||
// user policies and the session policies that you pass. This gives you a way
|
||||
// to further restrict the permissions for a federated user. You cannot use
|
||||
// session policies to grant more permissions than those that are defined in
|
||||
// the permissions policy of the IAM user. For more information, see Session
|
||||
// Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. For information about using GetFederationToken to
|
||||
// create temporary security credentials, see GetFederationToken—Federation
|
||||
// Through a Custom Identity Broker (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken).
|
||||
//
|
||||
// You can use the credentials to access a resource that has a resource-based
|
||||
// policy. If that policy specifically references the federated user session
|
||||
// in the Principal element of the policy, the session has the permissions allowed
|
||||
// by the policy. These permissions are granted in addition to the permissions
|
||||
// granted by the session policies.
|
||||
//
|
||||
// Tags
|
||||
//
|
||||
// (Optional) You can pass tag key-value pairs to your session. These are called
|
||||
// session tags. For more information about session tags, see Passing Session
|
||||
// Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// An administrator must grant you the permissions necessary to pass session
|
||||
// tags. The administrator can also create granular permissions to allow you
|
||||
// to pass only specific session tags. For more information, see Tutorial: Using
|
||||
|
|
@ -1234,7 +1186,7 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
|
|||
//
|
||||
// You could receive this error even though you meet other defined session policy
|
||||
// and session tag limits. For more information, see IAM and STS Entity Character
|
||||
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
|
||||
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// * ErrCodeRegionDisabledException "RegionDisabledException"
|
||||
|
|
@ -1323,7 +1275,7 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.
|
|||
// then the API returns an access denied error. For a comparison of GetSessionToken
|
||||
// with the other API operations that produce temporary credentials, see Requesting
|
||||
// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// Session Duration
|
||||
|
|
@ -1404,15 +1356,23 @@ func (c *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSessionToken
|
|||
type AssumeRoleInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// The duration, in seconds, of the role session. The value specified can can
|
||||
// range from 900 seconds (15 minutes) up to the maximum session duration that
|
||||
// is set for the role. The maximum session duration setting can have a value
|
||||
// from 1 hour to 12 hours. If you specify a value higher than this setting
|
||||
// or the administrator setting (whichever is lower), the operation fails. For
|
||||
// example, if you specify a session duration of 12 hours, but your administrator
|
||||
// set the maximum session duration to 6 hours, your operation fails. To learn
|
||||
// how to view the maximum value for your role, see View the Maximum Session
|
||||
// Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
|
||||
// The duration, in seconds, of the role session. The value specified can range
|
||||
// from 900 seconds (15 minutes) up to the maximum session duration set for
|
||||
// the role. The maximum session duration setting can have a value from 1 hour
|
||||
// to 12 hours. If you specify a value higher than this setting or the administrator
|
||||
// setting (whichever is lower), the operation fails. For example, if you specify
|
||||
// a session duration of 12 hours, but your administrator set the maximum session
|
||||
// duration to 6 hours, your operation fails.
|
||||
//
|
||||
// Role chaining limits your Amazon Web Services CLI or Amazon Web Services
|
||||
// API role session to a maximum of one hour. When you use the AssumeRole API
|
||||
// operation to assume a role, you can specify the duration of your role session
|
||||
// with the DurationSeconds parameter. You can specify a parameter value of
|
||||
// up to 43200 seconds (12 hours), depending on the maximum session duration
|
||||
// setting for your role. However, if you assume a role using role chaining
|
||||
// and provide a DurationSeconds parameter value greater than one hour, the
|
||||
// operation fails. To learn how to view the maximum value for your role, see
|
||||
// View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// By default, the value is set to 3600 seconds.
|
||||
|
|
@ -1422,7 +1382,7 @@ type AssumeRoleInput struct {
|
|||
// to the federation endpoint for a console sign-in token takes a SessionDuration
|
||||
// parameter that specifies the maximum length of the console session. For more
|
||||
// information, see Creating a URL that Enables Federated Users to Access the
|
||||
// Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
|
||||
// Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
|
||||
// in the IAM User Guide.
|
||||
DurationSeconds *int64 `min:"900" type:"integer"`
|
||||
|
||||
|
|
@ -1548,7 +1508,7 @@ type AssumeRoleInput struct {
|
|||
|
||||
// A list of session tags that you want to pass. Each session tag consists of
|
||||
// a key name and an associated value. For more information about session tags,
|
||||
// see Tagging STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// see Tagging Amazon Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// This parameter is optional. You can pass up to 50 session tags. The plaintext
|
||||
|
|
@ -1858,7 +1818,7 @@ type AssumeRoleWithSAMLInput struct {
|
|||
// to the federation endpoint for a console sign-in token takes a SessionDuration
|
||||
// parameter that specifies the maximum length of the console session. For more
|
||||
// information, see Creating a URL that Enables Federated Users to Access the
|
||||
// Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
|
||||
// Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
|
||||
// in the IAM User Guide.
|
||||
DurationSeconds *int64 `min:"900" type:"integer"`
|
||||
|
||||
|
|
@ -2205,7 +2165,7 @@ type AssumeRoleWithWebIdentityInput struct {
|
|||
// to the federation endpoint for a console sign-in token takes a SessionDuration
|
||||
// parameter that specifies the maximum length of the console session. For more
|
||||
// information, see Creating a URL that Enables Federated Users to Access the
|
||||
// Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
|
||||
// Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
|
||||
// in the IAM User Guide.
|
||||
DurationSeconds *int64 `min:"900" type:"integer"`
|
||||
|
||||
|
|
@ -2705,7 +2665,7 @@ func (s *DecodeAuthorizationMessageInput) SetEncodedMessage(v string) *DecodeAut
|
|||
type DecodeAuthorizationMessageOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// An XML document that contains the decoded message.
|
||||
// The API returns a response with the decoded message.
|
||||
DecodedMessage *string `type:"string"`
|
||||
}
|
||||
|
||||
|
|
@ -3237,8 +3197,8 @@ type GetSessionTokenInput struct {
|
|||
// user has a policy that requires MFA authentication. The value is either the
|
||||
// serial number for a hardware device (such as GAHT12345678) or an Amazon Resource
|
||||
// Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
|
||||
// You can find the device for an IAM user by going to the Management Console
|
||||
// and viewing the user's security credentials.
|
||||
// You can find the device for an IAM user by going to the Amazon Web Services
|
||||
// Management Console and viewing the user's security credentials.
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can
|
||||
|
|
@ -3400,9 +3360,9 @@ func (s *PolicyDescriptorType) SetArn(v string) *PolicyDescriptorType {
|
|||
|
||||
// You can pass custom key-value pair attributes when you assume a role or federate
|
||||
// a user. These are called session tags. You can then use the session tags
|
||||
// to control access to resources. For more information, see Tagging STS Sessions
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in
|
||||
// the IAM User Guide.
|
||||
// to control access to resources. For more information, see Tagging Amazon
|
||||
// Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// in the IAM User Guide.
|
||||
type Tag struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
generated
vendored
|
|
@ -67,7 +67,7 @@ const (
|
|||
//
|
||||
// You could receive this error even though you meet other defined session policy
|
||||
// and session tag limits. For more information, see IAM and STS Entity Character
|
||||
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
|
||||
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide.
|
||||
ErrCodePackedPolicyTooLargeException = "PackedPolicyTooLarge"
|
||||
|
||||
|
|
|
|||
19
vendor/github.com/aws/aws-sdk-go/service/sts/service.go
generated
vendored
19
vendor/github.com/aws/aws-sdk-go/service/sts/service.go
generated
vendored
|
|
@ -48,22 +48,23 @@ const (
|
|||
// svc := sts.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *STS {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *STS {
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *STS {
|
||||
svc := &STS{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
PartitionID: partitionID,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2011-06-15",
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
PartitionID: partitionID,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2011-06-15",
|
||||
ResolvedRegion: resolvedRegion,
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue