rebase: bump github.com/aws/aws-sdk-go from 1.44.67 to 1.44.82

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.67 to 1.44.82.
- [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.44.67...v1.44.82)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] 2022-08-22 20:13:17 +00:00 committed by mergify[bot]
parent b697b9b0d9
commit 3d05ef0585
24 changed files with 7669 additions and 7611 deletions

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.17
require ( require (
github.com/IBM/keyprotect-go-client v0.8.0 github.com/IBM/keyprotect-go-client v0.8.0
github.com/aws/aws-sdk-go v1.44.67 github.com/aws/aws-sdk-go v1.44.82
github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 github.com/aws/aws-sdk-go-v2/service/sts v1.16.13
github.com/ceph/ceph-csi/api v0.0.0-00010101000000-000000000000 github.com/ceph/ceph-csi/api v0.0.0-00010101000000-000000000000
// TODO: API for managing subvolume metadata and snapshot metadata requires `ceph_ci_untested` build-tag // TODO: API for managing subvolume metadata and snapshot metadata requires `ceph_ci_untested` build-tag

3
go.sum
View File

@ -150,8 +150,9 @@ github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi
github.com/aws/aws-sdk-go v1.25.41/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.41/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.35.24/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= github.com/aws/aws-sdk-go v1.35.24/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
github.com/aws/aws-sdk-go v1.38.49/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.38.49/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.44.67 h1:+nxfXbMe8QUB6svLsuLYsp+WhZBKM26w62Zidir739A=
github.com/aws/aws-sdk-go v1.44.67/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.67/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
github.com/aws/aws-sdk-go v1.44.82 h1:Miji7nHIMxTWfa831nZf8XAcMWGLaT+PvsS6CdbMG7M=
github.com/aws/aws-sdk-go v1.44.82/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
github.com/aws/aws-sdk-go-v2 v1.16.11 h1:xM1ZPSvty3xVmdxiGr7ay/wlqv+MWhH0rMlyLdbC0YQ= github.com/aws/aws-sdk-go-v2 v1.16.11 h1:xM1ZPSvty3xVmdxiGr7ay/wlqv+MWhH0rMlyLdbC0YQ=
github.com/aws/aws-sdk-go-v2 v1.16.11/go.mod h1:WTACcleLz6VZTp7fak4EO5b9Q4foxbn+8PIz3PmyKlo= github.com/aws/aws-sdk-go-v2 v1.16.11/go.mod h1:WTACcleLz6VZTp7fak4EO5b9Q4foxbn+8PIz3PmyKlo=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 h1:OmiwoVyLKEqqD5GvB683dbSqxiOfvx4U2lDZhG2Esc4= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 h1:OmiwoVyLKEqqD5GvB683dbSqxiOfvx4U2lDZhG2Esc4=

View File

@ -31,12 +31,12 @@ func (d *DecodeModelOptions) Set(optFns ...func(*DecodeModelOptions)) {
// allow you to get a list of the partitions in the order the endpoints // allow you to get a list of the partitions in the order the endpoints
// will be resolved in. // will be resolved in.
// //
// resolver, err := endpoints.DecodeModel(reader) // resolver, err := endpoints.DecodeModel(reader)
// //
// partitions := resolver.(endpoints.EnumPartitions).Partitions() // partitions := resolver.(endpoints.EnumPartitions).Partitions()
// for _, p := range partitions { // for _, p := range partitions {
// // ... inspect partitions // // ... inspect partitions
// } // }
func DecodeModel(r io.Reader, optFns ...func(*DecodeModelOptions)) (Resolver, error) { func DecodeModel(r io.Reader, optFns ...func(*DecodeModelOptions)) (Resolver, error) {
var opts DecodeModelOptions var opts DecodeModelOptions
opts.Set(optFns...) opts.Set(optFns...)

View File

@ -1677,6 +1677,9 @@ var awsPartition = partition{
endpointKey{ endpointKey{
Region: "ap-southeast-2", Region: "ap-southeast-2",
}: endpoint{}, }: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{ endpointKey{
Region: "ca-central-1", Region: "ca-central-1",
}: endpoint{}, }: endpoint{},
@ -2389,6 +2392,15 @@ var awsPartition = partition{
}: endpoint{ }: endpoint{
Hostname: "appmesh.ap-northeast-2.api.aws", Hostname: "appmesh.ap-northeast-2.api.aws",
}, },
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
Variant: dualStackVariant,
}: endpoint{
Hostname: "appmesh.ap-northeast-3.api.aws",
},
endpointKey{ endpointKey{
Region: "ap-south-1", Region: "ap-south-1",
}: endpoint{}, }: endpoint{},
@ -2416,6 +2428,15 @@ var awsPartition = partition{
}: endpoint{ }: endpoint{
Hostname: "appmesh.ap-southeast-2.api.aws", Hostname: "appmesh.ap-southeast-2.api.aws",
}, },
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
Variant: dualStackVariant,
}: endpoint{
Hostname: "appmesh.ap-southeast-3.api.aws",
},
endpointKey{ endpointKey{
Region: "ca-central-1", Region: "ca-central-1",
}: endpoint{}, }: endpoint{},
@ -3243,6 +3264,22 @@ var awsPartition = partition{
}: endpoint{}, }: endpoint{},
}, },
}, },
"backupstorage": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"batch": service{ "batch": service{
Defaults: endpointDefaults{ Defaults: endpointDefaults{
defaultKey{}: endpoint{}, defaultKey{}: endpoint{},
@ -3894,6 +3931,9 @@ var awsPartition = partition{
endpointKey{ endpointKey{
Region: "ap-southeast-2", Region: "ap-southeast-2",
}: endpoint{}, }: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{ endpointKey{
Region: "ca-central-1", Region: "ca-central-1",
}: endpoint{}, }: endpoint{},
@ -5229,6 +5269,22 @@ var awsPartition = partition{
}, },
"compute-optimizer": service{ "compute-optimizer": service{
Endpoints: serviceEndpoints{ Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{
Hostname: "compute-optimizer.af-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "af-south-1",
},
},
endpointKey{
Region: "ap-east-1",
}: endpoint{
Hostname: "compute-optimizer.ap-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-east-1",
},
},
endpointKey{ endpointKey{
Region: "ap-northeast-1", Region: "ap-northeast-1",
}: endpoint{ }: endpoint{
@ -5245,6 +5301,14 @@ var awsPartition = partition{
Region: "ap-northeast-2", Region: "ap-northeast-2",
}, },
}, },
endpointKey{
Region: "ap-northeast-3",
}: endpoint{
Hostname: "compute-optimizer.ap-northeast-3.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-3",
},
},
endpointKey{ endpointKey{
Region: "ap-south-1", Region: "ap-south-1",
}: endpoint{ }: endpoint{
@ -5293,6 +5357,14 @@ var awsPartition = partition{
Region: "eu-north-1", Region: "eu-north-1",
}, },
}, },
endpointKey{
Region: "eu-south-1",
}: endpoint{
Hostname: "compute-optimizer.eu-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-south-1",
},
},
endpointKey{ endpointKey{
Region: "eu-west-1", Region: "eu-west-1",
}: endpoint{ }: endpoint{
@ -5317,6 +5389,14 @@ var awsPartition = partition{
Region: "eu-west-3", Region: "eu-west-3",
}, },
}, },
endpointKey{
Region: "me-south-1",
}: endpoint{
Hostname: "compute-optimizer.me-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "me-south-1",
},
},
endpointKey{ endpointKey{
Region: "sa-east-1", Region: "sa-east-1",
}: endpoint{ }: endpoint{
@ -10405,6 +10485,37 @@ var awsPartition = partition{
}: endpoint{}, }: endpoint{},
}, },
}, },
"geo": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"glacier": service{ "glacier": service{
Defaults: endpointDefaults{ Defaults: endpointDefaults{
defaultKey{}: endpoint{ defaultKey{}: endpoint{
@ -12433,6 +12544,9 @@ var awsPartition = partition{
endpointKey{ endpointKey{
Region: "ap-southeast-2", Region: "ap-southeast-2",
}: endpoint{}, }: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{ endpointKey{
Region: "ca-central-1", Region: "ca-central-1",
}: endpoint{}, }: endpoint{},
@ -12816,6 +12930,15 @@ var awsPartition = partition{
}, },
Deprecated: boxedTrue, Deprecated: boxedTrue,
}, },
endpointKey{
Region: "me-central-1-fips",
}: endpoint{
Hostname: "kms-fips.me-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "me-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{ endpointKey{
Region: "me-south-1", Region: "me-south-1",
}: endpoint{}, }: endpoint{},
@ -13445,6 +13568,133 @@ var awsPartition = partition{
}, },
}, },
}, },
"license-manager-user-subscriptions": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "me-south-1",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com",
},
},
},
"lightsail": service{ "lightsail": service{
Endpoints: serviceEndpoints{ Endpoints: serviceEndpoints{
endpointKey{ endpointKey{
@ -18034,6 +18284,9 @@ var awsPartition = partition{
endpointKey{ endpointKey{
Region: "ap-southeast-2", Region: "ap-southeast-2",
}: endpoint{}, }: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{ endpointKey{
Region: "ca-central-1", Region: "ca-central-1",
}: endpoint{}, }: endpoint{},
@ -21776,6 +22029,19 @@ var awsPartition = partition{
}, },
}, },
}, },
"supportapp": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"swf": service{ "swf": service{
Endpoints: serviceEndpoints{ Endpoints: serviceEndpoints{
endpointKey{ endpointKey{
@ -24230,9 +24496,18 @@ var awsPartition = partition{
endpointKey{ endpointKey{
Region: "ap-southeast-2", Region: "ap-southeast-2",
}: endpoint{}, }: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{ endpointKey{
Region: "eu-west-1", Region: "eu-west-1",
}: endpoint{}, }: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{ endpointKey{
Region: "us-east-1", Region: "us-east-1",
}: endpoint{}, }: endpoint{},
@ -28850,6 +29125,12 @@ var awsusgovPartition = partition{
endpointKey{ endpointKey{
Region: "us-gov-east-1", Region: "us-gov-east-1",
}: endpoint{}, }: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.us-gov-east-1.api.aws",
},
endpointKey{ endpointKey{
Region: "us-gov-east-1", Region: "us-gov-east-1",
Variant: fipsVariant, Variant: fipsVariant,
@ -28859,6 +29140,12 @@ var awsusgovPartition = partition{
endpointKey{ endpointKey{
Region: "us-gov-west-1", Region: "us-gov-west-1",
}: endpoint{}, }: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: dualStackVariant,
}: endpoint{
Hostname: "lambda.us-gov-west-1.api.aws",
},
endpointKey{ endpointKey{
Region: "us-gov-west-1", Region: "us-gov-west-1",
Variant: fipsVariant, Variant: fipsVariant,
@ -31023,6 +31310,16 @@ var awsusgovPartition = partition{
}, },
}, },
}, },
"wellarchitected": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"workspaces": service{ "workspaces": service{
Endpoints: serviceEndpoints{ Endpoints: serviceEndpoints{
endpointKey{ endpointKey{
@ -31173,6 +31470,9 @@ var awsisoPartition = partition{
}, },
"appconfigdata": service{ "appconfigdata": service{
Endpoints: serviceEndpoints{ Endpoints: serviceEndpoints{
endpointKey{
Region: "us-iso-east-1",
}: endpoint{},
endpointKey{ endpointKey{
Region: "us-iso-west-1", Region: "us-iso-west-1",
}: endpoint{}, }: endpoint{},
@ -31928,6 +32228,13 @@ var awsisobPartition = partition{
}: endpoint{}, }: endpoint{},
}, },
}, },
"appconfigdata": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"application-autoscaling": service{ "application-autoscaling": service{
Defaults: endpointDefaults{ Defaults: endpointDefaults{
defaultKey{}: endpoint{ defaultKey{}: endpoint{
@ -32247,6 +32554,20 @@ var awsisobPartition = partition{
}: endpoint{}, }: endpoint{},
}, },
}, },
"metering.marketplace": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "aws-marketplace",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-isob-east-1",
}: endpoint{},
},
},
"monitoring": service{ "monitoring": service{
Endpoints: serviceEndpoints{ Endpoints: serviceEndpoints{
endpointKey{ endpointKey{

View File

@ -9,7 +9,7 @@
// AWS GovCloud (US) (aws-us-gov). // AWS GovCloud (US) (aws-us-gov).
// . // .
// //
// Enumerating Regions and Endpoint Metadata // # Enumerating Regions and Endpoint Metadata
// //
// Casting the Resolver returned by DefaultResolver to a EnumPartitions interface // Casting the Resolver returned by DefaultResolver to a EnumPartitions interface
// will allow you to get access to the list of underlying Partitions with the // will allow you to get access to the list of underlying Partitions with the
@ -17,22 +17,22 @@
// resolving to a single partition, or enumerate regions, services, and endpoints // resolving to a single partition, or enumerate regions, services, and endpoints
// in the partition. // in the partition.
// //
// resolver := endpoints.DefaultResolver() // resolver := endpoints.DefaultResolver()
// partitions := resolver.(endpoints.EnumPartitions).Partitions() // partitions := resolver.(endpoints.EnumPartitions).Partitions()
// //
// for _, p := range partitions { // for _, p := range partitions {
// fmt.Println("Regions for", p.ID()) // fmt.Println("Regions for", p.ID())
// for id, _ := range p.Regions() { // for id, _ := range p.Regions() {
// fmt.Println("*", id) // fmt.Println("*", id)
// } // }
// //
// fmt.Println("Services for", p.ID()) // fmt.Println("Services for", p.ID())
// for id, _ := range p.Services() { // for id, _ := range p.Services() {
// fmt.Println("*", id) // fmt.Println("*", id)
// } // }
// } // }
// //
// Using Custom Endpoints // # Using Custom Endpoints
// //
// The endpoints package also gives you the ability to use your own logic how // The endpoints package also gives you the ability to use your own logic how
// endpoints are resolved. This is a great way to define a custom endpoint // endpoints are resolved. This is a great way to define a custom endpoint
@ -47,20 +47,19 @@
// of Resolver.EndpointFor, converting it to a type that satisfies the // of Resolver.EndpointFor, converting it to a type that satisfies the
// Resolver interface. // Resolver interface.
// //
// myCustomResolver := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) {
// if service == endpoints.S3ServiceID {
// return endpoints.ResolvedEndpoint{
// URL: "s3.custom.endpoint.com",
// SigningRegion: "custom-signing-region",
// }, nil
// }
// //
// myCustomResolver := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) { // return endpoints.DefaultResolver().EndpointFor(service, region, optFns...)
// if service == endpoints.S3ServiceID { // }
// return endpoints.ResolvedEndpoint{
// URL: "s3.custom.endpoint.com",
// SigningRegion: "custom-signing-region",
// }, nil
// }
// //
// return endpoints.DefaultResolver().EndpointFor(service, region, optFns...) // sess := session.Must(session.NewSession(&aws.Config{
// } // Region: aws.String("us-west-2"),
// // EndpointResolver: endpoints.ResolverFunc(myCustomResolver),
// sess := session.Must(session.NewSession(&aws.Config{ // }))
// Region: aws.String("us-west-2"),
// EndpointResolver: endpoints.ResolverFunc(myCustomResolver),
// }))
package endpoints package endpoints

View File

@ -353,10 +353,12 @@ type EnumPartitions interface {
// as the second parameter. // as the second parameter.
// //
// This example shows how to get the regions for DynamoDB in the AWS partition. // This example shows how to get the regions for DynamoDB in the AWS partition.
// rs, exists := endpoints.RegionsForService(endpoints.DefaultPartitions(), endpoints.AwsPartitionID, endpoints.DynamodbServiceID) //
// rs, exists := endpoints.RegionsForService(endpoints.DefaultPartitions(), endpoints.AwsPartitionID, endpoints.DynamodbServiceID)
// //
// This is equivalent to using the partition directly. // This is equivalent to using the partition directly.
// rs := endpoints.AwsPartition().Services()[endpoints.DynamodbServiceID].Regions() //
// rs := endpoints.AwsPartition().Services()[endpoints.DynamodbServiceID].Regions()
func RegionsForService(ps []Partition, partitionID, serviceID string) (map[string]Region, bool) { func RegionsForService(ps []Partition, partitionID, serviceID string) (map[string]Region, bool) {
for _, p := range ps { for _, p := range ps {
if p.ID() != partitionID { if p.ID() != partitionID {
@ -423,8 +425,8 @@ func (p Partition) ID() string { return p.id }
// of new regions and services expansions. // of new regions and services expansions.
// //
// Errors that can be returned. // Errors that can be returned.
// * UnknownServiceError // - UnknownServiceError
// * UnknownEndpointError // - UnknownEndpointError
func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) { func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
return p.p.EndpointFor(service, region, opts...) return p.p.EndpointFor(service, region, opts...)
} }

View File

@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go" const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK // SDKVersion is the version of this SDK
const SDKVersion = "1.44.67" const SDKVersion = "1.44.82"

View File

@ -4,6 +4,7 @@ package ec2query
import ( import (
"encoding/xml" "encoding/xml"
"strings"
"github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/request"
@ -70,7 +71,7 @@ func UnmarshalError(r *request.Request) {
} }
r.Error = awserr.NewRequestFailure( r.Error = awserr.NewRequestFailure(
awserr.New(respErr.Code, respErr.Message, nil), awserr.New(strings.TrimSpace(respErr.Code), strings.TrimSpace(respErr.Message), nil),
r.HTTPResponse.StatusCode, r.HTTPResponse.StatusCode,
respErr.RequestID, respErr.RequestID,
) )

View File

@ -3,6 +3,7 @@ package query
import ( import (
"encoding/xml" "encoding/xml"
"fmt" "fmt"
"strings"
"github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/request"
@ -62,7 +63,7 @@ func UnmarshalError(r *request.Request) {
} }
r.Error = awserr.NewRequestFailure( r.Error = awserr.NewRequestFailure(
awserr.New(respErr.Code, respErr.Message, nil), awserr.New(strings.TrimSpace(respErr.Code), strings.TrimSpace(respErr.Message), nil),
r.HTTPResponse.StatusCode, r.HTTPResponse.StatusCode,
reqID, reqID,
) )

File diff suppressed because it is too large Load Diff

View File

@ -16,24 +16,24 @@
// //
// To learn more, see the following resources: // To learn more, see the following resources:
// //
// * Amazon EC2: AmazonEC2 product page (http://aws.amazon.com/ec2), Amazon // - Amazon EC2: AmazonEC2 product page (http://aws.amazon.com/ec2), Amazon
// EC2 documentation (http://aws.amazon.com/documentation/ec2) // EC2 documentation (http://aws.amazon.com/documentation/ec2)
// //
// * Amazon EBS: Amazon EBS product page (http://aws.amazon.com/ebs), Amazon // - Amazon EBS: Amazon EBS product page (http://aws.amazon.com/ebs), Amazon
// EBS documentation (http://aws.amazon.com/documentation/ebs) // EBS documentation (http://aws.amazon.com/documentation/ebs)
// //
// * Amazon VPC: Amazon VPC product page (http://aws.amazon.com/vpc), Amazon // - Amazon VPC: Amazon VPC product page (http://aws.amazon.com/vpc), Amazon
// VPC documentation (http://aws.amazon.com/documentation/vpc) // VPC documentation (http://aws.amazon.com/documentation/vpc)
// //
// * Amazon Web Services VPN: Amazon Web Services VPN product page (http://aws.amazon.com/vpn), // - Amazon Web Services VPN: Amazon Web Services VPN product page (http://aws.amazon.com/vpn),
// Amazon Web Services VPN documentation (http://aws.amazon.com/documentation/vpn) // Amazon Web Services VPN documentation (http://aws.amazon.com/documentation/vpn)
// //
// See https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15 for more information on this service. // See https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15 for more information on this service.
// //
// See ec2 package documentation for more information. // See ec2 package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/ // https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/
// //
// Using the Client // # Using the Client
// //
// To contact Amazon Elastic Compute Cloud with the SDK use the New function to create // To contact Amazon Elastic Compute Cloud with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service. // a new service client. With that client you can make API requests to the service.

View File

@ -39,13 +39,14 @@ const (
// aws.Config parameter to add your extra config. // aws.Config parameter to add your extra config.
// //
// Example: // Example:
// mySession := session.Must(session.NewSession())
// //
// // Create a EC2 client from just a session. // mySession := session.Must(session.NewSession())
// svc := ec2.New(mySession)
// //
// // Create a EC2 client with additional configuration // // Create a EC2 client from just a session.
// svc := ec2.New(mySession, aws.NewConfig().WithRegion("us-west-2")) // svc := ec2.New(mySession)
//
// // Create a EC2 client with additional configuration
// svc := ec2.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *EC2 { func New(p client.ConfigProvider, cfgs ...*aws.Config) *EC2 {
c := p.ClientConfig(EndpointsID, cfgs...) c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 { if c.SigningNameDerived || len(c.SigningName) == 0 {

File diff suppressed because it is too large Load Diff

View File

@ -36,7 +36,7 @@
// such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman // such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman
// (ECDHE). Most modern systems such as Java 7 and later support these modes. // (ECDHE). Most modern systems such as Java 7 and later support these modes.
// //
// Signing Requests // # Signing Requests
// //
// Requests must be signed by using an access key ID and a secret access key. // Requests must be signed by using an access key ID and a secret access key.
// We strongly recommend that you do not use your Amazon Web Services account // We strongly recommend that you do not use your Amazon Web Services account
@ -47,7 +47,7 @@
// //
// All KMS operations require Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). // All KMS operations require Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
// //
// Logging API Requests // # Logging API Requests
// //
// KMS supports CloudTrail, a service that logs Amazon Web Services API calls // KMS supports CloudTrail, a service that logs Amazon Web Services API calls
// and related events for your Amazon Web Services account and delivers them // and related events for your Amazon Web Services account and delivers them
@ -57,42 +57,45 @@
// including how to turn it on and find your log files, see the CloudTrail User // including how to turn it on and find your log files, see the CloudTrail User
// Guide (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/). // Guide (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/).
// //
// Additional Resources // # Additional Resources
// //
// For more information about credentials and request signing, see the following: // For more information about credentials and request signing, see the following:
// //
// * Amazon Web Services Security Credentials (https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html) // - Amazon Web Services Security Credentials (https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)
// - This topic provides general information about the types of credentials
// used to access Amazon Web Services.
// //
// * Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) // - This topic provides general information about the types of credentials
// - This section of the IAM User Guide describes how to create and use temporary // used to access Amazon Web Services.
// security credentials.
// //
// * Signature Version 4 Signing Process (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) // - Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
// - This set of topics walks you through the process of signing a request
// using an access key ID and a secret access key.
// //
// Commonly Used API Operations // - This section of the IAM User Guide describes how to create and use temporary
// security credentials.
//
// - Signature Version 4 Signing Process (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)
//
// - This set of topics walks you through the process of signing a request
// using an access key ID and a secret access key.
//
// # Commonly Used API Operations
// //
// Of the API operations discussed in this guide, the following will prove the // Of the API operations discussed in this guide, the following will prove the
// most useful for most applications. You will likely perform operations other // most useful for most applications. You will likely perform operations other
// than these, such as creating keys and assigning policies, by using the console. // than these, such as creating keys and assigning policies, by using the console.
// //
// * Encrypt // - Encrypt
// //
// * Decrypt // - Decrypt
// //
// * GenerateDataKey // - GenerateDataKey
// //
// * GenerateDataKeyWithoutPlaintext // - GenerateDataKeyWithoutPlaintext
// //
// See https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01 for more information on this service. // See https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01 for more information on this service.
// //
// See kms package documentation for more information. // See kms package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/kms/ // https://docs.aws.amazon.com/sdk-for-go/api/service/kms/
// //
// Using the Client // # Using the Client
// //
// To contact AWS Key Management Service with the SDK use the New function to create // To contact AWS Key Management Service with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service. // a new service client. With that client you can make API requests to the service.

View File

@ -40,13 +40,14 @@ const (
// aws.Config parameter to add your extra config. // aws.Config parameter to add your extra config.
// //
// Example: // Example:
// mySession := session.Must(session.NewSession())
// //
// // Create a KMS client from just a session. // mySession := session.Must(session.NewSession())
// svc := kms.New(mySession)
// //
// // Create a KMS client with additional configuration // // Create a KMS client from just a session.
// svc := kms.New(mySession, aws.NewConfig().WithRegion("us-west-2")) // svc := kms.New(mySession)
//
// // Create a KMS client with additional configuration
// svc := kms.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *KMS { func New(p client.ConfigProvider, cfgs ...*aws.Config) *KMS {
c := p.ClientConfig(EndpointsID, cfgs...) c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 { if c.SigningNameDerived || len(c.SigningName) == 0 {

View File

@ -29,14 +29,13 @@ const opGetRoleCredentials = "GetRoleCredentials"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the GetRoleCredentialsRequest method.
// req, resp := client.GetRoleCredentialsRequest(params)
// //
// // Example sending a request using the GetRoleCredentialsRequest method. // err := req.Send()
// req, resp := client.GetRoleCredentialsRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials
func (c *SSO) GetRoleCredentialsRequest(input *GetRoleCredentialsInput) (req *request.Request, output *GetRoleCredentialsOutput) { func (c *SSO) GetRoleCredentialsRequest(input *GetRoleCredentialsInput) (req *request.Request, output *GetRoleCredentialsOutput) {
@ -69,20 +68,21 @@ func (c *SSO) GetRoleCredentialsRequest(input *GetRoleCredentialsInput) (req *re
// API operation GetRoleCredentials for usage and error information. // API operation GetRoleCredentials for usage and error information.
// //
// Returned Error Types: // Returned Error Types:
// * InvalidRequestException
// Indicates that a problem occurred with the input to the request. For example,
// a required parameter might be missing or out of range.
// //
// * UnauthorizedException // - InvalidRequestException
// Indicates that the request is not authorized. This can happen due to an invalid // Indicates that a problem occurred with the input to the request. For example,
// access token in the request. // a required parameter might be missing or out of range.
// //
// * TooManyRequestsException // - UnauthorizedException
// Indicates that the request is being made too frequently and is more than // Indicates that the request is not authorized. This can happen due to an invalid
// what the server can handle. // access token in the request.
// //
// * ResourceNotFoundException // - TooManyRequestsException
// The specified resource doesn't exist. // Indicates that the request is being made too frequently and is more than
// what the server can handle.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials
func (c *SSO) GetRoleCredentials(input *GetRoleCredentialsInput) (*GetRoleCredentialsOutput, error) { func (c *SSO) GetRoleCredentials(input *GetRoleCredentialsInput) (*GetRoleCredentialsOutput, error) {
@ -122,14 +122,13 @@ const opListAccountRoles = "ListAccountRoles"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the ListAccountRolesRequest method.
// req, resp := client.ListAccountRolesRequest(params)
// //
// // Example sending a request using the ListAccountRolesRequest method. // err := req.Send()
// req, resp := client.ListAccountRolesRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles
func (c *SSO) ListAccountRolesRequest(input *ListAccountRolesInput) (req *request.Request, output *ListAccountRolesOutput) { func (c *SSO) ListAccountRolesRequest(input *ListAccountRolesInput) (req *request.Request, output *ListAccountRolesOutput) {
@ -157,7 +156,8 @@ func (c *SSO) ListAccountRolesRequest(input *ListAccountRolesInput) (req *reques
// ListAccountRoles API operation for AWS Single Sign-On. // ListAccountRoles API operation for AWS Single Sign-On.
// //
// Lists all roles that are assigned to the user for a given AWS account. // Lists all roles that are assigned to the user for a given Amazon Web Services
// account.
// //
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about // with awserr.Error's Code and Message methods to get detailed information about
@ -167,20 +167,21 @@ func (c *SSO) ListAccountRolesRequest(input *ListAccountRolesInput) (req *reques
// API operation ListAccountRoles for usage and error information. // API operation ListAccountRoles for usage and error information.
// //
// Returned Error Types: // Returned Error Types:
// * InvalidRequestException
// Indicates that a problem occurred with the input to the request. For example,
// a required parameter might be missing or out of range.
// //
// * UnauthorizedException // - InvalidRequestException
// Indicates that the request is not authorized. This can happen due to an invalid // Indicates that a problem occurred with the input to the request. For example,
// access token in the request. // a required parameter might be missing or out of range.
// //
// * TooManyRequestsException // - UnauthorizedException
// Indicates that the request is being made too frequently and is more than // Indicates that the request is not authorized. This can happen due to an invalid
// what the server can handle. // access token in the request.
// //
// * ResourceNotFoundException // - TooManyRequestsException
// The specified resource doesn't exist. // Indicates that the request is being made too frequently and is more than
// what the server can handle.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles
func (c *SSO) ListAccountRoles(input *ListAccountRolesInput) (*ListAccountRolesOutput, error) { func (c *SSO) ListAccountRoles(input *ListAccountRolesInput) (*ListAccountRolesOutput, error) {
@ -212,15 +213,14 @@ func (c *SSO) ListAccountRolesWithContext(ctx aws.Context, input *ListAccountRol
// //
// Note: This operation can generate multiple requests to a service. // Note: This operation can generate multiple requests to a service.
// //
// // Example iterating over at most 3 pages of a ListAccountRoles operation. // // Example iterating over at most 3 pages of a ListAccountRoles operation.
// pageNum := 0 // pageNum := 0
// err := client.ListAccountRolesPages(params, // err := client.ListAccountRolesPages(params,
// func(page *sso.ListAccountRolesOutput, lastPage bool) bool { // func(page *sso.ListAccountRolesOutput, lastPage bool) bool {
// pageNum++ // pageNum++
// fmt.Println(page) // fmt.Println(page)
// return pageNum <= 3 // return pageNum <= 3
// }) // })
//
func (c *SSO) ListAccountRolesPages(input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool) error { func (c *SSO) ListAccountRolesPages(input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool) error {
return c.ListAccountRolesPagesWithContext(aws.BackgroundContext(), input, fn) return c.ListAccountRolesPagesWithContext(aws.BackgroundContext(), input, fn)
} }
@ -272,14 +272,13 @@ const opListAccounts = "ListAccounts"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the ListAccountsRequest method.
// req, resp := client.ListAccountsRequest(params)
// //
// // Example sending a request using the ListAccountsRequest method. // err := req.Send()
// req, resp := client.ListAccountsRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts
func (c *SSO) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput) { func (c *SSO) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput) {
@ -307,10 +306,11 @@ func (c *SSO) ListAccountsRequest(input *ListAccountsInput) (req *request.Reques
// ListAccounts API operation for AWS Single Sign-On. // ListAccounts API operation for AWS Single Sign-On.
// //
// Lists all AWS accounts assigned to the user. These AWS accounts are assigned // Lists all Amazon Web Services accounts assigned to the user. These Amazon
// by the administrator of the account. For more information, see Assign User // Web Services accounts are assigned by the administrator of the account. For
// Access (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers) // more information, see Assign User Access (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers)
// in the AWS SSO User Guide. This operation returns a paginated response. // in the Amazon Web Services SSO User Guide. This operation returns a paginated
// response.
// //
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about // with awserr.Error's Code and Message methods to get detailed information about
@ -320,20 +320,21 @@ func (c *SSO) ListAccountsRequest(input *ListAccountsInput) (req *request.Reques
// API operation ListAccounts for usage and error information. // API operation ListAccounts for usage and error information.
// //
// Returned Error Types: // Returned Error Types:
// * InvalidRequestException
// Indicates that a problem occurred with the input to the request. For example,
// a required parameter might be missing or out of range.
// //
// * UnauthorizedException // - InvalidRequestException
// Indicates that the request is not authorized. This can happen due to an invalid // Indicates that a problem occurred with the input to the request. For example,
// access token in the request. // a required parameter might be missing or out of range.
// //
// * TooManyRequestsException // - UnauthorizedException
// Indicates that the request is being made too frequently and is more than // Indicates that the request is not authorized. This can happen due to an invalid
// what the server can handle. // access token in the request.
// //
// * ResourceNotFoundException // - TooManyRequestsException
// The specified resource doesn't exist. // Indicates that the request is being made too frequently and is more than
// what the server can handle.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts
func (c *SSO) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error) { func (c *SSO) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error) {
@ -365,15 +366,14 @@ func (c *SSO) ListAccountsWithContext(ctx aws.Context, input *ListAccountsInput,
// //
// Note: This operation can generate multiple requests to a service. // Note: This operation can generate multiple requests to a service.
// //
// // Example iterating over at most 3 pages of a ListAccounts operation. // // Example iterating over at most 3 pages of a ListAccounts operation.
// pageNum := 0 // pageNum := 0
// err := client.ListAccountsPages(params, // err := client.ListAccountsPages(params,
// func(page *sso.ListAccountsOutput, lastPage bool) bool { // func(page *sso.ListAccountsOutput, lastPage bool) bool {
// pageNum++ // pageNum++
// fmt.Println(page) // fmt.Println(page)
// return pageNum <= 3 // return pageNum <= 3
// }) // })
//
func (c *SSO) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error { func (c *SSO) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error {
return c.ListAccountsPagesWithContext(aws.BackgroundContext(), input, fn) return c.ListAccountsPagesWithContext(aws.BackgroundContext(), input, fn)
} }
@ -425,14 +425,13 @@ const opLogout = "Logout"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the LogoutRequest method.
// req, resp := client.LogoutRequest(params)
// //
// // Example sending a request using the LogoutRequest method. // err := req.Send()
// req, resp := client.LogoutRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout
func (c *SSO) LogoutRequest(input *LogoutInput) (req *request.Request, output *LogoutOutput) { func (c *SSO) LogoutRequest(input *LogoutInput) (req *request.Request, output *LogoutOutput) {
@ -455,7 +454,21 @@ func (c *SSO) LogoutRequest(input *LogoutInput) (req *request.Request, output *L
// Logout API operation for AWS Single Sign-On. // Logout API operation for AWS Single Sign-On.
// //
// Removes the client- and server-side session that is associated with the user. // Removes the locally stored SSO tokens from the client-side cache and sends
// an API call to the Amazon Web Services SSO service to invalidate the corresponding
// server-side Amazon Web Services SSO sign in session.
//
// If a user uses Amazon Web Services SSO to access the AWS CLI, the users
// Amazon Web Services SSO sign in session is used to obtain an IAM session,
// as specified in the corresponding Amazon Web Services SSO permission set.
// More specifically, Amazon Web Services SSO assumes an IAM role in the target
// account on behalf of the user, and the corresponding temporary Amazon Web
// Services credentials are returned to the client.
//
// After user logout, any existing IAM role sessions that were created by using
// Amazon Web Services SSO permission sets continue based on the duration configured
// in the permission set. For more information, see User authentications (https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html)
// in the Amazon Web Services SSO User Guide.
// //
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about // with awserr.Error's Code and Message methods to get detailed information about
@ -465,17 +478,18 @@ func (c *SSO) LogoutRequest(input *LogoutInput) (req *request.Request, output *L
// API operation Logout for usage and error information. // API operation Logout for usage and error information.
// //
// Returned Error Types: // Returned Error Types:
// * InvalidRequestException
// Indicates that a problem occurred with the input to the request. For example,
// a required parameter might be missing or out of range.
// //
// * UnauthorizedException // - InvalidRequestException
// Indicates that the request is not authorized. This can happen due to an invalid // Indicates that a problem occurred with the input to the request. For example,
// access token in the request. // a required parameter might be missing or out of range.
// //
// * TooManyRequestsException // - UnauthorizedException
// Indicates that the request is being made too frequently and is more than // Indicates that the request is not authorized. This can happen due to an invalid
// what the server can handle. // access token in the request.
//
// - TooManyRequestsException
// Indicates that the request is being made too frequently and is more than
// what the server can handle.
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout
func (c *SSO) Logout(input *LogoutInput) (*LogoutOutput, error) { func (c *SSO) Logout(input *LogoutInput) (*LogoutOutput, error) {
@ -499,17 +513,20 @@ func (c *SSO) LogoutWithContext(ctx aws.Context, input *LogoutInput, opts ...req
return out, req.Send() return out, req.Send()
} }
// Provides information about your AWS account. // Provides information about your Amazon Web Services account.
type AccountInfo struct { type AccountInfo struct {
_ struct{} `type:"structure"` _ struct{} `type:"structure"`
// The identifier of the AWS account that is assigned to the user. // The identifier of the Amazon Web Services account that is assigned to the
// user.
AccountId *string `locationName:"accountId" type:"string"` AccountId *string `locationName:"accountId" type:"string"`
// The display name of the AWS account that is assigned to the user. // The display name of the Amazon Web Services account that is assigned to the
// user.
AccountName *string `locationName:"accountName" type:"string"` AccountName *string `locationName:"accountName" type:"string"`
// The email address of the AWS account that is assigned to the user. // The email address of the Amazon Web Services account that is assigned to
// the user.
EmailAddress *string `locationName:"emailAddress" min:"1" type:"string"` EmailAddress *string `locationName:"emailAddress" min:"1" type:"string"`
} }
@ -554,7 +571,7 @@ type GetRoleCredentialsInput struct {
// The token issued by the CreateToken API call. For more information, see CreateToken // The token issued by the CreateToken API call. For more information, see CreateToken
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
// in the AWS SSO OIDC API Reference Guide. // in the Amazon Web Services SSO OIDC API Reference Guide.
// //
// AccessToken is a sensitive parameter and its value will be // AccessToken is a sensitive parameter and its value will be
// replaced with "sensitive" in string returned by GetRoleCredentialsInput's // replaced with "sensitive" in string returned by GetRoleCredentialsInput's
@ -563,7 +580,8 @@ type GetRoleCredentialsInput struct {
// AccessToken is a required field // AccessToken is a required field
AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"` AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
// The identifier for the AWS account that is assigned to the user. // The identifier for the Amazon Web Services account that is assigned to the
// user.
// //
// AccountId is a required field // AccountId is a required field
AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"` AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"`
@ -730,7 +748,7 @@ type ListAccountRolesInput struct {
// The token issued by the CreateToken API call. For more information, see CreateToken // The token issued by the CreateToken API call. For more information, see CreateToken
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
// in the AWS SSO OIDC API Reference Guide. // in the Amazon Web Services SSO OIDC API Reference Guide.
// //
// AccessToken is a sensitive parameter and its value will be // AccessToken is a sensitive parameter and its value will be
// replaced with "sensitive" in string returned by ListAccountRolesInput's // replaced with "sensitive" in string returned by ListAccountRolesInput's
@ -739,7 +757,8 @@ type ListAccountRolesInput struct {
// AccessToken is a required field // AccessToken is a required field
AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"` AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
// The identifier for the AWS account that is assigned to the user. // The identifier for the Amazon Web Services account that is assigned to the
// user.
// //
// AccountId is a required field // AccountId is a required field
AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"` AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"`
@ -859,7 +878,7 @@ type ListAccountsInput struct {
// The token issued by the CreateToken API call. For more information, see CreateToken // The token issued by the CreateToken API call. For more information, see CreateToken
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
// in the AWS SSO OIDC API Reference Guide. // in the Amazon Web Services SSO OIDC API Reference Guide.
// //
// AccessToken is a sensitive parameter and its value will be // AccessToken is a sensitive parameter and its value will be
// replaced with "sensitive" in string returned by ListAccountsInput's // replaced with "sensitive" in string returned by ListAccountsInput's
@ -974,7 +993,7 @@ type LogoutInput struct {
// The token issued by the CreateToken API call. For more information, see CreateToken // The token issued by the CreateToken API call. For more information, see CreateToken
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
// in the AWS SSO OIDC API Reference Guide. // in the Amazon Web Services SSO OIDC API Reference Guide.
// //
// AccessToken is a sensitive parameter and its value will be // AccessToken is a sensitive parameter and its value will be
// replaced with "sensitive" in string returned by LogoutInput's // replaced with "sensitive" in string returned by LogoutInput's
@ -1113,17 +1132,18 @@ type RoleCredentials struct {
_ struct{} `type:"structure"` _ struct{} `type:"structure"`
// The identifier used for the temporary security credentials. For more information, // The identifier used for the temporary security credentials. For more information,
// see Using Temporary Security Credentials to Request Access to AWS Resources // see Using Temporary Security Credentials to Request Access to Amazon Web
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) // Services Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
// in the AWS IAM User Guide. // in the Amazon Web Services IAM User Guide.
AccessKeyId *string `locationName:"accessKeyId" type:"string"` AccessKeyId *string `locationName:"accessKeyId" type:"string"`
// The date on which temporary security credentials expire. // The date on which temporary security credentials expire.
Expiration *int64 `locationName:"expiration" type:"long"` Expiration *int64 `locationName:"expiration" type:"long"`
// The key that is used to sign the request. For more information, see Using // The key that is used to sign the request. For more information, see Using
// Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) // Temporary Security Credentials to Request Access to Amazon Web Services Resources
// in the AWS IAM User Guide. // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
// in the Amazon Web Services IAM User Guide.
// //
// SecretAccessKey is a sensitive parameter and its value will be // SecretAccessKey is a sensitive parameter and its value will be
// replaced with "sensitive" in string returned by RoleCredentials's // replaced with "sensitive" in string returned by RoleCredentials's
@ -1131,8 +1151,9 @@ type RoleCredentials struct {
SecretAccessKey *string `locationName:"secretAccessKey" type:"string" sensitive:"true"` SecretAccessKey *string `locationName:"secretAccessKey" type:"string" sensitive:"true"`
// The token used for temporary credentials. For more information, see Using // The token used for temporary credentials. For more information, see Using
// Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) // Temporary Security Credentials to Request Access to Amazon Web Services Resources
// in the AWS IAM User Guide. // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
// in the Amazon Web Services IAM User Guide.
// //
// SessionToken is a sensitive parameter and its value will be // SessionToken is a sensitive parameter and its value will be
// replaced with "sensitive" in string returned by RoleCredentials's // replaced with "sensitive" in string returned by RoleCredentials's
@ -1186,7 +1207,7 @@ func (s *RoleCredentials) SetSessionToken(v string) *RoleCredentials {
type RoleInfo struct { type RoleInfo struct {
_ struct{} `type:"structure"` _ struct{} `type:"structure"`
// The identifier of the AWS account assigned to the user. // The identifier of the Amazon Web Services account assigned to the user.
AccountId *string `locationName:"accountId" type:"string"` AccountId *string `locationName:"accountId" type:"string"`
// The friendly name of the role that is assigned to the user. // The friendly name of the role that is assigned to the user.

View File

@ -3,30 +3,32 @@
// Package sso provides the client and types for making API // Package sso provides the client and types for making API
// requests to AWS Single Sign-On. // requests to AWS Single Sign-On.
// //
// AWS Single Sign-On Portal is a web service that makes it easy for you to // Amazon Web Services Single Sign On Portal is a web service that makes it
// assign user access to AWS SSO resources such as the user portal. Users can // easy for you to assign user access to Amazon Web Services SSO resources such
// get AWS account applications and roles assigned to them and get federated // as the AWS access portal. Users can get Amazon Web Services account applications
// into the application. // and roles assigned to them and get federated into the application.
// //
// For general information about AWS SSO, see What is AWS Single Sign-On? (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) // Although Amazon Web Services Single Sign-On was renamed, the sso and identitystore
// in the AWS SSO User Guide. // API namespaces will continue to retain their original name for backward compatibility
// purposes. For more information, see Amazon Web Services SSO rename (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed).
// //
// This API reference guide describes the AWS SSO Portal operations that you // This reference guide describes the Amazon Web Services SSO Portal operations
// can call programatically and includes detailed information on data types // that you can call programatically and includes detailed information on data
// and errors. // types and errors.
// //
// AWS provides SDKs that consist of libraries and sample code for various programming // Amazon Web Services provides SDKs that consist of libraries and sample code
// languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs // for various programming languages and platforms, such as Java, Ruby, .Net,
// provide a convenient way to create programmatic access to AWS SSO and other // iOS, or Android. The SDKs provide a convenient way to create programmatic
// AWS services. For more information about the AWS SDKs, including how to download // access to Amazon Web Services SSO and other Amazon Web Services services.
// and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/). // For more information about the Amazon Web Services SDKs, including how to
// download and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/).
// //
// See https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10 for more information on this service. // See https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10 for more information on this service.
// //
// See sso package documentation for more information. // See sso package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/sso/ // https://docs.aws.amazon.com/sdk-for-go/api/service/sso/
// //
// Using the Client // # Using the Client
// //
// To contact AWS Single Sign-On with the SDK use the New function to create // To contact AWS Single Sign-On with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service. // a new service client. With that client you can make API requests to the service.

View File

@ -40,13 +40,14 @@ const (
// aws.Config parameter to add your extra config. // aws.Config parameter to add your extra config.
// //
// Example: // Example:
// mySession := session.Must(session.NewSession())
// //
// // Create a SSO client from just a session. // mySession := session.Must(session.NewSession())
// svc := sso.New(mySession)
// //
// // Create a SSO client with additional configuration // // Create a SSO client from just a session.
// svc := sso.New(mySession, aws.NewConfig().WithRegion("us-west-2")) // svc := sso.New(mySession)
//
// // Create a SSO client with additional configuration
// svc := sso.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSO { func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSO {
c := p.ClientConfig(EndpointsID, cfgs...) c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 { if c.SigningNameDerived || len(c.SigningName) == 0 {

View File

@ -23,37 +23,37 @@ import (
// can be stubbed out for unit testing your code with the SDK without needing // can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the SDK's request pipeline. // to inject custom request handlers into the SDK's request pipeline.
// //
// // myFunc uses an SDK service client to make a request to // // myFunc uses an SDK service client to make a request to
// // AWS Single Sign-On. // // AWS Single Sign-On.
// func myFunc(svc ssoiface.SSOAPI) bool { // func myFunc(svc ssoiface.SSOAPI) bool {
// // Make svc.GetRoleCredentials request // // Make svc.GetRoleCredentials request
// } // }
// //
// func main() { // func main() {
// sess := session.New() // sess := session.New()
// svc := sso.New(sess) // svc := sso.New(sess)
// //
// myFunc(svc) // myFunc(svc)
// } // }
// //
// In your _test.go file: // In your _test.go file:
// //
// // Define a mock struct to be used in your unit tests of myFunc. // // Define a mock struct to be used in your unit tests of myFunc.
// type mockSSOClient struct { // type mockSSOClient struct {
// ssoiface.SSOAPI // ssoiface.SSOAPI
// } // }
// func (m *mockSSOClient) GetRoleCredentials(input *sso.GetRoleCredentialsInput) (*sso.GetRoleCredentialsOutput, error) { // func (m *mockSSOClient) GetRoleCredentials(input *sso.GetRoleCredentialsInput) (*sso.GetRoleCredentialsOutput, error) {
// // mock response/functionality // // mock response/functionality
// } // }
// //
// func TestMyFunc(t *testing.T) { // func TestMyFunc(t *testing.T) {
// // Setup Test // // Setup Test
// mockSvc := &mockSSOClient{} // mockSvc := &mockSSOClient{}
// //
// myfunc(mockSvc) // myfunc(mockSvc)
// //
// // Verify myFunc's functionality // // Verify myFunc's functionality
// } // }
// //
// It is important to note that this interface will have breaking changes // It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators, // when the service model is updated and adds new API operations, paginators,

View File

@ -28,14 +28,13 @@ const opAssumeRole = "AssumeRole"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the AssumeRoleRequest method.
// req, resp := client.AssumeRoleRequest(params)
// //
// // Example sending a request using the AssumeRoleRequest method. // err := req.Send()
// req, resp := client.AssumeRoleRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, output *AssumeRoleOutput) { func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, output *AssumeRoleOutput) {
@ -66,7 +65,7 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// and Comparing the Amazon Web Services 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. // in the IAM User Guide.
// //
// Permissions // # Permissions
// //
// The temporary security credentials created by AssumeRole can be used to make // The temporary security credentials created by AssumeRole can be used to make
// API calls to any Amazon Web Services service with the following exception: // API calls to any Amazon Web Services service with the following exception:
@ -105,10 +104,10 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// To allow a user to assume a role in the same account, you can do either of // To allow a user to assume a role in the same account, you can do either of
// the following: // the following:
// //
// * Attach a policy to the user that allows the user to call AssumeRole // - Attach a policy to the user that allows the user to call AssumeRole
// (as long as the role's trust policy trusts the account). // (as long as the role's trust policy trusts the account).
// //
// * Add the user as a principal directly in the role's trust policy. // - Add the user as a principal directly in the role's trust policy.
// //
// You can do either because the roles trust policy acts as an IAM resource-based // You can do either because the roles trust policy acts as an IAM resource-based
// policy. When a resource-based policy grants access to a principal in the // policy. When a resource-based policy grants access to a principal in the
@ -116,7 +115,7 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// about trust policies and resource-based policies, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) // 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. // in the IAM User Guide.
// //
// Tags // # Tags
// //
// (Optional) You can pass tag key-value pairs to your session. These tags are // (Optional) You can pass tag key-value pairs to your session. These tags are
// called session tags. For more information about session tags, see Passing // called session tags. For more information about session tags, see Passing
@ -134,7 +133,7 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
// in the IAM User Guide. // in the IAM User Guide.
// //
// Using MFA with AssumeRole // # Using MFA with AssumeRole
// //
// (Optional) You can include multi-factor authentication (MFA) information // (Optional) You can include multi-factor authentication (MFA) information
// when you call AssumeRole. This is useful for cross-account scenarios to ensure // when you call AssumeRole. This is useful for cross-account scenarios to ensure
@ -163,35 +162,36 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// API operation AssumeRole for usage and error information. // API operation AssumeRole for usage and error information.
// //
// Returned Error Codes: // Returned Error Codes:
// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
// The request was rejected because the policy document was malformed. The error
// message describes the specific error.
// //
// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
// The request was rejected because the total packed size of the session policies // The request was rejected because the policy document was malformed. The error
// and session tags combined was too large. An Amazon Web Services conversion // message describes the specific error.
// compresses the session policy document, session policy ARNs, and session
// tags into a packed binary format that has a separate limit. The error message
// indicates by percentage how close the policies and tags are to the upper
// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
// in the IAM User Guide.
// //
// You could receive this error even though you meet other defined session policy // - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
// and session tag limits. For more information, see IAM and STS Entity Character // The request was rejected because the total packed size of the session policies
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) // and session tags combined was too large. An Amazon Web Services conversion
// in the IAM User Guide. // compresses the session policy document, session policy ARNs, and session
// tags into a packed binary format that has a separate limit. The error message
// indicates by percentage how close the policies and tags are to the upper
// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
// in the IAM User Guide.
// //
// * ErrCodeRegionDisabledException "RegionDisabledException" // You could receive this error even though you meet other defined session policy
// STS is not activated in the requested region for the account that is being // and session tag limits. For more information, see IAM and STS Entity Character
// asked to generate credentials. The account administrator must use the IAM // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
// console to activate STS in that region. For more information, see Activating // in the IAM User Guide.
// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
// //
// * ErrCodeExpiredTokenException "ExpiredTokenException" // - ErrCodeRegionDisabledException "RegionDisabledException"
// The web identity token that was passed is expired or is not valid. Get a // STS is not activated in the requested region for the account that is being
// new identity token from the identity provider and then retry the request. // asked to generate credentials. The account administrator must use the IAM
// console to activate STS in that region. For more information, see Activating
// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
//
// - ErrCodeExpiredTokenException "ExpiredTokenException"
// The web identity token that was passed is expired or is not valid. Get a
// new identity token from the identity provider and then retry the request.
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) { func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) {
@ -231,14 +231,13 @@ const opAssumeRoleWithSAML = "AssumeRoleWithSAML"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the AssumeRoleWithSAMLRequest method.
// req, resp := client.AssumeRoleWithSAMLRequest(params)
// //
// // Example sending a request using the AssumeRoleWithSAMLRequest method. // err := req.Send()
// req, resp := client.AssumeRoleWithSAMLRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *request.Request, output *AssumeRoleWithSAMLOutput) { func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *request.Request, output *AssumeRoleWithSAMLOutput) {
@ -274,7 +273,7 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// can use these temporary security credentials to sign calls to Amazon Web // can use these temporary security credentials to sign calls to Amazon Web
// Services services. // Services services.
// //
// Session Duration // # Session Duration
// //
// By default, the temporary security credentials created by AssumeRoleWithSAML // By default, the temporary security credentials created by AssumeRoleWithSAML
// last for one hour. However, you can use the optional DurationSeconds parameter // last for one hour. However, you can use the optional DurationSeconds parameter
@ -300,7 +299,7 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// a role using role chaining and provide a DurationSeconds parameter value // a role using role chaining and provide a DurationSeconds parameter value
// greater than one hour, the operation fails. // greater than one hour, the operation fails.
// //
// Permissions // # Permissions
// //
// The temporary security credentials created by AssumeRoleWithSAML can be used // The temporary security credentials created by AssumeRoleWithSAML can be used
// to make API calls to any Amazon Web Services service with the following exception: // to make API calls to any Amazon Web Services service with the following exception:
@ -331,7 +330,7 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// identifiable information (PII). For example, you could instead use the persistent // identifiable information (PII). For example, you could instead use the persistent
// identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent). // identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).
// //
// Tags // # Tags
// //
// (Optional) You can configure your IdP to pass attributes into your SAML assertion // (Optional) You can configure your IdP to pass attributes into your SAML assertion
// as session tags. Each session tag consists of a key name and an associated // as session tags. Each session tag consists of a key name and an associated
@ -365,7 +364,7 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
// in the IAM User Guide. // in the IAM User Guide.
// //
// SAML Configuration // # SAML Configuration
// //
// Before your application can call AssumeRoleWithSAML, you must configure your // Before your application can call AssumeRoleWithSAML, you must configure your
// SAML identity provider (IdP) to issue the claims required by Amazon Web Services. // SAML identity provider (IdP) to issue the claims required by Amazon Web Services.
@ -376,17 +375,17 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// //
// For more information, see the following resources: // For more information, see the following resources:
// //
// * About SAML 2.0-based Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) // - About SAML 2.0-based Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html)
// in the IAM User Guide. // in the IAM User Guide.
// //
// * Creating SAML Identity Providers (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html) // - Creating SAML Identity Providers (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html)
// in the IAM User Guide. // in the IAM User Guide.
// //
// * Configuring a Relying Party and Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html) // - Configuring a Relying Party and Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html)
// in the IAM User Guide. // in the IAM User Guide.
// //
// * Creating a Role for SAML 2.0 Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html) // - Creating a Role for SAML 2.0 Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html)
// in the IAM User Guide. // in the IAM User Guide.
// //
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about // with awserr.Error's Code and Message methods to get detailed information about
@ -396,47 +395,48 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// API operation AssumeRoleWithSAML for usage and error information. // API operation AssumeRoleWithSAML for usage and error information.
// //
// Returned Error Codes: // Returned Error Codes:
// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
// The request was rejected because the policy document was malformed. The error
// message describes the specific error.
// //
// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
// The request was rejected because the total packed size of the session policies // The request was rejected because the policy document was malformed. The error
// and session tags combined was too large. An Amazon Web Services conversion // message describes the specific error.
// compresses the session policy document, session policy ARNs, and session
// tags into a packed binary format that has a separate limit. The error message
// indicates by percentage how close the policies and tags are to the upper
// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
// in the IAM User Guide.
// //
// You could receive this error even though you meet other defined session policy // - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
// and session tag limits. For more information, see IAM and STS Entity Character // The request was rejected because the total packed size of the session policies
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) // and session tags combined was too large. An Amazon Web Services conversion
// in the IAM User Guide. // compresses the session policy document, session policy ARNs, and session
// tags into a packed binary format that has a separate limit. The error message
// indicates by percentage how close the policies and tags are to the upper
// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
// in the IAM User Guide.
// //
// * ErrCodeIDPRejectedClaimException "IDPRejectedClaim" // You could receive this error even though you meet other defined session policy
// The identity provider (IdP) reported that authentication failed. This might // and session tag limits. For more information, see IAM and STS Entity Character
// be because the claim is invalid. // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
// in the IAM User Guide.
// //
// If this error is returned for the AssumeRoleWithWebIdentity operation, it // - ErrCodeIDPRejectedClaimException "IDPRejectedClaim"
// can also mean that the claim has expired or has been explicitly revoked. // The identity provider (IdP) reported that authentication failed. This might
// be because the claim is invalid.
// //
// * ErrCodeInvalidIdentityTokenException "InvalidIdentityToken" // If this error is returned for the AssumeRoleWithWebIdentity operation, it
// The web identity token that was passed could not be validated by Amazon Web // can also mean that the claim has expired or has been explicitly revoked.
// Services. Get a new identity token from the identity provider and then retry
// the request.
// //
// * ErrCodeExpiredTokenException "ExpiredTokenException" // - ErrCodeInvalidIdentityTokenException "InvalidIdentityToken"
// The web identity token that was passed is expired or is not valid. Get a // The web identity token that was passed could not be validated by Amazon Web
// new identity token from the identity provider and then retry the request. // Services. Get a new identity token from the identity provider and then retry
// the request.
// //
// * ErrCodeRegionDisabledException "RegionDisabledException" // - ErrCodeExpiredTokenException "ExpiredTokenException"
// STS is not activated in the requested region for the account that is being // The web identity token that was passed is expired or is not valid. Get a
// asked to generate credentials. The account administrator must use the IAM // new identity token from the identity provider and then retry the request.
// console to activate STS in that region. For more information, see Activating //
// and Deactivating Amazon Web Services STS in an Amazon Web Services Region // - ErrCodeRegionDisabledException "RegionDisabledException"
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // STS is not activated in the requested region for the account that is being
// in the IAM User Guide. // asked to generate credentials. The account administrator must use the IAM
// console to activate STS in that region. For more information, see Activating
// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) { func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) {
@ -476,14 +476,13 @@ const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the AssumeRoleWithWebIdentityRequest method.
// req, resp := client.AssumeRoleWithWebIdentityRequest(params)
// //
// // Example sending a request using the AssumeRoleWithWebIdentityRequest method. // err := req.Send()
// req, resp := client.AssumeRoleWithWebIdentityRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityInput) (req *request.Request, output *AssumeRoleWithWebIdentityOutput) { func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityInput) (req *request.Request, output *AssumeRoleWithWebIdentityOutput) {
@ -540,7 +539,7 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// temporary security credentials to sign calls to Amazon Web Services service // temporary security credentials to sign calls to Amazon Web Services service
// API operations. // API operations.
// //
// Session Duration // # Session Duration
// //
// By default, the temporary security credentials created by AssumeRoleWithWebIdentity // By default, the temporary security credentials created by AssumeRoleWithWebIdentity
// last for one hour. However, you can use the optional DurationSeconds parameter // last for one hour. However, you can use the optional DurationSeconds parameter
@ -555,7 +554,7 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) // URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
// in the IAM User Guide. // in the IAM User Guide.
// //
// Permissions // # Permissions
// //
// The temporary security credentials created by AssumeRoleWithWebIdentity can // The temporary security credentials created by AssumeRoleWithWebIdentity can
// be used to make API calls to any Amazon Web Services service with the following // be used to make API calls to any Amazon Web Services service with the following
@ -576,7 +575,7 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
// in the IAM User Guide. // in the IAM User Guide.
// //
// Tags // # Tags
// //
// (Optional) You can configure your IdP to pass attributes into your web identity // (Optional) You can configure your IdP to pass attributes into your web identity
// token as session tags. Each session tag consists of a key name and an associated // token as session tags. Each session tag consists of a key name and an associated
@ -610,7 +609,7 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
// in the IAM User Guide. // in the IAM User Guide.
// //
// Identities // # Identities
// //
// Before your application can call AssumeRoleWithWebIdentity, you must have // Before your application can call AssumeRoleWithWebIdentity, you must have
// an identity token from a supported identity provider and create a role that // an identity token from a supported identity provider and create a role that
@ -628,24 +627,24 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// For more information about how to use web identity federation and the AssumeRoleWithWebIdentity // For more information about how to use web identity federation and the AssumeRoleWithWebIdentity
// API, see the following resources: // API, see the following resources:
// //
// * Using Web Identity Federation API Operations for Mobile Apps (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html) // - Using Web Identity Federation API Operations for Mobile Apps (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html)
// and Federation Through a Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity). // and Federation Through a Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity).
// //
// * Web Identity Federation Playground (https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/). // - Web Identity Federation Playground (https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/).
// Walk through the process of authenticating through Login with Amazon, // Walk through the process of authenticating through Login with Amazon,
// Facebook, or Google, getting temporary security credentials, and then // Facebook, or Google, getting temporary security credentials, and then
// using those credentials to make a request to Amazon Web Services. // using those credentials to make a request to Amazon Web Services.
// //
// * Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/) // - Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/)
// and Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/). // and Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/).
// These toolkits contain sample apps that show how to invoke the identity // These toolkits contain sample apps that show how to invoke the identity
// providers. The toolkits then show how to use the information from these // providers. The toolkits then show how to use the information from these
// providers to get and use temporary security credentials. // providers to get and use temporary security credentials.
// //
// * Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications). // - Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications).
// This article discusses web identity federation and shows an example of // This article discusses web identity federation and shows an example of
// how to use web identity federation to get access to content in Amazon // how to use web identity federation to get access to content in Amazon
// S3. // S3.
// //
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about // with awserr.Error's Code and Message methods to get detailed information about
@ -655,54 +654,55 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// API operation AssumeRoleWithWebIdentity for usage and error information. // API operation AssumeRoleWithWebIdentity for usage and error information.
// //
// Returned Error Codes: // Returned Error Codes:
// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
// The request was rejected because the policy document was malformed. The error
// message describes the specific error.
// //
// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
// The request was rejected because the total packed size of the session policies // The request was rejected because the policy document was malformed. The error
// and session tags combined was too large. An Amazon Web Services conversion // message describes the specific error.
// compresses the session policy document, session policy ARNs, and session
// tags into a packed binary format that has a separate limit. The error message
// indicates by percentage how close the policies and tags are to the upper
// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
// in the IAM User Guide.
// //
// You could receive this error even though you meet other defined session policy // - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
// and session tag limits. For more information, see IAM and STS Entity Character // The request was rejected because the total packed size of the session policies
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) // and session tags combined was too large. An Amazon Web Services conversion
// in the IAM User Guide. // compresses the session policy document, session policy ARNs, and session
// tags into a packed binary format that has a separate limit. The error message
// indicates by percentage how close the policies and tags are to the upper
// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
// in the IAM User Guide.
// //
// * ErrCodeIDPRejectedClaimException "IDPRejectedClaim" // You could receive this error even though you meet other defined session policy
// The identity provider (IdP) reported that authentication failed. This might // and session tag limits. For more information, see IAM and STS Entity Character
// be because the claim is invalid. // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
// in the IAM User Guide.
// //
// If this error is returned for the AssumeRoleWithWebIdentity operation, it // - ErrCodeIDPRejectedClaimException "IDPRejectedClaim"
// can also mean that the claim has expired or has been explicitly revoked. // The identity provider (IdP) reported that authentication failed. This might
// be because the claim is invalid.
// //
// * ErrCodeIDPCommunicationErrorException "IDPCommunicationError" // If this error is returned for the AssumeRoleWithWebIdentity operation, it
// The request could not be fulfilled because the identity provider (IDP) that // can also mean that the claim has expired or has been explicitly revoked.
// was asked to verify the incoming identity token could not be reached. This
// is often a transient error caused by network conditions. Retry the request
// a limited number of times so that you don't exceed the request rate. If the
// error persists, the identity provider might be down or not responding.
// //
// * ErrCodeInvalidIdentityTokenException "InvalidIdentityToken" // - ErrCodeIDPCommunicationErrorException "IDPCommunicationError"
// The web identity token that was passed could not be validated by Amazon Web // The request could not be fulfilled because the identity provider (IDP) that
// Services. Get a new identity token from the identity provider and then retry // was asked to verify the incoming identity token could not be reached. This
// the request. // is often a transient error caused by network conditions. Retry the request
// a limited number of times so that you don't exceed the request rate. If the
// error persists, the identity provider might be down or not responding.
// //
// * ErrCodeExpiredTokenException "ExpiredTokenException" // - ErrCodeInvalidIdentityTokenException "InvalidIdentityToken"
// The web identity token that was passed is expired or is not valid. Get a // The web identity token that was passed could not be validated by Amazon Web
// new identity token from the identity provider and then retry the request. // Services. Get a new identity token from the identity provider and then retry
// the request.
// //
// * ErrCodeRegionDisabledException "RegionDisabledException" // - ErrCodeExpiredTokenException "ExpiredTokenException"
// STS is not activated in the requested region for the account that is being // The web identity token that was passed is expired or is not valid. Get a
// asked to generate credentials. The account administrator must use the IAM // new identity token from the identity provider and then retry the request.
// console to activate STS in that region. For more information, see Activating //
// and Deactivating Amazon Web Services STS in an Amazon Web Services Region // - ErrCodeRegionDisabledException "RegionDisabledException"
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // STS is not activated in the requested region for the account that is being
// in the IAM User Guide. // asked to generate credentials. The account administrator must use the IAM
// console to activate STS in that region. For more information, see Activating
// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) { func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) {
@ -742,14 +742,13 @@ const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the DecodeAuthorizationMessageRequest method.
// req, resp := client.DecodeAuthorizationMessageRequest(params)
// //
// // Example sending a request using the DecodeAuthorizationMessageRequest method. // err := req.Send()
// req, resp := client.DecodeAuthorizationMessageRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessageInput) (req *request.Request, output *DecodeAuthorizationMessageOutput) { func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessageInput) (req *request.Request, output *DecodeAuthorizationMessageOutput) {
@ -793,18 +792,18 @@ func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessag
// //
// The decoded message includes the following type of information: // The decoded message includes the following type of information:
// //
// * Whether the request was denied due to an explicit deny or due to the // - Whether the request was denied due to an explicit deny or due to the
// absence of an explicit allow. For more information, see Determining Whether // absence of an explicit allow. For more information, see Determining Whether
// a Request is Allowed or Denied (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow) // a Request is Allowed or Denied (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow)
// in the IAM User Guide. // in the IAM User Guide.
// //
// * The principal who made the request. // - The principal who made the request.
// //
// * The requested action. // - The requested action.
// //
// * The requested resource. // - The requested resource.
// //
// * The values of condition keys in the context of the user's request. // - The values of condition keys in the context of the user's request.
// //
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about // with awserr.Error's Code and Message methods to get detailed information about
@ -814,10 +813,10 @@ func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessag
// API operation DecodeAuthorizationMessage for usage and error information. // API operation DecodeAuthorizationMessage for usage and error information.
// //
// Returned Error Codes: // Returned Error Codes:
// * ErrCodeInvalidAuthorizationMessageException "InvalidAuthorizationMessageException" // - ErrCodeInvalidAuthorizationMessageException "InvalidAuthorizationMessageException"
// The error returned if the message passed to DecodeAuthorizationMessage was // The error returned if the message passed to DecodeAuthorizationMessage was
// invalid. This can happen if the token contains invalid characters, such as // invalid. This can happen if the token contains invalid characters, such as
// linebreaks. // linebreaks.
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) { func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) {
@ -857,14 +856,13 @@ const opGetAccessKeyInfo = "GetAccessKeyInfo"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the GetAccessKeyInfoRequest method.
// req, resp := client.GetAccessKeyInfoRequest(params)
// //
// // Example sending a request using the GetAccessKeyInfoRequest method. // err := req.Send()
// req, resp := client.GetAccessKeyInfoRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo
func (c *STS) GetAccessKeyInfoRequest(input *GetAccessKeyInfoInput) (req *request.Request, output *GetAccessKeyInfoOutput) { func (c *STS) GetAccessKeyInfoRequest(input *GetAccessKeyInfoInput) (req *request.Request, output *GetAccessKeyInfoOutput) {
@ -954,14 +952,13 @@ const opGetCallerIdentity = "GetCallerIdentity"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the GetCallerIdentityRequest method.
// req, resp := client.GetCallerIdentityRequest(params)
// //
// // Example sending a request using the GetCallerIdentityRequest method. // err := req.Send()
// req, resp := client.GetCallerIdentityRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *request.Request, output *GetCallerIdentityOutput) { func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *request.Request, output *GetCallerIdentityOutput) {
@ -1037,14 +1034,13 @@ const opGetFederationToken = "GetFederationToken"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the GetFederationTokenRequest method.
// req, resp := client.GetFederationTokenRequest(params)
// //
// // Example sending a request using the GetFederationTokenRequest method. // err := req.Send()
// req, resp := client.GetFederationTokenRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *request.Request, output *GetFederationTokenOutput) { func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *request.Request, output *GetFederationTokenOutput) {
@ -1094,7 +1090,7 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
// see IAM Best Practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) // see IAM Best Practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)
// in the IAM User Guide. // in the IAM User Guide.
// //
// Session duration // # Session duration
// //
// The temporary credentials are valid for the specified duration, from 900 // 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 // seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default
@ -1102,15 +1098,15 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
// by using the Amazon Web Services account root user credentials have a maximum // by using the Amazon Web Services account root user credentials have a maximum
// duration of 3,600 seconds (1 hour). // duration of 3,600 seconds (1 hour).
// //
// Permissions // # Permissions
// //
// You can use the temporary credentials created by GetFederationToken in any // You can use the temporary credentials created by GetFederationToken in any
// Amazon Web Services service except the following: // Amazon Web Services service except the following:
// //
// * You cannot call any IAM operations using the CLI or the Amazon Web Services // - You cannot call any IAM operations using the CLI or the Amazon Web Services
// API. // API.
// //
// * You cannot call any STS operations except GetCallerIdentity. // - 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) // 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 // to this operation. You can pass a single JSON policy document to use as an
@ -1136,7 +1132,7 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
// by the policy. These permissions are granted in addition to the permissions // by the policy. These permissions are granted in addition to the permissions
// granted by the session policies. // granted by the session policies.
// //
// Tags // # Tags
// //
// (Optional) You can pass tag key-value pairs to your session. These are called // (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 // session tags. For more information about session tags, see Passing Session
@ -1172,31 +1168,32 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
// API operation GetFederationToken for usage and error information. // API operation GetFederationToken for usage and error information.
// //
// Returned Error Codes: // Returned Error Codes:
// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
// The request was rejected because the policy document was malformed. The error
// message describes the specific error.
// //
// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
// The request was rejected because the total packed size of the session policies // The request was rejected because the policy document was malformed. The error
// and session tags combined was too large. An Amazon Web Services conversion // message describes the specific error.
// compresses the session policy document, session policy ARNs, and session
// tags into a packed binary format that has a separate limit. The error message
// indicates by percentage how close the policies and tags are to the upper
// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
// in the IAM User Guide.
// //
// You could receive this error even though you meet other defined session policy // - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
// and session tag limits. For more information, see IAM and STS Entity Character // The request was rejected because the total packed size of the session policies
// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) // and session tags combined was too large. An Amazon Web Services conversion
// in the IAM User Guide. // compresses the session policy document, session policy ARNs, and session
// tags into a packed binary format that has a separate limit. The error message
// indicates by percentage how close the policies and tags are to the upper
// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
// in the IAM User Guide.
// //
// * ErrCodeRegionDisabledException "RegionDisabledException" // You could receive this error even though you meet other defined session policy
// STS is not activated in the requested region for the account that is being // and session tag limits. For more information, see IAM and STS Entity Character
// asked to generate credentials. The account administrator must use the IAM // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
// console to activate STS in that region. For more information, see Activating // in the IAM User Guide.
// and Deactivating Amazon Web Services STS in an Amazon Web Services Region //
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // - ErrCodeRegionDisabledException "RegionDisabledException"
// in the IAM User Guide. // STS is not activated in the requested region for the account that is being
// asked to generate credentials. The account administrator must use the IAM
// console to activate STS in that region. For more information, see Activating
// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) { func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) {
@ -1236,14 +1233,13 @@ const opGetSessionToken = "GetSessionToken"
// This method is useful when you want to inject custom logic or configuration // This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
// //
// // Example sending a request using the GetSessionTokenRequest method.
// req, resp := client.GetSessionTokenRequest(params)
// //
// // Example sending a request using the GetSessionTokenRequest method. // err := req.Send()
// req, resp := client.GetSessionTokenRequest(params) // if err == nil { // resp is now filled
// // fmt.Println(resp)
// err := req.Send() // }
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.Request, output *GetSessionTokenOutput) { func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.Request, output *GetSessionTokenOutput) {
@ -1285,7 +1281,7 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.
// see Permissions for GetSessionToken (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html) // see Permissions for GetSessionToken (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html)
// in the IAM User Guide. // in the IAM User Guide.
// //
// Session Duration // # Session Duration
// //
// The GetSessionToken operation must be called by using the long-term Amazon // The GetSessionToken operation must be called by using the long-term Amazon
// Web Services security credentials of the Amazon Web Services account root // Web Services security credentials of the Amazon Web Services account root
@ -1296,15 +1292,15 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.
// range from 900 seconds (15 minutes) up to 3,600 seconds (1 hour), with a // range from 900 seconds (15 minutes) up to 3,600 seconds (1 hour), with a
// default of 1 hour. // default of 1 hour.
// //
// Permissions // # Permissions
// //
// The temporary security credentials created by GetSessionToken can be used // The temporary security credentials created by GetSessionToken can be used
// to make API calls to any Amazon Web Services service with the following exceptions: // to make API calls to any Amazon Web Services service with the following exceptions:
// //
// * You cannot call any IAM API operations unless MFA authentication information // - You cannot call any IAM API operations unless MFA authentication information
// is included in the request. // is included in the request.
// //
// * You cannot call any STS API except AssumeRole or GetCallerIdentity. // - You cannot call any STS API except AssumeRole or GetCallerIdentity.
// //
// We recommend that you do not call GetSessionToken with Amazon Web Services // We recommend that you do not call GetSessionToken with Amazon Web Services
// account root user credentials. Instead, follow our best practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users) // account root user credentials. Instead, follow our best practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users)
@ -1330,13 +1326,13 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.
// API operation GetSessionToken for usage and error information. // API operation GetSessionToken for usage and error information.
// //
// Returned Error Codes: // Returned Error Codes:
// * ErrCodeRegionDisabledException "RegionDisabledException" // - ErrCodeRegionDisabledException "RegionDisabledException"
// STS is not activated in the requested region for the account that is being // STS is not activated in the requested region for the account that is being
// asked to generate credentials. The account administrator must use the IAM // asked to generate credentials. The account administrator must use the IAM
// console to activate STS in that region. For more information, see Activating // console to activate STS in that region. For more information, see Activating
// and Deactivating Amazon Web Services STS in an Amazon Web Services Region // and Deactivating Amazon Web Services STS in an Amazon Web Services Region
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide. // in the IAM User Guide.
// //
// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) { func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) {

View File

@ -14,7 +14,7 @@
// See sts package documentation for more information. // See sts package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/ // https://docs.aws.amazon.com/sdk-for-go/api/service/sts/
// //
// Using the Client // # Using the Client
// //
// To contact AWS Security Token Service with the SDK use the New function to create // To contact AWS Security Token Service with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service. // a new service client. With that client you can make API requests to the service.

View File

@ -39,13 +39,14 @@ const (
// aws.Config parameter to add your extra config. // aws.Config parameter to add your extra config.
// //
// Example: // Example:
// mySession := session.Must(session.NewSession())
// //
// // Create a STS client from just a session. // mySession := session.Must(session.NewSession())
// svc := sts.New(mySession)
// //
// // Create a STS client with additional configuration // // Create a STS client from just a session.
// svc := sts.New(mySession, aws.NewConfig().WithRegion("us-west-2")) // svc := sts.New(mySession)
//
// // Create a STS client with additional configuration
// svc := sts.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *STS { func New(p client.ConfigProvider, cfgs ...*aws.Config) *STS {
c := p.ClientConfig(EndpointsID, cfgs...) c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 { if c.SigningNameDerived || len(c.SigningName) == 0 {

View File

@ -23,37 +23,37 @@ import (
// can be stubbed out for unit testing your code with the SDK without needing // can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the SDK's request pipeline. // to inject custom request handlers into the SDK's request pipeline.
// //
// // myFunc uses an SDK service client to make a request to // // myFunc uses an SDK service client to make a request to
// // AWS Security Token Service. // // AWS Security Token Service.
// func myFunc(svc stsiface.STSAPI) bool { // func myFunc(svc stsiface.STSAPI) bool {
// // Make svc.AssumeRole request // // Make svc.AssumeRole request
// } // }
// //
// func main() { // func main() {
// sess := session.New() // sess := session.New()
// svc := sts.New(sess) // svc := sts.New(sess)
// //
// myFunc(svc) // myFunc(svc)
// } // }
// //
// In your _test.go file: // In your _test.go file:
// //
// // Define a mock struct to be used in your unit tests of myFunc. // // Define a mock struct to be used in your unit tests of myFunc.
// type mockSTSClient struct { // type mockSTSClient struct {
// stsiface.STSAPI // stsiface.STSAPI
// } // }
// func (m *mockSTSClient) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) { // func (m *mockSTSClient) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
// // mock response/functionality // // mock response/functionality
// } // }
// //
// func TestMyFunc(t *testing.T) { // func TestMyFunc(t *testing.T) {
// // Setup Test // // Setup Test
// mockSvc := &mockSTSClient{} // mockSvc := &mockSTSClient{}
// //
// myfunc(mockSvc) // myfunc(mockSvc)
// //
// // Verify myFunc's functionality // // Verify myFunc's functionality
// } // }
// //
// It is important to note that this interface will have breaking changes // It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators, // when the service model is updated and adds new API operations, paginators,

2
vendor/modules.txt vendored
View File

@ -20,7 +20,7 @@ github.com/armon/go-metrics
# github.com/armon/go-radix v1.0.0 # github.com/armon/go-radix v1.0.0
## explicit ## explicit
github.com/armon/go-radix github.com/armon/go-radix
# github.com/aws/aws-sdk-go v1.44.67 # github.com/aws/aws-sdk-go v1.44.82
## explicit; go 1.11 ## explicit; go 1.11
github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws
github.com/aws/aws-sdk-go/aws/awserr github.com/aws/aws-sdk-go/aws/awserr