From e7e51ae384ace58c4b67e42d3e51b5e694ad0aec Mon Sep 17 00:00:00 2001 From: "c1-dev-bot[bot]" <2740113+c1-dev-bot[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 06:56:40 +0000 Subject: [PATCH] Use Identity Store UserStatus field for SSO user status Check the UserStatus field from the AWS Identity Store API before falling back to the SCIM API. This fixes status visibility for Identity Centre Directory users where SCIM is unavailable, and reduces per-user SCIM API calls when the status is already available from the Identity Store API. The UserStatus field was added to the Identity Store API on Nov 6, 2025. This change upgrades the identitystore SDK from v1.25.4 to v1.36.1 to access the new field. Resolves: EPD-1531 --- go.mod | 2 +- go.sum | 2 + pkg/connector/sso_user.go | 18 +- .../service/identitystore/CHANGELOG.md | 274 +++++++ .../service/identitystore/api_client.go | 392 ++++++++- .../identitystore/api_op_CreateGroup.go | 15 + .../api_op_CreateGroupMembership.go | 15 + .../identitystore/api_op_CreateUser.go | 43 +- .../identitystore/api_op_DeleteGroup.go | 15 + .../api_op_DeleteGroupMembership.go | 15 + .../identitystore/api_op_DeleteUser.go | 15 + .../identitystore/api_op_DescribeGroup.go | 34 +- .../api_op_DescribeGroupMembership.go | 34 +- .../identitystore/api_op_DescribeUser.go | 62 +- .../identitystore/api_op_GetGroupId.go | 21 +- .../api_op_GetGroupMembershipId.go | 21 +- .../service/identitystore/api_op_GetUserId.go | 21 +- .../identitystore/api_op_IsMemberInGroups.go | 21 +- .../api_op_ListGroupMemberships.go | 21 +- .../api_op_ListGroupMembershipsForMember.go | 21 +- .../identitystore/api_op_ListGroups.go | 25 +- .../service/identitystore/api_op_ListUsers.go | 28 +- .../identitystore/api_op_UpdateGroup.go | 24 +- .../identitystore/api_op_UpdateUser.go | 24 +- .../service/identitystore/auth.go | 79 +- .../service/identitystore/deserializers.go | 765 +++++++++++++++++- .../service/identitystore/doc.go | 6 +- .../service/identitystore/endpoints.go | 49 +- .../service/identitystore/generated.json | 3 +- .../identitystore/go_module_metadata.go | 2 +- .../internal/endpoints/endpoints.go | 64 +- .../service/identitystore/options.go | 18 +- .../service/identitystore/serializers.go | 262 ++++++ .../service/identitystore/types/enums.go | 96 +++ .../service/identitystore/types/errors.go | 4 + .../service/identitystore/types/types.go | 105 +++ .../service/identitystore/validators.go | 37 + vendor/modules.txt | 4 +- 38 files changed, 2521 insertions(+), 136 deletions(-) diff --git a/go.mod b/go.mod index fc71fb8a..5c4d4699 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go-v2/credentials v1.17.55 github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.55.5 github.com/aws/aws-sdk-go-v2/service/iam v1.35.0 - github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4 + github.com/aws/aws-sdk-go-v2/service/identitystore v1.36.1 github.com/aws/aws-sdk-go-v2/service/organizations v1.31.0 github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.27.5 github.com/aws/aws-sdk-go-v2/service/sts v1.33.10 diff --git a/go.sum b/go.sum index 5d789f18..b05c8578 100644 --- a/go.sum +++ b/go.sum @@ -38,6 +38,8 @@ github.com/aws/aws-sdk-go-v2/service/iam v1.35.0 h1:xIjTizH74aMNQBjp9D5cvjRZmOYt github.com/aws/aws-sdk-go-v2/service/iam v1.35.0/go.mod h1:IdHqqRLKgxYR4IY7Omd7SuV4SJzJ8seF+U5PW+mvtP4= github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4 h1:icyZwij1BqzyW5yZGcfHIftrPogK9LgiWt08B1IYyWQ= github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4/go.mod h1:NPEyhoIDtRHby3oWpLFUdGrfbMwM8f/4u57VdtRdH8g= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.36.1 h1:XzFSBprF2qH/HU3rj0sb19fMizHBdXzNdrKJ5BaFoKc= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.36.1/go.mod h1:lVt7GOrew2aoiZQwbEYLNo12LZdonRJ3AWt6uUYp5PI= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 h1:D4oz8/CzT9bAEYtVhSBmFj2dNOtaHOtMKc2vHBwYizA= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2/go.mod h1:Za3IHqTQ+yNcRHxu1OFucBh0ACZT4j4VQFF0BqpZcLY= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.3 h1:EP1ITDgYVPM2dL1bBBntJ7AW5yTjuWGz9XO+CZwpALU= diff --git a/pkg/connector/sso_user.go b/pkg/connector/sso_user.go index 66a50cc9..98c5d904 100644 --- a/pkg/connector/sso_user.go +++ b/pkg/connector/sso_user.go @@ -61,10 +61,20 @@ func (o *ssoUserResourceType) List(ctx context.Context, _ *v2.ResourceId, pt *pa l := ctxzap.Extract(ctx) rv := make([]*v2.Resource, 0, len(resp.Users)) for _, user := range resp.Users { - status, err := o.scimClient.getUserStatus(ctx, awsSdk.ToString(user.UserId)) - if err != nil { - // getUserStatus returns UserTrait_Status_STATUS_UNSPECIFIED in error case, and we don't want to fail sync if we fail to get status for one user. - l.Debug("aws-connector: failed to get user status from scim", zap.Error(err), zap.String("user_id", awsSdk.ToString(user.UserId))) + // Check the UserStatus field from the Identity Store API first. + // Fall back to SCIM only if the status is still unspecified. + var status v2.UserTrait_Status_Status + switch user.UserStatus { + case awsIdentityStoreTypes.UserStatusEnabled: + status = v2.UserTrait_Status_STATUS_ENABLED + case awsIdentityStoreTypes.UserStatusDisabled: + status = v2.UserTrait_Status_STATUS_DISABLED + default: + status, err = o.scimClient.getUserStatus(ctx, awsSdk.ToString(user.UserId)) + if err != nil { + // getUserStatus returns UserTrait_Status_STATUS_UNSPECIFIED in error case, and we don't want to fail sync if we fail to get status for one user. + l.Debug("aws-connector: failed to get user status from scim", zap.Error(err), zap.String("user_id", awsSdk.ToString(user.UserId))) + } } userARN := ssoUserToARN(o.region, awsSdk.ToString(o.identityInstance.IdentityStoreId), awsSdk.ToString(user.UserId)) annos := &v2.V1Identifier{ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/CHANGELOG.md index 8be2be40..33d83020 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/CHANGELOG.md @@ -1,3 +1,277 @@ +# v1.36.1 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.0 (2026-01-02) + +* **Feature**: This change introduces "Roles" attribute for User entities supported by AWS Identity Store SDK. + +# v1.35.2 (2025-12-19) + +* No change notes available for this release. + +# v1.35.1 (2025-12-09) + +* No change notes available for this release. + +# v1.35.0 (2025-12-08) + +* **Feature**: Updating AWS Identity Store APIs to support Attribute Extensions capability, with the first release adding Enterprise Attributes. This launch aligns Identity Store APIs with SCIM for enterprise attributes, reducing cases when customers are forced to use SCIM due to lack of SigV4 API support. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.6 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.34.5 (2025-11-25) + +* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234 + +# v1.34.4 (2025-11-20) + +* No change notes available for this release. + +# v1.34.3 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.2 (2025-11-12) + +* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use. +* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured. +* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations. + +# v1.34.1 (2025-11-11) + +* **Bug Fix**: Return validation error if input region is not a valid host label. + +# v1.34.0 (2025-11-06) + +* **Feature**: IdentityStore API: added new KMSExceptionReason fields to the Exception object; added multiple new fields to the User APIs - UserStatus, Birthdate, Website and Photos; added multiple new metadata fields for User, Groups and Membership APIs - CreatedAt, CreatedBy, UpdatedAt and UpdatedBy. + +# v1.33.3 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.33.2 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.1 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.0 (2025-10-16) + +* **Feature**: Update endpoint ruleset parameters casing +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.7 (2025-10-09) + +* No change notes available for this release. + +# v1.32.6 (2025-09-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.5 (2025-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.4 (2025-09-10) + +* No change notes available for this release. + +# v1.32.3 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.2 (2025-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.1 (2025-08-27) + +* **Dependency Update**: Update to smithy-go v1.23.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.0 (2025-08-26) + +* **Feature**: Remove incorrect endpoint tests + +# v1.31.2 (2025-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.1 (2025-08-20) + +* **Bug Fix**: Remove unused deserialization code. + +# v1.31.0 (2025-08-11) + +* **Feature**: Add support for configuring per-service Options via callback on global config. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.0 (2025-08-04) + +* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.1 (2025-07-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.0 (2025-07-28) + +* **Feature**: Add support for HTTP interceptors. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.7 (2025-07-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.6 (2025-06-17) + +* **Dependency Update**: Update to smithy-go v1.22.4. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.5 (2025-06-11) + +* No change notes available for this release. + +# v1.28.4 (2025-06-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.3 (2025-05-12) + +* No change notes available for this release. + +# v1.28.2 (2025-04-03) + +* No change notes available for this release. + +# v1.28.1 (2025-03-04.2) + +* **Bug Fix**: Add assurance test for operation order. + +# v1.28.0 (2025-02-27) + +* **Feature**: Track credential providers via User-Agent Feature ids +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.17 (2025-02-18) + +* **Bug Fix**: Bump go version to 1.22 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.16 (2025-02-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.15 (2025-01-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.14 (2025-01-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.13 (2025-01-24) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.22.2. + +# v1.27.12 (2025-01-17) + +* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. + +# v1.27.11 (2025-01-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.10 (2025-01-13) + +* No change notes available for this release. + +# v1.27.9 (2025-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.8 (2024-12-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.7 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.6 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.5 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.27.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.4 (2024-10-03) + +* No change notes available for this release. + +# v1.26.3 (2024-09-27) + +* No change notes available for this release. + +# v1.26.2 (2024-09-25) + +* No change notes available for this release. + +# v1.26.1 (2024-09-23) + +* No change notes available for this release. + +# v1.26.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.7 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.25.6 (2024-09-04) + +* No change notes available for this release. + +# v1.25.5 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.25.4 (2024-08-15) * **Dependency Update**: Bump minimum Go version to 1.21. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_client.go index fbf19970..439b7026 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_client.go @@ -4,6 +4,7 @@ package identitystore import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -19,7 +20,9 @@ import ( 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/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -30,6 +33,152 @@ import ( const ServiceID = "identitystore" const ServiceAPIVersion = "2020-06-15" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return fn() + } + + instr := mm.histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return func() {} + } + + instr := mm.histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + if _, ok := mp.(metrics.NopMeterProvider); ok { + // not using the metrics system - setting up the metrics context is a memory-intensive operation + // so we should skip it in this case + return parent, nil + } + + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/identitystore") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + if v := ctx.Value(operationMetricsKey{}); v != nil { + return v.(*operationMetrics) + } + return nil +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/identitystore") +} + // Client provides the API client to make operations call for AWS SSO Identity // Store. type Client struct { @@ -57,6 +206,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -89,8 +242,15 @@ func (c *Client) Options() Options { return c.options.Copy() } -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() @@ -114,15 +274,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + ctx, err = withOperationMetrics(ctx, options.MeterProvider) if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/identitystore") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + return result, metadata, err } @@ -160,7 +361,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { return fmt.Errorf("add ResolveEndpointV2: %v", err) } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -238,25 +439,33 @@ 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, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + 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, + AuthSchemePreference: cfg.AuthSchemePreference, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) + resolveInterceptors(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) resolveBaseEndpoint(cfg, &opts) - return New(opts, optFns...) + return New(opts, func(o *Options) { + for _, opt := range cfg.ServiceOptions { + opt(ServiceID, o) + } + for _, opt := range optFns { + opt(o) + } + }) } func resolveHTTPClient(o *Options) { @@ -370,6 +579,10 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) } +func resolveInterceptors(cfg aws.Config, o *Options) { + o.Interceptors = cfg.Interceptors.Copy() +} + func addClientUserAgent(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -435,6 +648,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { func addRecordResponseTiming(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) } + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} func addStreamingEventsPayload(stack *middleware.Stack) error { return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) } @@ -478,8 +715,9 @@ func addIsPaginatorUserAgent(o *Options) { func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/identitystore") }) - if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { + if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { return err } if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { @@ -541,25 +779,6 @@ 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 { @@ -575,6 +794,49 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +type setCredentialSourceMiddleware struct { + ua *awsmiddleware.RequestUserAgent + options Options +} + +func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } + +func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( + out middleware.BuildOutput, metadata middleware.Metadata, err error, +) { + asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) + if !ok { + return next.HandleBuild(ctx, in) + } + providerSources := asProviderSource.ProviderSources() + for _, source := range providerSources { + m.ua.AddCredentialsSource(source) + } + return next.HandleBuild(ctx, in) +} + +func addCredentialSource(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + mw := setCredentialSourceMiddleware{ua: ua, options: options} + return stack.Build.Insert(&mw, "UserAgent", middleware.Before) +} + +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } @@ -626,3 +888,63 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ + Interceptors: opts.Interceptors.BeforeRetryLoop, + }, "Retry", middleware.Before) +} + +func addInterceptAttempt(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ + BeforeAttempt: opts.Interceptors.BeforeAttempt, + AfterAttempt: opts.Interceptors.AfterAttempt, + }, "Retry", middleware.After) +} + +func addInterceptors(stack *middleware.Stack, opts Options) error { + // middlewares are expensive, don't add all of these interceptor ones unless the caller + // actually has at least one interceptor configured + // + // at the moment it's all-or-nothing because some of the middlewares here are responsible for + // setting fields in the interceptor context for future ones + if len(opts.Interceptors.BeforeExecution) == 0 && + len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 && + len(opts.Interceptors.BeforeRetryLoop) == 0 && + len(opts.Interceptors.BeforeAttempt) == 0 && + len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 && + len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 && + len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 && + len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 { + return nil + } + + return errors.Join( + stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After), + stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before), + stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After), + stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After), + stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse) + stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before), + ) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroup.go index 7b1ef095..518c3d67 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroup.go @@ -105,6 +105,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -123,6 +126,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } @@ -144,6 +150,15 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroupMembership.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroupMembership.go index a4074ae5..341f7423 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroupMembership.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroupMembership.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateGroupMembershipMiddlewares(stack *middleware. if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -129,6 +132,9 @@ func (c *Client) addOperationCreateGroupMembershipMiddlewares(stack *middleware. if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpCreateGroupMembershipValidationMiddleware(stack); err != nil { return err } @@ -150,6 +156,15 @@ func (c *Client) addOperationCreateGroupMembershipMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateUser.go index 0fb60f74..8a5077b8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateUser.go @@ -6,6 +6,7 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/identitystore/document" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -37,17 +38,29 @@ type CreateUserInput struct { // A list of Address objects containing addresses associated with the user. Addresses []types.Address + // The user's birthdate in YYYY-MM-DD format. This field supports standard date + // format for storing personal information. + Birthdate *string + // A string containing the name of the user. This value is typically formatted for - // display when the user is referenced. For example, "John Doe." + // display when the user is referenced. For example, "John Doe." When used in IAM + // Identity Center, this parameter is required. DisplayName *string // A list of Email objects containing email addresses associated with the user. Emails []types.Email + // A map with additional attribute extensions for the user. Each map key + // corresponds to an extension name, while map values represent extension data in + // Document type (not supported by Java V1, Go V1 and older versions of the CLI). + // aws:identitystore:enterprise is the only supported extension name. + Extensions map[string]document.Interface + // A string containing the geographical region or location of the user. Locale *string - // An object containing the name of the user. + // An object containing the name of the user. When used in IAM Identity Center, + // this parameter is required. Name *types.Name // A string containing an alternate name for the user. @@ -56,6 +69,10 @@ type CreateUserInput struct { // A list of PhoneNumber objects containing phone numbers associated with the user. PhoneNumbers []types.PhoneNumber + // A list of photos associated with the user. You can add up to 3 photos per user. + // Each photo can include a value, type, display name, and primary designation. + Photos []types.Photo + // A string containing the preferred language of the user. For example, "American // English" or "en-us." PreferredLanguage *string @@ -63,6 +80,9 @@ type CreateUserInput struct { // A string containing a URL that might be associated with the user. ProfileUrl *string + // A list of Role objects containing roles associated with the user. + Roles []types.Role + // A string containing the time zone of the user. Timezone *string @@ -81,6 +101,10 @@ type CreateUserInput struct { // value can vary based on your specific use case. UserType *string + // The user's personal website or blog URL. This field allows users to provide a + // link to their personal or professional website. + Website *string + noSmithyDocumentSerde } @@ -145,6 +169,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -163,6 +190,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } @@ -184,6 +214,15 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroup.go index fc2403c1..1035ace1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroup.go @@ -91,6 +91,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -109,6 +112,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } @@ -130,6 +136,15 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroupMembership.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroupMembership.go index f68986a2..40867bf8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroupMembership.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroupMembership.go @@ -91,6 +91,9 @@ func (c *Client) addOperationDeleteGroupMembershipMiddlewares(stack *middleware. if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -109,6 +112,9 @@ func (c *Client) addOperationDeleteGroupMembershipMiddlewares(stack *middleware. if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpDeleteGroupMembershipValidationMiddleware(stack); err != nil { return err } @@ -130,6 +136,15 @@ func (c *Client) addOperationDeleteGroupMembershipMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteUser.go index 3539c014..c9d93a8a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteUser.go @@ -91,6 +91,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -109,6 +112,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } @@ -130,6 +136,15 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroup.go index 1a2bbddd..686ebadf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroup.go @@ -9,14 +9,15 @@ import ( "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "time" ) // Retrieves the group metadata and attributes from GroupId in an identity store. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) DescribeGroup(ctx context.Context, params *DescribeGroupInput, optFns ...func(*Options)) (*DescribeGroupOutput, error) { if params == nil { params = &DescribeGroupInput{} @@ -62,6 +63,12 @@ type DescribeGroupOutput struct { // This member is required. IdentityStoreId *string + // The date and time the group was created. + CreatedAt *time.Time + + // The identifier of the user or system that created the group. + CreatedBy *string + // A string containing a description of the group. Description *string @@ -76,6 +83,12 @@ type DescribeGroupOutput struct { // resource by an external identity provider. ExternalIds []types.ExternalId + // The date and time the group was last updated. + UpdatedAt *time.Time + + // The identifier of the user or system that last updated the group. + UpdatedBy *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -125,6 +138,9 @@ func (c *Client) addOperationDescribeGroupMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -143,6 +159,9 @@ func (c *Client) addOperationDescribeGroupMiddlewares(stack *middleware.Stack, o if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpDescribeGroupValidationMiddleware(stack); err != nil { return err } @@ -164,6 +183,15 @@ func (c *Client) addOperationDescribeGroupMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroupMembership.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroupMembership.go index 50a1dd06..2ac29a98 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroupMembership.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroupMembership.go @@ -9,15 +9,16 @@ import ( "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "time" ) // Retrieves membership metadata and attributes from MembershipId in an identity // store. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) DescribeGroupMembership(ctx context.Context, params *DescribeGroupMembershipInput, optFns ...func(*Options)) (*DescribeGroupMembershipOutput, error) { if params == nil { params = &DescribeGroupMembershipInput{} @@ -70,6 +71,18 @@ type DescribeGroupMembershipOutput struct { // This member is required. MembershipId *string + // The date and time the group membership was created. + CreatedAt *time.Time + + // The identifier of the user or system that created the group membership. + CreatedBy *string + + // The date and time the group membership was last updated. + UpdatedAt *time.Time + + // The identifier of the user or system that last updated the group membership. + UpdatedBy *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -119,6 +132,9 @@ func (c *Client) addOperationDescribeGroupMembershipMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +153,9 @@ func (c *Client) addOperationDescribeGroupMembershipMiddlewares(stack *middlewar if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpDescribeGroupMembershipValidationMiddleware(stack); err != nil { return err } @@ -158,6 +177,15 @@ func (c *Client) addOperationDescribeGroupMembershipMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeUser.go index b1bd56e3..5f029908 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeUser.go @@ -6,17 +6,19 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/identitystore/document" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "time" ) // Retrieves the user metadata and attributes from the UserId in an identity store. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) DescribeUser(ctx context.Context, params *DescribeUserInput, optFns ...func(*Options)) (*DescribeUserOutput, error) { if params == nil { params = &DescribeUserInput{} @@ -47,6 +49,11 @@ type DescribeUserInput struct { // This member is required. UserId *string + // A collection of extension names indicating what extensions the service should + // retrieve alongside other user attributes. aws:identitystore:enterprise is the + // only supported extension name. + Extensions []string + noSmithyDocumentSerde } @@ -65,12 +72,26 @@ type DescribeUserOutput struct { // The physical address of the user. Addresses []types.Address + // The user's birthdate in YYYY-MM-DD format. This field returns the stored + // birthdate information for the user. + Birthdate *string + + // The date and time the user was created. + CreatedAt *time.Time + + // The identifier of the user or system that created the user. + CreatedBy *string + // The display name of the user. DisplayName *string // The email address of the user. Emails []types.Email + // A map of explicitly requested attribute extensions associated with the user. + // Not populated if the user has no requested extensions. + Extensions map[string]document.Interface + // A list of ExternalId objects that contains the identifiers issued to this // resource by an external identity provider. ExternalIds []types.ExternalId @@ -87,27 +108,47 @@ type DescribeUserOutput struct { // A list of PhoneNumber objects associated with a user. PhoneNumbers []types.PhoneNumber + // A list of photos associated with the user. Returns up to 3 photos with their + // associated metadata including type, display name, and primary designation. + Photos []types.Photo + // The preferred language of the user. PreferredLanguage *string // A URL link for the user's profile. ProfileUrl *string + // The roles of the user. + Roles []types.Role + // The time zone for a user. Timezone *string // A string containing the title of the user. Title *string + // The date and time the user was last updated. + UpdatedAt *time.Time + + // The identifier of the user or system that last updated the user. + UpdatedBy *string + // A unique string used to identify the user. The length limit is 128 characters. // This value can consist of letters, accented characters, symbols, numbers, and // punctuation. This value is specified at the time the user is created and stored // as an attribute of the user object in the identity store. UserName *string + // The current status of the user account. + UserStatus types.UserStatus + // A string indicating the type of user. UserType *string + // The user's personal website or blog URL. Returns the stored website information + // for the user. + Website *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -157,6 +198,9 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -175,6 +219,9 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpDescribeUserValidationMiddleware(stack); err != nil { return err } @@ -196,6 +243,15 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupId.go index b733bbf9..e961c15e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupId.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupId.go @@ -13,10 +13,10 @@ import ( // Retrieves GroupId in an identity store. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) GetGroupId(ctx context.Context, params *GetGroupIdInput, optFns ...func(*Options)) (*GetGroupIdOutput, error) { if params == nil { params = &GetGroupIdInput{} @@ -111,6 +111,9 @@ func (c *Client) addOperationGetGroupIdMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -129,6 +132,9 @@ func (c *Client) addOperationGetGroupIdMiddlewares(stack *middleware.Stack, opti if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpGetGroupIdValidationMiddleware(stack); err != nil { return err } @@ -150,6 +156,15 @@ func (c *Client) addOperationGetGroupIdMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupMembershipId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupMembershipId.go index 46503a7f..1fd1784b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupMembershipId.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupMembershipId.go @@ -13,10 +13,10 @@ import ( // Retrieves the MembershipId in an identity store. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) GetGroupMembershipId(ctx context.Context, params *GetGroupMembershipIdInput, optFns ...func(*Options)) (*GetGroupMembershipIdOutput, error) { if params == nil { params = &GetGroupMembershipIdInput{} @@ -115,6 +115,9 @@ func (c *Client) addOperationGetGroupMembershipIdMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -133,6 +136,9 @@ func (c *Client) addOperationGetGroupMembershipIdMiddlewares(stack *middleware.S if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpGetGroupMembershipIdValidationMiddleware(stack); err != nil { return err } @@ -154,6 +160,15 @@ func (c *Client) addOperationGetGroupMembershipIdMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetUserId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetUserId.go index d57b2a93..69f989c8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetUserId.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetUserId.go @@ -13,10 +13,10 @@ import ( // Retrieves the UserId in an identity store. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) GetUserId(ctx context.Context, params *GetUserIdInput, optFns ...func(*Options)) (*GetUserIdOutput, error) { if params == nil { params = &GetUserIdInput{} @@ -111,6 +111,9 @@ func (c *Client) addOperationGetUserIdMiddlewares(stack *middleware.Stack, optio if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -129,6 +132,9 @@ func (c *Client) addOperationGetUserIdMiddlewares(stack *middleware.Stack, optio if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpGetUserIdValidationMiddleware(stack); err != nil { return err } @@ -150,6 +156,15 @@ func (c *Client) addOperationGetUserIdMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_IsMemberInGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_IsMemberInGroups.go index 44e00287..3aa65e30 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_IsMemberInGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_IsMemberInGroups.go @@ -14,10 +14,10 @@ import ( // Checks the user's membership in all requested groups and returns if the member // exists in all queried groups. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) IsMemberInGroups(ctx context.Context, params *IsMemberInGroupsInput, optFns ...func(*Options)) (*IsMemberInGroupsOutput, error) { if params == nil { params = &IsMemberInGroupsInput{} @@ -109,6 +109,9 @@ func (c *Client) addOperationIsMemberInGroupsMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -127,6 +130,9 @@ func (c *Client) addOperationIsMemberInGroupsMiddlewares(stack *middleware.Stack if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpIsMemberInGroupsValidationMiddleware(stack); err != nil { return err } @@ -148,6 +154,15 @@ func (c *Client) addOperationIsMemberInGroupsMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMemberships.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMemberships.go index b0507f52..bc0bcee0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMemberships.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMemberships.go @@ -14,10 +14,10 @@ import ( // For the specified group in the specified identity store, returns the list of // all GroupMembership objects and returns results in paginated form. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) ListGroupMemberships(ctx context.Context, params *ListGroupMembershipsInput, optFns ...func(*Options)) (*ListGroupMembershipsOutput, error) { if params == nil { params = &ListGroupMembershipsInput{} @@ -122,6 +122,9 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,9 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpListGroupMembershipsValidationMiddleware(stack); err != nil { return err } @@ -161,6 +167,15 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMembershipsForMember.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMembershipsForMember.go index 535efab6..fdfb81b1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMembershipsForMember.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMembershipsForMember.go @@ -14,10 +14,10 @@ import ( // For the specified member in the specified identity store, returns the list of // all GroupMembership objects and returns results in paginated form. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) ListGroupMembershipsForMember(ctx context.Context, params *ListGroupMembershipsForMemberInput, optFns ...func(*Options)) (*ListGroupMembershipsForMemberOutput, error) { if params == nil { params = &ListGroupMembershipsForMemberInput{} @@ -125,6 +125,9 @@ func (c *Client) addOperationListGroupMembershipsForMemberMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -143,6 +146,9 @@ func (c *Client) addOperationListGroupMembershipsForMemberMiddlewares(stack *mid if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpListGroupMembershipsForMemberValidationMiddleware(stack); err != nil { return err } @@ -164,6 +170,15 @@ func (c *Client) addOperationListGroupMembershipsForMemberMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroups.go index ccdaec59..ecaf2567 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroups.go @@ -15,10 +15,10 @@ import ( // Group objects. Filtering for a Group by the DisplayName attribute is // deprecated. Instead, use the GetGroupId API action. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) ListGroups(ctx context.Context, params *ListGroupsInput, optFns ...func(*Options)) (*ListGroupsOutput, error) { if params == nil { params = &ListGroupsInput{} @@ -44,7 +44,7 @@ type ListGroupsInput struct { // This member is required. IdentityStoreId *string - // A list of Filter objects, which is used in the ListUsers and ListGroups + // A list of Filter objects, which is used in the ListUsers and ListGroups // requests. // // Deprecated: Using filters with ListGroups API is deprecated, please use @@ -75,7 +75,7 @@ type ListGroupsOutput struct { // The pagination token used for the ListUsers and ListGroups API operations. This // value is generated by the identity store service. It is returned in the API // response if the total results are more than the size of one page. This token is - // also returned when it1 is used in the API request to search for the next page. + // also returned when it is used in the API request to search for the next page. NextToken *string // Metadata pertaining to the operation's result. @@ -127,6 +127,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +148,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpListGroupsValidationMiddleware(stack); err != nil { return err } @@ -166,6 +172,15 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListUsers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListUsers.go index 0421d72f..b4cd7112 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListUsers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListUsers.go @@ -15,10 +15,10 @@ import ( // objects. Filtering for a User by the UserName attribute is deprecated. Instead, // use the GetUserId API action. // -// If you have administrator access to a member account, you can use this API from -// the member account. Read about [member accounts]in the Organizations User Guide. +// If you have access to a member account, you can use this API operation from the +// member account. For more information, see [Limiting access to the identity store from member accounts]in the IAM Identity Center User Guide. // -// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html +// [Limiting access to the identity store from member accounts]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts func (c *Client) ListUsers(ctx context.Context, params *ListUsersInput, optFns ...func(*Options)) (*ListUsersOutput, error) { if params == nil { params = &ListUsersInput{} @@ -44,7 +44,12 @@ type ListUsersInput struct { // This member is required. IdentityStoreId *string - // A list of Filter objects, which is used in the ListUsers and ListGroups + // A collection of extension names indicating what extensions the service should + // retrieve alongside other user attributes. aws:identitystore:enterprise is the + // only supported extension name. + Extensions []string + + // A list of Filter objects, which is used in the ListUsers and ListGroups // requests. // // Deprecated: Using filters with ListUsers API is deprecated, please use @@ -127,6 +132,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +153,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } @@ -166,6 +177,15 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateGroup.go index 56a1da3b..391c046d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateGroup.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// For the specified group in the specified identity store, updates the group -// metadata and attributes. +// Updates the specified group metadata and attributes in the specified identity +// store. func (c *Client) UpdateGroup(ctx context.Context, params *UpdateGroupInput, optFns ...func(*Options)) (*UpdateGroupOutput, error) { if params == nil { params = &UpdateGroupInput{} @@ -41,7 +41,10 @@ type UpdateGroupInput struct { IdentityStoreId *string // A list of AttributeOperation objects to apply to the requested group. These - // operations might add, replace, or remove an attribute. + // operations might add, replace, or remove an attribute. For more information on + // the attributes that can be added, replaced, or removed, see [Group]. + // + // [Group]: https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html // // This member is required. Operations []types.AttributeOperation @@ -99,6 +102,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -117,6 +123,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } @@ -138,6 +147,15 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateUser.go index 3d8cdcb2..303ed339 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateUser.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// For the specified user in the specified identity store, updates the user -// metadata and attributes. +// Updates the specified user metadata and attributes in the specified identity +// store. func (c *Client) UpdateUser(ctx context.Context, params *UpdateUserInput, optFns ...func(*Options)) (*UpdateUserOutput, error) { if params == nil { params = &UpdateUserInput{} @@ -36,7 +36,10 @@ type UpdateUserInput struct { IdentityStoreId *string // A list of AttributeOperation objects to apply to the requested user. These - // operations might add, replace, or remove an attribute. + // operations might add, replace, or remove an attribute. For more information on + // the attributes that can be added, replaced, or removed, see [User]. + // + // [User]: https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html // // This member is required. Operations []types.AttributeOperation @@ -99,6 +102,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -117,6 +123,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addCredentialSource(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } @@ -138,6 +147,15 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/auth.go index 26ac0e0d..31b7663d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/auth.go @@ -8,12 +8,17 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" + "slices" + "strings" ) -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error { params.Region = options.Region + return nil } type setLegacyContextSigningOptionsMiddleware struct { @@ -90,14 +95,16 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(ctx, params, input, options) + if err := bindAuthParamsRegion(ctx, params, input, options); err != nil { + return nil, err + } - return params + return params, nil } // AuthSchemeResolver returns a set of possible authentication options for an @@ -145,7 +152,13 @@ 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(ctx, m.operation, getOperationInput(ctx), m.options) + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("bind auth scheme params: %w", err) + } options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) @@ -157,11 +170,15 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { - for _, option := range options { + sorted := sortAuthOptions(options, m.options.AuthSchemePreference) + for _, option := range sorted { if option.SchemeID == smithyauth.SchemeIDAnonymous { return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true } @@ -180,6 +197,29 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) return nil, false } +func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { + byPriority := make([]*smithyauth.Option, 0, len(options)) + for _, prefName := range preferred { + for _, option := range options { + optName := option.SchemeID + if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { + optName = parts[1] + } + if prefName == optName { + byPriority = append(byPriority, option) + } + } + } + for _, option := range options { + if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { + return o.SchemeID == option.SchemeID + }) { + byPriority = append(byPriority, option) + } + } + return byPriority +} + type resolvedAuthSchemeKey struct{} type resolvedAuthScheme struct { @@ -216,7 +256,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -226,12 +269,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) if err != nil { return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) + + span.End() return next.HandleFinalize(ctx, in) } @@ -247,6 +298,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -256,6 +308,9 @@ func (*signRequestMiddleware) ID() string { func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) @@ -276,9 +331,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { return out, metadata, fmt.Errorf("sign request: %w", err) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/deserializers.go index a6e0097f..73039c2e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/deserializers.go @@ -8,26 +8,20 @@ import ( "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/identitystore/document" + internaldocument "github.com/aws/aws-sdk-go-v2/service/identitystore/internal/document" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" - "time" ) -func deserializeS3Expires(v string) (*time.Time, error) { - t, err := smithytime.ParseHTTPDate(v) - if err != nil { - return nil, nil - } - return &t, nil -} - type awsAwsjson11_deserializeOpCreateGroup struct { } @@ -43,6 +37,10 @@ func (m *awsAwsjson11_deserializeOpCreateGroup) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -168,6 +166,10 @@ func (m *awsAwsjson11_deserializeOpCreateGroupMembership) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -293,6 +295,10 @@ func (m *awsAwsjson11_deserializeOpCreateUser) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -418,6 +424,10 @@ func (m *awsAwsjson11_deserializeOpDeleteGroup) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -540,6 +550,10 @@ func (m *awsAwsjson11_deserializeOpDeleteGroupMembership) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -662,6 +676,10 @@ func (m *awsAwsjson11_deserializeOpDeleteUser) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -784,6 +802,10 @@ func (m *awsAwsjson11_deserializeOpDescribeGroup) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -903,6 +925,10 @@ func (m *awsAwsjson11_deserializeOpDescribeGroupMembership) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1022,6 +1048,10 @@ func (m *awsAwsjson11_deserializeOpDescribeUser) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1141,6 +1171,10 @@ func (m *awsAwsjson11_deserializeOpGetGroupId) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1260,6 +1294,10 @@ func (m *awsAwsjson11_deserializeOpGetGroupMembershipId) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1379,6 +1417,10 @@ func (m *awsAwsjson11_deserializeOpGetUserId) HandleDeserialize(ctx context.Cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1498,6 +1540,10 @@ func (m *awsAwsjson11_deserializeOpIsMemberInGroups) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1617,6 +1663,10 @@ func (m *awsAwsjson11_deserializeOpListGroupMemberships) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1736,6 +1786,10 @@ func (m *awsAwsjson11_deserializeOpListGroupMembershipsForMember) HandleDeserial return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1855,6 +1909,10 @@ func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1974,6 +2032,10 @@ func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2093,6 +2155,10 @@ func (m *awsAwsjson11_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2218,6 +2284,10 @@ func (m *awsAwsjson11_deserializeOpUpdateUser) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2595,7 +2665,7 @@ func awsAwsjson11_deserializeDocumentAccessDeniedException(v **types.AccessDenie for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -2604,6 +2674,15 @@ func awsAwsjson11_deserializeDocumentAccessDeniedException(v **types.AccessDenie sv.Message = ptr.String(jtv) } + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessDeniedExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.AccessDeniedExceptionReason(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -2684,7 +2763,7 @@ func awsAwsjson11_deserializeDocumentAddress(v **types.Address, value interface{ if value != nil { jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected SensitiveBooleanType to be of type *bool, got %T instead", value) + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) } sv.Primary = jtv } @@ -2759,6 +2838,14 @@ func awsAwsjson11_deserializeDocumentAddresses(v *[]types.Address, value interfa return nil } +func awsAwsjson11_deserializeDocumentAttributeValue(v *document.Interface, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + *v = internaldocument.NewDocumentUnmarshaler(value) + return nil +} + func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2781,7 +2868,7 @@ func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictExcepti for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -2843,7 +2930,7 @@ func awsAwsjson11_deserializeDocumentEmail(v **types.Email, value interface{}) e if value != nil { jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected SensitiveBooleanType to be of type *bool, got %T instead", value) + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) } sv.Primary = jtv } @@ -2909,6 +2996,40 @@ func awsAwsjson11_deserializeDocumentEmails(v *[]types.Email, value interface{}) return nil } +func awsAwsjson11_deserializeDocumentExtensions(v *map[string]document.Interface, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]document.Interface + if *v == nil { + mv = map[string]document.Interface{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal document.Interface + mapVar := parsedVal + if err := awsAwsjson11_deserializeDocumentAttributeValue(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsAwsjson11_deserializeDocumentExternalId(v **types.ExternalId, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3014,6 +3135,31 @@ func awsAwsjson11_deserializeDocumentGroup(v **types.Group, value interface{}) e for key, value := range shape { switch key { + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + case "Description": if value != nil { jtv, ok := value.(string) @@ -3055,6 +3201,31 @@ func awsAwsjson11_deserializeDocumentGroup(v **types.Group, value interface{}) e sv.IdentityStoreId = ptr.String(jtv) } + case "UpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "UpdatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.UpdatedBy = ptr.String(jtv) + } + default: _, _ = key, value @@ -3086,6 +3257,31 @@ func awsAwsjson11_deserializeDocumentGroupMembership(v **types.GroupMembership, for key, value := range shape { switch key { + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + case "GroupId": if value != nil { jtv, ok := value.(string) @@ -3118,6 +3314,31 @@ func awsAwsjson11_deserializeDocumentGroupMembership(v **types.GroupMembership, sv.MembershipId = ptr.String(jtv) } + case "UpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "UpdatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.UpdatedBy = ptr.String(jtv) + } + default: _, _ = key, value @@ -3167,7 +3388,7 @@ func awsAwsjson11_deserializeDocumentGroupMembershipExistenceResult(v **types.Gr if value != nil { jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected SensitiveBooleanType to be of type *bool, got %T instead", value) + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) } sv.MembershipExists = jtv } @@ -3305,7 +3526,7 @@ func awsAwsjson11_deserializeDocumentInternalServerException(v **types.InternalS for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3498,7 +3719,7 @@ func awsAwsjson11_deserializeDocumentPhoneNumber(v **types.PhoneNumber, value in if value != nil { jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected SensitiveBooleanType to be of type *bool, got %T instead", value) + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) } sv.Primary = jtv } @@ -3564,6 +3785,107 @@ func awsAwsjson11_deserializeDocumentPhoneNumbers(v *[]types.PhoneNumber, value return nil } +func awsAwsjson11_deserializeDocumentPhoto(v **types.Photo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Photo + if *v == nil { + sv = &types.Photo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Display": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) + } + sv.Display = ptr.String(jtv) + } + + case "Primary": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + } + sv.Primary = jtv + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPhotos(v *[]types.Photo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Photo + if *v == nil { + cv = []types.Photo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Photo + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPhoto(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3586,7 +3908,7 @@ func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.Resourc for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3595,6 +3917,15 @@ func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.Resourc sv.Message = ptr.String(jtv) } + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceNotFoundExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ResourceNotFoundExceptionReason(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -3631,6 +3962,98 @@ func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsAwsjson11_deserializeDocumentRole(v **types.Role, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Role + if *v == nil { + sv = &types.Role{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Primary": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) + } + sv.Primary = jtv + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRoles(v *[]types.Role, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Role + if *v == nil { + cv = []types.Role{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Role + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRole(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3653,7 +4076,7 @@ func awsAwsjson11_deserializeDocumentServiceQuotaExceededException(v **types.Ser for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3702,7 +4125,7 @@ func awsAwsjson11_deserializeDocumentThrottlingException(v **types.ThrottlingExc for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3711,6 +4134,15 @@ func awsAwsjson11_deserializeDocumentThrottlingException(v **types.ThrottlingExc sv.Message = ptr.String(jtv) } + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ThrottlingExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ThrottlingExceptionReason(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -3769,6 +4201,40 @@ func awsAwsjson11_deserializeDocumentUser(v **types.User, value interface{}) err return err } + case "Birthdate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) + } + sv.Birthdate = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + case "DisplayName": if value != nil { jtv, ok := value.(string) @@ -3783,6 +4249,11 @@ func awsAwsjson11_deserializeDocumentUser(v **types.User, value interface{}) err return err } + case "Extensions": + if err := awsAwsjson11_deserializeDocumentExtensions(&sv.Extensions, value); err != nil { + return err + } + case "ExternalIds": if err := awsAwsjson11_deserializeDocumentExternalIds(&sv.ExternalIds, value); err != nil { return err @@ -3825,6 +4296,11 @@ func awsAwsjson11_deserializeDocumentUser(v **types.User, value interface{}) err return err } + case "Photos": + if err := awsAwsjson11_deserializeDocumentPhotos(&sv.Photos, value); err != nil { + return err + } + case "PreferredLanguage": if value != nil { jtv, ok := value.(string) @@ -3843,6 +4319,11 @@ func awsAwsjson11_deserializeDocumentUser(v **types.User, value interface{}) err sv.ProfileUrl = ptr.String(jtv) } + case "Roles": + if err := awsAwsjson11_deserializeDocumentRoles(&sv.Roles, value); err != nil { + return err + } + case "Timezone": if value != nil { jtv, ok := value.(string) @@ -3861,6 +4342,31 @@ func awsAwsjson11_deserializeDocumentUser(v **types.User, value interface{}) err sv.Title = ptr.String(jtv) } + case "UpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "UpdatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.UpdatedBy = ptr.String(jtv) + } + case "UserId": if value != nil { jtv, ok := value.(string) @@ -3879,6 +4385,15 @@ func awsAwsjson11_deserializeDocumentUser(v **types.User, value interface{}) err sv.UserName = ptr.String(jtv) } + case "UserStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserStatus to be of type string, got %T instead", value) + } + sv.UserStatus = types.UserStatus(jtv) + } + case "UserType": if value != nil { jtv, ok := value.(string) @@ -3888,6 +4403,15 @@ func awsAwsjson11_deserializeDocumentUser(v **types.User, value interface{}) err sv.UserType = ptr.String(jtv) } + case "Website": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) + } + sv.Website = ptr.String(jtv) + } + default: _, _ = key, value @@ -3953,7 +4477,7 @@ func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationExc for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3962,6 +4486,15 @@ func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationExc sv.Message = ptr.String(jtv) } + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ValidationExceptionReason(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -4242,6 +4775,31 @@ func awsAwsjson11_deserializeOpDocumentDescribeGroupMembershipOutput(v **Describ for key, value := range shape { switch key { + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + case "GroupId": if value != nil { jtv, ok := value.(string) @@ -4274,6 +4832,31 @@ func awsAwsjson11_deserializeOpDocumentDescribeGroupMembershipOutput(v **Describ sv.MembershipId = ptr.String(jtv) } + case "UpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "UpdatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.UpdatedBy = ptr.String(jtv) + } + default: _, _ = key, value @@ -4305,6 +4888,31 @@ func awsAwsjson11_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutp for key, value := range shape { switch key { + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + case "Description": if value != nil { jtv, ok := value.(string) @@ -4346,6 +4954,31 @@ func awsAwsjson11_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutp sv.IdentityStoreId = ptr.String(jtv) } + case "UpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "UpdatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.UpdatedBy = ptr.String(jtv) + } + default: _, _ = key, value @@ -4382,6 +5015,40 @@ func awsAwsjson11_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput return err } + case "Birthdate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) + } + sv.Birthdate = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + case "DisplayName": if value != nil { jtv, ok := value.(string) @@ -4396,6 +5063,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput return err } + case "Extensions": + if err := awsAwsjson11_deserializeDocumentExtensions(&sv.Extensions, value); err != nil { + return err + } + case "ExternalIds": if err := awsAwsjson11_deserializeDocumentExternalIds(&sv.ExternalIds, value); err != nil { return err @@ -4438,6 +5110,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput return err } + case "Photos": + if err := awsAwsjson11_deserializeDocumentPhotos(&sv.Photos, value); err != nil { + return err + } + case "PreferredLanguage": if value != nil { jtv, ok := value.(string) @@ -4456,6 +5133,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput sv.ProfileUrl = ptr.String(jtv) } + case "Roles": + if err := awsAwsjson11_deserializeDocumentRoles(&sv.Roles, value); err != nil { + return err + } + case "Timezone": if value != nil { jtv, ok := value.(string) @@ -4474,6 +5156,31 @@ func awsAwsjson11_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput sv.Title = ptr.String(jtv) } + case "UpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value) + + } + } + + case "UpdatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringType to be of type string, got %T instead", value) + } + sv.UpdatedBy = ptr.String(jtv) + } + case "UserId": if value != nil { jtv, ok := value.(string) @@ -4492,6 +5199,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput sv.UserName = ptr.String(jtv) } + case "UserStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserStatus to be of type string, got %T instead", value) + } + sv.UserStatus = types.UserStatus(jtv) + } + case "UserType": if value != nil { jtv, ok := value.(string) @@ -4501,6 +5217,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput sv.UserType = ptr.String(jtv) } + case "Website": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) + } + sv.Website = ptr.String(jtv) + } + default: _, _ = key, value diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/doc.go index a1ff9b11..b00d7244 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/doc.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/doc.go @@ -10,7 +10,11 @@ // This reference guide describes the identity store operations that you can call // programmatically and includes detailed information about data types and errors. // -// IAM Identity Center uses the sso and identitystore API namespaces. +// IAM Identity Center uses the sso , sso-directory , and identitystore API +// namespaces. The sso-directory and identitystore namespaces authorize access to +// data in the Identity Store. Make sure your policies with IAM actions from these +// two namespaces are consistent to avoid conflicting authorization to the same +// data. // // [IAM Identity Center User Guide]: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html package identitystore diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/endpoints.go index d1557935..9d44c9bd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/endpoints.go @@ -14,8 +14,10 @@ import ( internalendpoints "github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints" smithyauth "github.com/aws/smithy-go/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/endpoints/private/rulesfn" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -216,11 +218,15 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) { } } -func bindRegion(region string) *string { +func bindRegion(region string) (*string, error) { if region == "" { - return nil + return nil, nil + } + if !rulesfn.IsValidHostLabel(region, true) { + return nil, fmt.Errorf("invalid input region %s", region) } - return aws.String(endpoints.MapFIPSRegion(region)) + + return aws.String(endpoints.MapFIPSRegion(region)), nil } // EndpointParameters provides the parameters that influence how endpoints are @@ -327,7 +333,9 @@ func (r *resolver) ResolveEndpoint( return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) } _UseDualStack := *params.UseDualStack + _ = _UseDualStack _UseFIPS := *params.UseFIPS + _ = _UseFIPS if exprVal := params.Endpoint; exprVal != nil { _Endpoint := *exprVal @@ -384,8 +392,8 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { - if "aws-us-gov" == _PartitionResult.Name { + if _PartitionResult.SupportsFIPS == true { + if _PartitionResult.Name == "aws-us-gov" { uriString := func() string { var out strings.Builder out.WriteString("https://identitystore.") @@ -476,10 +484,15 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) { params := &EndpointParameters{} - params.Region = bindRegion(options.Region) + region, err := bindRegion(options.Region) + if err != nil { + return nil, err + } + params.Region = region + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) params.Endpoint = options.BaseEndpoint @@ -488,7 +501,7 @@ func bindEndpointParams(ctx context.Context, input interface{}, options Options) b.bindEndpointParams(params) } - return params + return params, nil } type resolveEndpointV2Middleware struct { @@ -502,14 +515,13 @@ func (*resolveEndpointV2Middleware) ID() string { func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { 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) @@ -519,12 +531,20 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err) + } + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { endpt.URI.RawPath = endpt.URI.Path } @@ -546,5 +566,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/generated.json index cd618835..590f2a20 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/generated.json @@ -44,13 +44,14 @@ "protocol_test.go", "serializers.go", "snapshot_test.go", + "sra_operation_order_test.go", "types/enums.go", "types/errors.go", "types/types.go", "types/types_exported_test.go", "validators.go" ], - "go": "1.15", + "go": "1.23", "module": "github.com/aws/aws-sdk-go-v2/service/identitystore", "unstable": false } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/go_module_metadata.go index 85b9ca66..2c52da8f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/go_module_metadata.go @@ -3,4 +3,4 @@ package identitystore // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.25.4" +const goModuleVersion = "1.36.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints/endpoints.go index e090dbf1..334f8fba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints/endpoints.go @@ -87,6 +87,7 @@ func New() *Resolver { var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp + AwsEusc *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp @@ -94,8 +95,9 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), @@ -145,6 +147,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, @@ -172,6 +177,15 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-6", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-7", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, @@ -211,6 +225,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "mx-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, @@ -271,6 +288,46 @@ var defaultPartitions = endpoints.Partitions{ }: endpoints.Endpoint{}, }, }, + { + ID: "aws-eusc", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "identitystore.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "identitystore-fips.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "identitystore-fips.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "identitystore.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsEusc, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eusc-de-east-1", + }: endpoints.Endpoint{}, + }, + }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ @@ -354,6 +411,11 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-isof-east-1", + }: endpoints.Endpoint{}, + }, }, { ID: "aws-us-gov", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/options.go index 68279c83..277b7a89 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/options.go @@ -9,7 +9,9 @@ import ( internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" smithyauth "github.com/aws/smithy-go/auth" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" ) @@ -24,9 +26,6 @@ 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 @@ -69,6 +68,9 @@ type Options struct { // The logger writer interface to write logging messages to. Logger logging.Logger + // The client meter provider. + MeterProvider metrics.MeterProvider + // The region to send requests to. (Required) Region string @@ -103,6 +105,9 @@ type Options struct { // within your applications. RuntimeEnvironment aws.RuntimeEnvironment + // The client tracer provider. + TracerProvider tracing.TracerProvider + // 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. @@ -114,12 +119,18 @@ type Options struct { // implementation if nil. HTTPClient HTTPClient + // Client registry of operation interceptors. + Interceptors smithyhttp.InterceptorRegistry + // The auth scheme resolver which determines how to authenticate for each // operation. AuthSchemeResolver AuthSchemeResolver // The list of auth schemes supported by the client. AuthSchemes []smithyhttp.AuthScheme + + // Priority list of preferred auth scheme names (e.g. sigv4a). + AuthSchemePreference []string } // Copy creates a clone where the APIOptions list is deep copied. @@ -127,6 +138,7 @@ func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) + to.Interceptors = o.Interceptors.Copy() return to } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/serializers.go index 20786ed8..c1969d2e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) @@ -27,6 +28,10 @@ func (*awsAwsjson11_serializeOpCreateGroup) ID() string { func (m *awsAwsjson11_serializeOpCreateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -69,6 +74,8 @@ func (m *awsAwsjson11_serializeOpCreateGroup) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -82,6 +89,10 @@ func (*awsAwsjson11_serializeOpCreateGroupMembership) ID() string { func (m *awsAwsjson11_serializeOpCreateGroupMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -124,6 +135,8 @@ func (m *awsAwsjson11_serializeOpCreateGroupMembership) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -137,6 +150,10 @@ func (*awsAwsjson11_serializeOpCreateUser) ID() string { func (m *awsAwsjson11_serializeOpCreateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -179,6 +196,8 @@ func (m *awsAwsjson11_serializeOpCreateUser) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -192,6 +211,10 @@ func (*awsAwsjson11_serializeOpDeleteGroup) ID() string { func (m *awsAwsjson11_serializeOpDeleteGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -234,6 +257,8 @@ func (m *awsAwsjson11_serializeOpDeleteGroup) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -247,6 +272,10 @@ func (*awsAwsjson11_serializeOpDeleteGroupMembership) ID() string { func (m *awsAwsjson11_serializeOpDeleteGroupMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -289,6 +318,8 @@ func (m *awsAwsjson11_serializeOpDeleteGroupMembership) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -302,6 +333,10 @@ func (*awsAwsjson11_serializeOpDeleteUser) ID() string { func (m *awsAwsjson11_serializeOpDeleteUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -344,6 +379,8 @@ func (m *awsAwsjson11_serializeOpDeleteUser) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -357,6 +394,10 @@ func (*awsAwsjson11_serializeOpDescribeGroup) ID() string { func (m *awsAwsjson11_serializeOpDescribeGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -399,6 +440,8 @@ func (m *awsAwsjson11_serializeOpDescribeGroup) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -412,6 +455,10 @@ func (*awsAwsjson11_serializeOpDescribeGroupMembership) ID() string { func (m *awsAwsjson11_serializeOpDescribeGroupMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -454,6 +501,8 @@ func (m *awsAwsjson11_serializeOpDescribeGroupMembership) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -467,6 +516,10 @@ func (*awsAwsjson11_serializeOpDescribeUser) ID() string { func (m *awsAwsjson11_serializeOpDescribeUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -509,6 +562,8 @@ func (m *awsAwsjson11_serializeOpDescribeUser) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -522,6 +577,10 @@ func (*awsAwsjson11_serializeOpGetGroupId) ID() string { func (m *awsAwsjson11_serializeOpGetGroupId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -564,6 +623,8 @@ func (m *awsAwsjson11_serializeOpGetGroupId) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -577,6 +638,10 @@ func (*awsAwsjson11_serializeOpGetGroupMembershipId) ID() string { func (m *awsAwsjson11_serializeOpGetGroupMembershipId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -619,6 +684,8 @@ func (m *awsAwsjson11_serializeOpGetGroupMembershipId) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -632,6 +699,10 @@ func (*awsAwsjson11_serializeOpGetUserId) ID() string { func (m *awsAwsjson11_serializeOpGetUserId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -674,6 +745,8 @@ func (m *awsAwsjson11_serializeOpGetUserId) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -687,6 +760,10 @@ func (*awsAwsjson11_serializeOpIsMemberInGroups) ID() string { func (m *awsAwsjson11_serializeOpIsMemberInGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -729,6 +806,8 @@ func (m *awsAwsjson11_serializeOpIsMemberInGroups) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -742,6 +821,10 @@ func (*awsAwsjson11_serializeOpListGroupMemberships) ID() string { func (m *awsAwsjson11_serializeOpListGroupMemberships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -784,6 +867,8 @@ func (m *awsAwsjson11_serializeOpListGroupMemberships) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -797,6 +882,10 @@ func (*awsAwsjson11_serializeOpListGroupMembershipsForMember) ID() string { func (m *awsAwsjson11_serializeOpListGroupMembershipsForMember) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -839,6 +928,8 @@ func (m *awsAwsjson11_serializeOpListGroupMembershipsForMember) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -852,6 +943,10 @@ func (*awsAwsjson11_serializeOpListGroups) ID() string { func (m *awsAwsjson11_serializeOpListGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -894,6 +989,8 @@ func (m *awsAwsjson11_serializeOpListGroups) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -907,6 +1004,10 @@ func (*awsAwsjson11_serializeOpListUsers) ID() string { func (m *awsAwsjson11_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -949,6 +1050,8 @@ func (m *awsAwsjson11_serializeOpListUsers) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -962,6 +1065,10 @@ func (*awsAwsjson11_serializeOpUpdateGroup) ID() string { func (m *awsAwsjson11_serializeOpUpdateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1004,6 +1111,8 @@ func (m *awsAwsjson11_serializeOpUpdateGroup) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1017,6 +1126,10 @@ func (*awsAwsjson11_serializeOpUpdateUser) ID() string { func (m *awsAwsjson11_serializeOpUpdateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1059,6 +1172,8 @@ func (m *awsAwsjson11_serializeOpUpdateUser) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentAddress(v *types.Address, value smithyjson.Value) error { @@ -1227,6 +1342,33 @@ func awsAwsjson11_serializeDocumentEmails(v []types.Email, value smithyjson.Valu return nil } +func awsAwsjson11_serializeDocumentExtensionNames(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentExtensions(v map[string]document.Interface, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsAwsjson11_serializeDocumentAttributeValue(v[key], om); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentExternalId(v *types.ExternalId, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1373,6 +1515,81 @@ func awsAwsjson11_serializeDocumentPhoneNumbers(v []types.PhoneNumber, value smi return nil } +func awsAwsjson11_serializeDocumentPhoto(v *types.Photo, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Display != nil { + ok := object.Key("Display") + ok.String(*v.Display) + } + + if v.Primary { + ok := object.Key("Primary") + ok.Boolean(v.Primary) + } + + if v.Type != nil { + ok := object.Key("Type") + ok.String(*v.Type) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentPhotos(v []types.Photo, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentPhoto(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentRole(v *types.Role, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Primary { + ok := object.Key("Primary") + ok.Boolean(v.Primary) + } + + if v.Type != nil { + ok := object.Key("Type") + ok.String(*v.Type) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentRoles(v []types.Role, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentRole(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentUniqueAttribute(v *types.UniqueAttribute, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1449,6 +1666,11 @@ func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value s } } + if v.Birthdate != nil { + ok := object.Key("Birthdate") + ok.String(*v.Birthdate) + } + if v.DisplayName != nil { ok := object.Key("DisplayName") ok.String(*v.DisplayName) @@ -1461,6 +1683,13 @@ func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value s } } + if v.Extensions != nil { + ok := object.Key("Extensions") + if err := awsAwsjson11_serializeDocumentExtensions(v.Extensions, ok); err != nil { + return err + } + } + if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) @@ -1490,6 +1719,13 @@ func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value s } } + if v.Photos != nil { + ok := object.Key("Photos") + if err := awsAwsjson11_serializeDocumentPhotos(v.Photos, ok); err != nil { + return err + } + } + if v.PreferredLanguage != nil { ok := object.Key("PreferredLanguage") ok.String(*v.PreferredLanguage) @@ -1500,6 +1736,13 @@ func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value s ok.String(*v.ProfileUrl) } + if v.Roles != nil { + ok := object.Key("Roles") + if err := awsAwsjson11_serializeDocumentRoles(v.Roles, ok); err != nil { + return err + } + } + if v.Timezone != nil { ok := object.Key("Timezone") ok.String(*v.Timezone) @@ -1520,6 +1763,11 @@ func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value s ok.String(*v.UserType) } + if v.Website != nil { + ok := object.Key("Website") + ok.String(*v.Website) + } + return nil } @@ -1612,6 +1860,13 @@ func awsAwsjson11_serializeOpDocumentDescribeUserInput(v *DescribeUserInput, val object := value.Object() defer object.Close() + if v.Extensions != nil { + ok := object.Key("Extensions") + if err := awsAwsjson11_serializeDocumentExtensionNames(v.Extensions, ok); err != nil { + return err + } + } + if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) @@ -1802,6 +2057,13 @@ func awsAwsjson11_serializeOpDocumentListUsersInput(v *ListUsersInput, value smi object := value.Object() defer object.Close() + if v.Extensions != nil { + ok := object.Key("Extensions") + if err := awsAwsjson11_serializeDocumentExtensionNames(v.Extensions, ok); err != nil { + return err + } + } + if v.Filters != nil { ok := object.Key("Filters") if err := awsAwsjson11_serializeDocumentFilters(v.Filters, ok); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/enums.go index 25323622..5197467f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/enums.go @@ -2,6 +2,23 @@ package types +type AccessDeniedExceptionReason string + +// Enum values for AccessDeniedExceptionReason +const ( + AccessDeniedExceptionReasonKmsAccessDenied AccessDeniedExceptionReason = "KMS_ACCESS_DENIED" +) + +// Values returns all known values for AccessDeniedExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AccessDeniedExceptionReason) Values() []AccessDeniedExceptionReason { + return []AccessDeniedExceptionReason{ + "KMS_ACCESS_DENIED", + } +} + type ConflictExceptionReason string // Enum values for ConflictExceptionReason @@ -21,6 +38,24 @@ func (ConflictExceptionReason) Values() []ConflictExceptionReason { } } +type ResourceNotFoundExceptionReason string + +// Enum values for ResourceNotFoundExceptionReason +const ( + ResourceNotFoundExceptionReasonKmsKeyNotFound ResourceNotFoundExceptionReason = "KMS_KEY_NOT_FOUND" +) + +// Values returns all known values for ResourceNotFoundExceptionReason. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ResourceNotFoundExceptionReason) Values() []ResourceNotFoundExceptionReason { + return []ResourceNotFoundExceptionReason{ + "KMS_KEY_NOT_FOUND", + } +} + type ResourceType string // Enum values for ResourceType @@ -29,6 +64,7 @@ const ( ResourceTypeUser ResourceType = "USER" ResourceTypeIdentityStore ResourceType = "IDENTITY_STORE" ResourceTypeGroupMembership ResourceType = "GROUP_MEMBERSHIP" + ResourceTypeResourcePolicy ResourceType = "RESOURCE_POLICY" ) // Values returns all known values for ResourceType. Note that this can be @@ -41,5 +77,65 @@ func (ResourceType) Values() []ResourceType { "USER", "IDENTITY_STORE", "GROUP_MEMBERSHIP", + "RESOURCE_POLICY", + } +} + +type ThrottlingExceptionReason string + +// Enum values for ThrottlingExceptionReason +const ( + ThrottlingExceptionReasonKmsThrottling ThrottlingExceptionReason = "KMS_THROTTLING" +) + +// Values returns all known values for ThrottlingExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ThrottlingExceptionReason) Values() []ThrottlingExceptionReason { + return []ThrottlingExceptionReason{ + "KMS_THROTTLING", + } +} + +type UserStatus string + +// Enum values for UserStatus +const ( + UserStatusEnabled UserStatus = "ENABLED" + UserStatusDisabled UserStatus = "DISABLED" +) + +// Values returns all known values for UserStatus. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (UserStatus) Values() []UserStatus { + return []UserStatus{ + "ENABLED", + "DISABLED", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + ValidationExceptionReasonKmsInvalidArn ValidationExceptionReason = "KMS_INVALID_ARN" + ValidationExceptionReasonKmsInvalidKeyUsage ValidationExceptionReason = "KMS_INVALID_KEY_USAGE" + ValidationExceptionReasonKmsInvalidState ValidationExceptionReason = "KMS_INVALID_STATE" + ValidationExceptionReasonKmsDisabled ValidationExceptionReason = "KMS_DISABLED" +) + +// Values returns all known values for ValidationExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ValidationExceptionReason) Values() []ValidationExceptionReason { + return []ValidationExceptionReason{ + "KMS_INVALID_ARN", + "KMS_INVALID_KEY_USAGE", + "KMS_INVALID_STATE", + "KMS_DISABLED", } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/errors.go index 93a69319..24146a72 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/errors.go @@ -14,6 +14,7 @@ type AccessDeniedException struct { ErrorCodeOverride *string RequestId *string + Reason AccessDeniedExceptionReason noSmithyDocumentSerde } @@ -107,6 +108,7 @@ type ResourceNotFoundException struct { ResourceType ResourceType ResourceId *string + Reason ResourceNotFoundExceptionReason RequestId *string noSmithyDocumentSerde @@ -167,6 +169,7 @@ type ThrottlingException struct { RequestId *string RetryAfterSeconds int32 + Reason ThrottlingExceptionReason noSmithyDocumentSerde } @@ -195,6 +198,7 @@ type ValidationException struct { ErrorCodeOverride *string RequestId *string + Reason ValidationExceptionReason noSmithyDocumentSerde } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/types.go index 1fe83959..174eacbb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/types.go @@ -5,6 +5,7 @@ package types import ( "github.com/aws/aws-sdk-go-v2/service/identitystore/document" smithydocument "github.com/aws/smithy-go/document" + "time" ) // The address associated with the specified user. @@ -151,6 +152,12 @@ type Group struct { // This member is required. IdentityStoreId *string + // The date and time the group was created. + CreatedAt *time.Time + + // The identifier of the user or system that created the group. + CreatedBy *string + // A string containing a description of the specified group. Description *string @@ -159,12 +166,20 @@ type Group struct { // punctuation, tab, new line, carriage return, space, and nonbreaking space in // this attribute. This value is specified at the time the group is created and // stored as an attribute of the group object in the identity store. + // + // Prefix search supports a maximum of 1,000 characters for the string. DisplayName *string // A list of ExternalId objects that contains the identifiers issued to this // resource by an external identity provider. ExternalIds []ExternalId + // The date and time the group was last updated. + UpdatedAt *time.Time + + // The identifier of the user or system that last updated the group. + UpdatedBy *string + noSmithyDocumentSerde } @@ -177,6 +192,12 @@ type GroupMembership struct { // This member is required. IdentityStoreId *string + // The date and time the group membership was created. + CreatedAt *time.Time + + // The identifier of the user or system that created the group membership. + CreatedBy *string + // The identifier for a group in the identity store. GroupId *string @@ -188,6 +209,12 @@ type GroupMembership struct { // The identifier for a GroupMembership object in an identity store. MembershipId *string + // The date and time the group membership was last updated. + UpdatedAt *time.Time + + // The identifier of the user or system that last updated the group membership. + UpdatedBy *string + noSmithyDocumentSerde } @@ -267,6 +294,48 @@ type PhoneNumber struct { noSmithyDocumentSerde } +// Contains information about a user's photo. Users can have up to 3 photos, with +// one designated as primary. Supports common image formats, including jpg, jpeg, +// png, and gif. +type Photo struct { + + // The photo data or URL. Supported formats include jpg, jpeg, png, and gif. This + // field is required for all photo entries. + // + // This member is required. + Value *string + + // A human-readable description of the photo for display purposes. This optional + // field provides context about the photo. + Display *string + + // Specifies whether this is the user's primary photo. Default value is false . + // Only one photo can be designated as primary per user. + Primary bool + + // The type of photo. This field is optional and can be used to categorize + // different types of photos. + Type *string + + noSmithyDocumentSerde +} + +// The role associated with the user. +type Role struct { + + // A Boolean value representing whether this is the primary role for the + // associated resource. + Primary bool + + // A string representing the type of role. For example, "Work." + Type *string + + // A string containing a role name. For example, "Researcher." + Value *string + + noSmithyDocumentSerde +} + // An entity attribute that's unique to a specific entity. type UniqueAttribute struct { @@ -301,13 +370,29 @@ type User struct { // A list of Address objects containing addresses associated with the user. Addresses []Address + // The user's birthdate in YYYY-MM-DD format. This field stores personal birthdate + // information for the user. + Birthdate *string + + // The date and time the user was created. + CreatedAt *time.Time + + // The identifier of the user or system that created the user. + CreatedBy *string + // A string containing the name of the user that is formatted for display when the // user is referenced. For example, "John Doe." + // + // Prefix search supports a maximum of 1,000 characters for the string. DisplayName *string // A list of Email objects containing email addresses associated with the user. Emails []Email + // A map of explicitly requested attribute extensions associated with the user. + // Not populated if the user has no requested extensions. + Extensions map[string]document.Interface + // A list of ExternalId objects that contains the identifiers issued to this // resource by an external identity provider. ExternalIds []ExternalId @@ -324,6 +409,10 @@ type User struct { // A list of PhoneNumber objects containing phone numbers associated with the user. PhoneNumbers []PhoneNumber + // A list of photos associated with the user. Users can have up to 3 photos with + // metadata including type, display name, and primary designation. + Photos []Photo + // A string containing the preferred language of the user. For example, "American // English" or "en-us." PreferredLanguage *string @@ -331,6 +420,9 @@ type User struct { // A string containing a URL that might be associated with the user. ProfileUrl *string + // A list of Role objects containing roles associated with the user. + Roles []Role + // A string containing the time zone of the user. Timezone *string @@ -338,16 +430,29 @@ type User struct { // unspecified. The value can vary based on your specific use case. Title *string + // The date and time the user was last updated. + UpdatedAt *time.Time + + // The identifier of the user or system that last updated the user. + UpdatedBy *string + // A unique string used to identify the user. The length limit is 128 characters. // This value can consist of letters, accented characters, symbols, numbers, and // punctuation. This value is specified at the time the user is created and stored // as an attribute of the user object in the identity store. UserName *string + // The current status of the user account. + UserStatus UserStatus + // A string indicating the type of user. Possible values are left unspecified. The // value can vary based on your specific use case. UserType *string + // The user's personal website or blog URL. This field stores website information + // for personal or professional use. + Website *string + noSmithyDocumentSerde } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/validators.go index ad9ef1c8..079d069d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/validators.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/validators.go @@ -575,6 +575,38 @@ func validateFilters(v []types.Filter) error { } } +func validatePhoto(v *types.Photo) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Photo"} + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePhotos(v []types.Photo) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Photos"} + for i := range v { + if err := validatePhoto(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateUniqueAttribute(v *types.UniqueAttribute) error { if v == nil { return nil @@ -637,6 +669,11 @@ func validateOpCreateUserInput(v *CreateUserInput) error { if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } + if v.Photos != nil { + if err := validatePhotos(v.Photos); err != nil { + invalidParams.AddNested("Photos", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/vendor/modules.txt b/vendor/modules.txt index 5c819ff9..4a0a1925 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -93,8 +93,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudtrail/types github.com/aws/aws-sdk-go-v2/service/iam github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints github.com/aws/aws-sdk-go-v2/service/iam/types -# github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4 -## explicit; go 1.21 +# github.com/aws/aws-sdk-go-v2/service/identitystore v1.36.1 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/service/identitystore github.com/aws/aws-sdk-go-v2/service/identitystore/document github.com/aws/aws-sdk-go-v2/service/identitystore/internal/document