mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: bump the github-dependencies group across 1 directory with 9 updates
Bumps the github-dependencies group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/IBM/keyprotect-go-client](https://github.com/IBM/keyprotect-go-client) | `0.12.2` | `0.14.1` | | [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.53.14` | `1.54.6` | | [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) | `1.28.1` | `1.29.1` | | [github.com/hashicorp/vault/api](https://github.com/hashicorp/vault) | `1.12.0` | `1.14.0` | | [github.com/kubernetes-csi/csi-lib-utils](https://github.com/kubernetes-csi/csi-lib-utils) | `0.17.0` | `0.18.1` | | [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) | `2.17.1` | `2.19.0` | | [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) | `1.18.0` | `1.19.1` | | [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) | `1.6.0` | `1.7.0` | Updates `github.com/IBM/keyprotect-go-client` from 0.12.2 to 0.14.1 - [Release notes](https://github.com/IBM/keyprotect-go-client/releases) - [Changelog](https://github.com/IBM/keyprotect-go-client/blob/master/CHANGELOG.md) - [Commits](https://github.com/IBM/keyprotect-go-client/compare/v0.12.2...v0.14.1) Updates `github.com/aws/aws-sdk-go` from 1.53.14 to 1.54.6 - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.53.14...v1.54.6) Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.28.1 to 1.29.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ecr/v1.28.1...service/s3/v1.29.1) Updates `github.com/hashicorp/vault/api` from 1.12.0 to 1.14.0 - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/vault/compare/v1.12.0...v1.14.0) Updates `github.com/kubernetes-csi/csi-lib-utils` from 0.17.0 to 0.18.1 - [Release notes](https://github.com/kubernetes-csi/csi-lib-utils/releases) - [Commits](https://github.com/kubernetes-csi/csi-lib-utils/compare/v0.17.0...v0.18.1) Updates `github.com/onsi/ginkgo/v2` from 2.17.1 to 2.19.0 - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.17.1...v2.19.0) Updates `github.com/onsi/gomega` from 1.32.0 to 1.33.1 - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.32.0...v1.33.1) Updates `github.com/prometheus/client_golang` from 1.18.0 to 1.19.1 - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.18.0...v1.19.1) Updates `github.com/Azure/azure-sdk-for-go/sdk/azidentity` from 1.6.0 to 1.7.0 - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.6.0...sdk/azcore/v1.7.0) --- updated-dependencies: - dependency-name: github.com/IBM/keyprotect-go-client dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/hashicorp/vault/api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/kubernetes-csi/csi-lib-utils dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
29dde7abc2
commit
171ba6a65d
18
vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go
generated
vendored
Normal file
18
vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
package aws
|
||||
|
||||
// AccountIDEndpointMode controls how a resolved AWS account ID is handled for endpoint routing.
|
||||
type AccountIDEndpointMode string
|
||||
|
||||
const (
|
||||
// AccountIDEndpointModeUnset indicates the AWS account ID will not be used for endpoint routing
|
||||
AccountIDEndpointModeUnset AccountIDEndpointMode = ""
|
||||
|
||||
// AccountIDEndpointModePreferred indicates the AWS account ID will be used for endpoint routing if present
|
||||
AccountIDEndpointModePreferred = "preferred"
|
||||
|
||||
// AccountIDEndpointModeRequired indicates an error will be returned if the AWS account ID is not resolved from identity
|
||||
AccountIDEndpointModeRequired = "required"
|
||||
|
||||
// AccountIDEndpointModeDisabled indicates the AWS account ID will be ignored during endpoint routing
|
||||
AccountIDEndpointModeDisabled = "disabled"
|
||||
)
|
3
vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
generated
vendored
3
vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
generated
vendored
@ -162,6 +162,9 @@ type Config struct {
|
||||
// This variable is sourced from environment variable AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES or
|
||||
// the shared config profile attribute request_min_compression_size_bytes
|
||||
RequestMinCompressSizeBytes int64
|
||||
|
||||
// Controls how a resolved AWS account ID is handled for endpoint routing.
|
||||
AccountIDEndpointMode AccountIDEndpointMode
|
||||
}
|
||||
|
||||
// NewConfig returns a new Config pointer that can be chained with builder
|
||||
|
3
vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
generated
vendored
3
vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
generated
vendored
@ -90,6 +90,9 @@ type Credentials struct {
|
||||
// The time the credentials will expire at. Should be ignored if CanExpire
|
||||
// is false.
|
||||
Expires time.Time
|
||||
|
||||
// The ID of the account for the credentials.
|
||||
AccountID string
|
||||
}
|
||||
|
||||
// Expired returns if the credentials have expired.
|
||||
|
26
vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go
generated
vendored
26
vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go
generated
vendored
@ -70,6 +70,10 @@ func GetUseFIPSEndpoint(options ...interface{}) (value FIPSEndpointState, found
|
||||
// The SDK will automatically resolve these endpoints per API client using an
|
||||
// internal endpoint resolvers. If you'd like to provide custom endpoint
|
||||
// resolving behavior you can implement the EndpointResolver interface.
|
||||
//
|
||||
// Deprecated: This structure was used with the global [EndpointResolver]
|
||||
// interface, which has been deprecated in favor of service-specific endpoint
|
||||
// resolution. See the deprecation docs on that interface for more information.
|
||||
type Endpoint struct {
|
||||
// The base URL endpoint the SDK API clients will use to make API calls to.
|
||||
// The SDK will suffix URI path and query elements to this endpoint.
|
||||
@ -124,6 +128,8 @@ type Endpoint struct {
|
||||
}
|
||||
|
||||
// EndpointSource is the endpoint source type.
|
||||
//
|
||||
// Deprecated: The global [Endpoint] structure is deprecated.
|
||||
type EndpointSource int
|
||||
|
||||
const (
|
||||
@ -161,19 +167,25 @@ func (e *EndpointNotFoundError) Unwrap() error {
|
||||
// API clients will fallback to attempting to resolve the endpoint using its
|
||||
// internal default endpoint resolver.
|
||||
//
|
||||
// Deprecated: See EndpointResolverWithOptions
|
||||
// Deprecated: The global endpoint resolution interface is deprecated. The API
|
||||
// for endpoint resolution is now unique to each service and is set via the
|
||||
// EndpointResolverV2 field on service client options. Setting a value for
|
||||
// EndpointResolver on aws.Config or service client options will prevent you
|
||||
// from using any endpoint-related service features released after the
|
||||
// introduction of EndpointResolverV2. You may also encounter broken or
|
||||
// unexpected behavior when using the old global interface with services that
|
||||
// use many endpoint-related customizations such as S3.
|
||||
type EndpointResolver interface {
|
||||
ResolveEndpoint(service, region string) (Endpoint, error)
|
||||
}
|
||||
|
||||
// EndpointResolverFunc wraps a function to satisfy the EndpointResolver interface.
|
||||
//
|
||||
// Deprecated: See EndpointResolverWithOptionsFunc
|
||||
// Deprecated: The global endpoint resolution interface is deprecated. See
|
||||
// deprecation docs on [EndpointResolver].
|
||||
type EndpointResolverFunc func(service, region string) (Endpoint, error)
|
||||
|
||||
// ResolveEndpoint calls the wrapped function and returns the results.
|
||||
//
|
||||
// Deprecated: See EndpointResolverWithOptions.ResolveEndpoint
|
||||
func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint, error) {
|
||||
return e(service, region)
|
||||
}
|
||||
@ -184,11 +196,17 @@ func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint,
|
||||
// available. If the EndpointResolverWithOptions returns an EndpointNotFoundError error,
|
||||
// API clients will fallback to attempting to resolve the endpoint using its
|
||||
// internal default endpoint resolver.
|
||||
//
|
||||
// Deprecated: The global endpoint resolution interface is deprecated. See
|
||||
// deprecation docs on [EndpointResolver].
|
||||
type EndpointResolverWithOptions interface {
|
||||
ResolveEndpoint(service, region string, options ...interface{}) (Endpoint, error)
|
||||
}
|
||||
|
||||
// EndpointResolverWithOptionsFunc wraps a function to satisfy the EndpointResolverWithOptions interface.
|
||||
//
|
||||
// Deprecated: The global endpoint resolution interface is deprecated. See
|
||||
// deprecation docs on [EndpointResolver].
|
||||
type EndpointResolverWithOptionsFunc func(service, region string, options ...interface{}) (Endpoint, error)
|
||||
|
||||
// ResolveEndpoint calls the wrapped function and returns the results.
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package aws
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.25.2"
|
||||
const goModuleVersion = "1.30.0"
|
||||
|
5
vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go
generated
vendored
5
vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go
generated
vendored
@ -112,6 +112,8 @@ type MetricData struct {
|
||||
ResolveEndpointStartTime time.Time
|
||||
ResolveEndpointEndTime time.Time
|
||||
EndpointResolutionDuration time.Duration
|
||||
GetIdentityStartTime time.Time
|
||||
GetIdentityEndTime time.Time
|
||||
InThroughput float64
|
||||
OutThroughput float64
|
||||
RetryCount int
|
||||
@ -122,6 +124,7 @@ type MetricData struct {
|
||||
OperationName string
|
||||
PartitionID string
|
||||
Region string
|
||||
UserAgent string
|
||||
RequestContentLength int64
|
||||
Stream StreamMetrics
|
||||
Attempts []AttemptMetrics
|
||||
@ -144,8 +147,6 @@ type AttemptMetrics struct {
|
||||
ConnRequestedTime time.Time
|
||||
ConnObtainedTime time.Time
|
||||
ConcurrencyAcquireDuration time.Duration
|
||||
CredentialFetchStartTime time.Time
|
||||
CredentialFetchEndTime time.Time
|
||||
SignStartTime time.Time
|
||||
SignEndTime time.Time
|
||||
SigningDuration time.Duration
|
||||
|
44
vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
generated
vendored
44
vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
generated
vendored
@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
@ -30,6 +31,7 @@ const (
|
||||
FrameworkMetadata
|
||||
AdditionalMetadata
|
||||
ApplicationIdentifier
|
||||
FeatureMetadata2
|
||||
)
|
||||
|
||||
func (k SDKAgentKeyType) string() string {
|
||||
@ -50,6 +52,8 @@ func (k SDKAgentKeyType) string() string {
|
||||
return "lib"
|
||||
case ApplicationIdentifier:
|
||||
return "app"
|
||||
case FeatureMetadata2:
|
||||
return "m"
|
||||
case AdditionalMetadata:
|
||||
fallthrough
|
||||
default:
|
||||
@ -64,9 +68,29 @@ var validChars = map[rune]bool{
|
||||
'-': true, '.': true, '^': true, '_': true, '`': true, '|': true, '~': true,
|
||||
}
|
||||
|
||||
// UserAgentFeature enumerates tracked SDK features.
|
||||
type UserAgentFeature string
|
||||
|
||||
// Enumerates UserAgentFeature.
|
||||
const (
|
||||
UserAgentFeatureResourceModel UserAgentFeature = "A" // n/a (we don't generate separate resource types)
|
||||
UserAgentFeatureWaiter = "B"
|
||||
UserAgentFeaturePaginator = "C"
|
||||
UserAgentFeatureRetryModeLegacy = "D" // n/a (equivalent to standard)
|
||||
UserAgentFeatureRetryModeStandard = "E"
|
||||
UserAgentFeatureRetryModeAdaptive = "F"
|
||||
UserAgentFeatureS3Transfer = "G"
|
||||
UserAgentFeatureS3CryptoV1N = "H" // n/a (crypto client is external)
|
||||
UserAgentFeatureS3CryptoV2 = "I" // n/a
|
||||
UserAgentFeatureS3ExpressBucket = "J"
|
||||
UserAgentFeatureS3AccessGrants = "K" // not yet implemented
|
||||
UserAgentFeatureGZIPRequestCompression = "L"
|
||||
)
|
||||
|
||||
// RequestUserAgent is a build middleware that set the User-Agent for the request.
|
||||
type RequestUserAgent struct {
|
||||
sdkAgent, userAgent *smithyhttp.UserAgentBuilder
|
||||
features map[UserAgentFeature]struct{}
|
||||
}
|
||||
|
||||
// NewRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the
|
||||
@ -87,6 +111,7 @@ func NewRequestUserAgent() *RequestUserAgent {
|
||||
r := &RequestUserAgent{
|
||||
sdkAgent: sdkAgent,
|
||||
userAgent: userAgent,
|
||||
features: map[UserAgentFeature]struct{}{},
|
||||
}
|
||||
|
||||
addSDKMetadata(r)
|
||||
@ -191,6 +216,12 @@ func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string) {
|
||||
u.userAgent.AddKeyValue(strings.Map(rules, key), strings.Map(rules, value))
|
||||
}
|
||||
|
||||
// AddUserAgentFeature adds the feature ID to the tracking list to be emitted
|
||||
// in the final User-Agent string.
|
||||
func (u *RequestUserAgent) AddUserAgentFeature(feature UserAgentFeature) {
|
||||
u.features[feature] = struct{}{}
|
||||
}
|
||||
|
||||
// AddSDKAgentKey adds the component identified by name to the User-Agent string.
|
||||
func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) {
|
||||
// TODO: should target sdkAgent
|
||||
@ -227,6 +258,9 @@ func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildI
|
||||
func (u *RequestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) {
|
||||
const userAgent = "User-Agent"
|
||||
updateHTTPHeader(request, userAgent, u.userAgent.Build())
|
||||
if len(u.features) > 0 {
|
||||
updateHTTPHeader(request, userAgent, buildFeatureMetrics(u.features))
|
||||
}
|
||||
}
|
||||
|
||||
func (u *RequestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) {
|
||||
@ -259,3 +293,13 @@ func rules(r rune) rune {
|
||||
return '-'
|
||||
}
|
||||
}
|
||||
|
||||
func buildFeatureMetrics(features map[UserAgentFeature]struct{}) string {
|
||||
fs := make([]string, 0, len(features))
|
||||
for f := range features {
|
||||
fs = append(fs, string(f))
|
||||
}
|
||||
|
||||
sort.Strings(fs)
|
||||
return fmt.Sprintf("%s/%s", FeatureMetadata2.string(), strings.Join(fs, ","))
|
||||
}
|
||||
|
20
vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/none.go
generated
vendored
Normal file
20
vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/none.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
package ratelimit
|
||||
|
||||
import "context"
|
||||
|
||||
// None implements a no-op rate limiter which effectively disables client-side
|
||||
// rate limiting (also known as "retry quotas").
|
||||
//
|
||||
// GetToken does nothing and always returns a nil error. The returned
|
||||
// token-release function does nothing, and always returns a nil error.
|
||||
//
|
||||
// AddTokens does nothing and always returns a nil error.
|
||||
var None = &none{}
|
||||
|
||||
type none struct{}
|
||||
|
||||
func (*none) GetToken(ctx context.Context, cost uint) (func() error, error) {
|
||||
return func() error { return nil }, nil
|
||||
}
|
||||
|
||||
func (*none) AddTokens(v uint) error { return nil }
|
45
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
generated
vendored
45
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
generated
vendored
@ -2,12 +2,15 @@ package retry
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
@ -39,6 +42,10 @@ type Attempt struct {
|
||||
requestCloner RequestCloner
|
||||
}
|
||||
|
||||
// define the threshold at which we will consider certain kind of errors to be probably
|
||||
// caused by clock skew
|
||||
const skewThreshold = 4 * time.Minute
|
||||
|
||||
// NewAttemptMiddleware returns a new Attempt retry middleware.
|
||||
func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optFns ...func(*Attempt)) *Attempt {
|
||||
m := &Attempt{
|
||||
@ -86,6 +93,9 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn
|
||||
AttemptClockSkew: attemptClockSkew,
|
||||
})
|
||||
|
||||
// Setting clock skew to be used on other context (like signing)
|
||||
ctx = internalcontext.SetAttemptSkewContext(ctx, attemptClockSkew)
|
||||
|
||||
var attemptResult AttemptResult
|
||||
out, attemptResult, releaseRetryToken, err = r.handleAttempt(attemptCtx, attemptInput, releaseRetryToken, next)
|
||||
attemptClockSkew, _ = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata)
|
||||
@ -185,6 +195,8 @@ func (r *Attempt) handleAttempt(
|
||||
return out, attemptResult, nopRelease, err
|
||||
}
|
||||
|
||||
err = wrapAsClockSkew(ctx, err)
|
||||
|
||||
//------------------------------
|
||||
// Is Retryable and Should Retry
|
||||
//------------------------------
|
||||
@ -247,6 +259,37 @@ func (r *Attempt) handleAttempt(
|
||||
return out, attemptResult, releaseRetryToken, err
|
||||
}
|
||||
|
||||
// errors that, if detected when we know there's a clock skew,
|
||||
// can be retried and have a high chance of success
|
||||
var possibleSkewCodes = map[string]struct{}{
|
||||
"InvalidSignatureException": {},
|
||||
"SignatureDoesNotMatch": {},
|
||||
"AuthFailure": {},
|
||||
}
|
||||
|
||||
var definiteSkewCodes = map[string]struct{}{
|
||||
"RequestExpired": {},
|
||||
"RequestInTheFuture": {},
|
||||
"RequestTimeTooSkewed": {},
|
||||
}
|
||||
|
||||
// wrapAsClockSkew checks if this error could be related to a clock skew
|
||||
// error and if so, wrap the error.
|
||||
func wrapAsClockSkew(ctx context.Context, err error) error {
|
||||
var v interface{ ErrorCode() string }
|
||||
if !errors.As(err, &v) {
|
||||
return err
|
||||
}
|
||||
if _, ok := definiteSkewCodes[v.ErrorCode()]; ok {
|
||||
return &retryableClockSkewError{Err: err}
|
||||
}
|
||||
_, isPossibleSkewCode := possibleSkewCodes[v.ErrorCode()]
|
||||
if skew := internalcontext.GetAttemptSkewContext(ctx); skew > skewThreshold && isPossibleSkewCode {
|
||||
return &retryableClockSkewError{Err: err}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// MetricsHeader attaches SDK request metric header for retries to the transport
|
||||
type MetricsHeader struct{}
|
||||
|
||||
|
21
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
generated
vendored
21
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
generated
vendored
@ -2,6 +2,7 @@ package retry
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/url"
|
||||
"strings"
|
||||
@ -199,3 +200,23 @@ func (r RetryableErrorCode) IsErrorRetryable(err error) aws.Ternary {
|
||||
|
||||
return aws.TrueTernary
|
||||
}
|
||||
|
||||
// retryableClockSkewError marks errors that can be caused by clock skew
|
||||
// (difference between server time and client time).
|
||||
// This is returned when there's certain confidence that adjusting the client time
|
||||
// could allow a retry to succeed
|
||||
type retryableClockSkewError struct{ Err error }
|
||||
|
||||
func (e *retryableClockSkewError) Error() string {
|
||||
return fmt.Sprintf("Probable clock skew error: %v", e.Err)
|
||||
}
|
||||
|
||||
// Unwrap returns the wrapped error.
|
||||
func (e *retryableClockSkewError) Unwrap() error {
|
||||
return e.Err
|
||||
}
|
||||
|
||||
// RetryableError allows the retryer to retry this request
|
||||
func (e *retryableClockSkewError) RetryableError() bool {
|
||||
return true
|
||||
}
|
||||
|
11
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go
generated
vendored
11
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go
generated
vendored
@ -123,6 +123,17 @@ type StandardOptions struct {
|
||||
|
||||
// Provides the rate limiting strategy for rate limiting attempt retries
|
||||
// across all attempts the retryer is being used with.
|
||||
//
|
||||
// A RateLimiter operates as a token bucket with a set capacity, where
|
||||
// attempt failures events consume tokens. A retry attempt that attempts to
|
||||
// consume more tokens than what's available results in operation failure.
|
||||
// The default implementation is parameterized as follows:
|
||||
// - a capacity of 500 (DefaultRetryRateTokens)
|
||||
// - a retry caused by a timeout costs 10 tokens (DefaultRetryCost)
|
||||
// - a retry caused by other errors costs 5 tokens (DefaultRetryTimeoutCost)
|
||||
// - an operation that succeeds on the 1st attempt adds 1 token (DefaultNoRetryIncrement)
|
||||
//
|
||||
// You can disable rate limiting by setting this field to ratelimit.None.
|
||||
RateLimiter RateLimiter
|
||||
|
||||
// The cost to deduct from the RateLimiter's token bucket per retry.
|
||||
|
1
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
generated
vendored
1
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
generated
vendored
@ -38,7 +38,6 @@ var RequiredSignedHeaders = Rules{
|
||||
"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{},
|
||||
"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{},
|
||||
"X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
|
||||
"X-Amz-Expected-Bucket-Owner": struct{}{},
|
||||
"X-Amz-Grant-Full-control": struct{}{},
|
||||
"X-Amz-Grant-Read": struct{}{},
|
||||
"X-Amz-Grant-Read-Acp": struct{}{},
|
||||
|
29
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
generated
vendored
29
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
generated
vendored
@ -11,7 +11,6 @@ import (
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
|
||||
v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4"
|
||||
internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
@ -301,22 +300,7 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
|
||||
return out, metadata, &SigningError{Err: fmt.Errorf("computed payload hash missing from context")}
|
||||
}
|
||||
|
||||
mctx := metrics.Context(ctx)
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.CredentialFetchStartTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
credentials, err := s.credentialsProvider.Retrieve(ctx)
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.CredentialFetchEndTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)}
|
||||
}
|
||||
@ -337,20 +321,7 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
|
||||
})
|
||||
}
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.SignStartTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, signingRegion, sdk.NowTime(), signerOptions...)
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.SignEndTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)}
|
||||
}
|
||||
|
61
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
generated
vendored
61
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
generated
vendored
@ -1,48 +1,41 @@
|
||||
// Package v4 implements signing for AWS V4 signer
|
||||
// Package v4 implements the AWS signature version 4 algorithm (commonly known
|
||||
// as SigV4).
|
||||
//
|
||||
// Provides request signing for request that need to be signed with
|
||||
// AWS V4 Signatures.
|
||||
// For more information about SigV4, see [Signing AWS API requests] in the IAM
|
||||
// user guide.
|
||||
//
|
||||
// # Standalone Signer
|
||||
// While this implementation CAN work in an external context, it is developed
|
||||
// primarily for SDK use and you may encounter fringe behaviors around header
|
||||
// canonicalization.
|
||||
//
|
||||
// Generally using the signer outside of the SDK should not require any additional
|
||||
// # Pre-escaping a request URI
|
||||
//
|
||||
// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires
|
||||
// AWS v4 signature validation requires that the canonical string's URI path
|
||||
// component must be the escaped form of the HTTP request's path.
|
||||
//
|
||||
// additional escaping you many need to use the URL.Opaque to define what the raw URI should be sent
|
||||
// to the service as.
|
||||
// The Go HTTP client will perform escaping automatically on the HTTP request.
|
||||
// This may cause signature validation errors because the request differs from
|
||||
// the URI path or query from which the signature was generated.
|
||||
//
|
||||
// The signer will first check the URL.Opaque field, and use its value if set.
|
||||
// The signer does require the URL.Opaque field to be set in the form of:
|
||||
// Because of this, we recommend that you explicitly escape the request when
|
||||
// using this signer outside of the SDK to prevent possible signature mismatch.
|
||||
// This can be done by setting URL.Opaque on the request. The signer will
|
||||
// prefer that value, falling back to the return of URL.EscapedPath if unset.
|
||||
//
|
||||
// When setting URL.Opaque you must do so in the form of:
|
||||
//
|
||||
// "//<hostname>/<path>"
|
||||
//
|
||||
// // e.g.
|
||||
// "//example.com/some/path"
|
||||
//
|
||||
// The leading "//" and hostname are required or the URL.Opaque escaping will
|
||||
// not work correctly.
|
||||
// The leading "//" and hostname are required or the escaping will not work
|
||||
// correctly.
|
||||
//
|
||||
// If URL.Opaque is not set the signer will fallback to the URL.EscapedPath()
|
||||
// method and using the returned value.
|
||||
// The TestStandaloneSign unit test provides a complete example of using the
|
||||
// signer outside of the SDK and pre-escaping the URI path.
|
||||
//
|
||||
// AWS v4 signature validation requires that the canonical string's URI path
|
||||
// element must be the URI escaped form of the HTTP request's path.
|
||||
// http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
|
||||
//
|
||||
// The Go HTTP client will perform escaping automatically on the request. Some
|
||||
// of these escaping may cause signature validation errors because the HTTP
|
||||
// request differs from the URI path or query that the signature was generated.
|
||||
// https://golang.org/pkg/net/url/#URL.EscapedPath
|
||||
//
|
||||
// Because of this, it is recommended that when using the signer outside of the
|
||||
// SDK that explicitly escaping the request prior to being signed is preferable,
|
||||
// and will help prevent signature validation errors. This can be done by setting
|
||||
// the URL.Opaque or URL.RawPath. The SDK will use URL.Opaque first and then
|
||||
// call URL.EscapedPath() if Opaque is not set.
|
||||
//
|
||||
// Test `TestStandaloneSign` provides a complete example of using the signer
|
||||
// outside of the SDK and pre-escaping the URI path.
|
||||
// [Signing AWS API requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html
|
||||
package v4
|
||||
|
||||
import (
|
||||
@ -402,6 +395,12 @@ func buildQuery(r v4Internal.Rule, header http.Header) (url.Values, http.Header)
|
||||
query := url.Values{}
|
||||
unsignedHeaders := http.Header{}
|
||||
for k, h := range header {
|
||||
// literally just this header has this constraint for some stupid reason,
|
||||
// see #2508
|
||||
if k == "X-Amz-Expected-Bucket-Owner" {
|
||||
k = "x-amz-expected-bucket-owner"
|
||||
}
|
||||
|
||||
if r.IsValid(k) {
|
||||
query[k] = h
|
||||
} else {
|
||||
|
6
vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go
generated
vendored
6
vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go
generated
vendored
@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
"github.com/aws/smithy-go"
|
||||
"github.com/aws/smithy-go/auth"
|
||||
@ -39,7 +40,10 @@ func (v *V4SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request
|
||||
}
|
||||
|
||||
hash := v4.GetPayloadHash(ctx)
|
||||
err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, region, sdk.NowTime(), func(o *v4.SignerOptions) {
|
||||
signingTime := sdk.NowTime()
|
||||
skew := internalcontext.GetAttemptSkewContext(ctx)
|
||||
signingTime = signingTime.Add(skew)
|
||||
err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, region, signingTime, func(o *v4.SignerOptions) {
|
||||
o.DisableURIPathEscaping, _ = smithyhttp.GetDisableDoubleEncoding(&props)
|
||||
|
||||
o.Logger = v.Logger
|
||||
|
40
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
generated
vendored
40
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
generated
vendored
@ -1,3 +1,43 @@
|
||||
# v1.3.12 (2024-06-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.11 (2024-06-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.10 (2024-06-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.9 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.8 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.7 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.6 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.5 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.4 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.3 (2024-03-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.2 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package configsources
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.3.2"
|
||||
const goModuleVersion = "1.3.12"
|
||||
|
52
vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go
generated
vendored
Normal file
52
vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
type s3BackendKey struct{}
|
||||
type checksumInputAlgorithmKey struct{}
|
||||
type clockSkew struct{}
|
||||
|
||||
const (
|
||||
// S3BackendS3Express identifies the S3Express backend
|
||||
S3BackendS3Express = "S3Express"
|
||||
)
|
||||
|
||||
// SetS3Backend stores the resolved endpoint backend within the request
|
||||
// context, which is required for a variety of custom S3 behaviors.
|
||||
func SetS3Backend(ctx context.Context, typ string) context.Context {
|
||||
return middleware.WithStackValue(ctx, s3BackendKey{}, typ)
|
||||
}
|
||||
|
||||
// GetS3Backend retrieves the stored endpoint backend within the context.
|
||||
func GetS3Backend(ctx context.Context) string {
|
||||
v, _ := middleware.GetStackValue(ctx, s3BackendKey{}).(string)
|
||||
return v
|
||||
}
|
||||
|
||||
// SetChecksumInputAlgorithm sets the request checksum algorithm on the
|
||||
// context.
|
||||
func SetChecksumInputAlgorithm(ctx context.Context, value string) context.Context {
|
||||
return middleware.WithStackValue(ctx, checksumInputAlgorithmKey{}, value)
|
||||
}
|
||||
|
||||
// GetChecksumInputAlgorithm returns the checksum algorithm from the context.
|
||||
func GetChecksumInputAlgorithm(ctx context.Context) string {
|
||||
v, _ := middleware.GetStackValue(ctx, checksumInputAlgorithmKey{}).(string)
|
||||
return v
|
||||
}
|
||||
|
||||
// SetAttemptSkewContext sets the clock skew value on the context
|
||||
func SetAttemptSkewContext(ctx context.Context, v time.Duration) context.Context {
|
||||
return middleware.WithStackValue(ctx, clockSkew{}, v)
|
||||
}
|
||||
|
||||
// GetAttemptSkewContext gets the clock skew value from the context
|
||||
func GetAttemptSkewContext(ctx context.Context) time.Duration {
|
||||
x, _ := middleware.GetStackValue(ctx, clockSkew{}).(time.Duration)
|
||||
return x
|
||||
}
|
11
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go
generated
vendored
11
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go
generated
vendored
@ -12,11 +12,12 @@ type Partition struct {
|
||||
|
||||
// PartitionConfig provides the endpoint metadata for an AWS region or partition.
|
||||
type PartitionConfig struct {
|
||||
Name string `json:"name"`
|
||||
DnsSuffix string `json:"dnsSuffix"`
|
||||
DualStackDnsSuffix string `json:"dualStackDnsSuffix"`
|
||||
SupportsFIPS bool `json:"supportsFIPS"`
|
||||
SupportsDualStack bool `json:"supportsDualStack"`
|
||||
Name string `json:"name"`
|
||||
DnsSuffix string `json:"dnsSuffix"`
|
||||
DualStackDnsSuffix string `json:"dualStackDnsSuffix"`
|
||||
SupportsFIPS bool `json:"supportsFIPS"`
|
||||
SupportsDualStack bool `json:"supportsDualStack"`
|
||||
ImplicitGlobalRegion string `json:"implicitGlobalRegion"`
|
||||
}
|
||||
|
||||
type RegionOverrides struct {
|
||||
|
94
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go
generated
vendored
94
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go
generated
vendored
@ -13,11 +13,12 @@ var partitions = []Partition{
|
||||
ID: "aws",
|
||||
RegionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws",
|
||||
DnsSuffix: "amazonaws.com",
|
||||
DualStackDnsSuffix: "api.aws",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: true,
|
||||
Name: "aws",
|
||||
DnsSuffix: "amazonaws.com",
|
||||
DualStackDnsSuffix: "api.aws",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: true,
|
||||
ImplicitGlobalRegion: "us-east-1",
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"af-south-1": {
|
||||
@ -111,6 +112,13 @@ var partitions = []Partition{
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ca-west-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"eu-central-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
@ -229,11 +237,12 @@ var partitions = []Partition{
|
||||
ID: "aws-cn",
|
||||
RegionRegex: "^cn\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-cn",
|
||||
DnsSuffix: "amazonaws.com.cn",
|
||||
DualStackDnsSuffix: "api.amazonwebservices.com.cn",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: true,
|
||||
Name: "aws-cn",
|
||||
DnsSuffix: "amazonaws.com.cn",
|
||||
DualStackDnsSuffix: "api.amazonwebservices.com.cn",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: true,
|
||||
ImplicitGlobalRegion: "cn-northwest-1",
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"aws-cn-global": {
|
||||
@ -263,11 +272,12 @@ var partitions = []Partition{
|
||||
ID: "aws-us-gov",
|
||||
RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-us-gov",
|
||||
DnsSuffix: "amazonaws.com",
|
||||
DualStackDnsSuffix: "api.aws",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: true,
|
||||
Name: "aws-us-gov",
|
||||
DnsSuffix: "amazonaws.com",
|
||||
DualStackDnsSuffix: "api.aws",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: true,
|
||||
ImplicitGlobalRegion: "us-gov-west-1",
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"aws-us-gov-global": {
|
||||
@ -297,11 +307,12 @@ var partitions = []Partition{
|
||||
ID: "aws-iso",
|
||||
RegionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-iso",
|
||||
DnsSuffix: "c2s.ic.gov",
|
||||
DualStackDnsSuffix: "c2s.ic.gov",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
Name: "aws-iso",
|
||||
DnsSuffix: "c2s.ic.gov",
|
||||
DualStackDnsSuffix: "c2s.ic.gov",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
ImplicitGlobalRegion: "us-iso-east-1",
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"aws-iso-global": {
|
||||
@ -331,11 +342,12 @@ var partitions = []Partition{
|
||||
ID: "aws-iso-b",
|
||||
RegionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-iso-b",
|
||||
DnsSuffix: "sc2s.sgov.gov",
|
||||
DualStackDnsSuffix: "sc2s.sgov.gov",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
Name: "aws-iso-b",
|
||||
DnsSuffix: "sc2s.sgov.gov",
|
||||
DualStackDnsSuffix: "sc2s.sgov.gov",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
ImplicitGlobalRegion: "us-isob-east-1",
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"aws-iso-b-global": {
|
||||
@ -358,23 +370,33 @@ var partitions = []Partition{
|
||||
ID: "aws-iso-e",
|
||||
RegionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-iso-e",
|
||||
DnsSuffix: "cloud.adc-e.uk",
|
||||
DualStackDnsSuffix: "cloud.adc-e.uk",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
Name: "aws-iso-e",
|
||||
DnsSuffix: "cloud.adc-e.uk",
|
||||
DualStackDnsSuffix: "cloud.adc-e.uk",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
ImplicitGlobalRegion: "eu-isoe-west-1",
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"eu-isoe-west-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
},
|
||||
Regions: map[string]RegionOverrides{},
|
||||
},
|
||||
{
|
||||
ID: "aws-iso-f",
|
||||
RegionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-iso-f",
|
||||
DnsSuffix: "csp.hci.ic.gov",
|
||||
DualStackDnsSuffix: "csp.hci.ic.gov",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
Name: "aws-iso-f",
|
||||
DnsSuffix: "csp.hci.ic.gov",
|
||||
DualStackDnsSuffix: "csp.hci.ic.gov",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
ImplicitGlobalRegion: "us-isof-south-1",
|
||||
},
|
||||
Regions: map[string]RegionOverrides{},
|
||||
},
|
||||
|
6
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
generated
vendored
6
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
generated
vendored
@ -198,7 +198,11 @@
|
||||
"supportsFIPS" : true
|
||||
},
|
||||
"regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$",
|
||||
"regions" : { }
|
||||
"regions" : {
|
||||
"eu-isoe-west-1" : {
|
||||
"description" : "EU ISOE West"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id" : "aws-iso-f",
|
||||
"outputs" : {
|
||||
|
41
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
generated
vendored
41
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
generated
vendored
@ -1,3 +1,44 @@
|
||||
# v2.6.12 (2024-06-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.11 (2024-06-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.10 (2024-06-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.9 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.8 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.7 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.6 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.5 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.4 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.3 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.6.2 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package endpoints
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "2.6.2"
|
||||
const goModuleVersion = "2.6.12"
|
||||
|
42
vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go
generated
vendored
Normal file
42
vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
// AddTimeOffsetMiddleware sets a value representing clock skew on the request context.
|
||||
// This can be read by other operations (such as signing) to correct the date value they send
|
||||
// on the request
|
||||
type AddTimeOffsetMiddleware struct {
|
||||
Offset *atomic.Int64
|
||||
}
|
||||
|
||||
// ID the identifier for AddTimeOffsetMiddleware
|
||||
func (m *AddTimeOffsetMiddleware) ID() string { return "AddTimeOffsetMiddleware" }
|
||||
|
||||
// HandleBuild sets a value for attemptSkew on the request context if one is set on the client.
|
||||
func (m AddTimeOffsetMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
|
||||
out middleware.BuildOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
if m.Offset != nil {
|
||||
offset := time.Duration(m.Offset.Load())
|
||||
ctx = internalcontext.SetAttemptSkewContext(ctx, offset)
|
||||
}
|
||||
return next.HandleBuild(ctx, in)
|
||||
}
|
||||
|
||||
// HandleDeserialize gets the clock skew context from the context, and if set, sets it on the pointer
|
||||
// held by AddTimeOffsetMiddleware
|
||||
func (m *AddTimeOffsetMiddleware) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
||||
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
if v := internalcontext.GetAttemptSkewContext(ctx); v != 0 {
|
||||
m.Offset.Store(v.Nanoseconds())
|
||||
}
|
||||
return next.HandleDeserialize(ctx, in)
|
||||
}
|
4
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
generated
vendored
4
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
generated
vendored
@ -1,3 +1,7 @@
|
||||
# v1.11.2 (2024-03-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.11.1 (2024-02-21)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
@ -3,4 +3,4 @@
|
||||
package acceptencoding
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.11.1"
|
||||
const goModuleVersion = "1.11.2"
|
||||
|
49
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
49
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
@ -1,3 +1,52 @@
|
||||
# v1.11.14 (2024-06-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.13 (2024-06-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.12 (2024-06-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.11 (2024-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.10 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.9 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.8 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.7 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.6 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.5 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.4 (2024-03-05)
|
||||
|
||||
* **Bug Fix**: Restore typo'd API `AddAsIsInternalPresigingMiddleware` as an alias for backwards compatibility.
|
||||
|
||||
# v1.11.3 (2024-03-04)
|
||||
|
||||
* **Bug Fix**: Correct a typo in internal AddAsIsPresigningMiddleware API.
|
||||
|
||||
# v1.11.2 (2024-02-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
12
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go
generated
vendored
12
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go
generated
vendored
@ -27,13 +27,21 @@ func GetIsPresigning(ctx context.Context) bool {
|
||||
|
||||
type isPresigningKey struct{}
|
||||
|
||||
// AddAsIsPresigingMiddleware adds a middleware to the head of the stack that
|
||||
// AddAsIsPresigningMiddleware adds a middleware to the head of the stack that
|
||||
// will update the stack's context to be flagged as being invoked for the
|
||||
// purpose of presigning.
|
||||
func AddAsIsPresigingMiddleware(stack *middleware.Stack) error {
|
||||
func AddAsIsPresigningMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(asIsPresigningMiddleware{}, middleware.Before)
|
||||
}
|
||||
|
||||
// AddAsIsPresigingMiddleware is an alias for backwards compatibility.
|
||||
//
|
||||
// Deprecated: This API was released with a typo. Use
|
||||
// [AddAsIsPresigningMiddleware] instead.
|
||||
func AddAsIsPresigingMiddleware(stack *middleware.Stack) error {
|
||||
return AddAsIsPresigningMiddleware(stack)
|
||||
}
|
||||
|
||||
type asIsPresigningMiddleware struct{}
|
||||
|
||||
func (asIsPresigningMiddleware) ID() string { return "AsIsPresigningMiddleware" }
|
||||
|
@ -3,4 +3,4 @@
|
||||
package presignedurl
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.11.2"
|
||||
const goModuleVersion = "1.11.14"
|
||||
|
60
vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
generated
vendored
60
vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
generated
vendored
@ -1,3 +1,63 @@
|
||||
# v1.29.1 (2024-06-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.29.0 (2024-06-18)
|
||||
|
||||
* **Feature**: Track usage of various AWS SDK features in user-agent string.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.13 (2024-06-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.12 (2024-06-07)
|
||||
|
||||
* **Bug Fix**: Add clock skew correction on all service clients
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.11 (2024-06-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.10 (2024-05-23)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.28.9 (2024-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.8 (2024-05-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.7 (2024-05-08)
|
||||
|
||||
* **Bug Fix**: GoDoc improvement
|
||||
|
||||
# v1.28.6 (2024-03-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.5 (2024-03-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.4 (2024-03-07)
|
||||
|
||||
* **Bug Fix**: Remove dependency on go-cmp.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.3 (2024-03-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.2 (2024-03-04)
|
||||
|
||||
* **Bug Fix**: Update internal/presigned-url dependency for corrected API name.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.1 (2024-02-23)
|
||||
|
||||
* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
|
||||
|
110
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
generated
vendored
110
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
generated
vendored
@ -15,15 +15,18 @@ import (
|
||||
internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
|
||||
internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
|
||||
internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
|
||||
internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware"
|
||||
acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding"
|
||||
presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url"
|
||||
smithy "github.com/aws/smithy-go"
|
||||
smithyauth "github.com/aws/smithy-go/auth"
|
||||
smithydocument "github.com/aws/smithy-go/document"
|
||||
"github.com/aws/smithy-go/logging"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"net"
|
||||
"net/http"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -34,6 +37,9 @@ const ServiceAPIVersion = "2011-06-15"
|
||||
// Service.
|
||||
type Client struct {
|
||||
options Options
|
||||
|
||||
// Difference between the time reported by the server and the client
|
||||
timeOffset *atomic.Int64
|
||||
}
|
||||
|
||||
// New returns an initialized Client based on the functional options. Provide
|
||||
@ -72,6 +78,8 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
||||
options: options,
|
||||
}
|
||||
|
||||
initializeTimeOffsetResolver(client)
|
||||
|
||||
return client
|
||||
}
|
||||
|
||||
@ -233,15 +241,16 @@ func setResolvedDefaultsMode(o *Options) {
|
||||
// NewFromConfig returns a new client from the provided config.
|
||||
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
||||
opts := Options{
|
||||
Region: cfg.Region,
|
||||
DefaultsMode: cfg.DefaultsMode,
|
||||
RuntimeEnvironment: cfg.RuntimeEnvironment,
|
||||
HTTPClient: cfg.HTTPClient,
|
||||
Credentials: cfg.Credentials,
|
||||
APIOptions: cfg.APIOptions,
|
||||
Logger: cfg.Logger,
|
||||
ClientLogMode: cfg.ClientLogMode,
|
||||
AppID: cfg.AppID,
|
||||
Region: cfg.Region,
|
||||
DefaultsMode: cfg.DefaultsMode,
|
||||
RuntimeEnvironment: cfg.RuntimeEnvironment,
|
||||
HTTPClient: cfg.HTTPClient,
|
||||
Credentials: cfg.Credentials,
|
||||
APIOptions: cfg.APIOptions,
|
||||
Logger: cfg.Logger,
|
||||
ClientLogMode: cfg.ClientLogMode,
|
||||
AppID: cfg.AppID,
|
||||
AccountIDEndpointMode: cfg.AccountIDEndpointMode,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
@ -445,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error {
|
||||
return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
|
||||
}
|
||||
|
||||
func addIsWaiterUserAgent(o *Options) {
|
||||
o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
|
||||
ua, err := getOrAddRequestUserAgent(stack)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func addIsPaginatorUserAgent(o *Options) {
|
||||
o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
|
||||
ua, err := getOrAddRequestUserAgent(stack)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func addRetry(stack *middleware.Stack, o Options) error {
|
||||
attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
|
||||
m.LogAttempts = o.ClientLogMode.IsRetries()
|
||||
@ -488,6 +521,63 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string {
|
||||
if mode == aws.AccountIDEndpointModeDisabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" {
|
||||
return aws.String(ca.Credentials.AccountID)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error {
|
||||
mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset}
|
||||
if err := stack.Build.Add(&mw, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before)
|
||||
}
|
||||
func initializeTimeOffsetResolver(c *Client) {
|
||||
c.timeOffset = new(atomic.Int64)
|
||||
}
|
||||
|
||||
func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error {
|
||||
switch mode {
|
||||
case aws.AccountIDEndpointModeUnset:
|
||||
case aws.AccountIDEndpointModePreferred:
|
||||
case aws.AccountIDEndpointModeDisabled:
|
||||
case aws.AccountIDEndpointModeRequired:
|
||||
if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok {
|
||||
return fmt.Errorf("accountID is required but not set")
|
||||
} else if ca.Credentials.AccountID == "" {
|
||||
return fmt.Errorf("accountID is required but not set")
|
||||
}
|
||||
// default check in case invalid mode is configured through request config
|
||||
default:
|
||||
return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func addUserAgentRetryMode(stack *middleware.Stack, options Options) error {
|
||||
ua, err := getOrAddRequestUserAgent(stack)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
switch options.Retryer.(type) {
|
||||
case *retry.Standard:
|
||||
ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard)
|
||||
case *retry.AdaptiveMode:
|
||||
ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func addRecursionDetection(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
|
||||
}
|
||||
@ -643,7 +733,7 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = presignedurlcust.AddAsIsPresigingMiddleware(stack)
|
||||
err = presignedurlcust.AddAsIsPresigningMiddleware(stack)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
457
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
generated
vendored
457
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
generated
vendored
@ -16,69 +16,99 @@ import (
|
||||
// Amazon Web Services resources. These temporary credentials consist of an access
|
||||
// key ID, a secret access key, and a security token. Typically, you use AssumeRole
|
||||
// within your account or for cross-account access. For a comparison of AssumeRole
|
||||
// with other API operations that produce temporary credentials, see Requesting
|
||||
// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// in the IAM User Guide. Permissions The temporary security credentials created by
|
||||
// AssumeRole can be used to make API calls to any Amazon Web Services service
|
||||
// with the following exception: You cannot call the Amazon Web Services STS
|
||||
// GetFederationToken or GetSessionToken API operations. (Optional) You can pass
|
||||
// inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
// inline session policy. You can also specify up to 10 managed policy Amazon
|
||||
// Resource Names (ARNs) to use as managed session policies. The plaintext that you
|
||||
// use for both inline and managed session policies can't exceed 2,048 characters.
|
||||
// Passing policies to this operation returns new temporary credentials. The
|
||||
// resulting session's permissions are the intersection of the role's
|
||||
// identity-based policy and the session policies. You can use the role's temporary
|
||||
// credentials in subsequent Amazon Web Services API calls to access resources in
|
||||
// the account that owns the role. You cannot use session policies to grant more
|
||||
// permissions than those allowed by the identity-based policy of the role that is
|
||||
// being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. When you create a role, you create two policies: a role
|
||||
// trust policy that specifies who can assume the role, and a permissions policy
|
||||
// that specifies what can be done with the role. You specify the trusted principal
|
||||
// that is allowed to assume the role in the role trust policy. To assume a role
|
||||
// from a different account, your Amazon Web Services account must be trusted by
|
||||
// the role. The trust relationship is defined in the role's trust policy when the
|
||||
// role is created. That trust policy states which accounts are allowed to delegate
|
||||
// that access to users in the account. A user who wants to access a role in a
|
||||
// different account must also have permissions that are delegated from the account
|
||||
// administrator. The administrator must attach a policy that allows the user to
|
||||
// call AssumeRole for the ARN of the role in the other account. To allow a user
|
||||
// to assume a role in the same account, you can do either of the following:
|
||||
// with other API operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the
|
||||
// IAM User Guide.
|
||||
//
|
||||
// # Permissions
|
||||
//
|
||||
// The temporary security credentials created by AssumeRole can be used to make
|
||||
// API calls to any Amazon Web Services service with the following exception: You
|
||||
// cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken
|
||||
// API operations.
|
||||
//
|
||||
// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a
|
||||
// single JSON policy document to use as an inline session policy. You can also
|
||||
// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed
|
||||
// session policies. The plaintext that you use for both inline and managed session
|
||||
// policies can't exceed 2,048 characters. Passing policies to this operation
|
||||
// returns new temporary credentials. The resulting session's permissions are the
|
||||
// intersection of the role's identity-based policy and the session policies. You
|
||||
// can use the role's temporary credentials in subsequent Amazon Web Services API
|
||||
// calls to access resources in the account that owns the role. You cannot use
|
||||
// session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see [Session Policies]in the IAM User Guide.
|
||||
//
|
||||
// When you create a role, you create two policies: a role trust policy that
|
||||
// specifies who can assume the role, and a permissions policy that specifies what
|
||||
// can be done with the role. You specify the trusted principal that is allowed to
|
||||
// assume the role in the role trust policy.
|
||||
//
|
||||
// To assume a role from a different account, your Amazon Web Services account
|
||||
// must be trusted by the role. The trust relationship is defined in the role's
|
||||
// trust policy when the role is created. That trust policy states which accounts
|
||||
// are allowed to delegate that access to users in the account.
|
||||
//
|
||||
// A user who wants to access a role in a different account must also have
|
||||
// permissions that are delegated from the account administrator. The administrator
|
||||
// must attach a policy that allows the user to call AssumeRole for the ARN of the
|
||||
// role in the other account.
|
||||
//
|
||||
// To allow a user to assume a role in the same account, you can do either of the
|
||||
// following:
|
||||
//
|
||||
// - Attach a policy to the user that allows the user to call AssumeRole (as long
|
||||
// as the role's trust policy trusts the account).
|
||||
//
|
||||
// - Add the user as a principal directly in the role's trust policy.
|
||||
//
|
||||
// You can do either because the role’s trust policy acts as an IAM resource-based
|
||||
// policy. When a resource-based policy grants access to a principal in the same
|
||||
// account, no additional identity-based policy is required. For more information
|
||||
// about trust policies and resource-based policies, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
|
||||
// in the IAM User Guide. Tags (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 Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// in the IAM User Guide. An administrator must grant you the permissions necessary
|
||||
// to pass session tags. The administrator can also create granular permissions to
|
||||
// allow you to pass only specific session tags. For more information, see
|
||||
// Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
|
||||
// in the IAM User Guide. You can set the session tags as transitive. Transitive
|
||||
// tags persist during role chaining. For more information, see Chaining Roles
|
||||
// with Session Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
|
||||
// in the IAM User Guide. Using MFA with AssumeRole (Optional) You can include
|
||||
// multi-factor authentication (MFA) information when you call AssumeRole . This is
|
||||
// useful for cross-account scenarios to ensure that the user that assumes the role
|
||||
// has been authenticated with an Amazon Web Services MFA device. In that scenario,
|
||||
// the trust policy of the role being assumed includes a condition that tests for
|
||||
// MFA authentication. If the caller does not include valid MFA information, the
|
||||
// request to assume the role is denied. The condition in a trust policy that tests
|
||||
// for MFA authentication might look like the following example. "Condition":
|
||||
// {"Bool": {"aws:MultiFactorAuthPresent": true}} For more information, see
|
||||
// Configuring MFA-Protected API Access (https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html)
|
||||
// in the IAM User Guide guide. To use MFA with AssumeRole , you pass values for
|
||||
// the SerialNumber and TokenCode parameters. The SerialNumber value identifies
|
||||
// the user's hardware or virtual MFA device. The TokenCode is the time-based
|
||||
// one-time password (TOTP) that the MFA device produces.
|
||||
// about trust policies and resource-based policies, see [IAM Policies]in the IAM User Guide.
|
||||
//
|
||||
// # Tags
|
||||
//
|
||||
// (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 Session Tags in STS]in the IAM
|
||||
// User Guide.
|
||||
//
|
||||
// An administrator must grant you the permissions necessary to pass session tags.
|
||||
// The administrator can also create granular permissions to allow you to pass only
|
||||
// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide.
|
||||
//
|
||||
// You can set the session tags as transitive. Transitive tags persist during role
|
||||
// chaining. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide.
|
||||
//
|
||||
// # Using MFA with AssumeRole
|
||||
//
|
||||
// (Optional) You can include multi-factor authentication (MFA) information when
|
||||
// you call AssumeRole . This is useful for cross-account scenarios to ensure that
|
||||
// the user that assumes the role has been authenticated with an Amazon Web
|
||||
// Services MFA device. In that scenario, the trust policy of the role being
|
||||
// assumed includes a condition that tests for MFA authentication. If the caller
|
||||
// does not include valid MFA information, the request to assume the role is
|
||||
// denied. The condition in a trust policy that tests for MFA authentication might
|
||||
// look like the following example.
|
||||
//
|
||||
// "Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}
|
||||
//
|
||||
// For more information, see [Configuring MFA-Protected API Access] in the IAM User Guide guide.
|
||||
//
|
||||
// To use MFA with AssumeRole , you pass values for the SerialNumber and TokenCode
|
||||
// parameters. The SerialNumber value identifies the user's hardware or virtual
|
||||
// MFA device. The TokenCode is the time-based one-time password (TOTP) that the
|
||||
// MFA device produces.
|
||||
//
|
||||
// [Configuring MFA-Protected API Access]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
||||
// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
||||
// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
||||
// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [IAM Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
||||
// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
||||
// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
||||
func (c *Client) AssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*Options)) (*AssumeRoleOutput, error) {
|
||||
if params == nil {
|
||||
params = &AssumeRoleInput{}
|
||||
@ -101,17 +131,19 @@ type AssumeRoleInput struct {
|
||||
// This member is required.
|
||||
RoleArn *string
|
||||
|
||||
// An identifier for the assumed role session. Use the role session name to
|
||||
// uniquely identify a session when the same role is assumed by different
|
||||
// principals or for different reasons. In cross-account scenarios, the role
|
||||
// session name is visible to, and can be logged by the account that owns the role.
|
||||
// The role session name is also used in the ARN of the assumed role principal.
|
||||
// This means that subsequent cross-account API requests that use the temporary
|
||||
// security credentials will expose the role session name to the external account
|
||||
// in their CloudTrail logs. The regex used to validate this parameter is a string
|
||||
// of characters consisting of upper- and lower-case alphanumeric characters with
|
||||
// no spaces. You can also include underscores or any of the following characters:
|
||||
// =,.@-
|
||||
// An identifier for the assumed role session.
|
||||
//
|
||||
// Use the role session name to uniquely identify a session when the same role is
|
||||
// assumed by different principals or for different reasons. In cross-account
|
||||
// scenarios, the role session name is visible to, and can be logged by the account
|
||||
// that owns the role. The role session name is also used in the ARN of the assumed
|
||||
// role principal. This means that subsequent cross-account API requests that use
|
||||
// the temporary security credentials will expose the role session name to the
|
||||
// external account in their CloudTrail logs.
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@-
|
||||
//
|
||||
// This member is required.
|
||||
RoleSessionName *string
|
||||
@ -122,23 +154,27 @@ type AssumeRoleInput struct {
|
||||
// hours. If you specify a value higher than this setting or the administrator
|
||||
// setting (whichever is lower), the operation fails. For example, if you specify a
|
||||
// session duration of 12 hours, but your administrator set the maximum session
|
||||
// duration to 6 hours, your operation fails. Role chaining limits your Amazon Web
|
||||
// Services CLI or Amazon Web Services API role session to a maximum of one hour.
|
||||
// When you use the AssumeRole API operation to assume a role, you can specify the
|
||||
// duration of your role session with the DurationSeconds parameter. You can
|
||||
// specify a parameter value of up to 43200 seconds (12 hours), depending on the
|
||||
// maximum session duration setting for your role. However, if you assume a role
|
||||
// using role chaining and provide a DurationSeconds parameter value greater than
|
||||
// one hour, the operation fails. To learn how to view the maximum value for your
|
||||
// role, see View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
|
||||
// in the IAM User Guide. By default, the value is set to 3600 seconds. The
|
||||
// DurationSeconds parameter is separate from the duration of a console session
|
||||
// that you might request using the returned credentials. The request to the
|
||||
// federation endpoint for a console sign-in token takes a SessionDuration
|
||||
// duration to 6 hours, your operation fails.
|
||||
//
|
||||
// Role chaining limits your Amazon Web Services CLI or Amazon Web Services API
|
||||
// role session to a maximum of one hour. When you use the AssumeRole API
|
||||
// operation to assume a role, you can specify the duration of your role session
|
||||
// with the DurationSeconds parameter. You can specify a parameter value of up to
|
||||
// 43200 seconds (12 hours), depending on the maximum session duration setting for
|
||||
// your role. However, if you assume a role using role chaining and provide a
|
||||
// DurationSeconds parameter value greater than one hour, the operation fails. To
|
||||
// learn how to view the maximum value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide.
|
||||
//
|
||||
// By default, the value is set to 3600 seconds.
|
||||
//
|
||||
// The DurationSeconds parameter is separate from the duration of a console
|
||||
// session that you might request using the returned credentials. The request to
|
||||
// the federation endpoint for a console sign-in token takes a SessionDuration
|
||||
// parameter that specifies the maximum length of the console session. For more
|
||||
// information, see Creating a URL that Enables Federated Users to Access the
|
||||
// Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
|
||||
// in the IAM User Guide.
|
||||
// information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide.
|
||||
//
|
||||
// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
||||
// [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
|
||||
DurationSeconds *int32
|
||||
|
||||
// A unique identifier that might be required when you assume a role in another
|
||||
@ -149,63 +185,79 @@ type AssumeRoleInput struct {
|
||||
// the administrator of the trusting account might send an external ID to the
|
||||
// administrator of the trusted account. That way, only someone with the ID can
|
||||
// assume the role, rather than everyone in the account. For more information about
|
||||
// the external ID, see How to Use an External ID When Granting Access to Your
|
||||
// Amazon Web Services Resources to a Third Party (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html)
|
||||
// in the IAM User Guide. The regex used to validate this parameter is a string of
|
||||
// characters consisting of upper- and lower-case alphanumeric characters with no
|
||||
// spaces. You can also include underscores or any of the following characters:
|
||||
// =,.@:/-
|
||||
// the external ID, see [How to Use an External ID When Granting Access to Your Amazon Web Services Resources to a Third Party]in the IAM User Guide.
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@:/-
|
||||
//
|
||||
// [How to Use an External ID When Granting Access to Your Amazon Web Services Resources to a Third Party]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
|
||||
ExternalId *string
|
||||
|
||||
// An IAM policy in JSON format that you want to use as an inline session policy.
|
||||
//
|
||||
// This parameter is optional. Passing policies to this operation returns new
|
||||
// temporary credentials. The resulting session's permissions are the intersection
|
||||
// of the role's identity-based policy and the session policies. You can use the
|
||||
// role's temporary credentials in subsequent Amazon Web Services API calls to
|
||||
// access resources in the account that owns the role. You cannot use session
|
||||
// policies to grant more permissions than those allowed by the identity-based
|
||||
// policy of the role that is being assumed. For more information, see Session
|
||||
// Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. The plaintext that you use for both inline and managed
|
||||
// session policies can't exceed 2,048 characters. The JSON policy characters can
|
||||
// be any ASCII character from the space character to the end of the valid
|
||||
// character list (\u0020 through \u00FF). It can also include the tab (\u0009),
|
||||
// linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web
|
||||
// Services conversion compresses the passed inline session policy, managed policy
|
||||
// ARNs, and session tags into a packed binary format that has a separate limit.
|
||||
// Your request can fail for this limit even if your plaintext meets the other
|
||||
// requirements. The PackedPolicySize response element indicates by percentage how
|
||||
// close the policies and tags for your request are to the upper size limit.
|
||||
// policy of the role that is being assumed. For more information, see [Session Policies]in the IAM
|
||||
// User Guide.
|
||||
//
|
||||
// The plaintext that you use for both inline and managed session policies can't
|
||||
// exceed 2,048 characters. The JSON policy characters can be any ASCII character
|
||||
// from the space character to the end of the valid character list (\u0020 through
|
||||
// \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
|
||||
// return (\u000D) characters.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
Policy *string
|
||||
|
||||
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
|
||||
// use as managed session policies. The policies must exist in the same account as
|
||||
// the role. This parameter is optional. You can provide up to 10 managed policy
|
||||
// ARNs. However, the plaintext that you use for both inline and managed session
|
||||
// policies can't exceed 2,048 characters. For more information about ARNs, see
|
||||
// Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
|
||||
// in the Amazon Web Services General Reference. An Amazon Web Services conversion
|
||||
// compresses the passed inline session policy, managed policy ARNs, and session
|
||||
// tags into a packed binary format that has a separate limit. Your request can
|
||||
// fail for this limit even if your plaintext meets the other requirements. The
|
||||
// PackedPolicySize response element indicates by percentage how close the policies
|
||||
// and tags for your request are to the upper size limit. Passing policies to this
|
||||
// operation returns new temporary credentials. The resulting session's permissions
|
||||
// are the intersection of the role's identity-based policy and the session
|
||||
// policies. You can use the role's temporary credentials in subsequent Amazon Web
|
||||
// Services API calls to access resources in the account that owns the role. You
|
||||
// cannot use session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide.
|
||||
// the role.
|
||||
//
|
||||
// This parameter is optional. You can provide up to 10 managed policy ARNs.
|
||||
// However, the plaintext that you use for both inline and managed session policies
|
||||
// can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the
|
||||
// Amazon Web Services General Reference.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// Passing policies to this operation returns new temporary credentials. The
|
||||
// resulting session's permissions are the intersection of the role's
|
||||
// identity-based policy and the session policies. You can use the role's temporary
|
||||
// credentials in subsequent Amazon Web Services API calls to access resources in
|
||||
// the account that owns the role. You cannot use session policies to grant more
|
||||
// permissions than those allowed by the identity-based policy of the role that is
|
||||
// being assumed. For more information, see [Session Policies]in the IAM User Guide.
|
||||
//
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
|
||||
PolicyArns []types.PolicyDescriptorType
|
||||
|
||||
// A list of previously acquired trusted context assertions in the format of a
|
||||
// JSON array. The trusted context assertion is signed and encrypted by Amazon Web
|
||||
// Services STS. The following is an example of a ProvidedContext value that
|
||||
// includes a single trusted context assertion and the ARN of the context provider
|
||||
// from which the trusted context assertion was generated.
|
||||
// [{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]
|
||||
// Services STS.
|
||||
//
|
||||
// The following is an example of a ProvidedContext value that includes a single
|
||||
// trusted context assertion and the ARN of the context provider from which the
|
||||
// trusted context assertion was generated.
|
||||
//
|
||||
// [{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]
|
||||
ProvidedContexts []types.ProvidedContext
|
||||
|
||||
// The identification number of the MFA device that is associated with the user
|
||||
@ -213,79 +265,97 @@ type AssumeRoleInput struct {
|
||||
// the role being assumed includes a condition that requires MFA authentication.
|
||||
// The value is either the serial number for a hardware device (such as
|
||||
// GAHT12345678 ) or an Amazon Resource Name (ARN) for a virtual device (such as
|
||||
// arn:aws:iam::123456789012:mfa/user ). The regex used to validate this parameter
|
||||
// is a string of characters consisting of upper- and lower-case alphanumeric
|
||||
// characters with no spaces. You can also include underscores or any of the
|
||||
// following characters: =,.@-
|
||||
// arn:aws:iam::123456789012:mfa/user ).
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@-
|
||||
SerialNumber *string
|
||||
|
||||
// The source identity specified by the principal that is calling the AssumeRole
|
||||
// operation. You can require users to specify a source identity when they assume a
|
||||
// role. You do this by using the sts:SourceIdentity condition key in a role trust
|
||||
// policy. You can use source identity information in CloudTrail logs to determine
|
||||
// who took actions with a role. You can use the aws:SourceIdentity condition key
|
||||
// to further control access to Amazon Web Services resources based on the value of
|
||||
// source identity. For more information about using source identity, see Monitor
|
||||
// and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
|
||||
// in the IAM User Guide. The regex used to validate this parameter is a string of
|
||||
// characters consisting of upper- and lower-case alphanumeric characters with no
|
||||
// spaces. You can also include underscores or any of the following characters:
|
||||
// =,.@-. You cannot use a value that begins with the text aws: . This prefix is
|
||||
// reserved for Amazon Web Services internal use.
|
||||
// operation.
|
||||
//
|
||||
// You can require users to specify a source identity when they assume a role. You
|
||||
// do this by using the sts:SourceIdentity condition key in a role trust policy.
|
||||
// You can use source identity information in CloudTrail logs to determine who took
|
||||
// actions with a role. You can use the aws:SourceIdentity condition key to
|
||||
// further control access to Amazon Web Services resources based on the value of
|
||||
// source identity. For more information about using source identity, see [Monitor and control actions taken with assumed roles]in the
|
||||
// IAM User Guide.
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@-. You cannot use a
|
||||
// value that begins with the text aws: . This prefix is reserved for Amazon Web
|
||||
// Services internal use.
|
||||
//
|
||||
// [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
||||
SourceIdentity *string
|
||||
|
||||
// A list of session tags that you want to pass. Each session tag consists of a
|
||||
// key name and an associated value. For more information about session tags, see
|
||||
// Tagging Amazon Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// in the IAM User Guide. This parameter is optional. You can pass up to 50 session
|
||||
// tags. The plaintext session tag keys can’t exceed 128 characters, and the values
|
||||
// can’t exceed 256 characters. For these and additional limits, see IAM and STS
|
||||
// Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
|
||||
// inline session policy, managed policy ARNs, and session tags into a packed
|
||||
// binary format that has a separate limit. Your request can fail for this limit
|
||||
// even if your plaintext meets the other requirements. The PackedPolicySize
|
||||
// response element indicates by percentage how close the policies and tags for
|
||||
// your request are to the upper size limit. You can pass a session tag with the
|
||||
// same key as a tag that is already attached to the role. When you do, session
|
||||
// tags override a role tag with the same key. Tag key–value pairs are not case
|
||||
// sensitive, but case is preserved. This means that you cannot have separate
|
||||
// Department and department tag keys. Assume that the role has the Department =
|
||||
// Marketing tag and you pass the department = engineering session tag. Department
|
||||
// and department are not saved as separate tags, and the session tag passed in
|
||||
// the request takes precedence over the role tag. Additionally, if you used
|
||||
// temporary credentials to perform this operation, the new session inherits any
|
||||
// transitive session tags from the calling session. If you pass a session tag with
|
||||
// the same key as an inherited tag, the operation fails. To view the inherited
|
||||
// tags for a session, see the CloudTrail logs. For more information, see Viewing
|
||||
// Session Tags in CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs)
|
||||
// key name and an associated value. For more information about session tags, see [Tagging Amazon Web Services STS Sessions]
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// This parameter is optional. You can pass up to 50 session tags. The plaintext
|
||||
// session tag keys can’t exceed 128 characters, and the values can’t exceed 256
|
||||
// characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User Guide.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// You can pass a session tag with the same key as a tag that is already attached
|
||||
// to the role. When you do, session tags override a role tag with the same key.
|
||||
//
|
||||
// Tag key–value pairs are not case sensitive, but case is preserved. This means
|
||||
// that you cannot have separate Department and department tag keys. Assume that
|
||||
// the role has the Department = Marketing tag and you pass the department =
|
||||
// engineering session tag. Department and department are not saved as separate
|
||||
// tags, and the session tag passed in the request takes precedence over the role
|
||||
// tag.
|
||||
//
|
||||
// Additionally, if you used temporary credentials to perform this operation, the
|
||||
// new session inherits any transitive session tags from the calling session. If
|
||||
// you pass a session tag with the same key as an inherited tag, the operation
|
||||
// fails. To view the inherited tags for a session, see the CloudTrail logs. For
|
||||
// more information, see [Viewing Session Tags in CloudTrail]in the IAM User Guide.
|
||||
//
|
||||
// [Tagging Amazon Web Services STS Sessions]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
||||
// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
||||
// [Viewing Session Tags in CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs
|
||||
Tags []types.Tag
|
||||
|
||||
// The value provided by the MFA device, if the trust policy of the role being
|
||||
// assumed requires MFA. (In other words, if the policy includes a condition that
|
||||
// tests for MFA). If the role being assumed requires MFA and if the TokenCode
|
||||
// value is missing or expired, the AssumeRole call returns an "access denied"
|
||||
// error. The format for this parameter, as described by its regex pattern, is a
|
||||
// sequence of six numeric digits.
|
||||
// error.
|
||||
//
|
||||
// The format for this parameter, as described by its regex pattern, is a sequence
|
||||
// of six numeric digits.
|
||||
TokenCode *string
|
||||
|
||||
// A list of keys for session tags that you want to set as transitive. If you set
|
||||
// a tag key as transitive, the corresponding key and value passes to subsequent
|
||||
// sessions in a role chain. For more information, see Chaining Roles with Session
|
||||
// Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
|
||||
// in the IAM User Guide. This parameter is optional. When you set session tags as
|
||||
// transitive, the session policy and session tags packed binary limit is not
|
||||
// affected. If you choose not to specify a transitive tag key, then no tags are
|
||||
// passed from this session to any subsequent sessions.
|
||||
// sessions in a role chain. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide.
|
||||
//
|
||||
// This parameter is optional. When you set session tags as transitive, the
|
||||
// session policy and session tags packed binary limit is not affected.
|
||||
//
|
||||
// If you choose not to specify a transitive tag key, then no tags are passed from
|
||||
// this session to any subsequent sessions.
|
||||
//
|
||||
// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
||||
TransitiveTagKeys []string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
// Contains the response to a successful AssumeRole request, including temporary
|
||||
// Amazon Web Services credentials that can be used to make Amazon Web Services
|
||||
// requests.
|
||||
// Contains the response to a successful AssumeRole request, including temporary Amazon Web
|
||||
// Services credentials that can be used to make Amazon Web Services requests.
|
||||
type AssumeRoleOutput struct {
|
||||
|
||||
// The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers
|
||||
@ -296,9 +366,10 @@ type AssumeRoleOutput struct {
|
||||
AssumedRoleUser *types.AssumedRoleUser
|
||||
|
||||
// The temporary security credentials, which include an access key ID, a secret
|
||||
// access key, and a security (or session) token. The size of the security token
|
||||
// that STS API operations return is not fixed. We strongly recommend that you make
|
||||
// no assumptions about the maximum size.
|
||||
// access key, and a security (or session) token.
|
||||
//
|
||||
// The size of the security token that STS API operations return is not fixed. We
|
||||
// strongly recommend that you make no assumptions about the maximum size.
|
||||
Credentials *types.Credentials
|
||||
|
||||
// A percentage value that indicates the packed size of the session policies and
|
||||
@ -308,17 +379,21 @@ type AssumeRoleOutput struct {
|
||||
PackedPolicySize *int32
|
||||
|
||||
// The source identity specified by the principal that is calling the AssumeRole
|
||||
// operation. You can require users to specify a source identity when they assume a
|
||||
// role. You do this by using the sts:SourceIdentity condition key in a role trust
|
||||
// policy. You can use source identity information in CloudTrail logs to determine
|
||||
// who took actions with a role. You can use the aws:SourceIdentity condition key
|
||||
// to further control access to Amazon Web Services resources based on the value of
|
||||
// source identity. For more information about using source identity, see Monitor
|
||||
// and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
|
||||
// in the IAM User Guide. The regex used to validate this parameter is a string of
|
||||
// characters consisting of upper- and lower-case alphanumeric characters with no
|
||||
// spaces. You can also include underscores or any of the following characters:
|
||||
// =,.@-
|
||||
// operation.
|
||||
//
|
||||
// You can require users to specify a source identity when they assume a role. You
|
||||
// do this by using the sts:SourceIdentity condition key in a role trust policy.
|
||||
// You can use source identity information in CloudTrail logs to determine who took
|
||||
// actions with a role. You can use the aws:SourceIdentity condition key to
|
||||
// further control access to Amazon Web Services resources based on the value of
|
||||
// source identity. For more information about using source identity, see [Monitor and control actions taken with assumed roles]in the
|
||||
// IAM User Guide.
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@-
|
||||
//
|
||||
// [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
||||
SourceIdentity *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@ -382,6 +457,12 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAssumeRoleValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
373
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
generated
vendored
373
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
generated
vendored
@ -16,92 +16,132 @@ import (
|
||||
// mechanism for tying an enterprise identity store or directory to role-based
|
||||
// Amazon Web Services access without user-specific credentials or configuration.
|
||||
// For a comparison of AssumeRoleWithSAML with the other API operations that
|
||||
// produce temporary credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// in the IAM User Guide. The temporary security credentials returned by this
|
||||
// operation consist of an access key ID, a secret access key, and a security
|
||||
// token. Applications can use these temporary security credentials to sign calls
|
||||
// to Amazon Web Services services. Session Duration By default, the temporary
|
||||
// security credentials created by AssumeRoleWithSAML last for one hour. However,
|
||||
// you can use the optional DurationSeconds parameter to specify the duration of
|
||||
// your session. Your role session lasts for the duration that you specify, or
|
||||
// until the time specified in the SAML authentication response's
|
||||
// SessionNotOnOrAfter value, whichever is shorter. You can provide a
|
||||
// DurationSeconds value from 900 seconds (15 minutes) up to the maximum session
|
||||
// duration setting for the role. This setting can have a value from 1 hour to 12
|
||||
// hours. To learn how to view the maximum value for your role, see View the
|
||||
// Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
|
||||
// in the IAM User Guide. The maximum session duration limit applies when you use
|
||||
// the AssumeRole* API operations or the assume-role* CLI commands. However the
|
||||
// limit does not apply when you use those operations to create a console 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. Role chaining (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining)
|
||||
// limits your CLI or Amazon Web Services API role session to a maximum of one
|
||||
// produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide.
|
||||
//
|
||||
// The temporary security credentials returned by this operation consist of an
|
||||
// access key ID, a secret access key, and a security token. Applications can use
|
||||
// these temporary security credentials to sign calls to Amazon Web Services
|
||||
// services.
|
||||
//
|
||||
// # Session Duration
|
||||
//
|
||||
// By default, the temporary security credentials created by AssumeRoleWithSAML
|
||||
// last for one hour. However, you can use the optional DurationSeconds parameter
|
||||
// to specify the duration of your session. Your role session lasts for the
|
||||
// duration that you specify, or until the time specified in the SAML
|
||||
// authentication response's SessionNotOnOrAfter value, whichever is shorter. You
|
||||
// can provide a DurationSeconds value from 900 seconds (15 minutes) up to the
|
||||
// maximum session duration setting for the role. This setting can have a value
|
||||
// from 1 hour to 12 hours. To learn how to view the maximum value for your role,
|
||||
// see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. The maximum session duration limit applies when you
|
||||
// use the AssumeRole* API operations or the assume-role* CLI commands. However
|
||||
// the limit does not apply when you use those operations to create a console URL.
|
||||
// For more information, see [Using IAM Roles]in the IAM User Guide.
|
||||
//
|
||||
// [Role chaining]limits your CLI or Amazon Web Services API role session to a maximum of one
|
||||
// hour. When you use the AssumeRole API operation to assume a role, you can
|
||||
// specify the duration of your role session with the DurationSeconds parameter.
|
||||
// You can specify a parameter value of up to 43200 seconds (12 hours), depending
|
||||
// on the maximum session duration setting for your role. However, if you assume a
|
||||
// role using role chaining and provide a DurationSeconds parameter value greater
|
||||
// than one hour, the operation fails. Permissions The temporary security
|
||||
// credentials created by AssumeRoleWithSAML can be used to make API calls to any
|
||||
// Amazon Web Services service with the following exception: you cannot call the
|
||||
// STS GetFederationToken or GetSessionToken API operations. (Optional) You can
|
||||
// pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
// inline session policy. You can also specify up to 10 managed policy Amazon
|
||||
// Resource Names (ARNs) to use as managed session policies. The plaintext that you
|
||||
// use for both inline and managed session policies can't exceed 2,048 characters.
|
||||
// Passing policies to this operation returns new temporary credentials. The
|
||||
// resulting session's permissions are the intersection of the role's
|
||||
// identity-based policy and the session policies. You can use the role's temporary
|
||||
// credentials in subsequent Amazon Web Services API calls to access resources in
|
||||
// the account that owns the role. You cannot use session policies to grant more
|
||||
// permissions than those allowed by the identity-based policy of the role that is
|
||||
// being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. Calling AssumeRoleWithSAML does not require the use of
|
||||
// Amazon Web Services security credentials. The identity of the caller is
|
||||
// validated by using keys in the metadata document that is uploaded for the SAML
|
||||
// provider entity for your identity provider. Calling AssumeRoleWithSAML can
|
||||
// result in an entry in your CloudTrail logs. The entry includes the value in the
|
||||
// NameID element of the SAML assertion. We recommend that you use a NameIDType
|
||||
// that is not associated with any personally identifiable information (PII). For
|
||||
// example, you could instead use the persistent identifier (
|
||||
// urn:oasis:names:tc:SAML:2.0:nameid-format:persistent ). Tags (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 value. For more
|
||||
// information about session tags, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// in the IAM User Guide. You can pass up to 50 session tags. The plaintext session
|
||||
// tag keys can’t exceed 128 characters and the values can’t exceed 256 characters.
|
||||
// For these and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
|
||||
// inline session policy, managed policy ARNs, and session tags into a packed
|
||||
// binary format that has a separate limit. Your request can fail for this limit
|
||||
// even if your plaintext meets the other requirements. The PackedPolicySize
|
||||
// response element indicates by percentage how close the policies and tags for
|
||||
// your request are to the upper size limit. You can pass a session tag with the
|
||||
// same key as a tag that is attached to the role. When you do, session tags
|
||||
// override the role's tags with the same key. An administrator must grant you the
|
||||
// permissions necessary to pass session tags. The administrator can also create
|
||||
// granular permissions to allow you to pass only specific session tags. For more
|
||||
// information, see Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
|
||||
// in the IAM User Guide. You can set the session tags as transitive. Transitive
|
||||
// tags persist during role chaining. For more information, see Chaining Roles
|
||||
// with Session Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
|
||||
// in the IAM User Guide. SAML Configuration Before your application can call
|
||||
// AssumeRoleWithSAML , you must configure your SAML identity provider (IdP) to
|
||||
// issue the claims required by Amazon Web Services. Additionally, you must use
|
||||
// Identity and Access Management (IAM) to create a SAML provider entity in your
|
||||
// Amazon Web Services account that represents your identity provider. You must
|
||||
// also create an IAM role that specifies this SAML provider in its trust policy.
|
||||
// than one hour, the operation fails.
|
||||
//
|
||||
// # Permissions
|
||||
//
|
||||
// The temporary security credentials created by AssumeRoleWithSAML can be used to
|
||||
// make API calls to any Amazon Web Services service with the following exception:
|
||||
// you cannot call the STS GetFederationToken or GetSessionToken API operations.
|
||||
//
|
||||
// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a
|
||||
// single JSON policy document to use as an inline session policy. You can also
|
||||
// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed
|
||||
// session policies. The plaintext that you use for both inline and managed session
|
||||
// policies can't exceed 2,048 characters. Passing policies to this operation
|
||||
// returns new temporary credentials. The resulting session's permissions are the
|
||||
// intersection of the role's identity-based policy and the session policies. You
|
||||
// can use the role's temporary credentials in subsequent Amazon Web Services API
|
||||
// calls to access resources in the account that owns the role. You cannot use
|
||||
// session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see [Session Policies]in the IAM User Guide.
|
||||
//
|
||||
// Calling AssumeRoleWithSAML does not require the use of Amazon Web Services
|
||||
// security credentials. The identity of the caller is validated by using keys in
|
||||
// the metadata document that is uploaded for the SAML provider entity for your
|
||||
// identity provider.
|
||||
//
|
||||
// Calling AssumeRoleWithSAML can result in an entry in your CloudTrail logs. The
|
||||
// entry includes the value in the NameID element of the SAML assertion. We
|
||||
// recommend that you use a NameIDType that is not associated with any personally
|
||||
// identifiable information (PII). For example, you could instead use the
|
||||
// persistent identifier ( urn:oasis:names:tc:SAML:2.0:nameid-format:persistent ).
|
||||
//
|
||||
// # Tags
|
||||
//
|
||||
// (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 value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// You can pass up to 50 session tags. The plaintext session tag keys can’t exceed
|
||||
// 128 characters and the values can’t exceed 256 characters. For these and
|
||||
// additional limits, see [IAM and STS Character Limits]in the IAM User Guide.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// You can pass a session tag with the same key as a tag that is attached to the
|
||||
// role. When you do, session tags override the role's tags with the same key.
|
||||
//
|
||||
// An administrator must grant you the permissions necessary to pass session tags.
|
||||
// The administrator can also create granular permissions to allow you to pass only
|
||||
// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide.
|
||||
//
|
||||
// You can set the session tags as transitive. Transitive tags persist during role
|
||||
// chaining. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide.
|
||||
//
|
||||
// # SAML Configuration
|
||||
//
|
||||
// Before your application can call AssumeRoleWithSAML , you must configure your
|
||||
// SAML identity provider (IdP) to issue the claims required by Amazon Web
|
||||
// Services. Additionally, you must use Identity and Access Management (IAM) to
|
||||
// create a SAML provider entity in your Amazon Web Services account that
|
||||
// represents your identity provider. You must also create an IAM role that
|
||||
// specifies this SAML provider in its trust policy.
|
||||
//
|
||||
// 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)
|
||||
// in the IAM User Guide.
|
||||
// - Creating SAML Identity Providers (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html)
|
||||
// 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)
|
||||
// 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)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// [About SAML 2.0-based Federation]
|
||||
// - in the IAM User Guide.
|
||||
//
|
||||
// [Creating SAML Identity Providers]
|
||||
// - in the IAM User Guide.
|
||||
//
|
||||
// [Configuring a Relying Party and Claims]
|
||||
// - in the IAM User Guide.
|
||||
//
|
||||
// [Creating a Role for SAML 2.0 Federation]
|
||||
// - in the IAM User Guide.
|
||||
//
|
||||
// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
||||
// [Creating a Role for SAML 2.0 Federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html
|
||||
// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
||||
// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
||||
// [Creating SAML Identity Providers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html
|
||||
// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
||||
// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
||||
// [Configuring a Relying Party and Claims]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html
|
||||
// [Role chaining]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
|
||||
// [Using IAM Roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
||||
// [About SAML 2.0-based Federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html
|
||||
// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
||||
func (c *Client) AssumeRoleWithSAML(ctx context.Context, params *AssumeRoleWithSAMLInput, optFns ...func(*Options)) (*AssumeRoleWithSAMLOutput, error) {
|
||||
if params == nil {
|
||||
params = &AssumeRoleWithSAMLInput{}
|
||||
@ -130,9 +170,11 @@ type AssumeRoleWithSAMLInput struct {
|
||||
// This member is required.
|
||||
RoleArn *string
|
||||
|
||||
// The base64 encoded SAML authentication response provided by the IdP. For more
|
||||
// information, see Configuring a Relying Party and Adding Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html)
|
||||
// in the IAM User Guide.
|
||||
// The base64 encoded SAML authentication response provided by the IdP.
|
||||
//
|
||||
// For more information, see [Configuring a Relying Party and Adding Claims] in the IAM User Guide.
|
||||
//
|
||||
// [Configuring a Relying Party and Adding Claims]: https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html
|
||||
//
|
||||
// This member is required.
|
||||
SAMLAssertion *string
|
||||
@ -146,92 +188,114 @@ type AssumeRoleWithSAMLInput struct {
|
||||
// than this setting, the operation fails. For example, if you specify a session
|
||||
// duration of 12 hours, but your administrator set the maximum session duration to
|
||||
// 6 hours, your operation fails. To learn how to view the maximum value for your
|
||||
// role, see View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
|
||||
// in the IAM User Guide. By default, the value is set to 3600 seconds. The
|
||||
// DurationSeconds parameter is separate from the duration of a console session
|
||||
// that you might request using the returned credentials. The request to the
|
||||
// federation endpoint for a console sign-in token takes a SessionDuration
|
||||
// role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide.
|
||||
//
|
||||
// By default, the value is set to 3600 seconds.
|
||||
//
|
||||
// The DurationSeconds parameter is separate from the duration of a console
|
||||
// session that you might request using the returned credentials. The request to
|
||||
// the federation endpoint for a console sign-in token takes a SessionDuration
|
||||
// parameter that specifies the maximum length of the console session. For more
|
||||
// information, see Creating a URL that Enables Federated Users to Access the
|
||||
// Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
|
||||
// in the IAM User Guide.
|
||||
// information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide.
|
||||
//
|
||||
// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
||||
// [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
|
||||
DurationSeconds *int32
|
||||
|
||||
// An IAM policy in JSON format that you want to use as an inline session policy.
|
||||
//
|
||||
// This parameter is optional. Passing policies to this operation returns new
|
||||
// temporary credentials. The resulting session's permissions are the intersection
|
||||
// of the role's identity-based policy and the session policies. You can use the
|
||||
// role's temporary credentials in subsequent Amazon Web Services API calls to
|
||||
// access resources in the account that owns the role. You cannot use session
|
||||
// policies to grant more permissions than those allowed by the identity-based
|
||||
// policy of the role that is being assumed. For more information, see Session
|
||||
// Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. The plaintext that you use for both inline and managed
|
||||
// session policies can't exceed 2,048 characters. The JSON policy characters can
|
||||
// be any ASCII character from the space character to the end of the valid
|
||||
// character list (\u0020 through \u00FF). It can also include the tab (\u0009),
|
||||
// linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web
|
||||
// Services conversion compresses the passed inline session policy, managed policy
|
||||
// ARNs, and session tags into a packed binary format that has a separate limit.
|
||||
// Your request can fail for this limit even if your plaintext meets the other
|
||||
// requirements. The PackedPolicySize response element indicates by percentage how
|
||||
// close the policies and tags for your request are to the upper size limit.
|
||||
// policy of the role that is being assumed. For more information, see [Session Policies]in the IAM
|
||||
// User Guide.
|
||||
//
|
||||
// The plaintext that you use for both inline and managed session policies can't
|
||||
// exceed 2,048 characters. The JSON policy characters can be any ASCII character
|
||||
// from the space character to the end of the valid character list (\u0020 through
|
||||
// \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
|
||||
// return (\u000D) characters.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
Policy *string
|
||||
|
||||
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
|
||||
// use as managed session policies. The policies must exist in the same account as
|
||||
// the role. This parameter is optional. You can provide up to 10 managed policy
|
||||
// ARNs. However, the plaintext that you use for both inline and managed session
|
||||
// policies can't exceed 2,048 characters. For more information about ARNs, see
|
||||
// Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
|
||||
// in the Amazon Web Services General Reference. An Amazon Web Services conversion
|
||||
// compresses the passed inline session policy, managed policy ARNs, and session
|
||||
// tags into a packed binary format that has a separate limit. Your request can
|
||||
// fail for this limit even if your plaintext meets the other requirements. The
|
||||
// PackedPolicySize response element indicates by percentage how close the policies
|
||||
// and tags for your request are to the upper size limit. Passing policies to this
|
||||
// operation returns new temporary credentials. The resulting session's permissions
|
||||
// are the intersection of the role's identity-based policy and the session
|
||||
// policies. You can use the role's temporary credentials in subsequent Amazon Web
|
||||
// Services API calls to access resources in the account that owns the role. You
|
||||
// cannot use session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide.
|
||||
// the role.
|
||||
//
|
||||
// This parameter is optional. You can provide up to 10 managed policy ARNs.
|
||||
// However, the plaintext that you use for both inline and managed session policies
|
||||
// can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the
|
||||
// Amazon Web Services General Reference.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// Passing policies to this operation returns new temporary credentials. The
|
||||
// resulting session's permissions are the intersection of the role's
|
||||
// identity-based policy and the session policies. You can use the role's temporary
|
||||
// credentials in subsequent Amazon Web Services API calls to access resources in
|
||||
// the account that owns the role. You cannot use session policies to grant more
|
||||
// permissions than those allowed by the identity-based policy of the role that is
|
||||
// being assumed. For more information, see [Session Policies]in the IAM User Guide.
|
||||
//
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
|
||||
PolicyArns []types.PolicyDescriptorType
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
// Contains the response to a successful AssumeRoleWithSAML request, including
|
||||
// temporary Amazon Web Services credentials that can be used to make Amazon Web
|
||||
// Services requests.
|
||||
// Contains the response to a successful AssumeRoleWithSAML request, including temporary Amazon Web
|
||||
// Services credentials that can be used to make Amazon Web Services requests.
|
||||
type AssumeRoleWithSAMLOutput struct {
|
||||
|
||||
// The identifiers for the temporary security credentials that the operation
|
||||
// returns.
|
||||
AssumedRoleUser *types.AssumedRoleUser
|
||||
|
||||
// The value of the Recipient attribute of the SubjectConfirmationData element of
|
||||
// The value of the Recipient attribute of the SubjectConfirmationData element of
|
||||
// the SAML assertion.
|
||||
Audience *string
|
||||
|
||||
// The temporary security credentials, which include an access key ID, a secret
|
||||
// access key, and a security (or session) token. The size of the security token
|
||||
// that STS API operations return is not fixed. We strongly recommend that you make
|
||||
// no assumptions about the maximum size.
|
||||
// access key, and a security (or session) token.
|
||||
//
|
||||
// The size of the security token that STS API operations return is not fixed. We
|
||||
// strongly recommend that you make no assumptions about the maximum size.
|
||||
Credentials *types.Credentials
|
||||
|
||||
// The value of the Issuer element of the SAML assertion.
|
||||
Issuer *string
|
||||
|
||||
// A hash value based on the concatenation of the following:
|
||||
//
|
||||
// - The Issuer response value.
|
||||
//
|
||||
// - The Amazon Web Services account ID.
|
||||
//
|
||||
// - The friendly name (the last part of the ARN) of the SAML provider in IAM.
|
||||
//
|
||||
// The combination of NameQualifier and Subject can be used to uniquely identify a
|
||||
// user. The following pseudocode shows how the hash value is calculated: BASE64 (
|
||||
// SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) )
|
||||
// user.
|
||||
//
|
||||
// The following pseudocode shows how the hash value is calculated:
|
||||
//
|
||||
// BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) )
|
||||
NameQualifier *string
|
||||
|
||||
// A percentage value that indicates the packed size of the session policies and
|
||||
@ -240,31 +304,36 @@ type AssumeRoleWithSAMLOutput struct {
|
||||
// allowed space.
|
||||
PackedPolicySize *int32
|
||||
|
||||
// The value in the SourceIdentity attribute in the SAML assertion. You can
|
||||
// require users to set a source identity value when they assume a role. You do
|
||||
// this by using the sts:SourceIdentity condition key in a role trust policy. That
|
||||
// way, actions that are taken with the role are associated with that user. After
|
||||
// the source identity is set, the value cannot be changed. It is present in the
|
||||
// request for all actions that are taken by the role and persists across chained
|
||||
// role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
|
||||
// sessions. You can configure your SAML identity provider to use an attribute
|
||||
// associated with your users, like user name or email, as the source identity when
|
||||
// calling AssumeRoleWithSAML . You do this by adding an attribute to the SAML
|
||||
// assertion. For more information about using source identity, see Monitor and
|
||||
// control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
|
||||
// in the IAM User Guide. The regex used to validate this parameter is a string of
|
||||
// characters consisting of upper- and lower-case alphanumeric characters with no
|
||||
// spaces. You can also include underscores or any of the following characters:
|
||||
// =,.@-
|
||||
// The value in the SourceIdentity attribute in the SAML assertion.
|
||||
//
|
||||
// You can require users to set a source identity value when they assume a role.
|
||||
// You do this by using the sts:SourceIdentity condition key in a role trust
|
||||
// policy. That way, actions that are taken with the role are associated with that
|
||||
// user. After the source identity is set, the value cannot be changed. It is
|
||||
// present in the request for all actions that are taken by the role and persists
|
||||
// across [chained role]sessions. You can configure your SAML identity provider to use an
|
||||
// attribute associated with your users, like user name or email, as the source
|
||||
// identity when calling AssumeRoleWithSAML . You do this by adding an attribute to
|
||||
// the SAML assertion. For more information about using source identity, see [Monitor and control actions taken with assumed roles]in
|
||||
// the IAM User Guide.
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@-
|
||||
//
|
||||
// [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining
|
||||
// [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
||||
SourceIdentity *string
|
||||
|
||||
// The value of the NameID element in the Subject element of the SAML assertion.
|
||||
Subject *string
|
||||
|
||||
// The format of the name ID, as defined by the Format attribute in the NameID
|
||||
// The format of the name ID, as defined by the Format attribute in the NameID
|
||||
// element of the SAML assertion. Typical examples of the format are transient or
|
||||
// persistent . If the format includes the prefix
|
||||
// urn:oasis:names:tc:SAML:2.0:nameid-format , that prefix is removed. For example,
|
||||
// persistent .
|
||||
//
|
||||
// If the format includes the prefix urn:oasis:names:tc:SAML:2.0:nameid-format ,
|
||||
// that prefix is removed. For example,
|
||||
// urn:oasis:names:tc:SAML:2.0:nameid-format:transient is returned as transient .
|
||||
// If the format includes any other prefix, the format is returned with no
|
||||
// modifications.
|
||||
@ -328,6 +397,12 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAssumeRoleWithSAMLValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
387
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
generated
vendored
387
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
generated
vendored
@ -14,105 +14,143 @@ import (
|
||||
// Returns a set of temporary security credentials for users who have been
|
||||
// authenticated in a mobile or web application with a web identity provider.
|
||||
// Example providers include the OAuth 2.0 providers Login with Amazon and
|
||||
// Facebook, or any OpenID Connect-compatible identity provider such as Google or
|
||||
// Amazon Cognito federated identities (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html)
|
||||
// . For mobile applications, we recommend that you use Amazon Cognito. You can use
|
||||
// Amazon Cognito with the Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/)
|
||||
// and the Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/)
|
||||
// to uniquely identify a user. You can also supply the user with a consistent
|
||||
// identity throughout the lifetime of an application. To learn more about Amazon
|
||||
// Cognito, see Amazon Cognito identity pools (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html)
|
||||
// in Amazon Cognito Developer Guide. Calling AssumeRoleWithWebIdentity does not
|
||||
// require the use of Amazon Web Services security credentials. Therefore, you can
|
||||
// distribute an application (for example, on mobile devices) that requests
|
||||
// temporary security credentials without including long-term Amazon Web Services
|
||||
// credentials in the application. You also don't need to deploy server-based proxy
|
||||
// services that use long-term Amazon Web Services credentials. Instead, the
|
||||
// identity of the caller is validated by using a token from the web identity
|
||||
// provider. For a comparison of AssumeRoleWithWebIdentity with the other API
|
||||
// operations that produce temporary credentials, see Requesting Temporary
|
||||
// Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// in the IAM User Guide. The temporary security credentials returned by this API
|
||||
// consist of an access key ID, a secret access key, and a security token.
|
||||
// Applications can use these temporary security credentials to sign calls to
|
||||
// Amazon Web Services service API operations. Session Duration By default, the
|
||||
// temporary security credentials created by AssumeRoleWithWebIdentity last for
|
||||
// one hour. However, you can use the optional DurationSeconds parameter to
|
||||
// specify the duration of your session. You can provide a value from 900 seconds
|
||||
// (15 minutes) up to the maximum session duration setting for the role. This
|
||||
// setting can have a value from 1 hour to 12 hours. To learn how to view the
|
||||
// maximum value for your role, see View the Maximum Session Duration Setting for
|
||||
// a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
|
||||
// in the IAM User Guide. The maximum session duration limit applies when you use
|
||||
// the AssumeRole* API operations or the assume-role* CLI commands. However the
|
||||
// limit does not apply when you use those operations to create a console 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. Permissions The temporary security credentials created by
|
||||
// AssumeRoleWithWebIdentity can be used to make API calls to any Amazon Web
|
||||
// Services service with the following exception: you cannot call the STS
|
||||
// GetFederationToken or GetSessionToken API operations. (Optional) You can pass
|
||||
// inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
// inline session policy. You can also specify up to 10 managed policy Amazon
|
||||
// Resource Names (ARNs) to use as managed session policies. The plaintext that you
|
||||
// use for both inline and managed session policies can't exceed 2,048 characters.
|
||||
// Passing policies to this operation returns new temporary credentials. The
|
||||
// resulting session's permissions are the intersection of the role's
|
||||
// identity-based policy and the session policies. You can use the role's temporary
|
||||
// credentials in subsequent Amazon Web Services API calls to access resources in
|
||||
// the account that owns the role. You cannot use session policies to grant more
|
||||
// permissions than those allowed by the identity-based policy of the role that is
|
||||
// being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. Tags (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 value. For more information about
|
||||
// session tags, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// in the IAM User Guide. You can pass up to 50 session tags. The plaintext session
|
||||
// tag keys can’t exceed 128 characters and the values can’t exceed 256 characters.
|
||||
// For these and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
|
||||
// inline session policy, managed policy ARNs, and session tags into a packed
|
||||
// binary format that has a separate limit. Your request can fail for this limit
|
||||
// even if your plaintext meets the other requirements. The PackedPolicySize
|
||||
// response element indicates by percentage how close the policies and tags for
|
||||
// your request are to the upper size limit. You can pass a session tag with the
|
||||
// same key as a tag that is attached to the role. When you do, the session tag
|
||||
// overrides the role tag with the same key. An administrator must grant you the
|
||||
// permissions necessary to pass session tags. The administrator can also create
|
||||
// granular permissions to allow you to pass only specific session tags. For more
|
||||
// information, see Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
|
||||
// in the IAM User Guide. You can set the session tags as transitive. Transitive
|
||||
// tags persist during role chaining. For more information, see Chaining Roles
|
||||
// with Session Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
|
||||
// in the IAM User Guide. Identities Before your application can call
|
||||
// AssumeRoleWithWebIdentity , you must have an identity token from a supported
|
||||
// identity provider and create a role that the application can assume. The role
|
||||
// that your application assumes must trust the identity provider that is
|
||||
// associated with the identity token. In other words, the identity provider must
|
||||
// be specified in the role's trust policy. Calling AssumeRoleWithWebIdentity can
|
||||
// result in an entry in your CloudTrail logs. The entry includes the Subject (http://openid.net/specs/openid-connect-core-1_0.html#Claims)
|
||||
// of the provided web identity token. We recommend that you avoid using any
|
||||
// personally identifiable information (PII) in this field. For example, you could
|
||||
// instead use a GUID or a pairwise identifier, as suggested in the OIDC
|
||||
// specification (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes)
|
||||
// . For more information about how to use web identity federation and the
|
||||
// Facebook, or any OpenID Connect-compatible identity provider such as Google or [Amazon Cognito federated identities].
|
||||
//
|
||||
// For mobile applications, we recommend that you use Amazon Cognito. You can use
|
||||
// Amazon Cognito with the [Amazon Web Services SDK for iOS Developer Guide]and the [Amazon Web Services SDK for Android Developer Guide] to uniquely identify a user. You can also
|
||||
// supply the user with a consistent identity throughout the lifetime of an
|
||||
// application.
|
||||
//
|
||||
// To learn more about Amazon Cognito, see [Amazon Cognito identity pools] in Amazon Cognito Developer Guide.
|
||||
//
|
||||
// Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web
|
||||
// Services security credentials. Therefore, you can distribute an application (for
|
||||
// example, on mobile devices) that requests temporary security credentials without
|
||||
// including long-term Amazon Web Services credentials in the application. You also
|
||||
// don't need to deploy server-based proxy services that use long-term Amazon Web
|
||||
// Services credentials. Instead, the identity of the caller is validated by using
|
||||
// a token from the web identity provider. For a comparison of
|
||||
// AssumeRoleWithWebIdentity with the other API operations that produce temporary
|
||||
// credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide.
|
||||
//
|
||||
// The temporary security credentials returned by this API consist of an access
|
||||
// key ID, a secret access key, and a security token. Applications can use these
|
||||
// temporary security credentials to sign calls to Amazon Web Services service API
|
||||
// operations.
|
||||
//
|
||||
// # Session Duration
|
||||
//
|
||||
// By default, the temporary security credentials created by
|
||||
// AssumeRoleWithWebIdentity last for one hour. However, you can use the optional
|
||||
// DurationSeconds parameter to specify the duration of your session. You can
|
||||
// provide a value from 900 seconds (15 minutes) up to the maximum session duration
|
||||
// setting for the role. This setting can have a value from 1 hour to 12 hours. To
|
||||
// learn how to view the maximum value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide.
|
||||
// The maximum session duration limit applies when you use the AssumeRole* API
|
||||
// operations or the assume-role* CLI commands. However the limit does not apply
|
||||
// when you use those operations to create a console URL. For more information, see
|
||||
// [Using IAM Roles]in the IAM User Guide.
|
||||
//
|
||||
// # Permissions
|
||||
//
|
||||
// The temporary security credentials created by AssumeRoleWithWebIdentity can be
|
||||
// used to make API calls to any Amazon Web Services service with the following
|
||||
// exception: you cannot call the STS GetFederationToken or GetSessionToken API
|
||||
// operations.
|
||||
//
|
||||
// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a
|
||||
// single JSON policy document to use as an inline session policy. You can also
|
||||
// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed
|
||||
// session policies. The plaintext that you use for both inline and managed session
|
||||
// policies can't exceed 2,048 characters. Passing policies to this operation
|
||||
// returns new temporary credentials. The resulting session's permissions are the
|
||||
// intersection of the role's identity-based policy and the session policies. You
|
||||
// can use the role's temporary credentials in subsequent Amazon Web Services API
|
||||
// calls to access resources in the account that owns the role. You cannot use
|
||||
// session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see [Session Policies]in the IAM User Guide.
|
||||
//
|
||||
// # Tags
|
||||
//
|
||||
// (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
|
||||
// value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User Guide.
|
||||
//
|
||||
// You can pass up to 50 session tags. The plaintext session tag keys can’t exceed
|
||||
// 128 characters and the values can’t exceed 256 characters. For these and
|
||||
// additional limits, see [IAM and STS Character Limits]in the IAM User Guide.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// You can pass a session tag with the same key as a tag that is attached to the
|
||||
// role. When you do, the session tag overrides the role tag with the same key.
|
||||
//
|
||||
// An administrator must grant you the permissions necessary to pass session tags.
|
||||
// The administrator can also create granular permissions to allow you to pass only
|
||||
// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide.
|
||||
//
|
||||
// You can set the session tags as transitive. Transitive tags persist during role
|
||||
// chaining. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide.
|
||||
//
|
||||
// # Identities
|
||||
//
|
||||
// Before your application can call AssumeRoleWithWebIdentity , you must have an
|
||||
// identity token from a supported identity provider and create a role that the
|
||||
// application can assume. The role that your application assumes must trust the
|
||||
// identity provider that is associated with the identity token. In other words,
|
||||
// the identity provider must be specified in the role's trust policy.
|
||||
//
|
||||
// Calling AssumeRoleWithWebIdentity can result in an entry in your CloudTrail
|
||||
// logs. The entry includes the [Subject]of the provided web identity token. We recommend
|
||||
// that you avoid using any personally identifiable information (PII) in this
|
||||
// field. For example, you could instead use a GUID or a pairwise identifier, as [suggested in the OIDC specification].
|
||||
//
|
||||
// For more information about how to use web identity federation and the
|
||||
// AssumeRoleWithWebIdentity 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)
|
||||
// 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/)
|
||||
// . Walk through the process of authenticating through Login with Amazon,
|
||||
//
|
||||
// [Using Web Identity Federation API Operations for Mobile Apps]
|
||||
// - and [Federation Through a Web-based Identity Provider].
|
||||
//
|
||||
// [Web Identity Federation Playground]
|
||||
// - . Walk through the process of authenticating through Login with Amazon,
|
||||
// Facebook, or Google, getting temporary security credentials, and then using
|
||||
// those credentials to make a request to Amazon Web Services.
|
||||
// - 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/)
|
||||
// . These toolkits contain sample apps that show how to invoke the identity
|
||||
// providers. The toolkits then show how to use the information from these
|
||||
//
|
||||
// [Amazon Web Services SDK for iOS Developer Guide]
|
||||
// - and [Amazon Web Services SDK for Android Developer Guide]. 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 to get and use temporary security credentials.
|
||||
// - 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 how to
|
||||
// use web identity federation to get access to content in Amazon S3.
|
||||
//
|
||||
// [Web Identity Federation with Mobile Applications]
|
||||
// - . This article discusses web identity federation and shows an example of
|
||||
// how to use web identity federation to get access to content in Amazon S3.
|
||||
//
|
||||
// [Amazon Web Services SDK for iOS Developer Guide]: http://aws.amazon.com/sdkforios/
|
||||
// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
||||
// [Web Identity Federation Playground]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
|
||||
// [Amazon Web Services SDK for Android Developer Guide]: http://aws.amazon.com/sdkforandroid/
|
||||
// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
||||
// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
||||
// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
||||
// [Subject]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
|
||||
// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
||||
// [Amazon Cognito identity pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
|
||||
// [Federation Through a Web-based Identity Provider]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
||||
// [Using IAM Roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Amazon Cognito federated identities]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
|
||||
// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
||||
// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
||||
// [Web Identity Federation with Mobile Applications]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
|
||||
// [Using Web Identity Federation API Operations for Mobile Apps]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
||||
// [suggested in the OIDC specification]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
|
||||
func (c *Client) AssumeRoleWithWebIdentity(ctx context.Context, params *AssumeRoleWithWebIdentityInput, optFns ...func(*Options)) (*AssumeRoleWithWebIdentityOutput, error) {
|
||||
if params == nil {
|
||||
params = &AssumeRoleWithWebIdentityInput{}
|
||||
@ -139,10 +177,11 @@ type AssumeRoleWithWebIdentityInput struct {
|
||||
// identifier that is associated with the user who is using your application. That
|
||||
// way, the temporary security credentials that your application will use are
|
||||
// associated with that user. This session name is included as part of the ARN and
|
||||
// assumed role ID in the AssumedRoleUser response element. The regex used to
|
||||
// validate this parameter is a string of characters consisting of upper- and
|
||||
// lower-case alphanumeric characters with no spaces. You can also include
|
||||
// underscores or any of the following characters: =,.@-
|
||||
// assumed role ID in the AssumedRoleUser response element.
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@-
|
||||
//
|
||||
// This member is required.
|
||||
RoleSessionName *string
|
||||
@ -162,73 +201,90 @@ type AssumeRoleWithWebIdentityInput struct {
|
||||
// higher than this setting, the operation fails. For example, if you specify a
|
||||
// session duration of 12 hours, but your administrator set the maximum session
|
||||
// duration to 6 hours, your operation fails. To learn how to view the maximum
|
||||
// value for your role, see View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
|
||||
// in the IAM User Guide. By default, the value is set to 3600 seconds. The
|
||||
// DurationSeconds parameter is separate from the duration of a console session
|
||||
// that you might request using the returned credentials. The request to the
|
||||
// federation endpoint for a console sign-in token takes a SessionDuration
|
||||
// value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide.
|
||||
//
|
||||
// By default, the value is set to 3600 seconds.
|
||||
//
|
||||
// The DurationSeconds parameter is separate from the duration of a console
|
||||
// session that you might request using the returned credentials. The request to
|
||||
// the federation endpoint for a console sign-in token takes a SessionDuration
|
||||
// parameter that specifies the maximum length of the console session. For more
|
||||
// information, see Creating a URL that Enables Federated Users to Access the
|
||||
// Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
|
||||
// in the IAM User Guide.
|
||||
// information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide.
|
||||
//
|
||||
// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
||||
// [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
|
||||
DurationSeconds *int32
|
||||
|
||||
// An IAM policy in JSON format that you want to use as an inline session policy.
|
||||
//
|
||||
// This parameter is optional. Passing policies to this operation returns new
|
||||
// temporary credentials. The resulting session's permissions are the intersection
|
||||
// of the role's identity-based policy and the session policies. You can use the
|
||||
// role's temporary credentials in subsequent Amazon Web Services API calls to
|
||||
// access resources in the account that owns the role. You cannot use session
|
||||
// policies to grant more permissions than those allowed by the identity-based
|
||||
// policy of the role that is being assumed. For more information, see Session
|
||||
// Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. The plaintext that you use for both inline and managed
|
||||
// session policies can't exceed 2,048 characters. The JSON policy characters can
|
||||
// be any ASCII character from the space character to the end of the valid
|
||||
// character list (\u0020 through \u00FF). It can also include the tab (\u0009),
|
||||
// linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web
|
||||
// Services conversion compresses the passed inline session policy, managed policy
|
||||
// ARNs, and session tags into a packed binary format that has a separate limit.
|
||||
// Your request can fail for this limit even if your plaintext meets the other
|
||||
// requirements. The PackedPolicySize response element indicates by percentage how
|
||||
// close the policies and tags for your request are to the upper size limit.
|
||||
// policy of the role that is being assumed. For more information, see [Session Policies]in the IAM
|
||||
// User Guide.
|
||||
//
|
||||
// The plaintext that you use for both inline and managed session policies can't
|
||||
// exceed 2,048 characters. The JSON policy characters can be any ASCII character
|
||||
// from the space character to the end of the valid character list (\u0020 through
|
||||
// \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
|
||||
// return (\u000D) characters.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
Policy *string
|
||||
|
||||
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
|
||||
// use as managed session policies. The policies must exist in the same account as
|
||||
// the role. This parameter is optional. You can provide up to 10 managed policy
|
||||
// ARNs. However, the plaintext that you use for both inline and managed session
|
||||
// policies can't exceed 2,048 characters. For more information about ARNs, see
|
||||
// Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
|
||||
// in the Amazon Web Services General Reference. An Amazon Web Services conversion
|
||||
// compresses the passed inline session policy, managed policy ARNs, and session
|
||||
// tags into a packed binary format that has a separate limit. Your request can
|
||||
// fail for this limit even if your plaintext meets the other requirements. The
|
||||
// PackedPolicySize response element indicates by percentage how close the policies
|
||||
// and tags for your request are to the upper size limit. Passing policies to this
|
||||
// operation returns new temporary credentials. The resulting session's permissions
|
||||
// are the intersection of the role's identity-based policy and the session
|
||||
// policies. You can use the role's temporary credentials in subsequent Amazon Web
|
||||
// Services API calls to access resources in the account that owns the role. You
|
||||
// cannot use session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide.
|
||||
// the role.
|
||||
//
|
||||
// This parameter is optional. You can provide up to 10 managed policy ARNs.
|
||||
// However, the plaintext that you use for both inline and managed session policies
|
||||
// can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the
|
||||
// Amazon Web Services General Reference.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// Passing policies to this operation returns new temporary credentials. The
|
||||
// resulting session's permissions are the intersection of the role's
|
||||
// identity-based policy and the session policies. You can use the role's temporary
|
||||
// credentials in subsequent Amazon Web Services API calls to access resources in
|
||||
// the account that owns the role. You cannot use session policies to grant more
|
||||
// permissions than those allowed by the identity-based policy of the role that is
|
||||
// being assumed. For more information, see [Session Policies]in the IAM User Guide.
|
||||
//
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
|
||||
PolicyArns []types.PolicyDescriptorType
|
||||
|
||||
// The fully qualified host component of the domain name of the OAuth 2.0 identity
|
||||
// provider. Do not specify this value for an OpenID Connect identity provider.
|
||||
//
|
||||
// Currently www.amazon.com and graph.facebook.com are the only supported identity
|
||||
// providers for OAuth 2.0 access tokens. Do not include URL schemes and port
|
||||
// numbers. Do not specify this value for OpenID Connect ID tokens.
|
||||
// numbers.
|
||||
//
|
||||
// Do not specify this value for OpenID Connect ID tokens.
|
||||
ProviderId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
// Contains the response to a successful AssumeRoleWithWebIdentity request,
|
||||
// including temporary Amazon Web Services credentials that can be used to make
|
||||
// Amazon Web Services requests.
|
||||
// Contains the response to a successful AssumeRoleWithWebIdentity request, including temporary Amazon Web
|
||||
// Services credentials that can be used to make Amazon Web Services requests.
|
||||
type AssumeRoleWithWebIdentityOutput struct {
|
||||
|
||||
// The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers
|
||||
@ -244,9 +300,10 @@ type AssumeRoleWithWebIdentityOutput struct {
|
||||
Audience *string
|
||||
|
||||
// The temporary security credentials, which include an access key ID, a secret
|
||||
// access key, and a security token. The size of the security token that STS API
|
||||
// operations return is not fixed. We strongly recommend that you make no
|
||||
// assumptions about the maximum size.
|
||||
// access key, and a security token.
|
||||
//
|
||||
// The size of the security token that STS API operations return is not fixed. We
|
||||
// strongly recommend that you make no assumptions about the maximum size.
|
||||
Credentials *types.Credentials
|
||||
|
||||
// A percentage value that indicates the packed size of the session policies and
|
||||
@ -255,30 +312,34 @@ type AssumeRoleWithWebIdentityOutput struct {
|
||||
// allowed space.
|
||||
PackedPolicySize *int32
|
||||
|
||||
// The issuing authority of the web identity token presented. For OpenID Connect
|
||||
// The issuing authority of the web identity token presented. For OpenID Connect
|
||||
// ID tokens, this contains the value of the iss field. For OAuth 2.0 access
|
||||
// tokens, this contains the value of the ProviderId parameter that was passed in
|
||||
// the AssumeRoleWithWebIdentity request.
|
||||
Provider *string
|
||||
|
||||
// The value of the source identity that is returned in the JSON web token (JWT)
|
||||
// from the identity provider. You can require users to set a source identity value
|
||||
// when they assume a role. You do this by using the sts:SourceIdentity condition
|
||||
// key in a role trust policy. That way, actions that are taken with the role are
|
||||
// associated with that user. After the source identity is set, the value cannot be
|
||||
// changed. It is present in the request for all actions that are taken by the role
|
||||
// and persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
|
||||
// sessions. You can configure your identity provider to use an attribute
|
||||
// from the identity provider.
|
||||
//
|
||||
// You can require users to set a source identity value when they assume a role.
|
||||
// You do this by using the sts:SourceIdentity condition key in a role trust
|
||||
// policy. That way, actions that are taken with the role are associated with that
|
||||
// user. After the source identity is set, the value cannot be changed. It is
|
||||
// present in the request for all actions that are taken by the role and persists
|
||||
// across [chained role]sessions. You can configure your identity provider to use an attribute
|
||||
// associated with your users, like user name or email, as the source identity when
|
||||
// calling AssumeRoleWithWebIdentity . You do this by adding a claim to the JSON
|
||||
// web token. To learn more about OIDC tokens and claims, see Using Tokens with
|
||||
// User Pools (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html)
|
||||
// in the Amazon Cognito Developer Guide. For more information about using source
|
||||
// identity, see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
|
||||
// in the IAM User Guide. The regex used to validate this parameter is a string of
|
||||
// characters consisting of upper- and lower-case alphanumeric characters with no
|
||||
// spaces. You can also include underscores or any of the following characters:
|
||||
// =,.@-
|
||||
// web token. To learn more about OIDC tokens and claims, see [Using Tokens with User Pools]in the Amazon
|
||||
// Cognito Developer Guide. For more information about using source identity, see [Monitor and control actions taken with assumed roles]
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@-
|
||||
//
|
||||
// [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining
|
||||
// [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
||||
// [Using Tokens with User Pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html
|
||||
SourceIdentity *string
|
||||
|
||||
// The unique user identifier that is returned by the identity provider. This
|
||||
@ -347,6 +408,12 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAssumeRoleWithWebIdentityValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
51
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
generated
vendored
51
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
generated
vendored
@ -11,28 +11,39 @@ import (
|
||||
)
|
||||
|
||||
// Decodes additional information about the authorization status of a request from
|
||||
// an encoded message returned in response to an Amazon Web Services request. For
|
||||
// example, if a user is not authorized to perform an operation that he or she has
|
||||
// requested, the request returns a Client.UnauthorizedOperation response (an HTTP
|
||||
// 403 response). Some Amazon Web Services operations additionally return an
|
||||
// encoded message that can provide details about this authorization failure. Only
|
||||
// certain Amazon Web Services operations return an encoded authorization message.
|
||||
// The documentation for an individual operation indicates whether that operation
|
||||
// returns an encoded message in addition to returning an HTTP code. The message is
|
||||
// encoded because the details of the authorization status can contain privileged
|
||||
// information that the user who requested the operation should not see. To decode
|
||||
// an authorization status message, a user must be granted permissions through an
|
||||
// IAM policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
|
||||
// to request the DecodeAuthorizationMessage ( sts:DecodeAuthorizationMessage )
|
||||
// action. The decoded message includes the following type of information:
|
||||
// an encoded message returned in response to an Amazon Web Services request.
|
||||
//
|
||||
// For example, if a user is not authorized to perform an operation that he or she
|
||||
// has requested, the request returns a Client.UnauthorizedOperation response (an
|
||||
// HTTP 403 response). Some Amazon Web Services operations additionally return an
|
||||
// encoded message that can provide details about this authorization failure.
|
||||
//
|
||||
// Only certain Amazon Web Services operations return an encoded authorization
|
||||
// message. The documentation for an individual operation indicates whether that
|
||||
// operation returns an encoded message in addition to returning an HTTP code.
|
||||
//
|
||||
// The message is encoded because the details of the authorization status can
|
||||
// contain privileged information that the user who requested the operation should
|
||||
// not see. To decode an authorization status message, a user must be granted
|
||||
// permissions through an IAM [policy]to request the DecodeAuthorizationMessage (
|
||||
// sts:DecodeAuthorizationMessage ) action.
|
||||
//
|
||||
// The decoded message includes the following type of information:
|
||||
//
|
||||
// - 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 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.
|
||||
// absence of an explicit allow. For more information, see [Determining Whether a Request is Allowed or Denied]in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// - The principal who made the request.
|
||||
//
|
||||
// - The requested action.
|
||||
//
|
||||
// - The requested resource.
|
||||
//
|
||||
// - The values of condition keys in the context of the user's request.
|
||||
//
|
||||
// [Determining Whether a Request is Allowed or Denied]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow
|
||||
// [policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
||||
func (c *Client) DecodeAuthorizationMessage(ctx context.Context, params *DecodeAuthorizationMessageInput, optFns ...func(*Options)) (*DecodeAuthorizationMessageOutput, error) {
|
||||
if params == nil {
|
||||
params = &DecodeAuthorizationMessageInput{}
|
||||
@ -127,6 +138,12 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDecodeAuthorizationMessageValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
55
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
generated
vendored
55
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
generated
vendored
@ -10,23 +10,31 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Returns the account identifier for the specified access key ID. Access keys
|
||||
// consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE ) and
|
||||
// a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY ).
|
||||
// For more information about access keys, see Managing Access Keys for IAM Users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)
|
||||
// in the IAM User Guide. When you pass an access key ID to this operation, it
|
||||
// returns the ID of the Amazon Web Services account to which the keys belong.
|
||||
// Access key IDs beginning with AKIA are long-term credentials for an IAM user or
|
||||
// the Amazon Web Services account root user. Access key IDs beginning with ASIA
|
||||
// are temporary credentials that are created using STS operations. If the account
|
||||
// in the response belongs to you, you can sign in as the root user and review your
|
||||
// root user access keys. Then, you can pull a credentials report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html)
|
||||
// to learn which IAM user owns the keys. To learn who requested the temporary
|
||||
// credentials for an ASIA access key, view the STS events in your CloudTrail logs (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html)
|
||||
// in the IAM User Guide. This operation does not indicate the state of the access
|
||||
// key. The key might be active, inactive, or deleted. Active keys might not have
|
||||
// permissions to perform an operation. Providing a deleted access key might return
|
||||
// an error that the key doesn't exist.
|
||||
// Returns the account identifier for the specified access key ID.
|
||||
//
|
||||
// Access keys consist of two parts: an access key ID (for example,
|
||||
// AKIAIOSFODNN7EXAMPLE ) and a secret access key (for example,
|
||||
// wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY ). For more information about access
|
||||
// keys, see [Managing Access Keys for IAM Users]in the IAM User Guide.
|
||||
//
|
||||
// When you pass an access key ID to this operation, it returns the ID of the
|
||||
// Amazon Web Services account to which the keys belong. Access key IDs beginning
|
||||
// with AKIA are long-term credentials for an IAM user or the Amazon Web Services
|
||||
// account root user. Access key IDs beginning with ASIA are temporary credentials
|
||||
// that are created using STS operations. If the account in the response belongs to
|
||||
// you, you can sign in as the root user and review your root user access keys.
|
||||
// Then, you can pull a [credentials report]to learn which IAM user owns the keys. To learn who
|
||||
// requested the temporary credentials for an ASIA access key, view the STS events
|
||||
// in your [CloudTrail logs]in the IAM User Guide.
|
||||
//
|
||||
// This operation does not indicate the state of the access key. The key might be
|
||||
// active, inactive, or deleted. Active keys might not have permissions to perform
|
||||
// an operation. Providing a deleted access key might return an error that the key
|
||||
// doesn't exist.
|
||||
//
|
||||
// [credentials report]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html
|
||||
// [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html
|
||||
// [Managing Access Keys for IAM Users]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
|
||||
func (c *Client) GetAccessKeyInfo(ctx context.Context, params *GetAccessKeyInfoInput, optFns ...func(*Options)) (*GetAccessKeyInfoOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetAccessKeyInfoInput{}
|
||||
@ -44,9 +52,10 @@ func (c *Client) GetAccessKeyInfo(ctx context.Context, params *GetAccessKeyInfoI
|
||||
|
||||
type GetAccessKeyInfoInput struct {
|
||||
|
||||
// The identifier of an access key. This parameter allows (through its regex
|
||||
// pattern) a string of characters that can consist of any upper- or lowercase
|
||||
// letter or digit.
|
||||
// The identifier of an access key.
|
||||
//
|
||||
// This parameter allows (through its regex pattern) a string of characters that
|
||||
// can consist of any upper- or lowercase letter or digit.
|
||||
//
|
||||
// This member is required.
|
||||
AccessKeyId *string
|
||||
@ -120,6 +129,12 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetAccessKeyInfoValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
32
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
generated
vendored
32
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
generated
vendored
@ -12,13 +12,15 @@ import (
|
||||
)
|
||||
|
||||
// Returns details about the IAM user or role whose credentials are used to call
|
||||
// the operation. No permissions are required to perform this operation. If an
|
||||
// administrator attaches a policy to your identity that explicitly denies access
|
||||
// to the sts:GetCallerIdentity action, you can still perform this operation.
|
||||
// Permissions are not required because the same information is returned when
|
||||
// access is denied. To view an example response, see I Am Not Authorized to
|
||||
// Perform: iam:DeleteVirtualMFADevice (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa)
|
||||
// in the IAM User Guide.
|
||||
// the operation.
|
||||
//
|
||||
// No permissions are required to perform this operation. If an administrator
|
||||
// attaches a policy to your identity that explicitly denies access to the
|
||||
// sts:GetCallerIdentity action, you can still perform this operation. Permissions
|
||||
// are not required because the same information is returned when access is denied.
|
||||
// To view an example response, see [I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice]in the IAM User Guide.
|
||||
//
|
||||
// [I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa
|
||||
func (c *Client) GetCallerIdentity(ctx context.Context, params *GetCallerIdentityInput, optFns ...func(*Options)) (*GetCallerIdentityOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetCallerIdentityInput{}
|
||||
@ -38,8 +40,8 @@ type GetCallerIdentityInput struct {
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
// Contains the response to a successful GetCallerIdentity request, including
|
||||
// information about the entity making the request.
|
||||
// Contains the response to a successful GetCallerIdentity request, including information about the
|
||||
// entity making the request.
|
||||
type GetCallerIdentityOutput struct {
|
||||
|
||||
// The Amazon Web Services account ID number of the account that owns or contains
|
||||
@ -51,8 +53,10 @@ type GetCallerIdentityOutput struct {
|
||||
|
||||
// The unique identifier of the calling entity. The exact value depends on the
|
||||
// type of entity that is making the call. The values returned are those listed in
|
||||
// the aws:userid column in the Principal table (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable)
|
||||
// found on the Policy Variables reference page in the IAM User Guide.
|
||||
// the aws:userid column in the [Principal table]found on the Policy Variables reference page in
|
||||
// the IAM User Guide.
|
||||
//
|
||||
// [Principal table]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable
|
||||
UserId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@ -116,6 +120,12 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCallerIdentity(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
|
323
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
generated
vendored
323
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
generated
vendored
@ -14,74 +14,100 @@ import (
|
||||
// Returns a set of temporary security credentials (consisting of an access key
|
||||
// ID, a secret access key, and a security token) for a user. A typical use is in a
|
||||
// proxy application that gets temporary security credentials on behalf of
|
||||
// distributed applications inside a corporate network. You must call the
|
||||
// GetFederationToken operation using the long-term security credentials of an IAM
|
||||
// user. As a result, this call is appropriate in contexts where those credentials
|
||||
// can be safeguarded, usually in a server-based application. For a comparison of
|
||||
// GetFederationToken with the other API operations that produce temporary
|
||||
// credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the 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. Although it is possible to call GetFederationToken using
|
||||
// the security credentials of an Amazon Web Services account root user rather than
|
||||
// an IAM user that you create for the purpose of a proxy application, we do not
|
||||
// recommend it. For more information, see Safeguard your root user credentials
|
||||
// and don't use them for everyday tasks (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)
|
||||
// in the IAM User Guide. You can create a mobile-based or browser-based app that
|
||||
// can authenticate users using a web identity provider like Login with Amazon,
|
||||
// Facebook, Google, or an OpenID Connect-compatible identity provider. In this
|
||||
// case, we recommend that you use Amazon Cognito (http://aws.amazon.com/cognito/)
|
||||
// or AssumeRoleWithWebIdentity . For more information, see Federation Through a
|
||||
// Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
|
||||
// in the IAM User Guide. Session duration The temporary credentials are valid for
|
||||
// the specified duration, from 900 seconds (15 minutes) up to a maximum of 129,600
|
||||
// seconds (36 hours). The default session duration is 43,200 seconds (12 hours).
|
||||
// Temporary credentials obtained by using the root user credentials have a maximum
|
||||
// duration of 3,600 seconds (1 hour). Permissions You can use the temporary
|
||||
// credentials created by GetFederationToken in any Amazon Web Services service
|
||||
// with the following exceptions:
|
||||
// distributed applications inside a corporate network.
|
||||
//
|
||||
// You must call the GetFederationToken operation using the long-term security
|
||||
// credentials of an IAM user. As a result, this call is appropriate in contexts
|
||||
// where those credentials can be safeguarded, usually in a server-based
|
||||
// application. For a comparison of GetFederationToken with the other API
|
||||
// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide.
|
||||
//
|
||||
// Although it is possible to call GetFederationToken using the security
|
||||
// credentials of an Amazon Web Services account root user rather than an IAM user
|
||||
// that you create for the purpose of a proxy application, we do not recommend it.
|
||||
// For more information, see [Safeguard your root user credentials and don't use them for everyday tasks]in the IAM User Guide.
|
||||
//
|
||||
// You can create a mobile-based or browser-based app that can authenticate users
|
||||
// using a web identity provider like Login with Amazon, Facebook, Google, or an
|
||||
// OpenID Connect-compatible identity provider. In this case, we recommend that you
|
||||
// use [Amazon Cognito]or AssumeRoleWithWebIdentity . For more information, see [Federation Through a Web-based Identity Provider] in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// # Session duration
|
||||
//
|
||||
// The temporary credentials are valid for the specified duration, from 900
|
||||
// seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default
|
||||
// session duration is 43,200 seconds (12 hours). Temporary credentials obtained by
|
||||
// using the root user credentials have a maximum duration of 3,600 seconds (1
|
||||
// hour).
|
||||
//
|
||||
// # Permissions
|
||||
//
|
||||
// You can use the temporary credentials created by GetFederationToken in any
|
||||
// Amazon Web Services service with the following exceptions:
|
||||
//
|
||||
// - You cannot call any IAM operations using the CLI or the Amazon Web Services
|
||||
// API. This limitation does not apply to console sessions.
|
||||
//
|
||||
// - You cannot call any STS operations except GetCallerIdentity .
|
||||
//
|
||||
// You can use temporary credentials for single sign-on (SSO) to the console. You
|
||||
// must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
// inline session policy. You can also specify up to 10 managed policy Amazon
|
||||
// Resource Names (ARNs) to use as managed session policies. The plaintext that you
|
||||
// use for both inline and managed session policies can't exceed 2,048 characters.
|
||||
// You can use temporary credentials for single sign-on (SSO) to the console.
|
||||
//
|
||||
// You must pass an inline or managed [session policy] to this operation. You can pass a single
|
||||
// JSON policy document to use as an inline session policy. You can also specify up
|
||||
// to 10 managed policy Amazon Resource Names (ARNs) to use as managed session
|
||||
// policies. The plaintext that you use for both inline and managed session
|
||||
// policies can't exceed 2,048 characters.
|
||||
//
|
||||
// Though the session policy parameters are optional, if you do not pass a policy,
|
||||
// then the resulting federated user session has no permissions. When you pass
|
||||
// session policies, the session permissions are the intersection of the IAM user
|
||||
// policies and the session policies that you pass. This gives you a way to further
|
||||
// restrict the permissions for a federated user. You cannot use session policies
|
||||
// to grant more permissions than those that are defined in the permissions policy
|
||||
// of the IAM user. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. For information about using GetFederationToken to create
|
||||
// temporary security credentials, see GetFederationToken—Federation Through a
|
||||
// Custom Identity Broker (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken)
|
||||
// . You can use the credentials to access a resource that has a resource-based
|
||||
// of the IAM user. For more information, see [Session Policies]in the IAM User Guide. For
|
||||
// information about using GetFederationToken to create temporary security
|
||||
// credentials, see [GetFederationToken—Federation Through a Custom Identity Broker].
|
||||
//
|
||||
// You can use the credentials to access a resource that has a resource-based
|
||||
// policy. If that policy specifically references the federated user session in the
|
||||
// Principal element of the policy, the session has the permissions allowed by the
|
||||
// policy. These permissions are granted in addition to the permissions granted by
|
||||
// the session policies. Tags (Optional) You can pass tag key-value pairs to your
|
||||
// session. These are called session tags. For more information about session tags,
|
||||
// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// in the IAM User Guide. You can create a mobile-based or browser-based app that
|
||||
// can authenticate users using a web identity provider like Login with Amazon,
|
||||
// Facebook, Google, or an OpenID Connect-compatible identity provider. In this
|
||||
// case, we recommend that you use Amazon Cognito (http://aws.amazon.com/cognito/)
|
||||
// or AssumeRoleWithWebIdentity . For more information, see Federation Through a
|
||||
// Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
|
||||
// in the IAM User Guide. An administrator must grant you the permissions necessary
|
||||
// to pass session tags. The administrator can also create granular permissions to
|
||||
// allow you to pass only specific session tags. For more information, see
|
||||
// Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
|
||||
// in the IAM User Guide. Tag key–value pairs are not case sensitive, but case is
|
||||
// preserved. This means that you cannot have separate Department and department
|
||||
// tag keys. Assume that the user that you are federating has the Department =
|
||||
// Marketing tag and you pass the department = engineering session tag. Department
|
||||
// and department are not saved as separate tags, and the session tag passed in
|
||||
// the request takes precedence over the user tag.
|
||||
// the session policies.
|
||||
//
|
||||
// # Tags
|
||||
//
|
||||
// (Optional) You can pass tag key-value pairs to your session. These are called
|
||||
// session tags. For more information about session tags, see [Passing Session Tags in STS]in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// You can create a mobile-based or browser-based app that can authenticate users
|
||||
// using a web identity provider like Login with Amazon, Facebook, Google, or an
|
||||
// OpenID Connect-compatible identity provider. In this case, we recommend that you
|
||||
// use [Amazon Cognito]or AssumeRoleWithWebIdentity . For more information, see [Federation Through a Web-based Identity Provider] in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// An administrator must grant you the permissions necessary to pass session tags.
|
||||
// The administrator can also create granular permissions to allow you to pass only
|
||||
// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide.
|
||||
//
|
||||
// Tag key–value pairs are not case sensitive, but case is preserved. This means
|
||||
// that you cannot have separate Department and department tag keys. Assume that
|
||||
// the user that you are federating has the Department = Marketing tag and you
|
||||
// pass the department = engineering session tag. Department and department are
|
||||
// not saved as separate tags, and the session tag passed in the request takes
|
||||
// precedence over the user tag.
|
||||
//
|
||||
// [Federation Through a Web-based Identity Provider]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
||||
// [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Amazon Cognito]: http://aws.amazon.com/cognito/
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
||||
// [GetFederationToken—Federation Through a Custom Identity Broker]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken
|
||||
// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
||||
// [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
||||
// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
||||
// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
||||
func (c *Client) GetFederationToken(ctx context.Context, params *GetFederationTokenInput, optFns ...func(*Options)) (*GetFederationTokenOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetFederationTokenInput{}
|
||||
@ -102,10 +128,11 @@ type GetFederationTokenInput struct {
|
||||
// The name of the federated user. The name is used as an identifier for the
|
||||
// temporary security credentials (such as Bob ). For example, you can reference
|
||||
// the federated user name in a resource-based policy, such as in an Amazon S3
|
||||
// bucket policy. The regex used to validate this parameter is a string of
|
||||
// characters consisting of upper- and lower-case alphanumeric characters with no
|
||||
// spaces. You can also include underscores or any of the following characters:
|
||||
// =,.@-
|
||||
// bucket policy.
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@-
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
@ -119,99 +146,127 @@ type GetFederationTokenInput struct {
|
||||
DurationSeconds *int32
|
||||
|
||||
// An IAM policy in JSON format that you want to use as an inline session policy.
|
||||
// You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
// inline session policy. You can also specify up to 10 managed policy Amazon
|
||||
// Resource Names (ARNs) to use as managed session policies. This parameter is
|
||||
// optional. However, if you do not pass any session policies, then the resulting
|
||||
// federated user session has no permissions. When you pass session policies, the
|
||||
// session permissions are the intersection of the IAM user policies and the
|
||||
// session policies that you pass. This gives you a way to further restrict the
|
||||
// permissions for a federated user. You cannot use session policies to grant more
|
||||
// permissions than those that are defined in the permissions policy of the IAM
|
||||
// user. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. The resulting credentials can be used to access a
|
||||
// resource that has a resource-based policy. If that policy specifically
|
||||
// references the federated user session in the Principal element of the policy,
|
||||
// the session has the permissions allowed by the policy. These permissions are
|
||||
// granted in addition to the permissions that are granted by the session policies.
|
||||
//
|
||||
// You must pass an inline or managed [session policy] to this operation. You can pass a single
|
||||
// JSON policy document to use as an inline session policy. You can also specify up
|
||||
// to 10 managed policy Amazon Resource Names (ARNs) to use as managed session
|
||||
// policies.
|
||||
//
|
||||
// This parameter is optional. However, if you do not pass any session policies,
|
||||
// then the resulting federated user session has no permissions.
|
||||
//
|
||||
// When you pass session policies, the session permissions are the intersection of
|
||||
// the IAM user policies and the session policies that you pass. This gives you a
|
||||
// way to further restrict the permissions for a federated user. You cannot use
|
||||
// session policies to grant more permissions than those that are defined in the
|
||||
// permissions policy of the IAM user. For more information, see [Session Policies]in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// The resulting credentials can be used to access a resource that has a
|
||||
// resource-based policy. If that policy specifically references the federated user
|
||||
// session in the Principal element of the policy, the session has the permissions
|
||||
// allowed by the policy. These permissions are granted in addition to the
|
||||
// permissions that are granted by the session policies.
|
||||
//
|
||||
// The plaintext that you use for both inline and managed session policies can't
|
||||
// exceed 2,048 characters. The JSON policy characters can be any ASCII character
|
||||
// from the space character to the end of the valid character list (\u0020 through
|
||||
// \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
|
||||
// return (\u000D) characters. An Amazon Web Services conversion compresses the
|
||||
// passed inline session policy, managed policy ARNs, and session tags into a
|
||||
// packed binary format that has a separate limit. Your request can fail for this
|
||||
// limit even if your plaintext meets the other requirements. The PackedPolicySize
|
||||
// response element indicates by percentage how close the policies and tags for
|
||||
// your request are to the upper size limit.
|
||||
Policy *string
|
||||
|
||||
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
|
||||
// use as a managed session policy. The policies must exist in the same account as
|
||||
// the IAM user that is requesting federated access. You must pass an inline or
|
||||
// managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
// inline session policy. You can also specify up to 10 managed policy Amazon
|
||||
// Resource Names (ARNs) to use as managed session policies. The plaintext that you
|
||||
// use for both inline and managed session policies can't exceed 2,048 characters.
|
||||
// You can provide up to 10 managed policy ARNs. For more information about ARNs,
|
||||
// see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
|
||||
// in the Amazon Web Services General Reference. This parameter is optional.
|
||||
// However, if you do not pass any session policies, then the resulting federated
|
||||
// user session has no permissions. When you pass session policies, the session
|
||||
// permissions are the intersection of the IAM user policies and the session
|
||||
// policies that you pass. This gives you a way to further restrict the permissions
|
||||
// for a federated user. You cannot use session policies to grant more permissions
|
||||
// than those that are defined in the permissions policy of the IAM user. For more
|
||||
// information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. The resulting credentials can be used to access a
|
||||
// resource that has a resource-based policy. If that policy specifically
|
||||
// references the federated user session in the Principal element of the policy,
|
||||
// the session has the permissions allowed by the policy. These permissions are
|
||||
// granted in addition to the permissions that are granted by the session policies.
|
||||
// return (\u000D) characters.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
Policy *string
|
||||
|
||||
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
|
||||
// use as a managed session policy. The policies must exist in the same account as
|
||||
// the IAM user that is requesting federated access.
|
||||
//
|
||||
// You must pass an inline or managed [session policy] to this operation. You can pass a single
|
||||
// JSON policy document to use as an inline session policy. You can also specify up
|
||||
// to 10 managed policy Amazon Resource Names (ARNs) to use as managed session
|
||||
// policies. The plaintext that you use for both inline and managed session
|
||||
// policies can't exceed 2,048 characters. You can provide up to 10 managed policy
|
||||
// ARNs. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the Amazon Web Services General
|
||||
// Reference.
|
||||
//
|
||||
// This parameter is optional. However, if you do not pass any session policies,
|
||||
// then the resulting federated user session has no permissions.
|
||||
//
|
||||
// When you pass session policies, the session permissions are the intersection of
|
||||
// the IAM user policies and the session policies that you pass. This gives you a
|
||||
// way to further restrict the permissions for a federated user. You cannot use
|
||||
// session policies to grant more permissions than those that are defined in the
|
||||
// permissions policy of the IAM user. For more information, see [Session Policies]in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// The resulting credentials can be used to access a resource that has a
|
||||
// resource-based policy. If that policy specifically references the federated user
|
||||
// session in the Principal element of the policy, the session has the permissions
|
||||
// allowed by the policy. These permissions are granted in addition to the
|
||||
// permissions that are granted by the session policies.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
|
||||
PolicyArns []types.PolicyDescriptorType
|
||||
|
||||
// A list of session tags. Each session tag consists of a key name and an
|
||||
// associated value. For more information about session tags, see Passing Session
|
||||
// Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// in the IAM User Guide. This parameter is optional. You can pass up to 50 session
|
||||
// tags. The plaintext session tag keys can’t exceed 128 characters and the values
|
||||
// can’t exceed 256 characters. For these and additional limits, see IAM and STS
|
||||
// Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
|
||||
// inline session policy, managed policy ARNs, and session tags into a packed
|
||||
// binary format that has a separate limit. Your request can fail for this limit
|
||||
// even if your plaintext meets the other requirements. The PackedPolicySize
|
||||
// response element indicates by percentage how close the policies and tags for
|
||||
// your request are to the upper size limit. You can pass a session tag with the
|
||||
// same key as a tag that is already attached to the user you are federating. When
|
||||
// you do, session tags override a user tag with the same key. Tag key–value pairs
|
||||
// are not case sensitive, but case is preserved. This means that you cannot have
|
||||
// separate Department and department tag keys. Assume that the role has the
|
||||
// Department = Marketing tag and you pass the department = engineering session
|
||||
// tag. Department and department are not saved as separate tags, and the session
|
||||
// tag passed in the request takes precedence over the role tag.
|
||||
// associated value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// This parameter is optional. You can pass up to 50 session tags. The plaintext
|
||||
// session tag keys can’t exceed 128 characters and the values can’t exceed 256
|
||||
// characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User Guide.
|
||||
//
|
||||
// An Amazon Web Services conversion compresses the passed inline session policy,
|
||||
// managed policy ARNs, and session tags into a packed binary format that has a
|
||||
// separate limit. Your request can fail for this limit even if your plaintext
|
||||
// meets the other requirements. The PackedPolicySize response element indicates
|
||||
// by percentage how close the policies and tags for your request are to the upper
|
||||
// size limit.
|
||||
//
|
||||
// You can pass a session tag with the same key as a tag that is already attached
|
||||
// to the user you are federating. When you do, session tags override a user tag
|
||||
// with the same key.
|
||||
//
|
||||
// Tag key–value pairs are not case sensitive, but case is preserved. This means
|
||||
// that you cannot have separate Department and department tag keys. Assume that
|
||||
// the role has the Department = Marketing tag and you pass the department =
|
||||
// engineering session tag. Department and department are not saved as separate
|
||||
// tags, and the session tag passed in the request takes precedence over the role
|
||||
// tag.
|
||||
//
|
||||
// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
||||
// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
||||
Tags []types.Tag
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
// Contains the response to a successful GetFederationToken request, including
|
||||
// temporary Amazon Web Services credentials that can be used to make Amazon Web
|
||||
// Services requests.
|
||||
// Contains the response to a successful GetFederationToken request, including temporary Amazon Web
|
||||
// Services credentials that can be used to make Amazon Web Services requests.
|
||||
type GetFederationTokenOutput struct {
|
||||
|
||||
// The temporary security credentials, which include an access key ID, a secret
|
||||
// access key, and a security (or session) token. The size of the security token
|
||||
// that STS API operations return is not fixed. We strongly recommend that you make
|
||||
// no assumptions about the maximum size.
|
||||
// access key, and a security (or session) token.
|
||||
//
|
||||
// The size of the security token that STS API operations return is not fixed. We
|
||||
// strongly recommend that you make no assumptions about the maximum size.
|
||||
Credentials *types.Credentials
|
||||
|
||||
// Identifiers for the federated user associated with the credentials (such as
|
||||
@ -287,6 +342,12 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetFederationTokenValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
110
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
generated
vendored
110
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
generated
vendored
@ -15,43 +15,58 @@ import (
|
||||
// IAM user. The credentials consist of an access key ID, a secret access key, and
|
||||
// a security token. Typically, you use GetSessionToken if you want to use MFA to
|
||||
// protect programmatic calls to specific Amazon Web Services API operations like
|
||||
// Amazon EC2 StopInstances . MFA-enabled IAM users must call GetSessionToken and
|
||||
// submit an MFA code that is associated with their MFA device. Using the temporary
|
||||
// security credentials that the call returns, IAM users can then make programmatic
|
||||
// calls to API operations that require MFA authentication. An incorrect MFA code
|
||||
// causes the API to return an access denied error. For a comparison of
|
||||
// GetSessionToken with the other API operations that produce temporary
|
||||
// credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the 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. No permissions are required for users to perform this
|
||||
// operation. The purpose of the sts:GetSessionToken operation is to authenticate
|
||||
// the user using MFA. You cannot use policies to control authentication
|
||||
// operations. For more information, see Permissions for GetSessionToken (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html)
|
||||
// in the IAM User Guide. Session Duration The GetSessionToken operation must be
|
||||
// called by using the long-term Amazon Web Services security credentials of an IAM
|
||||
// user. Credentials that are created by IAM users are valid for the duration that
|
||||
// you specify. This duration can range from 900 seconds (15 minutes) up to a
|
||||
// maximum of 129,600 seconds (36 hours), with a default of 43,200 seconds (12
|
||||
// hours). Credentials based on account credentials can range from 900 seconds (15
|
||||
// minutes) up to 3,600 seconds (1 hour), with a default of 1 hour. Permissions The
|
||||
// temporary security credentials created by GetSessionToken can be used to make
|
||||
// API calls to any Amazon Web Services service with the following exceptions:
|
||||
// Amazon EC2 StopInstances .
|
||||
//
|
||||
// MFA-enabled IAM users must call GetSessionToken and submit an MFA code that is
|
||||
// associated with their MFA device. Using the temporary security credentials that
|
||||
// the call returns, IAM users can then make programmatic calls to API operations
|
||||
// that require MFA authentication. An incorrect MFA code causes the API to return
|
||||
// an access denied error. For a comparison of GetSessionToken with the other API
|
||||
// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide.
|
||||
//
|
||||
// No permissions are required for users to perform this operation. The purpose of
|
||||
// the sts:GetSessionToken operation is to authenticate the user using MFA. You
|
||||
// cannot use policies to control authentication operations. For more information,
|
||||
// see [Permissions for GetSessionToken]in the IAM User Guide.
|
||||
//
|
||||
// # Session Duration
|
||||
//
|
||||
// The GetSessionToken operation must be called by using the long-term Amazon Web
|
||||
// Services security credentials of an IAM user. Credentials that are created by
|
||||
// IAM users are valid for the duration that you specify. This duration can range
|
||||
// from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours),
|
||||
// with a default of 43,200 seconds (12 hours). Credentials based on account
|
||||
// credentials can range from 900 seconds (15 minutes) up to 3,600 seconds (1
|
||||
// hour), with a default of 1 hour.
|
||||
//
|
||||
// # Permissions
|
||||
//
|
||||
// The temporary security credentials created by GetSessionToken can be used 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 is included in the request.
|
||||
//
|
||||
// - You cannot call any STS API except AssumeRole or GetCallerIdentity .
|
||||
//
|
||||
// The credentials that GetSessionToken returns are based on permissions
|
||||
// associated with the IAM user whose credentials were used to call the operation.
|
||||
// The temporary credentials have the same permissions as the IAM user. Although it
|
||||
// is possible to call GetSessionToken using the security credentials of an Amazon
|
||||
// Web Services account root user rather than an IAM user, we do not recommend it.
|
||||
// If GetSessionToken is called using root user credentials, the temporary
|
||||
// credentials have root user permissions. For more information, see Safeguard
|
||||
// your root user credentials and don't use them for everyday tasks (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)
|
||||
// in the IAM User Guide For more information about using GetSessionToken to
|
||||
// create temporary credentials, see Temporary Credentials for Users in Untrusted
|
||||
// Environments (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken)
|
||||
// in the IAM User Guide.
|
||||
// The temporary credentials have the same permissions as the IAM user.
|
||||
//
|
||||
// Although it is possible to call GetSessionToken using the security credentials
|
||||
// of an Amazon Web Services account root user rather than an IAM user, we do not
|
||||
// recommend it. If GetSessionToken is called using root user credentials, the
|
||||
// temporary credentials have root user permissions. For more information, see [Safeguard your root user credentials and don't use them for everyday tasks]in
|
||||
// the IAM User Guide
|
||||
//
|
||||
// For more information about using GetSessionToken to create temporary
|
||||
// credentials, see [Temporary Credentials for Users in Untrusted Environments]in the IAM User Guide.
|
||||
//
|
||||
// [Permissions for GetSessionToken]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
|
||||
// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
||||
// [Temporary Credentials for Users in Untrusted Environments]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
|
||||
// [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
||||
// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
||||
func (c *Client) GetSessionToken(ctx context.Context, params *GetSessionTokenInput, optFns ...func(*Options)) (*GetSessionTokenOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetSessionTokenInput{}
|
||||
@ -83,10 +98,11 @@ type GetSessionTokenInput struct {
|
||||
// number for a hardware device (such as GAHT12345678 ) or an Amazon Resource Name
|
||||
// (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user ). You
|
||||
// can find the device for an IAM user by going to the Amazon Web Services
|
||||
// Management Console and viewing the user's security credentials. The regex used
|
||||
// to validate this parameter is a string of characters consisting of upper- and
|
||||
// lower-case alphanumeric characters with no spaces. You can also include
|
||||
// underscores or any of the following characters: =,.@:/-
|
||||
// Management Console and viewing the user's security credentials.
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@:/-
|
||||
SerialNumber *string
|
||||
|
||||
// The value provided by the MFA device, if MFA is required. If any policy
|
||||
@ -94,22 +110,24 @@ type GetSessionTokenInput struct {
|
||||
// authentication is required, the user must provide a code when requesting a set
|
||||
// of temporary security credentials. A user who fails to provide the code receives
|
||||
// an "access denied" response when requesting resources that require MFA
|
||||
// authentication. The format for this parameter, as described by its regex
|
||||
// pattern, is a sequence of six numeric digits.
|
||||
// authentication.
|
||||
//
|
||||
// The format for this parameter, as described by its regex pattern, is a sequence
|
||||
// of six numeric digits.
|
||||
TokenCode *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
// Contains the response to a successful GetSessionToken request, including
|
||||
// temporary Amazon Web Services credentials that can be used to make Amazon Web
|
||||
// Services requests.
|
||||
// Contains the response to a successful GetSessionToken request, including temporary Amazon Web
|
||||
// Services credentials that can be used to make Amazon Web Services requests.
|
||||
type GetSessionTokenOutput struct {
|
||||
|
||||
// The temporary security credentials, which include an access key ID, a secret
|
||||
// access key, and a security (or session) token. The size of the security token
|
||||
// that STS API operations return is not fixed. We strongly recommend that you make
|
||||
// no assumptions about the maximum size.
|
||||
// access key, and a security (or session) token.
|
||||
//
|
||||
// The size of the security token that STS API operations return is not fixed. We
|
||||
// strongly recommend that you make no assumptions about the maximum size.
|
||||
Credentials *types.Credentials
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
@ -173,6 +191,12 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSessionToken(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
|
8
vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go
generated
vendored
8
vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go
generated
vendored
@ -12,7 +12,7 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) {
|
||||
func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) {
|
||||
params.Region = options.Region
|
||||
}
|
||||
|
||||
@ -90,12 +90,12 @@ type AuthResolverParameters struct {
|
||||
Region string
|
||||
}
|
||||
|
||||
func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters {
|
||||
func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters {
|
||||
params := &AuthResolverParameters{
|
||||
Operation: operation,
|
||||
}
|
||||
|
||||
bindAuthParamsRegion(params, input, options)
|
||||
bindAuthParamsRegion(ctx, params, input, options)
|
||||
|
||||
return params
|
||||
}
|
||||
@ -157,7 +157,7 @@ func (*resolveAuthSchemeMiddleware) ID() string {
|
||||
func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
|
||||
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options)
|
||||
params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options)
|
||||
options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
|
||||
|
9
vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
generated
vendored
9
vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
generated
vendored
@ -20,8 +20,17 @@ import (
|
||||
"io"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func deserializeS3Expires(v string) (*time.Time, error) {
|
||||
t, err := smithytime.ParseHTTPDate(v)
|
||||
if err != nil {
|
||||
return nil, nil
|
||||
}
|
||||
return &t, nil
|
||||
}
|
||||
|
||||
type awsAwsquery_deserializeOpAssumeRole struct {
|
||||
}
|
||||
|
||||
|
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go
generated
vendored
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go
generated
vendored
@ -3,9 +3,11 @@
|
||||
// Package sts provides the API client, operations, and parameter types for AWS
|
||||
// Security Token Service.
|
||||
//
|
||||
// Security Token Service Security Token Service (STS) enables you to request
|
||||
// temporary, limited-privilege credentials for users. This guide provides
|
||||
// descriptions of the STS API. For more information about using this service, see
|
||||
// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
|
||||
// .
|
||||
// # Security Token Service
|
||||
//
|
||||
// Security Token Service (STS) enables you to request temporary,
|
||||
// limited-privilege credentials for users. This guide provides descriptions of the
|
||||
// STS API. For more information about using this service, see [Temporary Security Credentials].
|
||||
//
|
||||
// [Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html
|
||||
package sts
|
||||
|
8
vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go
generated
vendored
8
vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go
generated
vendored
@ -1045,7 +1045,7 @@ type endpointParamsBinder interface {
|
||||
bindEndpointParams(*EndpointParameters)
|
||||
}
|
||||
|
||||
func bindEndpointParams(input interface{}, options Options) *EndpointParameters {
|
||||
func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters {
|
||||
params := &EndpointParameters{}
|
||||
|
||||
params.Region = bindRegion(options.Region)
|
||||
@ -1075,6 +1075,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid
|
||||
return next.HandleFinalize(ctx, in)
|
||||
}
|
||||
|
||||
if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil {
|
||||
return out, metadata, fmt.Errorf("invalid accountID set: %w", err)
|
||||
}
|
||||
|
||||
req, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
|
||||
@ -1084,7 +1088,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid
|
||||
return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
|
||||
}
|
||||
|
||||
params := bindEndpointParams(getOperationInput(ctx), m.options)
|
||||
params := bindEndpointParams(ctx, getOperationInput(ctx), m.options)
|
||||
endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
|
||||
|
3
vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
generated
vendored
3
vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
generated
vendored
@ -5,8 +5,7 @@
|
||||
"github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
|
||||
"github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding": "v1.0.5",
|
||||
"github.com/aws/aws-sdk-go-v2/service/internal/presigned-url": "v1.0.7",
|
||||
"github.com/aws/smithy-go": "v1.4.0",
|
||||
"github.com/google/go-cmp": "v0.5.4"
|
||||
"github.com/aws/smithy-go": "v1.4.0"
|
||||
},
|
||||
"files": [
|
||||
"api_client.go",
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package sts
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.28.1"
|
||||
const goModuleVersion = "1.29.1"
|
||||
|
34
vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go
generated
vendored
34
vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go
generated
vendored
@ -24,6 +24,9 @@ type Options struct {
|
||||
// modify this list for per operation behavior.
|
||||
APIOptions []func(*middleware.Stack) error
|
||||
|
||||
// Indicates how aws account ID is applied in endpoint2.0 routing
|
||||
AccountIDEndpointMode aws.AccountIDEndpointMode
|
||||
|
||||
// The optional application specific identifier appended to the User-Agent header.
|
||||
AppID string
|
||||
|
||||
@ -50,8 +53,10 @@ type Options struct {
|
||||
// Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
|
||||
// value for this field will likely prevent you from using any endpoint-related
|
||||
// service features released after the introduction of EndpointResolverV2 and
|
||||
// BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom
|
||||
// endpoint, set the client option BaseEndpoint instead.
|
||||
// BaseEndpoint.
|
||||
//
|
||||
// To migrate an EndpointResolver implementation that uses a custom endpoint, set
|
||||
// the client option BaseEndpoint instead.
|
||||
EndpointResolver EndpointResolver
|
||||
|
||||
// Resolves the endpoint used for a particular service operation. This should be
|
||||
@ -70,17 +75,20 @@ type Options struct {
|
||||
// RetryMaxAttempts specifies the maximum number attempts an API client will call
|
||||
// an operation that fails with a retryable error. A value of 0 is ignored, and
|
||||
// will not be used to configure the API client created default retryer, or modify
|
||||
// per operation call's retry max attempts. If specified in an operation call's
|
||||
// functional options with a value that is different than the constructed client's
|
||||
// Options, the Client's Retryer will be wrapped to use the operation's specific
|
||||
// RetryMaxAttempts value.
|
||||
// per operation call's retry max attempts.
|
||||
//
|
||||
// If specified in an operation call's functional options with a value that is
|
||||
// different than the constructed client's Options, the Client's Retryer will be
|
||||
// wrapped to use the operation's specific RetryMaxAttempts value.
|
||||
RetryMaxAttempts int
|
||||
|
||||
// RetryMode specifies the retry mode the API client will be created with, if
|
||||
// Retryer option is not also specified. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
// Retryer option is not also specified.
|
||||
//
|
||||
// When creating a new API Clients this member will only be used if the Retryer
|
||||
// Options member is nil. This value will be ignored if Retryer is not nil.
|
||||
//
|
||||
// Currently does not support per operation call overrides, may in the future.
|
||||
RetryMode aws.RetryMode
|
||||
|
||||
// Retryer guides how HTTP requests should be retried in case of recoverable
|
||||
@ -97,8 +105,9 @@ type Options struct {
|
||||
|
||||
// The initial DefaultsMode used when the client options were constructed. If the
|
||||
// DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
|
||||
// value was at that point in time. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
// value was at that point in time.
|
||||
//
|
||||
// Currently does not support per operation call overrides, may in the future.
|
||||
resolvedDefaultsMode aws.DefaultsMode
|
||||
|
||||
// The HTTP client to invoke API calls with. Defaults to client's default HTTP
|
||||
@ -143,6 +152,7 @@ func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
|
||||
// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
|
||||
// this field will likely prevent you from using any endpoint-related service
|
||||
// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
|
||||
//
|
||||
// To migrate an EndpointResolver implementation that uses a custom endpoint, set
|
||||
// the client option BaseEndpoint instead.
|
||||
func WithEndpointResolver(v EndpointResolver) func(*Options) {
|
||||
|
26
vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
generated
vendored
26
vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
generated
vendored
@ -65,9 +65,10 @@ func (e *IDPCommunicationErrorException) ErrorCode() string {
|
||||
func (e *IDPCommunicationErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// The identity provider (IdP) reported that authentication failed. This might be
|
||||
// because the claim is invalid. If this error is returned for the
|
||||
// AssumeRoleWithWebIdentity operation, it can also mean that the claim has expired
|
||||
// or has been explicitly revoked.
|
||||
// because the claim is invalid.
|
||||
//
|
||||
// If this error is returned for the AssumeRoleWithWebIdentity operation, it can
|
||||
// also mean that the claim has expired or has been explicitly revoked.
|
||||
type IDPRejectedClaimException struct {
|
||||
Message *string
|
||||
|
||||
@ -183,11 +184,13 @@ func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { retu
|
||||
// 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 and session tag limits. For more information, see IAM
|
||||
// and STS Entity Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide.
|
||||
// limit. For more information, see [Passing Session Tags in STS]in the IAM User Guide.
|
||||
//
|
||||
// You could receive this error even though you meet other defined session policy
|
||||
// and session tag limits. For more information, see [IAM and STS Entity Character Limits]in the IAM User Guide.
|
||||
//
|
||||
// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
||||
// [IAM and STS Entity Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length
|
||||
type PackedPolicyTooLargeException struct {
|
||||
Message *string
|
||||
|
||||
@ -215,9 +218,10 @@ func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return
|
||||
|
||||
// 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.
|
||||
// console to activate STS in that region. For more information, see [Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region]in the IAM
|
||||
// User Guide.
|
||||
//
|
||||
// [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
|
||||
type RegionDisabledException struct {
|
||||
Message *string
|
||||
|
||||
|
50
vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go
generated
vendored
50
vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go
generated
vendored
@ -11,10 +11,11 @@ import (
|
||||
// returns.
|
||||
type AssumedRoleUser struct {
|
||||
|
||||
// The ARN of the temporary security credentials that are returned from the
|
||||
// AssumeRole action. For more information about ARNs and how to use them in
|
||||
// policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html)
|
||||
// in the IAM User Guide.
|
||||
// The ARN of the temporary security credentials that are returned from the AssumeRole
|
||||
// action. For more information about ARNs and how to use them in policies, see [IAM Identifiers]in
|
||||
// the IAM User Guide.
|
||||
//
|
||||
// [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html
|
||||
//
|
||||
// This member is required.
|
||||
Arn *string
|
||||
@ -61,8 +62,9 @@ type FederatedUser struct {
|
||||
|
||||
// The ARN that specifies the federated user that is associated with the
|
||||
// credentials. For more information about ARNs and how to use them in policies,
|
||||
// see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html)
|
||||
// in the IAM User Guide.
|
||||
// see [IAM Identifiers]in the IAM User Guide.
|
||||
//
|
||||
// [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html
|
||||
//
|
||||
// This member is required.
|
||||
Arn *string
|
||||
@ -81,9 +83,10 @@ type FederatedUser struct {
|
||||
type PolicyDescriptorType struct {
|
||||
|
||||
// The Amazon Resource Name (ARN) of the IAM managed policy to use as a session
|
||||
// policy for the role. For more information about ARNs, see Amazon Resource Names
|
||||
// (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
|
||||
// in the Amazon Web Services General Reference.
|
||||
// policy for the role. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the Amazon Web
|
||||
// Services General Reference.
|
||||
//
|
||||
// [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
|
||||
Arn *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
@ -107,23 +110,30 @@ type ProvidedContext struct {
|
||||
|
||||
// You can pass custom key-value pair attributes when you assume a role or
|
||||
// federate a user. These are called session tags. You can then use the session
|
||||
// tags to control access to resources. For more information, see Tagging Amazon
|
||||
// Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
||||
// in the IAM User Guide.
|
||||
// tags to control access to resources. For more information, see [Tagging Amazon Web Services STS Sessions]in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// [Tagging Amazon Web Services STS Sessions]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
||||
type Tag struct {
|
||||
|
||||
// The key for a session tag. You can pass up to 50 session tags. The plain text
|
||||
// session tag keys can’t exceed 128 characters. For these and additional limits,
|
||||
// see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide.
|
||||
// The key for a session tag.
|
||||
//
|
||||
// You can pass up to 50 session tags. The plain text session tag keys can’t
|
||||
// exceed 128 characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
||||
//
|
||||
// This member is required.
|
||||
Key *string
|
||||
|
||||
// The value for a session tag. You can pass up to 50 session tags. The plain text
|
||||
// session tag values can’t exceed 256 characters. For these and additional limits,
|
||||
// see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide.
|
||||
// The value for a session tag.
|
||||
//
|
||||
// You can pass up to 50 session tags. The plain text session tag values can’t
|
||||
// exceed 256 characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User
|
||||
// Guide.
|
||||
//
|
||||
// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
||||
//
|
||||
// This member is required.
|
||||
Value *string
|
||||
|
585
vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
generated
vendored
585
vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
generated
vendored
@ -1079,6 +1079,9 @@ var awsPartition = partition{
|
||||
endpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
@ -1091,6 +1094,9 @@ var awsPartition = partition{
|
||||
endpointKey{
|
||||
Region: "eu-west-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
}: endpoint{},
|
||||
@ -4583,91 +4589,6 @@ var awsPartition = partition{
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"backupstorage": 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-south-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-4",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-north-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-south-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "me-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "me-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-2",
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"batch": service{
|
||||
Defaults: endpointDefaults{
|
||||
defaultKey{}: endpoint{},
|
||||
@ -4873,6 +4794,14 @@ var awsPartition = partition{
|
||||
Region: "ap-southeast-2",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-ca-central-1",
|
||||
}: endpoint{
|
||||
Hostname: "bedrock.ca-central-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "ca-central-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-eu-central-1",
|
||||
}: endpoint{
|
||||
@ -4889,6 +4818,14 @@ var awsPartition = partition{
|
||||
Region: "eu-west-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-eu-west-2",
|
||||
}: endpoint{
|
||||
Hostname: "bedrock.eu-west-2.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "eu-west-2",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-eu-west-3",
|
||||
}: endpoint{
|
||||
@ -4897,6 +4834,14 @@ var awsPartition = partition{
|
||||
Region: "eu-west-3",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-fips-ca-central-1",
|
||||
}: endpoint{
|
||||
Hostname: "bedrock-fips.ca-central-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "ca-central-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-fips-us-east-1",
|
||||
}: endpoint{
|
||||
@ -4945,6 +4890,14 @@ var awsPartition = partition{
|
||||
Region: "ap-southeast-2",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-runtime-ca-central-1",
|
||||
}: endpoint{
|
||||
Hostname: "bedrock-runtime.ca-central-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "ca-central-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-runtime-eu-central-1",
|
||||
}: endpoint{
|
||||
@ -4961,6 +4914,14 @@ var awsPartition = partition{
|
||||
Region: "eu-west-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-runtime-eu-west-2",
|
||||
}: endpoint{
|
||||
Hostname: "bedrock-runtime.eu-west-2.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "eu-west-2",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-runtime-eu-west-3",
|
||||
}: endpoint{
|
||||
@ -4969,6 +4930,14 @@ var awsPartition = partition{
|
||||
Region: "eu-west-3",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-runtime-fips-ca-central-1",
|
||||
}: endpoint{
|
||||
Hostname: "bedrock-runtime-fips.ca-central-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "ca-central-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-runtime-fips-us-east-1",
|
||||
}: endpoint{
|
||||
@ -4985,6 +4954,14 @@ var awsPartition = partition{
|
||||
Region: "us-west-2",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-runtime-sa-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "bedrock-runtime.sa-east-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "sa-east-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-runtime-us-east-1",
|
||||
}: endpoint{
|
||||
@ -5001,6 +4978,14 @@ var awsPartition = partition{
|
||||
Region: "us-west-2",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-sa-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "bedrock.sa-east-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "sa-east-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-us-east-1",
|
||||
}: endpoint{
|
||||
@ -5017,15 +5002,24 @@ var awsPartition = partition{
|
||||
Region: "us-west-2",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
}: endpoint{},
|
||||
@ -5083,6 +5077,12 @@ var awsPartition = partition{
|
||||
},
|
||||
"cases": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-1",
|
||||
}: endpoint{},
|
||||
@ -5297,69 +5297,157 @@ var awsPartition = partition{
|
||||
endpointKey{
|
||||
Region: "af-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "af-south-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-east-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-2",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-northeast-3",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-south-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-north-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-north-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-south-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-2",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-3",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "il-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "il-central-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "me-south-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "me-south-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "sa-east-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-2",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-2",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"cloudcontrolapi": service{
|
||||
@ -9264,9 +9352,21 @@ var awsPartition = partition{
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "directconnect-fips.ca-central-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "ca-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "directconnect-fips.ca-west-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
@ -9291,6 +9391,24 @@ var awsPartition = partition{
|
||||
endpointKey{
|
||||
Region: "eu-west-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "fips-ca-central-1",
|
||||
}: endpoint{
|
||||
Hostname: "directconnect-fips.ca-central-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "ca-central-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-ca-west-1",
|
||||
}: endpoint{
|
||||
Hostname: "directconnect-fips.ca-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "ca-west-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-east-1",
|
||||
}: endpoint{
|
||||
@ -15561,6 +15679,9 @@ var awsPartition = partition{
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
@ -17465,12 +17586,27 @@ var awsPartition = partition{
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "kendra-fips.ca-central-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "fips-ca-central-1",
|
||||
}: endpoint{
|
||||
Hostname: "kendra-fips.ca-central-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "ca-central-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-east-1",
|
||||
}: endpoint{
|
||||
@ -21684,6 +21820,9 @@ var awsPartition = partition{
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
@ -25241,6 +25380,9 @@ var awsPartition = partition{
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "me-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoint{},
|
||||
@ -31870,6 +32012,24 @@ var awsPartition = partition{
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "ca-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "storagegateway-fips.ca-west-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "ca-west-1-fips",
|
||||
}: endpoint{
|
||||
Hostname: "storagegateway-fips.ca-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "ca-west-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
@ -33793,6 +33953,9 @@ var awsPartition = partition{
|
||||
endpointKey{
|
||||
Region: "eu-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-3",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoint{},
|
||||
@ -33802,6 +33965,9 @@ var awsPartition = partition{
|
||||
endpointKey{
|
||||
Region: "us-east-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-west-2",
|
||||
}: endpoint{},
|
||||
@ -36138,16 +36304,6 @@ var awscnPartition = partition{
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"backupstorage": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "cn-north-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "cn-northwest-1",
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"batch": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
@ -38917,16 +39073,6 @@ var awsusgovPartition = partition{
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"backupstorage": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"batch": service{
|
||||
Defaults: endpointDefaults{
|
||||
defaultKey{}: endpoint{},
|
||||
@ -38977,6 +39123,22 @@ var awsusgovPartition = partition{
|
||||
},
|
||||
"bedrock": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "bedrock-fips-us-gov-west-1",
|
||||
}: endpoint{
|
||||
Hostname: "bedrock-fips.us-gov-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-west-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-runtime-fips-us-gov-west-1",
|
||||
}: endpoint{
|
||||
Hostname: "bedrock-runtime-fips.us-gov-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-west-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "bedrock-runtime-us-gov-west-1",
|
||||
}: endpoint{
|
||||
@ -41821,6 +41983,62 @@ var awsusgovPartition = partition{
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"kinesisvideo": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "fips-us-gov-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "kinesisvideo-fips.us-gov-east-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-gov-west-1",
|
||||
}: endpoint{
|
||||
Hostname: "kinesisvideo-fips.us-gov-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-west-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "kinesisvideo-fips.us-gov-east-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-east-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "kinesisvideo-fips.us-gov-east-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-east-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
}: endpoint{
|
||||
Hostname: "kinesisvideo-fips.us-gov-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-west-1",
|
||||
},
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "kinesisvideo-fips.us-gov-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-west-1",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"kms": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
@ -43562,6 +43780,46 @@ var awsusgovPartition = partition{
|
||||
},
|
||||
},
|
||||
},
|
||||
"securitylake": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "securitylake.us-gov-east-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1-fips",
|
||||
}: endpoint{
|
||||
Hostname: "securitylake.us-gov-east-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "securitylake.us-gov-west-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1-fips",
|
||||
}: endpoint{
|
||||
Hostname: "securitylake.us-gov-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-west-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
},
|
||||
},
|
||||
"serverlessrepo": service{
|
||||
Defaults: endpointDefaults{
|
||||
defaultKey{}: endpoint{
|
||||
@ -45743,42 +46001,12 @@ var awsisoPartition = partition{
|
||||
},
|
||||
"ram": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "fips-us-iso-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "ram-fips.us-iso-east-1.c2s.ic.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-iso-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-iso-west-1",
|
||||
}: endpoint{
|
||||
Hostname: "ram-fips.us-iso-west-1.c2s.ic.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-iso-west-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-iso-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-iso-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "ram-fips.us-iso-east-1.c2s.ic.gov",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-iso-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-iso-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "ram-fips.us-iso-west-1.c2s.ic.gov",
|
||||
},
|
||||
},
|
||||
},
|
||||
"rbin": service{
|
||||
@ -45823,37 +46051,10 @@ var awsisoPartition = partition{
|
||||
},
|
||||
"rds": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "rds-fips.us-iso-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-iso-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "rds-fips.us-iso-west-1",
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-iso-west-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "rds.us-iso-east-1",
|
||||
}: endpoint{
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-iso-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "rds.us-iso-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov",
|
||||
Hostname: "rds.us-iso-east-1.c2s.ic.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-iso-east-1",
|
||||
},
|
||||
@ -45862,16 +46063,7 @@ var awsisoPartition = partition{
|
||||
endpointKey{
|
||||
Region: "rds.us-iso-west-1",
|
||||
}: endpoint{
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-iso-west-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "rds.us-iso-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov",
|
||||
Hostname: "rds.us-iso-west-1.c2s.ic.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-iso-west-1",
|
||||
},
|
||||
@ -45884,12 +46076,12 @@ var awsisoPartition = partition{
|
||||
Region: "us-iso-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov",
|
||||
Hostname: "rds.us-iso-east-1.c2s.ic.gov",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-iso-east-1-fips",
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov",
|
||||
Hostname: "rds.us-iso-east-1.c2s.ic.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-iso-east-1",
|
||||
},
|
||||
@ -45902,12 +46094,12 @@ var awsisoPartition = partition{
|
||||
Region: "us-iso-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov",
|
||||
Hostname: "rds.us-iso-west-1.c2s.ic.gov",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-iso-west-1-fips",
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov",
|
||||
Hostname: "rds.us-iso-west-1.c2s.ic.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-iso-west-1",
|
||||
},
|
||||
@ -46866,24 +47058,9 @@ var awsisobPartition = partition{
|
||||
},
|
||||
"ram": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "fips-us-isob-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "ram-fips.us-isob-east-1.sc2s.sgov.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-isob-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-isob-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-isob-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "ram-fips.us-isob-east-1.sc2s.sgov.gov",
|
||||
},
|
||||
},
|
||||
},
|
||||
"rbin": service{
|
||||
@ -46910,28 +47087,10 @@ var awsisobPartition = partition{
|
||||
},
|
||||
"rds": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "rds-fips.us-isob-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-isob-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "rds.us-isob-east-1",
|
||||
}: endpoint{
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-isob-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "rds.us-isob-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov",
|
||||
Hostname: "rds.us-isob-east-1.sc2s.sgov.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-isob-east-1",
|
||||
},
|
||||
@ -46944,12 +47103,12 @@ var awsisobPartition = partition{
|
||||
Region: "us-isob-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov",
|
||||
Hostname: "rds.us-isob-east-1.sc2s.sgov.gov",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-isob-east-1-fips",
|
||||
}: endpoint{
|
||||
Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov",
|
||||
Hostname: "rds.us-isob-east-1.sc2s.sgov.gov",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-isob-east-1",
|
||||
},
|
||||
|
2
vendor/github.com/aws/aws-sdk-go/aws/version.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go/aws/version.go
generated
vendored
@ -5,4 +5,4 @@ package aws
|
||||
const SDKName = "aws-sdk-go"
|
||||
|
||||
// SDKVersion is the version of this SDK
|
||||
const SDKVersion = "1.53.14"
|
||||
const SDKVersion = "1.54.6"
|
||||
|
659
vendor/github.com/aws/aws-sdk-go/service/kms/api.go
generated
vendored
659
vendor/github.com/aws/aws-sdk-go/service/kms/api.go
generated
vendored
@ -807,6 +807,7 @@ func (c *KMS) CreateCustomKeyStoreRequest(input *CreateCustomKeyStoreInput) (req
|
||||
// for Amazon VPC endpoint service connectivity for an external key store.
|
||||
//
|
||||
// - XksProxyInvalidResponseException
|
||||
//
|
||||
// KMS cannot interpret the response it received from the external key store
|
||||
// proxy. The problem might be a poorly constructed response, but it could also
|
||||
// be a transient network issue. If you see this error repeatedly, report it
|
||||
@ -1107,11 +1108,15 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out
|
||||
// Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair,
|
||||
// or an SM2 key pair (China Regions only). The private key in an asymmetric
|
||||
// KMS key never leaves KMS unencrypted. However, you can use the GetPublicKey
|
||||
// operation to download the public key so it can be used outside of KMS. KMS
|
||||
// keys with RSA or SM2 key pairs can be used to encrypt or decrypt data or
|
||||
// sign and verify messages (but not both). KMS keys with ECC key pairs can
|
||||
// be used only to sign and verify messages. For information about asymmetric
|
||||
// KMS keys, see Asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
|
||||
// operation to download the public key so it can be used outside of KMS. Each
|
||||
// KMS key can have only one key usage. KMS keys with RSA key pairs can be used
|
||||
// to encrypt and decrypt data or sign and verify messages (but not both). KMS
|
||||
// keys with NIST-recommended ECC key pairs can be used to sign and verify messages
|
||||
// or derive shared secrets (but not both). KMS keys with ECC_SECG_P256K1 can
|
||||
// be used only to sign and verify messages. KMS keys with SM2 key pairs (China
|
||||
// Regions only) can be used to either encrypt and decrypt data, sign and verify
|
||||
// messages, or derive shared secrets (you must choose one key usage type).
|
||||
// For information about asymmetric KMS keys, see Asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
|
||||
// in the Key Management Service Developer Guide.
|
||||
//
|
||||
// # HMAC KMS key
|
||||
@ -1554,7 +1559,8 @@ func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -2068,6 +2074,219 @@ func (c *KMS) DeleteImportedKeyMaterialWithContext(ctx aws.Context, input *Delet
|
||||
return out, req.Send()
|
||||
}
|
||||
|
||||
const opDeriveSharedSecret = "DeriveSharedSecret"
|
||||
|
||||
// DeriveSharedSecretRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DeriveSharedSecret operation. The "output" return
|
||||
// value will be populated with the request's response once the request completes
|
||||
// successfully.
|
||||
//
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// See DeriveSharedSecret for more information on using the DeriveSharedSecret
|
||||
// API call, and error handling.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// // Example sending a request using the DeriveSharedSecretRequest method.
|
||||
// req, resp := client.DeriveSharedSecretRequest(params)
|
||||
//
|
||||
// err := req.Send()
|
||||
// if err == nil { // resp is now filled
|
||||
// fmt.Println(resp)
|
||||
// }
|
||||
//
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeriveSharedSecret
|
||||
func (c *KMS) DeriveSharedSecretRequest(input *DeriveSharedSecretInput) (req *request.Request, output *DeriveSharedSecretOutput) {
|
||||
op := &request.Operation{
|
||||
Name: opDeriveSharedSecret,
|
||||
HTTPMethod: "POST",
|
||||
HTTPPath: "/",
|
||||
}
|
||||
|
||||
if input == nil {
|
||||
input = &DeriveSharedSecretInput{}
|
||||
}
|
||||
|
||||
output = &DeriveSharedSecretOutput{}
|
||||
req = c.newRequest(op, input, output)
|
||||
return
|
||||
}
|
||||
|
||||
// DeriveSharedSecret API operation for AWS Key Management Service.
|
||||
//
|
||||
// Derives a shared secret using a key agreement algorithm.
|
||||
//
|
||||
// You must use an asymmetric NIST-recommended elliptic curve (ECC) or SM2 (China
|
||||
// Regions only) KMS key pair with a KeyUsage value of KEY_AGREEMENT to call
|
||||
// DeriveSharedSecret.
|
||||
//
|
||||
// DeriveSharedSecret uses the Elliptic Curve Cryptography Cofactor Diffie-Hellman
|
||||
// Primitive (https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar3.pdf#page=60)
|
||||
// (ECDH) to establish a key agreement between two peers by deriving a shared
|
||||
// secret from their elliptic curve public-private key pairs. You can use the
|
||||
// raw shared secret that DeriveSharedSecret returns to derive a symmetric key
|
||||
// that can encrypt and decrypt data that is sent between the two peers, or
|
||||
// that can generate and verify HMACs. KMS recommends that you follow NIST recommendations
|
||||
// for key derivation (https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Cr2.pdf)
|
||||
// when using the raw shared secret to derive a symmetric key.
|
||||
//
|
||||
// The following workflow demonstrates how to establish key agreement over an
|
||||
// insecure communication channel using DeriveSharedSecret.
|
||||
//
|
||||
// Alice calls CreateKey to create an asymmetric KMS key pair with a KeyUsage
|
||||
// value of KEY_AGREEMENT.
|
||||
//
|
||||
// The asymmetric KMS key must use a NIST-recommended elliptic curve (ECC) or
|
||||
// SM2 (China Regions only) key spec.
|
||||
//
|
||||
// Bob creates an elliptic curve key pair.
|
||||
//
|
||||
// Bob can call CreateKey to create an asymmetric KMS key pair or generate a
|
||||
// key pair outside of KMS. Bob's key pair must use the same NIST-recommended
|
||||
// elliptic curve (ECC) or SM2 (China Regions ony) curve as Alice.
|
||||
//
|
||||
// Alice and Bob exchange their public keys through an insecure communication
|
||||
// channel (like the internet).
|
||||
//
|
||||
// Use GetPublicKey to download the public key of your asymmetric KMS key pair.
|
||||
//
|
||||
// KMS strongly recommends verifying that the public key you receive came from
|
||||
// the expected party before using it to derive a shared secret.
|
||||
//
|
||||
// Alice calls DeriveSharedSecret.
|
||||
//
|
||||
// KMS uses the private key from the KMS key pair generated in Step 1, Bob's
|
||||
// public key, and the Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive
|
||||
// to derive the shared secret. The private key in your KMS key pair never leaves
|
||||
// KMS unencrypted. DeriveSharedSecret returns the raw shared secret.
|
||||
//
|
||||
// Bob uses the Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive
|
||||
// to calculate the same raw secret using his private key and Alice's public
|
||||
// key.
|
||||
//
|
||||
// To derive a shared secret you must provide a key agreement algorithm, the
|
||||
// private key of the caller's asymmetric NIST-recommended elliptic curve or
|
||||
// SM2 (China Regions only) KMS key pair, and the public key from your peer's
|
||||
// NIST-recommended elliptic curve or SM2 (China Regions only) key pair. The
|
||||
// public key can be from another asymmetric KMS key pair or from a key pair
|
||||
// generated outside of KMS, but both key pairs must be on the same elliptic
|
||||
// curve.
|
||||
//
|
||||
// The KMS key that you use for this operation must be in a compatible key state.
|
||||
// For details, see Key states of KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
|
||||
// in the Key Management Service Developer Guide.
|
||||
//
|
||||
// Cross-account use: Yes. To perform this operation with a KMS key in a different
|
||||
// Amazon Web Services account, specify the key ARN or alias ARN in the value
|
||||
// of the KeyId parameter.
|
||||
//
|
||||
// Required permissions: kms:DeriveSharedSecret (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
|
||||
// (key policy)
|
||||
//
|
||||
// Related operations:
|
||||
//
|
||||
// - CreateKey
|
||||
//
|
||||
// - GetPublicKey
|
||||
//
|
||||
// - DescribeKey
|
||||
//
|
||||
// Eventual consistency: The KMS API follows an eventual consistency model.
|
||||
// For more information, see KMS eventual consistency (https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html).
|
||||
//
|
||||
// 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
|
||||
// the error.
|
||||
//
|
||||
// See the AWS API reference guide for AWS Key Management Service's
|
||||
// API operation DeriveSharedSecret for usage and error information.
|
||||
//
|
||||
// Returned Error Types:
|
||||
//
|
||||
// - NotFoundException
|
||||
// The request was rejected because the specified entity or resource could not
|
||||
// be found.
|
||||
//
|
||||
// - DisabledException
|
||||
// The request was rejected because the specified KMS key is not enabled.
|
||||
//
|
||||
// - KeyUnavailableException
|
||||
// The request was rejected because the specified KMS key was not available.
|
||||
// You can retry the request.
|
||||
//
|
||||
// - DependencyTimeoutException
|
||||
// The system timed out while trying to fulfill the request. You can retry the
|
||||
// request.
|
||||
//
|
||||
// - InvalidGrantTokenException
|
||||
// The request was rejected because the specified grant token is not valid.
|
||||
//
|
||||
// - InvalidKeyUsageException
|
||||
// The request was rejected for one of the following reasons:
|
||||
//
|
||||
// - The KeyUsage value of the KMS key is incompatible with the API operation.
|
||||
//
|
||||
// - The encryption algorithm or signing algorithm specified for the operation
|
||||
// is incompatible with the type of key material in the KMS key (KeySpec).
|
||||
//
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
// key, use the DescribeKey operation.
|
||||
//
|
||||
// - InternalException
|
||||
// The request was rejected because an internal exception occurred. The request
|
||||
// can be retried.
|
||||
//
|
||||
// - InvalidStateException
|
||||
// The request was rejected because the state of the specified resource is not
|
||||
// valid for this request.
|
||||
//
|
||||
// This exceptions means one of the following:
|
||||
//
|
||||
// - The key state of the KMS key is not compatible with the operation. To
|
||||
// find the key state, use the DescribeKey operation. For more information
|
||||
// about which key states are compatible with each KMS operation, see Key
|
||||
// states of KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
|
||||
// in the Key Management Service Developer Guide .
|
||||
//
|
||||
// - For cryptographic operations on KMS keys in custom key stores, this
|
||||
// exception represents a general failure with many possible causes. To identify
|
||||
// the cause, see the error message that accompanies the exception.
|
||||
//
|
||||
// - DryRunOperationException
|
||||
// The request was rejected because the DryRun parameter was specified.
|
||||
//
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeriveSharedSecret
|
||||
func (c *KMS) DeriveSharedSecret(input *DeriveSharedSecretInput) (*DeriveSharedSecretOutput, error) {
|
||||
req, out := c.DeriveSharedSecretRequest(input)
|
||||
return out, req.Send()
|
||||
}
|
||||
|
||||
// DeriveSharedSecretWithContext is the same as DeriveSharedSecret with the addition of
|
||||
// the ability to pass a context and additional request options.
|
||||
//
|
||||
// See DeriveSharedSecret for details on how to use this API operation.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *KMS) DeriveSharedSecretWithContext(ctx aws.Context, input *DeriveSharedSecretInput, opts ...request.Option) (*DeriveSharedSecretOutput, error) {
|
||||
req, out := c.DeriveSharedSecretRequest(input)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return out, req.Send()
|
||||
}
|
||||
|
||||
const opDescribeCustomKeyStores = "DescribeCustomKeyStores"
|
||||
|
||||
// DescribeCustomKeyStoresRequest generates a "aws/request.Request" representing the
|
||||
@ -3326,7 +3545,8 @@ func (c *KMS) EncryptRequest(input *EncryptInput) (req *request.Request, output
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -3554,7 +3774,8 @@ func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request.
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -3772,7 +3993,8 @@ func (c *KMS) GenerateDataKeyPairRequest(input *GenerateDataKeyPairInput) (req *
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -3969,7 +4191,8 @@ func (c *KMS) GenerateDataKeyPairWithoutPlaintextRequest(input *GenerateDataKeyP
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -4178,7 +4401,8 @@ func (c *KMS) GenerateDataKeyWithoutPlaintextRequest(input *GenerateDataKeyWitho
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -4343,7 +4567,8 @@ func (c *KMS) GenerateMacRequest(input *GenerateMacInput) (req *request.Request,
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -4911,9 +5136,9 @@ func (c *KMS) GetParametersForImportRequest(input *GetParametersForImportInput)
|
||||
// GetParametersForImport returns the items that you need to import your key
|
||||
// material.
|
||||
//
|
||||
// - The public key (or "wrapping key") of an asymmetric key pair that KMS
|
||||
// generates. You will use this public key to encrypt ("wrap") your key material
|
||||
// while it's in transit to KMS.
|
||||
// - The public key (or "wrapping key") of an RSA key pair that KMS generates.
|
||||
// You will use this public key to encrypt ("wrap") your key material while
|
||||
// it's in transit to KMS.
|
||||
//
|
||||
// - A import token that ensures that KMS can decrypt your key material and
|
||||
// associate it with the correct KMS key.
|
||||
@ -5089,7 +5314,8 @@ func (c *KMS) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Reques
|
||||
// The type of key material in the public key, such as RSA_4096 or ECC_NIST_P521.
|
||||
//
|
||||
// - KeyUsage (https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage):
|
||||
// Whether the key is used for encryption or signing.
|
||||
// Whether the key is used for encryption, signing, or deriving a shared
|
||||
// secret.
|
||||
//
|
||||
// - EncryptionAlgorithms (https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms)
|
||||
// or SigningAlgorithms (https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms):
|
||||
@ -5170,7 +5396,8 @@ func (c *KMS) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Reques
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -7082,7 +7309,8 @@ func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, out
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -8134,7 +8362,8 @@ func (c *KMS) SignRequest(input *SignInput) (req *request.Request, output *SignO
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -8939,6 +9168,7 @@ func (c *KMS) UpdateCustomKeyStoreRequest(input *UpdateCustomKeyStoreInput) (req
|
||||
// for Amazon VPC endpoint service connectivity for an external key store.
|
||||
//
|
||||
// - XksProxyInvalidResponseException
|
||||
//
|
||||
// KMS cannot interpret the response it received from the external key store
|
||||
// proxy. The problem might be a poorly constructed response, but it could also
|
||||
// be a transient network issue. If you see this error repeatedly, report it
|
||||
@ -9412,7 +9642,8 @@ func (c *KMS) VerifyRequest(input *VerifyInput) (req *request.Request, output *V
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -9576,7 +9807,8 @@ func (c *KMS) VerifyMacRequest(input *VerifyMacInput) (req *request.Request, out
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -11140,15 +11372,18 @@ type CreateKeyInput struct {
|
||||
//
|
||||
// * HMAC keys (symmetric) HMAC_224 HMAC_256 HMAC_384 HMAC_512
|
||||
//
|
||||
// * Asymmetric RSA key pairs RSA_2048 RSA_3072 RSA_4096
|
||||
// * Asymmetric RSA key pairs (encryption and decryption -or- signing and
|
||||
// verification) RSA_2048 RSA_3072 RSA_4096
|
||||
//
|
||||
// * Asymmetric NIST-recommended elliptic curve key pairs ECC_NIST_P256 (secp256r1)
|
||||
// ECC_NIST_P384 (secp384r1) ECC_NIST_P521 (secp521r1)
|
||||
// * Asymmetric NIST-recommended elliptic curve key pairs (signing and verification
|
||||
// -or- deriving shared secrets) ECC_NIST_P256 (secp256r1) ECC_NIST_P384
|
||||
// (secp384r1) ECC_NIST_P521 (secp521r1)
|
||||
//
|
||||
// * Other asymmetric elliptic curve key pairs ECC_SECG_P256K1 (secp256k1),
|
||||
// commonly used for cryptocurrencies.
|
||||
// * Other asymmetric elliptic curve key pairs (signing and verification)
|
||||
// ECC_SECG_P256K1 (secp256k1), commonly used for cryptocurrencies.
|
||||
//
|
||||
// * SM2 key pairs (China Regions only) SM2
|
||||
// * SM2 key pairs (encryption and decryption -or- signing and verification
|
||||
// -or- deriving shared secrets) SM2 (China Regions only)
|
||||
KeySpec *string `type:"string" enum:"KeySpec"`
|
||||
|
||||
// Determines the cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
|
||||
@ -11163,13 +11398,16 @@ type CreateKeyInput struct {
|
||||
//
|
||||
// * For HMAC KMS keys (symmetric), specify GENERATE_VERIFY_MAC.
|
||||
//
|
||||
// * For asymmetric KMS keys with RSA key material, specify ENCRYPT_DECRYPT
|
||||
// * For asymmetric KMS keys with RSA key pairs, specify ENCRYPT_DECRYPT
|
||||
// or SIGN_VERIFY.
|
||||
//
|
||||
// * For asymmetric KMS keys with ECC key material, specify SIGN_VERIFY.
|
||||
// * For asymmetric KMS keys with NIST-recommended elliptic curve key pairs,
|
||||
// specify SIGN_VERIFY or KEY_AGREEMENT.
|
||||
//
|
||||
// * For asymmetric KMS keys with SM2 key material (China Regions only),
|
||||
// specify ENCRYPT_DECRYPT or SIGN_VERIFY.
|
||||
// * For asymmetric KMS keys with ECC_SECG_P256K1 key pairs specify SIGN_VERIFY.
|
||||
//
|
||||
// * For asymmetric KMS keys with SM2 key pairs (China Regions only), specify
|
||||
// ENCRYPT_DECRYPT, SIGN_VERIFY, or KEY_AGREEMENT.
|
||||
KeyUsage *string `type:"string" enum:"KeyUsageType"`
|
||||
|
||||
// Creates a multi-Region primary key that you can replicate into other Amazon
|
||||
@ -12555,6 +12793,282 @@ func (s *DependencyTimeoutException) RequestID() string {
|
||||
return s.RespMetadata.RequestID
|
||||
}
|
||||
|
||||
type DeriveSharedSecretInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// Checks if your request will succeed. DryRun is an optional parameter.
|
||||
//
|
||||
// To learn more about how to use this parameter, see Testing your KMS API calls
|
||||
// (https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html)
|
||||
// in the Key Management Service Developer Guide.
|
||||
DryRun *bool `type:"boolean"`
|
||||
|
||||
// A list of grant tokens.
|
||||
//
|
||||
// Use a grant token when your permission to call this operation comes from
|
||||
// a new grant that has not yet achieved eventual consistency. For more information,
|
||||
// see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
|
||||
// and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
|
||||
// in the Key Management Service Developer Guide.
|
||||
GrantTokens []*string `type:"list"`
|
||||
|
||||
// Specifies the key agreement algorithm used to derive the shared secret. The
|
||||
// only valid value is ECDH.
|
||||
//
|
||||
// KeyAgreementAlgorithm is a required field
|
||||
KeyAgreementAlgorithm *string `type:"string" required:"true" enum:"KeyAgreementAlgorithmSpec"`
|
||||
|
||||
// Identifies an asymmetric NIST-recommended ECC or SM2 (China Regions only)
|
||||
// KMS key. KMS uses the private key in the specified key pair to derive the
|
||||
// shared secret. The key usage of the KMS key must be KEY_AGREEMENT. To find
|
||||
// the KeyUsage of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
|
||||
// When using an alias name, prefix it with "alias/". To specify a KMS key in
|
||||
// a different Amazon Web Services account, you must use the key ARN or alias
|
||||
// ARN.
|
||||
//
|
||||
// For example:
|
||||
//
|
||||
// * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
|
||||
//
|
||||
// * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
|
||||
//
|
||||
// * Alias name: alias/ExampleAlias
|
||||
//
|
||||
// * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
|
||||
//
|
||||
// To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
|
||||
// To get the alias name and alias ARN, use ListAliases.
|
||||
//
|
||||
// KeyId is a required field
|
||||
KeyId *string `min:"1" type:"string" required:"true"`
|
||||
|
||||
// Specifies the public key in your peer's NIST-recommended elliptic curve (ECC)
|
||||
// or SM2 (China Regions only) key pair.
|
||||
//
|
||||
// The public key must be a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo
|
||||
// (SPKI), as defined in RFC 5280 (https://tools.ietf.org/html/rfc5280).
|
||||
//
|
||||
// GetPublicKey returns the public key of an asymmetric KMS key pair in the
|
||||
// required DER-encoded format.
|
||||
//
|
||||
// If you use Amazon Web Services CLI version 1 (https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-welcome.html),
|
||||
// you must provide the DER-encoded X.509 public key in a file. Otherwise, the
|
||||
// Amazon Web Services CLI Base64-encodes the public key a second time, resulting
|
||||
// in a ValidationException.
|
||||
//
|
||||
// You can specify the public key as binary data in a file using fileb (fileb://<path-to-file>)
|
||||
// or in-line using a Base64 encoded string.
|
||||
// PublicKey is automatically base64 encoded/decoded by the SDK.
|
||||
//
|
||||
// PublicKey is a required field
|
||||
PublicKey []byte `min:"1" type:"blob" required:"true"`
|
||||
|
||||
// A signed attestation document (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc)
|
||||
// from an Amazon Web Services Nitro enclave and the encryption algorithm to
|
||||
// use with the enclave's public key. The only valid encryption algorithm is
|
||||
// RSAES_OAEP_SHA_256.
|
||||
//
|
||||
// This parameter only supports attestation documents for Amazon Web Services
|
||||
// Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web Services Nitro
|
||||
// Enclaves, use the Amazon Web Services Nitro Enclaves SDK (https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk)
|
||||
// to generate the attestation document and then use the Recipient parameter
|
||||
// from any Amazon Web Services SDK to provide the attestation document for
|
||||
// the enclave.
|
||||
//
|
||||
// When you use this parameter, instead of returning a plaintext copy of the
|
||||
// shared secret, KMS encrypts the plaintext shared secret under the public
|
||||
// key in the attestation document, and returns the resulting ciphertext in
|
||||
// the CiphertextForRecipient field in the response. This ciphertext can be
|
||||
// decrypted only with the private key in the enclave. The CiphertextBlob field
|
||||
// in the response contains the encrypted shared secret derived from the KMS
|
||||
// key specified by the KeyId parameter and public key specified by the PublicKey
|
||||
// parameter. The SharedSecret field in the response is null or empty.
|
||||
//
|
||||
// For information about the interaction between KMS and Amazon Web Services
|
||||
// Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS (https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html)
|
||||
// in the Key Management Service Developer Guide.
|
||||
Recipient *RecipientInfo `type:"structure"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s DeriveSharedSecretInput) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s DeriveSharedSecretInput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// Validate inspects the fields of the type to determine if they are valid.
|
||||
func (s *DeriveSharedSecretInput) Validate() error {
|
||||
invalidParams := request.ErrInvalidParams{Context: "DeriveSharedSecretInput"}
|
||||
if s.KeyAgreementAlgorithm == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("KeyAgreementAlgorithm"))
|
||||
}
|
||||
if s.KeyId == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("KeyId"))
|
||||
}
|
||||
if s.KeyId != nil && len(*s.KeyId) < 1 {
|
||||
invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
|
||||
}
|
||||
if s.PublicKey == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("PublicKey"))
|
||||
}
|
||||
if s.PublicKey != nil && len(s.PublicKey) < 1 {
|
||||
invalidParams.Add(request.NewErrParamMinLen("PublicKey", 1))
|
||||
}
|
||||
if s.Recipient != nil {
|
||||
if err := s.Recipient.Validate(); err != nil {
|
||||
invalidParams.AddNested("Recipient", err.(request.ErrInvalidParams))
|
||||
}
|
||||
}
|
||||
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetDryRun sets the DryRun field's value.
|
||||
func (s *DeriveSharedSecretInput) SetDryRun(v bool) *DeriveSharedSecretInput {
|
||||
s.DryRun = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetGrantTokens sets the GrantTokens field's value.
|
||||
func (s *DeriveSharedSecretInput) SetGrantTokens(v []*string) *DeriveSharedSecretInput {
|
||||
s.GrantTokens = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetKeyAgreementAlgorithm sets the KeyAgreementAlgorithm field's value.
|
||||
func (s *DeriveSharedSecretInput) SetKeyAgreementAlgorithm(v string) *DeriveSharedSecretInput {
|
||||
s.KeyAgreementAlgorithm = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetKeyId sets the KeyId field's value.
|
||||
func (s *DeriveSharedSecretInput) SetKeyId(v string) *DeriveSharedSecretInput {
|
||||
s.KeyId = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetPublicKey sets the PublicKey field's value.
|
||||
func (s *DeriveSharedSecretInput) SetPublicKey(v []byte) *DeriveSharedSecretInput {
|
||||
s.PublicKey = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetRecipient sets the Recipient field's value.
|
||||
func (s *DeriveSharedSecretInput) SetRecipient(v *RecipientInfo) *DeriveSharedSecretInput {
|
||||
s.Recipient = v
|
||||
return s
|
||||
}
|
||||
|
||||
type DeriveSharedSecretOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// The plaintext shared secret encrypted with the public key in the attestation
|
||||
// document.
|
||||
//
|
||||
// This field is included in the response only when the Recipient parameter
|
||||
// in the request includes a valid attestation document from an Amazon Web Services
|
||||
// Nitro enclave. For information about the interaction between KMS and Amazon
|
||||
// Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses
|
||||
// KMS (https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html)
|
||||
// in the Key Management Service Developer Guide.
|
||||
// CiphertextForRecipient is automatically base64 encoded/decoded by the SDK.
|
||||
CiphertextForRecipient []byte `min:"1" type:"blob"`
|
||||
|
||||
// Identifies the key agreement algorithm used to derive the shared secret.
|
||||
KeyAgreementAlgorithm *string `type:"string" enum:"KeyAgreementAlgorithmSpec"`
|
||||
|
||||
// Identifies the KMS key used to derive the shared secret.
|
||||
KeyId *string `min:"1" type:"string"`
|
||||
|
||||
// The source of the key material for the specified KMS key.
|
||||
//
|
||||
// When this value is AWS_KMS, KMS created the key material. When this value
|
||||
// is EXTERNAL, the key material was imported or the KMS key doesn't have any
|
||||
// key material.
|
||||
//
|
||||
// The only valid values for DeriveSharedSecret are AWS_KMS and EXTERNAL. DeriveSharedSecret
|
||||
// does not support KMS keys with a KeyOrigin value of AWS_CLOUDHSM or EXTERNAL_KEY_STORE.
|
||||
KeyOrigin *string `type:"string" enum:"OriginType"`
|
||||
|
||||
// The raw secret derived from the specified key agreement algorithm, private
|
||||
// key in the asymmetric KMS key, and your peer's public key.
|
||||
//
|
||||
// If the response includes the CiphertextForRecipient field, the SharedSecret
|
||||
// field is null or empty.
|
||||
//
|
||||
// SharedSecret is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by DeriveSharedSecretOutput's
|
||||
// String and GoString methods.
|
||||
//
|
||||
// SharedSecret is automatically base64 encoded/decoded by the SDK.
|
||||
SharedSecret []byte `min:"1" type:"blob" sensitive:"true"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s DeriveSharedSecretOutput) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s DeriveSharedSecretOutput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// SetCiphertextForRecipient sets the CiphertextForRecipient field's value.
|
||||
func (s *DeriveSharedSecretOutput) SetCiphertextForRecipient(v []byte) *DeriveSharedSecretOutput {
|
||||
s.CiphertextForRecipient = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetKeyAgreementAlgorithm sets the KeyAgreementAlgorithm field's value.
|
||||
func (s *DeriveSharedSecretOutput) SetKeyAgreementAlgorithm(v string) *DeriveSharedSecretOutput {
|
||||
s.KeyAgreementAlgorithm = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetKeyId sets the KeyId field's value.
|
||||
func (s *DeriveSharedSecretOutput) SetKeyId(v string) *DeriveSharedSecretOutput {
|
||||
s.KeyId = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetKeyOrigin sets the KeyOrigin field's value.
|
||||
func (s *DeriveSharedSecretOutput) SetKeyOrigin(v string) *DeriveSharedSecretOutput {
|
||||
s.KeyOrigin = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetSharedSecret sets the SharedSecret field's value.
|
||||
func (s *DeriveSharedSecretOutput) SetSharedSecret(v []byte) *DeriveSharedSecretOutput {
|
||||
s.SharedSecret = v
|
||||
return s
|
||||
}
|
||||
|
||||
type DescribeCustomKeyStoresInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@ -14006,9 +14520,11 @@ type GenerateDataKeyPairInput struct {
|
||||
// RSAES_OAEP_SHA_256.
|
||||
//
|
||||
// This parameter only supports attestation documents for Amazon Web Services
|
||||
// Nitro Enclaves. To include this parameter, use the Amazon Web Services Nitro
|
||||
// Enclaves SDK (https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk)
|
||||
// or any Amazon Web Services SDK.
|
||||
// Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web Services Nitro
|
||||
// Enclaves, use the Amazon Web Services Nitro Enclaves SDK (https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk)
|
||||
// to generate the attestation document and then use the Recipient parameter
|
||||
// from any Amazon Web Services SDK to provide the attestation document for
|
||||
// the enclave.
|
||||
//
|
||||
// When you use this parameter, instead of returning a plaintext copy of the
|
||||
// private data key, KMS encrypts the plaintext private data key under the public
|
||||
@ -15199,25 +15715,19 @@ type GetParametersForImportInput struct {
|
||||
// KeyId is a required field
|
||||
KeyId *string `min:"1" type:"string" required:"true"`
|
||||
|
||||
// The algorithm you will use with the asymmetric public key (PublicKey) in
|
||||
// the response to protect your key material during import. For more information,
|
||||
// see Select a wrapping algorithm (kms/latest/developerguide/importing-keys-get-public-key-and-token.html#select-wrapping-algorithm)
|
||||
// The algorithm you will use with the RSA public key (PublicKey) in the response
|
||||
// to protect your key material during import. For more information, see Select
|
||||
// a wrapping algorithm (kms/latest/developerguide/importing-keys-get-public-key-and-token.html#select-wrapping-algorithm)
|
||||
// in the Key Management Service Developer Guide.
|
||||
//
|
||||
// For RSA_AES wrapping algorithms, you encrypt your key material with an AES
|
||||
// key that you generate, then encrypt your AES key with the RSA public key
|
||||
// from KMS. For RSAES wrapping algorithms, you encrypt your key material directly
|
||||
// with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt
|
||||
// your key material directly with the SM2 public key from KMS.
|
||||
// with the RSA public key from KMS.
|
||||
//
|
||||
// The wrapping algorithms that you can use depend on the type of key material
|
||||
// that you are importing. To import an RSA private key, you must use an RSA_AES
|
||||
// wrapping algorithm, except in China Regions, where you must use the SM2PKE
|
||||
// wrapping algorithm to import an RSA private key.
|
||||
//
|
||||
// The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256
|
||||
// and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China
|
||||
// Regions.
|
||||
// wrapping algorithm.
|
||||
//
|
||||
// * RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key
|
||||
// material.
|
||||
@ -15237,24 +15747,19 @@ type GetParametersForImportInput struct {
|
||||
// * RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not
|
||||
// support the RSAES_PKCS1_V1_5 wrapping algorithm.
|
||||
//
|
||||
// * SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and
|
||||
// SM2 key material.
|
||||
//
|
||||
// WrappingAlgorithm is a required field
|
||||
WrappingAlgorithm *string `type:"string" required:"true" enum:"AlgorithmSpec"`
|
||||
|
||||
// The type of public key to return in the response. You will use this wrapping
|
||||
// The type of RSA public key to return in the response. You will use this wrapping
|
||||
// key with the specified wrapping algorithm to protect your key material during
|
||||
// import.
|
||||
//
|
||||
// Use the longest wrapping key that is practical.
|
||||
// Use the longest RSA wrapping key that is practical.
|
||||
//
|
||||
// You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private
|
||||
// key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public
|
||||
// key.
|
||||
//
|
||||
// The SM2 wrapping key spec is available only in China Regions.
|
||||
//
|
||||
// WrappingKeySpec is a required field
|
||||
WrappingKeySpec *string `type:"string" required:"true" enum:"WrappingKeySpec"`
|
||||
}
|
||||
@ -15490,6 +15995,10 @@ type GetPublicKeyOutput struct {
|
||||
// is ENCRYPT_DECRYPT.
|
||||
EncryptionAlgorithms []*string `type:"list" enum:"EncryptionAlgorithmSpec"`
|
||||
|
||||
// The key agreement algorithm used to derive a shared secret. This field is
|
||||
// present only when the KMS key has a KeyUsage value of KEY_AGREEMENT.
|
||||
KeyAgreementAlgorithms []*string `type:"list" enum:"KeyAgreementAlgorithmSpec"`
|
||||
|
||||
// The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
|
||||
// of the asymmetric KMS key from which the public key was downloaded.
|
||||
KeyId *string `min:"1" type:"string"`
|
||||
@ -15497,11 +16006,11 @@ type GetPublicKeyOutput struct {
|
||||
// The type of the of the public key that was downloaded.
|
||||
KeySpec *string `type:"string" enum:"KeySpec"`
|
||||
|
||||
// The permitted use of the public key. Valid values are ENCRYPT_DECRYPT or
|
||||
// SIGN_VERIFY.
|
||||
// The permitted use of the public key. Valid values for asymmetric key pairs
|
||||
// are ENCRYPT_DECRYPT, SIGN_VERIFY, and KEY_AGREEMENT.
|
||||
//
|
||||
// This information is critical. If a public key with SIGN_VERIFY key usage
|
||||
// encrypts data outside of KMS, the ciphertext cannot be decrypted.
|
||||
// This information is critical. For example, if a public key with SIGN_VERIFY
|
||||
// key usage encrypts data outside of KMS, the ciphertext cannot be decrypted.
|
||||
KeyUsage *string `type:"string" enum:"KeyUsageType"`
|
||||
|
||||
// The exported public key.
|
||||
@ -15550,6 +16059,12 @@ func (s *GetPublicKeyOutput) SetEncryptionAlgorithms(v []*string) *GetPublicKeyO
|
||||
return s
|
||||
}
|
||||
|
||||
// SetKeyAgreementAlgorithms sets the KeyAgreementAlgorithms field's value.
|
||||
func (s *GetPublicKeyOutput) SetKeyAgreementAlgorithms(v []*string) *GetPublicKeyOutput {
|
||||
s.KeyAgreementAlgorithms = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetKeyId sets the KeyId field's value.
|
||||
func (s *GetPublicKeyOutput) SetKeyId(v string) *GetPublicKeyOutput {
|
||||
s.KeyId = &v
|
||||
@ -16603,7 +17118,8 @@ func (s *InvalidImportTokenException) RequestID() string {
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -17052,6 +17568,9 @@ type KeyMetadata struct {
|
||||
// only when Origin is EXTERNAL, otherwise this value is omitted.
|
||||
ExpirationModel *string `type:"string" enum:"ExpirationModelType"`
|
||||
|
||||
// The key agreement algorithm used to derive a shared secret.
|
||||
KeyAgreementAlgorithms []*string `type:"list" enum:"KeyAgreementAlgorithmSpec"`
|
||||
|
||||
// The globally unique identifier for the KMS key.
|
||||
//
|
||||
// KeyId is a required field
|
||||
@ -17232,6 +17751,12 @@ func (s *KeyMetadata) SetExpirationModel(v string) *KeyMetadata {
|
||||
return s
|
||||
}
|
||||
|
||||
// SetKeyAgreementAlgorithms sets the KeyAgreementAlgorithms field's value.
|
||||
func (s *KeyMetadata) SetKeyAgreementAlgorithms(v []*string) *KeyMetadata {
|
||||
s.KeyAgreementAlgorithms = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetKeyId sets the KeyId field's value.
|
||||
func (s *KeyMetadata) SetKeyId(v string) *KeyMetadata {
|
||||
s.KeyId = &v
|
||||
@ -23034,6 +23559,9 @@ const (
|
||||
|
||||
// GrantOperationVerifyMac is a GrantOperation enum value
|
||||
GrantOperationVerifyMac = "VerifyMac"
|
||||
|
||||
// GrantOperationDeriveSharedSecret is a GrantOperation enum value
|
||||
GrantOperationDeriveSharedSecret = "DeriveSharedSecret"
|
||||
)
|
||||
|
||||
// GrantOperation_Values returns all elements of the GrantOperation enum
|
||||
@ -23055,6 +23583,19 @@ func GrantOperation_Values() []string {
|
||||
GrantOperationGenerateDataKeyPairWithoutPlaintext,
|
||||
GrantOperationGenerateMac,
|
||||
GrantOperationVerifyMac,
|
||||
GrantOperationDeriveSharedSecret,
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
// KeyAgreementAlgorithmSpecEcdh is a KeyAgreementAlgorithmSpec enum value
|
||||
KeyAgreementAlgorithmSpecEcdh = "ECDH"
|
||||
)
|
||||
|
||||
// KeyAgreementAlgorithmSpec_Values returns all elements of the KeyAgreementAlgorithmSpec enum
|
||||
func KeyAgreementAlgorithmSpec_Values() []string {
|
||||
return []string{
|
||||
KeyAgreementAlgorithmSpecEcdh,
|
||||
}
|
||||
}
|
||||
|
||||
@ -23195,6 +23736,9 @@ const (
|
||||
|
||||
// KeyUsageTypeGenerateVerifyMac is a KeyUsageType enum value
|
||||
KeyUsageTypeGenerateVerifyMac = "GENERATE_VERIFY_MAC"
|
||||
|
||||
// KeyUsageTypeKeyAgreement is a KeyUsageType enum value
|
||||
KeyUsageTypeKeyAgreement = "KEY_AGREEMENT"
|
||||
)
|
||||
|
||||
// KeyUsageType_Values returns all elements of the KeyUsageType enum
|
||||
@ -23203,6 +23747,7 @@ func KeyUsageType_Values() []string {
|
||||
KeyUsageTypeSignVerify,
|
||||
KeyUsageTypeEncryptDecrypt,
|
||||
KeyUsageTypeGenerateVerifyMac,
|
||||
KeyUsageTypeKeyAgreement,
|
||||
}
|
||||
}
|
||||
|
||||
|
4
vendor/github.com/aws/aws-sdk-go/service/kms/errors.go
generated
vendored
4
vendor/github.com/aws/aws-sdk-go/service/kms/errors.go
generated
vendored
@ -279,7 +279,8 @@ const (
|
||||
// For encrypting, decrypting, re-encrypting, and generating data keys, the
|
||||
// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the
|
||||
// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage
|
||||
// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key
|
||||
// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage
|
||||
// of a KMS key, use the DescribeKey operation.
|
||||
//
|
||||
// To find the encryption or signing algorithms supported for a particular KMS
|
||||
@ -424,6 +425,7 @@ const (
|
||||
// ErrCodeXksProxyInvalidResponseException for service response error code
|
||||
// "XksProxyInvalidResponseException".
|
||||
//
|
||||
//
|
||||
// KMS cannot interpret the response it received from the external key store
|
||||
// proxy. The problem might be a poorly constructed response, but it could also
|
||||
// be a transient network issue. If you see this error repeatedly, report it
|
||||
|
4
vendor/github.com/aws/smithy-go/CHANGELOG.md
generated
vendored
4
vendor/github.com/aws/smithy-go/CHANGELOG.md
generated
vendored
@ -1,3 +1,7 @@
|
||||
# Release (2024-03-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# Release (2024-02-21)
|
||||
|
||||
## Module Highlights
|
||||
|
2
vendor/github.com/aws/smithy-go/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/smithy-go/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package smithy
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.20.1"
|
||||
const goModuleVersion = "1.20.2"
|
||||
|
Reference in New Issue
Block a user