diff --git a/.changelog/01b2fbcc0cd54a0ea0ec4c389d36fd97.json b/.changelog/01b2fbcc0cd54a0ea0ec4c389d36fd97.json new file mode 100644 index 00000000000..6b359b06f03 --- /dev/null +++ b/.changelog/01b2fbcc0cd54a0ea0ec4c389d36fd97.json @@ -0,0 +1,8 @@ +{ + "id": "01b2fbcc-0cd5-4a0e-a0ec-4c389d36fd97", + "type": "feature", + "description": "Adds support for EKS add-ons pod identity associations integration", + "modules": [ + "service/eks" + ] +} \ No newline at end of file diff --git a/.changelog/10e2652f364e4c159163b4e90b9d56f0.json b/.changelog/10e2652f364e4c159163b4e90b9d56f0.json new file mode 100644 index 00000000000..77707cd3864 --- /dev/null +++ b/.changelog/10e2652f364e4c159163b4e90b9d56f0.json @@ -0,0 +1,8 @@ +{ + "id": "10e2652f-364e-4c15-9163-b4e90b9d56f0", + "type": "feature", + "description": "This release adds support for the AWS Batch GetJobQueueSnapshot API operation.", + "modules": [ + "service/batch" + ] +} \ No newline at end of file diff --git a/.changelog/2d83bd8aff93433780d98d610fe0f9f8.json b/.changelog/2d83bd8aff93433780d98d610fe0f9f8.json new file mode 100644 index 00000000000..512c1504ffa --- /dev/null +++ b/.changelog/2d83bd8aff93433780d98d610fe0f9f8.json @@ -0,0 +1,8 @@ +{ + "id": "2d83bd8a-ff93-4337-80d9-8d610fe0f9f8", + "type": "documentation", + "description": "This doc-only update identifies fields that are specific to Gen 1 and Gen 2 applications.", + "modules": [ + "service/amplify" + ] +} \ No newline at end of file diff --git a/.changelog/3ee78f646b9a41c58f5e5d6f3b9b6793.json b/.changelog/3ee78f646b9a41c58f5e5d6f3b9b6793.json new file mode 100644 index 00000000000..26b09a1728a --- /dev/null +++ b/.changelog/3ee78f646b9a41c58f5e5d6f3b9b6793.json @@ -0,0 +1,8 @@ +{ + "id": "3ee78f64-6b9a-41c5-8f5e-5d6f3b9b6793", + "type": "feature", + "description": "Support RESET_VALUE UpdateType for PropertyUpdates to reset property value to default or null", + "modules": [ + "service/iottwinmaker" + ] +} \ No newline at end of file diff --git a/service/amplify/api_op_CreateBackendEnvironment.go b/service/amplify/api_op_CreateBackendEnvironment.go index 8ad7dc3ebfc..73369eb7e28 100644 --- a/service/amplify/api_op_CreateBackendEnvironment.go +++ b/service/amplify/api_op_CreateBackendEnvironment.go @@ -15,9 +15,9 @@ import ( // // This API is available only to Amplify Gen 1 applications where the backend is // created using Amplify Studio or the Amplify command line interface (CLI). This -// API isn’t available to applications created using the Amplify Gen 2 public -// preview. When you deploy an application with Amplify Gen 2, you provision the -// app's backend infrastructure using Typescript code. +// API isn’t available to Amplify Gen 2 applications. When you deploy an +// application with Amplify Gen 2, you provision the app's backend infrastructure +// using Typescript code. func (c *Client) CreateBackendEnvironment(ctx context.Context, params *CreateBackendEnvironmentInput, optFns ...func(*Options)) (*CreateBackendEnvironmentOutput, error) { if params == nil { params = &CreateBackendEnvironmentInput{} diff --git a/service/amplify/api_op_CreateBranch.go b/service/amplify/api_op_CreateBranch.go index aae1dd7e286..a83c273b9c1 100644 --- a/service/amplify/api_op_CreateBranch.go +++ b/service/amplify/api_op_CreateBranch.go @@ -42,10 +42,17 @@ type CreateBranchInput struct { // The backend for a Branch of an Amplify app. Use for a backend created from an // CloudFormation stack. + // + // This field is available to Amplify Gen 2 apps only. When you deploy an + // application with Amplify Gen 2, you provision the app's backend infrastructure + // using Typescript code. Backend *types.Backend - // The Amazon Resource Name (ARN) for a backend environment that is part of an - // Amplify app. + // The Amazon Resource Name (ARN) for a backend environment that is part of a Gen + // 1 Amplify app. + // + // This field is available to Amplify Gen 1 apps only where the backend is created + // using Amplify Studio or the Amplify command line interface (CLI). BackendEnvironmentArn *string // The basic authorization credentials for the branch. You must base64-encode the diff --git a/service/amplify/api_op_DeleteBackendEnvironment.go b/service/amplify/api_op_DeleteBackendEnvironment.go index 6400b901d8b..d8d509a7297 100644 --- a/service/amplify/api_op_DeleteBackendEnvironment.go +++ b/service/amplify/api_op_DeleteBackendEnvironment.go @@ -13,11 +13,11 @@ import ( // Deletes a backend environment for an Amplify app. // -// This API is available only to Amplify Gen 1 applications where the backend was +// This API is available only to Amplify Gen 1 applications where the backend is // created using Amplify Studio or the Amplify command line interface (CLI). This -// API isn’t available to applications created using the Amplify Gen 2 public -// preview. When you deploy an application with Amplify Gen 2, you provision the -// app's backend infrastructure using Typescript code. +// API isn’t available to Amplify Gen 2 applications. When you deploy an +// application with Amplify Gen 2, you provision the app's backend infrastructure +// using Typescript code. func (c *Client) DeleteBackendEnvironment(ctx context.Context, params *DeleteBackendEnvironmentInput, optFns ...func(*Options)) (*DeleteBackendEnvironmentOutput, error) { if params == nil { params = &DeleteBackendEnvironmentInput{} diff --git a/service/amplify/api_op_GetBackendEnvironment.go b/service/amplify/api_op_GetBackendEnvironment.go index 8464b3585e6..90265f74f97 100644 --- a/service/amplify/api_op_GetBackendEnvironment.go +++ b/service/amplify/api_op_GetBackendEnvironment.go @@ -13,11 +13,11 @@ import ( // Returns a backend environment for an Amplify app. // -// This API is available only to Amplify Gen 1 applications where the backend was +// This API is available only to Amplify Gen 1 applications where the backend is // created using Amplify Studio or the Amplify command line interface (CLI). This -// API isn’t available to applications created using the Amplify Gen 2 public -// preview. When you deploy an application with Amplify Gen 2, you provision the -// app's backend infrastructure using Typescript code. +// API isn’t available to Amplify Gen 2 applications. When you deploy an +// application with Amplify Gen 2, you provision the app's backend infrastructure +// using Typescript code. func (c *Client) GetBackendEnvironment(ctx context.Context, params *GetBackendEnvironmentInput, optFns ...func(*Options)) (*GetBackendEnvironmentOutput, error) { if params == nil { params = &GetBackendEnvironmentInput{} diff --git a/service/amplify/api_op_ListBackendEnvironments.go b/service/amplify/api_op_ListBackendEnvironments.go index b2120a6fb8b..4309ca5854d 100644 --- a/service/amplify/api_op_ListBackendEnvironments.go +++ b/service/amplify/api_op_ListBackendEnvironments.go @@ -13,11 +13,11 @@ import ( // Lists the backend environments for an Amplify app. // -// This API is available only to Amplify Gen 1 applications where the backend was +// This API is available only to Amplify Gen 1 applications where the backend is // created using Amplify Studio or the Amplify command line interface (CLI). This -// API isn’t available to applications created using the Amplify Gen 2 public -// preview. When you deploy an application with Amplify Gen 2, you provision the -// app's backend infrastructure using Typescript code. +// API isn’t available to Amplify Gen 2 applications. When you deploy an +// application with Amplify Gen 2, you provision the app's backend infrastructure +// using Typescript code. func (c *Client) ListBackendEnvironments(ctx context.Context, params *ListBackendEnvironmentsInput, optFns ...func(*Options)) (*ListBackendEnvironmentsOutput, error) { if params == nil { params = &ListBackendEnvironmentsInput{} diff --git a/service/amplify/api_op_UpdateBranch.go b/service/amplify/api_op_UpdateBranch.go index 3b27ffca1f1..78d4bec3065 100644 --- a/service/amplify/api_op_UpdateBranch.go +++ b/service/amplify/api_op_UpdateBranch.go @@ -42,10 +42,17 @@ type UpdateBranchInput struct { // The backend for a Branch of an Amplify app. Use for a backend created from an // CloudFormation stack. + // + // This field is available to Amplify Gen 2 apps only. When you deploy an + // application with Amplify Gen 2, you provision the app's backend infrastructure + // using Typescript code. Backend *types.Backend - // The Amazon Resource Name (ARN) for a backend environment that is part of an - // Amplify app. + // The Amazon Resource Name (ARN) for a backend environment that is part of a Gen + // 1 Amplify app. + // + // This field is available to Amplify Gen 1 apps only where the backend is created + // using Amplify Studio or the Amplify command line interface (CLI). BackendEnvironmentArn *string // The basic authorization credentials for the branch. You must base64-encode the diff --git a/service/amplify/types/types.go b/service/amplify/types/types.go index 3d072d8b6c3..16b80b30df4 100644 --- a/service/amplify/types/types.go +++ b/service/amplify/types/types.go @@ -186,7 +186,11 @@ type AutoBranchCreationConfig struct { noSmithyDocumentSerde } -// Describes the backend properties associated with an Amplify Branch . +// Describes the backend associated with an Amplify Branch . +// +// This property is available to Amplify Gen 2 apps only. When you deploy an +// application with Amplify Gen 2, you provision the app's backend infrastructure +// using Typescript code. type Backend struct { // The Amazon Resource Name (ARN) for the CloudFormation stack. @@ -195,7 +199,9 @@ type Backend struct { noSmithyDocumentSerde } -// Describes the backend environment for an Amplify app. +// Describes the backend environment associated with a Branch of a Gen 1 Amplify +// app. Amplify Gen 1 applications are created using Amplify Studio or the Amplify +// command line interface (CLI). type BackendEnvironment struct { // The Amazon Resource Name (ARN) for a backend environment that is part of an @@ -321,11 +327,19 @@ type Branch struct { // A list of custom resources that are linked to this branch. AssociatedResources []string - // Describes the backend properties associated with an Amplify Branch . + // Describes the backend associated with an Amplify Branch . + // + // This property is available to Amplify Gen 2 apps only. When you deploy an + // application with Amplify Gen 2, you provision the app's backend infrastructure + // using Typescript code. Backend *Backend // The Amazon Resource Name (ARN) for a backend environment that is part of an // Amplify app. + // + // This property is available to Amplify Gen 1 apps only. When you deploy an + // application with Amplify Gen 2, you provision the app's backend infrastructure + // using Typescript code. BackendEnvironmentArn *string // The basic authorization credentials for a branch of an Amplify app. You must diff --git a/service/batch/api_op_GetJobQueueSnapshot.go b/service/batch/api_op_GetJobQueueSnapshot.go new file mode 100644 index 00000000000..022d7b4506f --- /dev/null +++ b/service/batch/api_op_GetJobQueueSnapshot.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package batch + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/batch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides a list of the first 100 RUNNABLE jobs associated to a single job queue. +func (c *Client) GetJobQueueSnapshot(ctx context.Context, params *GetJobQueueSnapshotInput, optFns ...func(*Options)) (*GetJobQueueSnapshotOutput, error) { + if params == nil { + params = &GetJobQueueSnapshotInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetJobQueueSnapshot", params, optFns, c.addOperationGetJobQueueSnapshotMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetJobQueueSnapshotOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetJobQueueSnapshotInput struct { + + // The job queue’s name or full queue Amazon Resource Name (ARN). + // + // This member is required. + JobQueue *string + + noSmithyDocumentSerde +} + +type GetJobQueueSnapshotOutput struct { + + // The list of the first 100 RUNNABLE jobs in each job queue. For + // first-in-first-out (FIFO) job queues, jobs are ordered based on their submission + // time. For fair share scheduling (FSS) job queues, jobs are ordered based on + // their job priority and share usage. + FrontOfQueue *types.FrontOfQueueDetail + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetJobQueueSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetJobQueueSnapshot{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetJobQueueSnapshot{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetJobQueueSnapshot"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetJobQueueSnapshotValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetJobQueueSnapshot(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetJobQueueSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetJobQueueSnapshot", + } +} diff --git a/service/batch/api_op_ListJobs.go b/service/batch/api_op_ListJobs.go index 6ef7c3d96c8..3d99aa054d1 100644 --- a/service/batch/api_op_ListJobs.go +++ b/service/batch/api_op_ListJobs.go @@ -90,13 +90,22 @@ type ListJobsInput struct { // returned. JobStatus types.JobStatus - // The maximum number of results returned by ListJobs in paginated output. When - // this parameter is used, ListJobs only returns maxResults results in a single - // page and a nextToken response element. The remaining results of the initial - // request can be seen by sending another ListJobs request with the returned - // nextToken value. This value can be between 1 and 100. If this parameter isn't - // used, then ListJobs returns up to 100 results and a nextToken value if - // applicable. + // The maximum number of results returned by ListJobs in a paginated output. When + // this parameter is used, ListJobs returns up to maxResults results in a single + // page and a nextToken response element, if applicable. The remaining results of + // the initial request can be seen by sending another ListJobs request with the + // returned nextToken value. + // + // The following outlines key parameters and limitations: + // + // - The minimum value is 1. + // + // - When --job-status is used, Batch returns up to 1000 values. + // + // - When --filters is used, Batch returns up to 100 values. + // + // - If neither parameter is used, then ListJobs returns up to 1000 results (jobs + // that are in the RUNNING status) and a nextToken value, if applicable. MaxResults *int32 // The job ID for a multi-node parallel job. Specifying a multi-node parallel job @@ -220,13 +229,22 @@ var _ ListJobsAPIClient = (*Client)(nil) // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { - // The maximum number of results returned by ListJobs in paginated output. When - // this parameter is used, ListJobs only returns maxResults results in a single - // page and a nextToken response element. The remaining results of the initial - // request can be seen by sending another ListJobs request with the returned - // nextToken value. This value can be between 1 and 100. If this parameter isn't - // used, then ListJobs returns up to 100 results and a nextToken value if - // applicable. + // The maximum number of results returned by ListJobs in a paginated output. When + // this parameter is used, ListJobs returns up to maxResults results in a single + // page and a nextToken response element, if applicable. The remaining results of + // the initial request can be seen by sending another ListJobs request with the + // returned nextToken value. + // + // The following outlines key parameters and limitations: + // + // - The minimum value is 1. + // + // - When --job-status is used, Batch returns up to 1000 values. + // + // - When --filters is used, Batch returns up to 100 values. + // + // - If neither parameter is used, then ListJobs returns up to 1000 results (jobs + // that are in the RUNNING status) and a nextToken value, if applicable. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/batch/deserializers.go b/service/batch/deserializers.go index 95ec530c071..69a5fdb6c49 100644 --- a/service/batch/deserializers.go +++ b/service/batch/deserializers.go @@ -1725,6 +1725,156 @@ func awsRestjson1_deserializeOpDocumentDescribeSchedulingPoliciesOutput(v **Desc return nil } +type awsRestjson1_deserializeOpGetJobQueueSnapshot struct { +} + +func (*awsRestjson1_deserializeOpGetJobQueueSnapshot) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetJobQueueSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetJobQueueSnapshot(response, &metadata) + } + output := &GetJobQueueSnapshotOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetJobQueueSnapshotOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetJobQueueSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetJobQueueSnapshotOutput(v **GetJobQueueSnapshotOutput, 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 *GetJobQueueSnapshotOutput + if *v == nil { + sv = &GetJobQueueSnapshotOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "frontOfQueue": + if err := awsRestjson1_deserializeDocumentFrontOfQueueDetail(&sv.FrontOfQueue, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListJobs struct { } @@ -7152,6 +7302,142 @@ func awsRestjson1_deserializeDocumentFargatePlatformConfiguration(v **types.Farg return nil } +func awsRestjson1_deserializeDocumentFrontOfQueueDetail(v **types.FrontOfQueueDetail, 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.FrontOfQueueDetail + if *v == nil { + sv = &types.FrontOfQueueDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "jobs": + if err := awsRestjson1_deserializeDocumentFrontOfQueueJobSummaryList(&sv.Jobs, value); err != nil { + return err + } + + case "lastUpdatedAt": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFrontOfQueueJobSummary(v **types.FrontOfQueueJobSummary, 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.FrontOfQueueJobSummary + if *v == nil { + sv = &types.FrontOfQueueJobSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "earliestTimeAtPosition": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EarliestTimeAtPosition = ptr.Int64(i64) + } + + case "jobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.JobArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFrontOfQueueJobSummaryList(v *[]types.FrontOfQueueJobSummary, 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.FrontOfQueueJobSummary + if *v == nil { + cv = []types.FrontOfQueueJobSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FrontOfQueueJobSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentFrontOfQueueJobSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentHost(v **types.Host, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/batch/generated.json b/service/batch/generated.json index 5ad7fc7ca31..9417ad1603a 100644 --- a/service/batch/generated.json +++ b/service/batch/generated.json @@ -21,6 +21,7 @@ "api_op_DescribeJobQueues.go", "api_op_DescribeJobs.go", "api_op_DescribeSchedulingPolicies.go", + "api_op_GetJobQueueSnapshot.go", "api_op_ListJobs.go", "api_op_ListSchedulingPolicies.go", "api_op_ListTagsForResource.go", diff --git a/service/batch/serializers.go b/service/batch/serializers.go index 4782bc3bfb7..2b9a31efa73 100644 --- a/service/batch/serializers.go +++ b/service/batch/serializers.go @@ -1136,6 +1136,81 @@ func awsRestjson1_serializeOpDocumentDescribeSchedulingPoliciesInput(v *Describe return nil } +type awsRestjson1_serializeOpGetJobQueueSnapshot struct { +} + +func (*awsRestjson1_serializeOpGetJobQueueSnapshot) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetJobQueueSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetJobQueueSnapshotInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/getjobqueuesnapshot") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetJobQueueSnapshotInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetJobQueueSnapshotInput(v *GetJobQueueSnapshotInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetJobQueueSnapshotInput(v *GetJobQueueSnapshotInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.JobQueue != nil { + ok := object.Key("jobQueue") + ok.String(*v.JobQueue) + } + + return nil +} + type awsRestjson1_serializeOpListJobs struct { } diff --git a/service/batch/snapshot/api_op_GetJobQueueSnapshot.go.snap b/service/batch/snapshot/api_op_GetJobQueueSnapshot.go.snap new file mode 100644 index 00000000000..6c44943a833 --- /dev/null +++ b/service/batch/snapshot/api_op_GetJobQueueSnapshot.go.snap @@ -0,0 +1,34 @@ +GetJobQueueSnapshot + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + RecordResponseTiming + RequestResponseLogger diff --git a/service/batch/snapshot_test.go b/service/batch/snapshot_test.go index 6d8dcf7481f..b5e18d792e9 100644 --- a/service/batch/snapshot_test.go +++ b/service/batch/snapshot_test.go @@ -218,6 +218,18 @@ func TestCheckSnapshot_DescribeSchedulingPolicies(t *testing.T) { } } +func TestCheckSnapshot_GetJobQueueSnapshot(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetJobQueueSnapshot(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetJobQueueSnapshot") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListJobs(t *testing.T) { svc := New(Options{}) _, err := svc.ListJobs(context.Background(), nil, func(o *Options) { @@ -505,6 +517,18 @@ func TestUpdateSnapshot_DescribeSchedulingPolicies(t *testing.T) { } } +func TestUpdateSnapshot_GetJobQueueSnapshot(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetJobQueueSnapshot(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetJobQueueSnapshot") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListJobs(t *testing.T) { svc := New(Options{}) _, err := svc.ListJobs(context.Background(), nil, func(o *Options) { diff --git a/service/batch/types/types.go b/service/batch/types/types.go index 9656d0a9ade..866cbd777cc 100644 --- a/service/batch/types/types.go +++ b/service/batch/types/types.go @@ -2547,6 +2547,36 @@ type FargatePlatformConfiguration struct { noSmithyDocumentSerde } +// Contains a list of the first 100 RUNNABLE jobs associated to a single job queue. +type FrontOfQueueDetail struct { + + // The Amazon Resource Names (ARNs) of the first 100 RUNNABLE jobs in a named job + // queue. For first-in-first-out (FIFO) job queues, jobs are ordered based on their + // submission time. For fair share scheduling (FSS) job queues, jobs are ordered + // based on their job priority and share usage. + Jobs []FrontOfQueueJobSummary + + // The Unix timestamp (in milliseconds) for when each of the first 100 RUNNABLE + // jobs were last updated. + LastUpdatedAt *int64 + + noSmithyDocumentSerde +} + +// An object that represents summary details for the first 100 RUNNABLE jobs in a +// job queue. +type FrontOfQueueJobSummary struct { + + // The Unix timestamp (in milliseconds) for when the job transitioned to its + // current position in the job queue. + EarliestTimeAtPosition *int64 + + // The ARN for a job in a named job queue. + JobArn *string + + noSmithyDocumentSerde +} + // Determine whether your data volume persists on the host container instance and // where it's stored. If this parameter is empty, then the Docker daemon assigns a // host path for your data volume. However, the data isn't guaranteed to persist diff --git a/service/batch/validators.go b/service/batch/validators.go index a50786ae166..a7ed6c11e38 100644 --- a/service/batch/validators.go +++ b/service/batch/validators.go @@ -210,6 +210,26 @@ func (m *validateOpDescribeSchedulingPolicies) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpGetJobQueueSnapshot struct { +} + +func (*validateOpGetJobQueueSnapshot) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetJobQueueSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetJobQueueSnapshotInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetJobQueueSnapshotInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -430,6 +450,10 @@ func addOpDescribeSchedulingPoliciesValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpDescribeSchedulingPolicies{}, middleware.After) } +func addOpGetJobQueueSnapshotValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetJobQueueSnapshot{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } @@ -1897,6 +1921,21 @@ func validateOpDescribeSchedulingPoliciesInput(v *DescribeSchedulingPoliciesInpu } } +func validateOpGetJobQueueSnapshotInput(v *GetJobQueueSnapshotInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetJobQueueSnapshotInput"} + if v.JobQueue == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobQueue")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil diff --git a/service/eks/api_op_CreateAddon.go b/service/eks/api_op_CreateAddon.go index 896d00bf108..2f968029df5 100644 --- a/service/eks/api_op_CreateAddon.go +++ b/service/eks/api_op_CreateAddon.go @@ -61,6 +61,14 @@ type CreateAddonInput struct { // DescribeAddonConfiguration . ConfigurationValues *string + // An array of Pod Identity Assocations to be created. Each EKS Pod Identity + // association maps a Kubernetes service account to an IAM Role. + // + // For more information, see [Attach an IAM Role to an Amazon EKS add-on using Pod Identity] in the EKS User Guide. + // + // [Attach an IAM Role to an Amazon EKS add-on using Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/add-ons-iam.html + PodIdentityAssociations []types.AddonPodIdentityAssociations + // How to resolve field value conflicts for an Amazon EKS add-on. Conflicts are // handled based on the value you choose: // diff --git a/service/eks/api_op_CreateCluster.go b/service/eks/api_op_CreateCluster.go index 5809c415424..2cf1a2415b5 100644 --- a/service/eks/api_op_CreateCluster.go +++ b/service/eks/api_op_CreateCluster.go @@ -45,12 +45,12 @@ import ( // In most cases, it takes several minutes to create a cluster. After you create // an Amazon EKS cluster, you must configure your Kubernetes tooling to communicate // with the API server and launch nodes into your cluster. For more information, -// see [Managing Cluster Authentication]and [Launching Amazon EKS nodes] in the Amazon EKS User Guide. +// see [Allowing users to access your cluster]and [Launching Amazon EKS nodes] in the Amazon EKS User Guide. // +// [Allowing users to access your cluster]: https://docs.aws.amazon.com/eks/latest/userguide/cluster-auth.html // [CloudWatch Pricing]: http://aws.amazon.com/cloudwatch/pricing/ // [Amazon EKS Cluster Control Plane Logs]: https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html // [Amazon EKS Cluster Endpoint Access Control]: https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html -// [Managing Cluster Authentication]: https://docs.aws.amazon.com/eks/latest/userguide/managing-auth.html // [Launching Amazon EKS nodes]: https://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html func (c *Client) CreateCluster(ctx context.Context, params *CreateClusterInput, optFns ...func(*Options)) (*CreateClusterOutput, error) { if params == nil { diff --git a/service/eks/api_op_CreateNodegroup.go b/service/eks/api_op_CreateNodegroup.go index c1004753a03..a57136c6e6c 100644 --- a/service/eks/api_op_CreateNodegroup.go +++ b/service/eks/api_op_CreateNodegroup.go @@ -17,7 +17,7 @@ import ( // Kubernetes version for the cluster. All node groups are created with the latest // AMI release version for the respective minor Kubernetes version of the cluster, // unless you deploy a custom AMI using a launch template. For more information -// about using launch templates, see [Launch template support]. +// about using launch templates, see [Customizing managed nodes with launch templates]. // // An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and // associated Amazon EC2 instances that are managed by Amazon Web Services for an @@ -26,7 +26,7 @@ import ( // Windows AMI types are only supported for commercial Amazon Web Services Regions // that support Windows on Amazon EKS. // -// [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html +// [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html // [Managed node groups]: https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html func (c *Client) CreateNodegroup(ctx context.Context, params *CreateNodegroupInput, optFns ...func(*Options)) (*CreateNodegroupOutput, error) { if params == nil { @@ -58,9 +58,9 @@ type CreateNodegroupInput struct { // nodes to use when they are launched. For more information, see [Amazon EKS node IAM role]in the Amazon // EKS User Guide . If you specify launchTemplate , then don't specify [IamInstanceProfile] in your // launch template, or the node group deployment will fail. For more information - // about using launch templates with Amazon EKS, see [Launch template support]in the Amazon EKS User Guide. + // about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide. // - // [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html // [IamInstanceProfile]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html // [Amazon EKS node IAM role]: https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html // @@ -75,9 +75,9 @@ type CreateNodegroupInput struct { // The subnets to use for the Auto Scaling group that is created for your node // group. If you specify launchTemplate , then don't specify [SubnetId] in your launch // template, or the node group deployment will fail. For more information about - // using launch templates with Amazon EKS, see [Launch template support]in the Amazon EKS User Guide. + // using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide. // - // [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html // [SubnetId]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html // // This member is required. @@ -88,9 +88,9 @@ type CreateNodegroupInput struct { // group deployment will fail. If your launch template uses a Windows custom AMI, // then add eks:kube-proxy-windows to your Windows nodes rolearn in the aws-auth // ConfigMap . For more information about using launch templates with Amazon EKS, - // see [Launch template support]in the Amazon EKS User Guide. + // see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide. // - // [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html AmiType types.AMITypes // The capacity type for your node group. @@ -104,9 +104,9 @@ type CreateNodegroupInput struct { // disk size is 20 GiB for Linux and Bottlerocket. The default disk size is 50 GiB // for Windows. If you specify launchTemplate , then don't specify diskSize , or // the node group deployment will fail. For more information about using launch - // templates with Amazon EKS, see [Launch template support]in the Amazon EKS User Guide. + // templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide. // - // [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html DiskSize *int32 // Specify the instance types for a node group. If you specify a GPU instance @@ -118,20 +118,22 @@ type CreateNodegroupInput struct { // don't specify an instance type in a launch template or for instanceTypes , then // t3.medium is used, by default. If you specify Spot for capacityType , then we // recommend specifying multiple values for instanceTypes . For more information, - // see [Managed node group capacity types]and [Launch template support] in the Amazon EKS User Guide. + // see [Managed node group capacity types]and [Customizing managed nodes with launch templates] in the Amazon EKS User Guide. // + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html // [Managed node group capacity types]: https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types - // [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html InstanceTypes []string // The Kubernetes labels to apply to the nodes in the node group when they are // created. Labels map[string]string - // An object representing a node group's launch template specification. If - // specified, then do not specify instanceTypes , diskSize , or remoteAccess and - // make sure that the launch template meets the requirements in - // launchTemplateSpecification . + // An object representing a node group's launch template specification. When using + // this object, don't directly specify instanceTypes , diskSize , or remoteAccess . + // Make sure that the launch template meets the requirements in + // launchTemplateSpecification . Also refer to [Customizing managed nodes with launch templates] in the Amazon EKS User Guide. + // + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html LaunchTemplate *types.LaunchTemplateSpecification // The AMI version of the Amazon EKS optimized AMI to use with your node group. By @@ -143,21 +145,21 @@ type CreateNodegroupInput struct { // // If you specify launchTemplate , and your launch template uses a custom AMI, then // don't specify releaseVersion , or the node group deployment will fail. For more - // information about using launch templates with Amazon EKS, see [Launch template support]in the Amazon EKS + // information about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS // User Guide. // + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html // [Amazon EKS optimized Amazon Linux AMI versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html - // [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html // [Amazon EKS optimized Windows AMI versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html ReleaseVersion *string // The remote access configuration to use with your node group. For Linux, the // protocol is SSH. For Windows, the protocol is RDP. If you specify launchTemplate // , then don't specify remoteAccess , or the node group deployment will fail. For - // more information about using launch templates with Amazon EKS, see [Launch template support]in the + // more information about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the // Amazon EKS User Guide. // - // [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html RemoteAccess *types.RemoteAccessConfig // The scaling configuration details for the Auto Scaling group that is created @@ -182,10 +184,10 @@ type CreateNodegroupInput struct { // Kubernetes version of the cluster is used, and this is the only accepted // specified value. If you specify launchTemplate , and your launch template uses a // custom AMI, then don't specify version , or the node group deployment will fail. - // For more information about using launch templates with Amazon EKS, see [Launch template support]in the + // For more information about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the // Amazon EKS User Guide. // - // [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Version *string noSmithyDocumentSerde diff --git a/service/eks/api_op_DescribeAddonConfiguration.go b/service/eks/api_op_DescribeAddonConfiguration.go index 5824d3d9430..14d2be3c784 100644 --- a/service/eks/api_op_DescribeAddonConfiguration.go +++ b/service/eks/api_op_DescribeAddonConfiguration.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/eks/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -60,6 +61,10 @@ type DescribeAddonConfigurationOutput struct { // an add-on is created or updated. ConfigurationSchema *string + // The Kubernetes service account name used by the addon, and any suggested IAM + // policies. Use this information to create an IAM Role for the Addon. + PodIdentityConfiguration []types.AddonPodIdentityConfiguration + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/eks/api_op_UpdateAddon.go b/service/eks/api_op_UpdateAddon.go index f94a12638c1..28b96ee5824 100644 --- a/service/eks/api_op_UpdateAddon.go +++ b/service/eks/api_op_UpdateAddon.go @@ -57,6 +57,16 @@ type UpdateAddonInput struct { // DescribeAddonConfiguration . ConfigurationValues *string + // An array of Pod Identity Assocations to be updated. Each EKS Pod Identity + // association maps a Kubernetes service account to an IAM Role. If this value is + // left blank, no change. If an empty array is provided, existing Pod Identity + // Assocations owned by the Addon are deleted. + // + // For more information, see [Attach an IAM Role to an Amazon EKS add-on using Pod Identity] in the EKS User Guide. + // + // [Attach an IAM Role to an Amazon EKS add-on using Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/add-ons-iam.html + PodIdentityAssociations []types.AddonPodIdentityAssociations + // How to resolve field value conflicts for an Amazon EKS add-on if you've changed // a value from the Amazon EKS default value. Conflicts are handled based on the // option you choose: diff --git a/service/eks/api_op_UpdateNodegroupVersion.go b/service/eks/api_op_UpdateNodegroupVersion.go index 01a47f13253..aa215f64cff 100644 --- a/service/eks/api_op_UpdateNodegroupVersion.go +++ b/service/eks/api_op_UpdateNodegroupVersion.go @@ -90,11 +90,11 @@ type UpdateNodegroupVersionInput struct { // // If you specify launchTemplate , and your launch template uses a custom AMI, then // don't specify releaseVersion , or the node group update will fail. For more - // information about using launch templates with Amazon EKS, see [Launch template support]in the Amazon EKS + // information about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS // User Guide. // + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html // [Amazon EKS optimized Amazon Linux AMI versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html - // [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html // [Amazon EKS optimized Windows AMI versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html ReleaseVersion *string @@ -104,9 +104,9 @@ type UpdateNodegroupVersionInput struct { // version of the cluster's Kubernetes version. If you specify launchTemplate , and // your launch template uses a custom AMI, then don't specify version , or the node // group update will fail. For more information about using launch templates with - // Amazon EKS, see [Launch template support]in the Amazon EKS User Guide. + // Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide. // - // [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html + // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Version *string noSmithyDocumentSerde diff --git a/service/eks/deserializers.go b/service/eks/deserializers.go index bd6d2de2ad7..c24e519997c 100644 --- a/service/eks/deserializers.go +++ b/service/eks/deserializers.go @@ -3345,6 +3345,11 @@ func awsRestjson1_deserializeOpDocumentDescribeAddonConfigurationOutput(v **Desc sv.ConfigurationSchema = ptr.String(jtv) } + case "podIdentityConfiguration": + if err := awsRestjson1_deserializeDocumentAddonPodIdentityConfigurationList(&sv.PodIdentityConfiguration, value); err != nil { + return err + } + default: _, _ = key, value @@ -9744,6 +9749,11 @@ func awsRestjson1_deserializeDocumentAddon(v **types.Addon, value interface{}) e sv.Owner = ptr.String(jtv) } + case "podIdentityAssociations": + if err := awsRestjson1_deserializeDocumentStringList(&sv.PodIdentityAssociations, value); err != nil { + return err + } + case "publisher": if value != nil { jtv, ok := value.(string) @@ -9986,6 +9996,85 @@ func awsRestjson1_deserializeDocumentAddonIssueList(v *[]types.AddonIssue, value return nil } +func awsRestjson1_deserializeDocumentAddonPodIdentityConfiguration(v **types.AddonPodIdentityConfiguration, 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.AddonPodIdentityConfiguration + if *v == nil { + sv = &types.AddonPodIdentityConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "recommendedManagedPolicies": + if err := awsRestjson1_deserializeDocumentStringList(&sv.RecommendedManagedPolicies, value); err != nil { + return err + } + + case "serviceAccount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceAccount = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAddonPodIdentityConfigurationList(v *[]types.AddonPodIdentityConfiguration, 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.AddonPodIdentityConfiguration + if *v == nil { + cv = []types.AddonPodIdentityConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AddonPodIdentityConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentAddonPodIdentityConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAddons(v *[]types.AddonInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10070,6 +10159,15 @@ func awsRestjson1_deserializeDocumentAddonVersionInfo(v **types.AddonVersionInfo sv.RequiresConfiguration = jtv } + case "requiresIamPermissions": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.RequiresIamPermissions = jtv + } + default: _, _ = key, value @@ -13789,6 +13887,15 @@ func awsRestjson1_deserializeDocumentPodIdentityAssociation(v **types.PodIdentit sv.Namespace = ptr.String(jtv) } + case "ownerArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OwnerArn = ptr.String(jtv) + } + case "roleArn": if value != nil { jtv, ok := value.(string) @@ -13913,6 +14020,15 @@ func awsRestjson1_deserializeDocumentPodIdentityAssociationSummary(v **types.Pod sv.Namespace = ptr.String(jtv) } + case "ownerArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OwnerArn = ptr.String(jtv) + } + case "serviceAccount": if value != nil { jtv, ok := value.(string) diff --git a/service/eks/serializers.go b/service/eks/serializers.go index d2209c99346..e6f73861781 100644 --- a/service/eks/serializers.go +++ b/service/eks/serializers.go @@ -532,6 +532,13 @@ func awsRestjson1_serializeOpDocumentCreateAddonInput(v *CreateAddonInput, value ok.String(*v.ConfigurationValues) } + if v.PodIdentityAssociations != nil { + ok := object.Key("podIdentityAssociations") + if err := awsRestjson1_serializeDocumentAddonPodIdentityAssociationsList(v.PodIdentityAssociations, ok); err != nil { + return err + } + } + if len(v.ResolveConflicts) > 0 { ok := object.Key("resolveConflicts") ok.String(string(v.ResolveConflicts)) @@ -4312,6 +4319,13 @@ func awsRestjson1_serializeOpDocumentUpdateAddonInput(v *UpdateAddonInput, value ok.String(*v.ConfigurationValues) } + if v.PodIdentityAssociations != nil { + ok := object.Key("podIdentityAssociations") + if err := awsRestjson1_serializeDocumentAddonPodIdentityAssociationsList(v.PodIdentityAssociations, ok); err != nil { + return err + } + } + if len(v.ResolveConflicts) > 0 { ok := object.Key("resolveConflicts") ok.String(string(v.ResolveConflicts)) @@ -4985,6 +4999,36 @@ func awsRestjson1_serializeDocumentAccessScope(v *types.AccessScope, value smith return nil } +func awsRestjson1_serializeDocumentAddonPodIdentityAssociations(v *types.AddonPodIdentityAssociations, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.ServiceAccount != nil { + ok := object.Key("serviceAccount") + ok.String(*v.ServiceAccount) + } + + return nil +} + +func awsRestjson1_serializeDocumentAddonPodIdentityAssociationsList(v []types.AddonPodIdentityAssociations, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAddonPodIdentityAssociations(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentCategoryList(v []types.Category, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/eks/types/enums.go b/service/eks/types/enums.go index a79e4ddb4ce..47075c0c2b9 100644 --- a/service/eks/types/enums.go +++ b/service/eks/types/enums.go @@ -33,6 +33,8 @@ const ( AddonIssueCodeAdmissionRequestDenied AddonIssueCode = "AdmissionRequestDenied" AddonIssueCodeUnsupportedAddonModification AddonIssueCode = "UnsupportedAddonModification" AddonIssueCodeK8sResourceNotFound AddonIssueCode = "K8sResourceNotFound" + AddonIssueCodeAddonSubscriptionNeeded AddonIssueCode = "AddonSubscriptionNeeded" + AddonIssueCodeAddonPermissionFailure AddonIssueCode = "AddonPermissionFailure" ) // Values returns all known values for AddonIssueCode. Note that this can be @@ -49,6 +51,8 @@ func (AddonIssueCode) Values() []AddonIssueCode { "AdmissionRequestDenied", "UnsupportedAddonModification", "K8sResourceNotFound", + "AddonSubscriptionNeeded", + "AddonPermissionFailure", } } @@ -709,6 +713,7 @@ const ( UpdateParamTypeSecurityGroups UpdateParamType = "SecurityGroups" UpdateParamTypeSubnets UpdateParamType = "Subnets" UpdateParamTypeAuthenticationMode UpdateParamType = "AuthenticationMode" + UpdateParamTypePodIdentityAssociations UpdateParamType = "PodIdentityAssociations" ) // Values returns all known values for UpdateParamType. Note that this can be @@ -744,6 +749,7 @@ func (UpdateParamType) Values() []UpdateParamType { "SecurityGroups", "Subnets", "AuthenticationMode", + "PodIdentityAssociations", } } diff --git a/service/eks/types/types.go b/service/eks/types/types.go index 3c1f20333ef..e19528a5cf6 100644 --- a/service/eks/types/types.go +++ b/service/eks/types/types.go @@ -141,6 +141,14 @@ type Addon struct { // The owner of the add-on. Owner *string + // An array of Pod Identity Assocations owned by the Addon. Each EKS Pod Identity + // association maps a role to a service account in a namespace in the cluster. + // + // For more information, see [Attach an IAM Role to an Amazon EKS add-on using Pod Identity] in the EKS User Guide. + // + // [Attach an IAM Role to an Amazon EKS add-on using Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/add-ons-iam.html + PodIdentityAssociations []string + // The publisher of the add-on. Publisher *string @@ -208,6 +216,41 @@ type AddonIssue struct { noSmithyDocumentSerde } +// A type of Pod Identity Association owned by an Amazon EKS Add-on. +// +// Each EKS Pod Identity Association maps a role to a service account in a +// namespace in the cluster. +// +// For more information, see [Attach an IAM Role to an Amazon EKS add-on using Pod Identity] in the EKS User Guide. +// +// [Attach an IAM Role to an Amazon EKS add-on using Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/add-ons-iam.html +type AddonPodIdentityAssociations struct { + + // The ARN of an IAM Role. + // + // This member is required. + RoleArn *string + + // The name of a Kubernetes Service Account. + // + // This member is required. + ServiceAccount *string + + noSmithyDocumentSerde +} + +// Information about how to configure IAM for an Addon. +type AddonPodIdentityConfiguration struct { + + // A suggested IAM Policy for the addon. + RecommendedManagedPolicies []string + + // The Kubernetes Service Account name used by the addon. + ServiceAccount *string + + noSmithyDocumentSerde +} + // Information about an add-on version. type AddonVersionInfo struct { @@ -223,6 +266,10 @@ type AddonVersionInfo struct { // Whether the add-on requires configuration. RequiresConfiguration bool + // Indicates if the Addon requires IAM Permissions to operate, such as networking + // permissions. + RequiresIamPermissions bool + noSmithyDocumentSerde } @@ -308,9 +355,7 @@ type Cluster struct { // The endpoint for your Kubernetes API server. Endpoint *string - // An object representing the health of your local Amazon EKS cluster on an Amazon - // Web Services Outpost. This object isn't available for clusters on the Amazon Web - // Services cloud. + // An object representing the health of your Amazon EKS cluster. Health *ClusterHealth // The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This @@ -371,21 +416,16 @@ type Cluster struct { noSmithyDocumentSerde } -// An object representing the health of your local Amazon EKS cluster on an Amazon -// Web Services Outpost. You can't use this API with an Amazon EKS cluster on the -// Amazon Web Services cloud. +// An object representing the health of your Amazon EKS cluster. type ClusterHealth struct { - // An object representing the health issues of your local Amazon EKS cluster on an - // Amazon Web Services Outpost. + // An object representing the health issues of your Amazon EKS cluster. Issues []ClusterIssue noSmithyDocumentSerde } -// An issue with your local Amazon EKS cluster on an Amazon Web Services Outpost. -// You can't use this API with an Amazon EKS cluster on the Amazon Web Services -// cloud. +// An issue with your Amazon EKS cluster. type ClusterIssue struct { // The error code of the issue. @@ -1006,15 +1046,15 @@ type KubernetesNetworkConfigResponse struct { // HibernationOptions , or [TerminateInstances]TerminateInstances , or the node group deployment or // update will fail. For more information about launch templates, see [CreateLaunchTemplate] // CreateLaunchTemplate in the Amazon EC2 API Reference. For more information about -// using launch templates with Amazon EKS, see [Launch template support]in the Amazon EKS User Guide. +// using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide. // // You must specify either the launch template ID or the launch template name in // the request, but not both. // // [HibernationOptions]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html +// [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html // [CreateLaunchTemplate]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html // [RequestSpotInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html -// [Launch template support]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html // [IamInstanceProfile]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html // [SubnetId]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html // [TerminateInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TerminateInstances.html @@ -1477,6 +1517,9 @@ type PodIdentityAssociation struct { // must be in this namespace. Namespace *string + // If defined, the Pod Identity Association is owned by an Amazon EKS Addon. + OwnerArn *string + // The Amazon Resource Name (ARN) of the IAM role to associate with the service // account. The EKS Pod Identity agent manages credentials to assume this role for // applications in the containers in the pods that use this service account. @@ -1544,6 +1587,9 @@ type PodIdentityAssociationSummary struct { // must be in this namespace. Namespace *string + // If defined, the Pod Identity Association is owned by an Amazon EKS Addon. + OwnerArn *string + // The name of the Kubernetes service account inside the cluster to associate the // IAM credentials with. ServiceAccount *string diff --git a/service/eks/validators.go b/service/eks/validators.go index 55c4b1e8544..9cfc83cf320 100644 --- a/service/eks/validators.go +++ b/service/eks/validators.go @@ -1258,6 +1258,41 @@ func addOpUpdatePodIdentityAssociationValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpUpdatePodIdentityAssociation{}, middleware.After) } +func validateAddonPodIdentityAssociations(v *types.AddonPodIdentityAssociations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddonPodIdentityAssociations"} + if v.ServiceAccount == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceAccount")) + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAddonPodIdentityAssociationsList(v []types.AddonPodIdentityAssociations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddonPodIdentityAssociationsList"} + for i := range v { + if err := validateAddonPodIdentityAssociations(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateConnectorConfigRequest(v *types.ConnectorConfigRequest) error { if v == nil { return nil @@ -1426,6 +1461,11 @@ func validateOpCreateAddonInput(v *CreateAddonInput) error { if v.AddonName == nil { invalidParams.Add(smithy.NewErrParamRequired("AddonName")) } + if v.PodIdentityAssociations != nil { + if err := validateAddonPodIdentityAssociationsList(v.PodIdentityAssociations); err != nil { + invalidParams.AddNested("PodIdentityAssociations", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2160,6 +2200,11 @@ func validateOpUpdateAddonInput(v *UpdateAddonInput) error { if v.AddonName == nil { invalidParams.Add(smithy.NewErrParamRequired("AddonName")) } + if v.PodIdentityAssociations != nil { + if err := validateAddonPodIdentityAssociationsList(v.PodIdentityAssociations); err != nil { + invalidParams.AddNested("PodIdentityAssociations", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/iottwinmaker/types/enums.go b/service/iottwinmaker/types/enums.go index c58f00ebee2..a830c041d9b 100644 --- a/service/iottwinmaker/types/enums.go +++ b/service/iottwinmaker/types/enums.go @@ -285,9 +285,10 @@ type PropertyUpdateType string // Enum values for PropertyUpdateType const ( - PropertyUpdateTypeUpdate PropertyUpdateType = "UPDATE" - PropertyUpdateTypeDelete PropertyUpdateType = "DELETE" - PropertyUpdateTypeCreate PropertyUpdateType = "CREATE" + PropertyUpdateTypeUpdate PropertyUpdateType = "UPDATE" + PropertyUpdateTypeDelete PropertyUpdateType = "DELETE" + PropertyUpdateTypeCreate PropertyUpdateType = "CREATE" + PropertyUpdateTypeResetValue PropertyUpdateType = "RESET_VALUE" ) // Values returns all known values for PropertyUpdateType. Note that this can be @@ -299,6 +300,7 @@ func (PropertyUpdateType) Values() []PropertyUpdateType { "UPDATE", "DELETE", "CREATE", + "RESET_VALUE", } } diff --git a/service/ram/internal/endpoints/endpoints.go b/service/ram/internal/endpoints/endpoints.go index ac6301592e9..97d433f3a8d 100644 --- a/service/ram/internal/endpoints/endpoints.go +++ b/service/ram/internal/endpoints/endpoints.go @@ -382,42 +382,12 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "fips-us-iso-east-1", - }: endpoints.Endpoint{ - Hostname: "ram-fips.us-iso-east-1.c2s.ic.gov", - CredentialScope: endpoints.CredentialScope{ - Region: "us-iso-east-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "fips-us-iso-west-1", - }: endpoints.Endpoint{ - Hostname: "ram-fips.us-iso-west-1.c2s.ic.gov", - CredentialScope: endpoints.CredentialScope{ - Region: "us-iso-west-1", - }, - Deprecated: aws.TrueTernary, - }, endpoints.EndpointKey{ Region: "us-iso-east-1", }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-iso-east-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ram-fips.us-iso-east-1.c2s.ic.gov", - }, endpoints.EndpointKey{ Region: "us-iso-west-1", }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-iso-west-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ram-fips.us-iso-west-1.c2s.ic.gov", - }, }, }, { @@ -441,24 +411,9 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "fips-us-isob-east-1", - }: endpoints.Endpoint{ - Hostname: "ram-fips.us-isob-east-1.sc2s.sgov.gov", - CredentialScope: endpoints.CredentialScope{ - Region: "us-isob-east-1", - }, - Deprecated: aws.TrueTernary, - }, endpoints.EndpointKey{ Region: "us-isob-east-1", }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-isob-east-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ram-fips.us-isob-east-1.sc2s.sgov.gov", - }, }, }, {