From f1ea0aa68d971ee8f6130a725fb5feae4ea0af03 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Mon, 3 Jul 2023 18:24:05 +0000 Subject: [PATCH] Regenerated Clients --- .../96370bd038fb4f73ab76ca50857a575c.json | 8 ++ .../9ccdb37cdd6d481e95dc017e64be8c4c.json | 8 ++ .../athena/internal/endpoints/endpoints.go | 9 ++ .../internal/endpoints/endpoints.go | 85 ++++++++++++++ service/batch/api_op_CancelJob.go | 12 +- .../batch/api_op_CreateComputeEnvironment.go | 4 +- service/batch/api_op_SubmitJob.go | 7 +- service/batch/deserializers.go | 59 ++++++++++ service/batch/serializers.go | 24 ++++ service/batch/types/types.go | 88 ++++++++++---- service/sagemaker/deserializers.go | 36 +++++- service/sagemaker/serializers.go | 12 ++ service/sagemaker/types/enums.go | 19 +++ service/sagemaker/types/types.go | 70 +++++++---- service/sagemaker/validators.go | 8 +- .../internal/endpoints/endpoints.go | 27 ----- .../internal/endpoints/endpoints.go | 110 ++++++++++++++++++ .../internal/endpoints/endpoints.go | 9 -- 18 files changed, 497 insertions(+), 98 deletions(-) create mode 100644 .changelog/96370bd038fb4f73ab76ca50857a575c.json create mode 100644 .changelog/9ccdb37cdd6d481e95dc017e64be8c4c.json diff --git a/.changelog/96370bd038fb4f73ab76ca50857a575c.json b/.changelog/96370bd038fb4f73ab76ca50857a575c.json new file mode 100644 index 00000000000..9ca1df06c66 --- /dev/null +++ b/.changelog/96370bd038fb4f73ab76ca50857a575c.json @@ -0,0 +1,8 @@ +{ + "id": "96370bd0-38fb-4f73-ab76-ca50857a575c", + "type": "feature", + "description": "SageMaker Inference Recommender now accepts new fields SupportedEndpointType and ServerlessConfiguration to support serverless endpoints.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/9ccdb37cdd6d481e95dc017e64be8c4c.json b/.changelog/9ccdb37cdd6d481e95dc017e64be8c4c.json new file mode 100644 index 00000000000..b08448e9d3d --- /dev/null +++ b/.changelog/9ccdb37cdd6d481e95dc017e64be8c4c.json @@ -0,0 +1,8 @@ +{ + "id": "9ccdb37c-dd6d-481e-95dc-017e64be8c4c", + "type": "feature", + "description": "This feature allows customers to use AWS Batch with Linux with ARM64 CPU Architecture and X86_64 CPU Architecture with Windows OS on Fargate Platform.", + "modules": [ + "service/batch" + ] +} \ No newline at end of file diff --git a/service/athena/internal/endpoints/endpoints.go b/service/athena/internal/endpoints/endpoints.go index 901b31abb5c..6ae034ec011 100644 --- a/service/athena/internal/endpoints/endpoints.go +++ b/service/athena/internal/endpoints/endpoints.go @@ -319,6 +319,15 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "athena.me-central-1.api.aws", + }, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/backupstorage/internal/endpoints/endpoints.go b/service/backupstorage/internal/endpoints/endpoints.go index e088a12c6c0..a05936ccea5 100644 --- a/service/backupstorage/internal/endpoints/endpoints.go +++ b/service/backupstorage/internal/endpoints/endpoints.go @@ -139,15 +139,84 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "af-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, @@ -187,6 +256,14 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "cn-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + }: endpoints.Endpoint{}, + }, }, { ID: "aws-iso", @@ -306,5 +383,13 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-gov-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + }, }, } diff --git a/service/batch/api_op_CancelJob.go b/service/batch/api_op_CancelJob.go index a348e3c6104..2efef1881dd 100644 --- a/service/batch/api_op_CancelJob.go +++ b/service/batch/api_op_CancelJob.go @@ -12,10 +12,14 @@ import ( // Cancels a job in an Batch job queue. Jobs that are in the SUBMITTED or PENDING // are canceled. A job in RUNNABLE remains in RUNNABLE until it reaches the head -// of the job queue. Then the job status is updated to FAILED . Jobs that -// progressed to the STARTING or RUNNING state aren't canceled. However, the API -// operation still succeeds, even if no job is canceled. These jobs must be -// terminated with the TerminateJob operation. +// of the job queue. Then the job status is updated to FAILED . A PENDING job is +// canceled after all dependency jobs are completed. Therefore, it may take longer +// than expected to cancel a job in PENDING status. When you try to cancel an +// array parent job in PENDING , Batch attempts to cancel all child jobs. The array +// parent job is canceled when all child jobs are completed. Jobs that progressed +// to the STARTING or RUNNING state aren't canceled. However, the API operation +// still succeeds, even if no job is canceled. These jobs must be terminated with +// the TerminateJob operation. func (c *Client) CancelJob(ctx context.Context, params *CancelJobInput, optFns ...func(*Options)) (*CancelJobOutput, error) { if params == nil { params = &CancelJobInput{} diff --git a/service/batch/api_op_CreateComputeEnvironment.go b/service/batch/api_op_CreateComputeEnvironment.go index 8a8b44b2db8..6bc850e9080 100644 --- a/service/batch/api_op_CreateComputeEnvironment.go +++ b/service/batch/api_op_CreateComputeEnvironment.go @@ -57,7 +57,9 @@ import ( // - Set the allocation strategy ( allocationStrategy ) parameter to // BEST_FIT_PROGRESSIVE or SPOT_CAPACITY_OPTIMIZED . // - Set the update to latest image version ( updateToLatestImageVersion ) -// parameter to true . +// parameter to true . The updateToLatestImageVersion parameter is used when you +// update a compute environment. This parameter is ignored when you create a +// compute environment. // - Don't specify an AMI ID in imageId , imageIdOverride (in ec2Configuration (https://docs.aws.amazon.com/batch/latest/APIReference/API_Ec2Configuration.html) // ), or in the launch template ( launchTemplate ). In that case, Batch selects // the latest Amazon ECS optimized AMI that's supported by Batch at the time the diff --git a/service/batch/api_op_SubmitJob.go b/service/batch/api_op_SubmitJob.go index 5a617c7a1a5..4ba25fac169 100644 --- a/service/batch/api_op_SubmitJob.go +++ b/service/batch/api_op_SubmitJob.go @@ -120,9 +120,10 @@ type SubmitJobInput struct { // value is 9999. SchedulingPriorityOverride *int32 - // The share identifier for the job. If the job queue doesn't have a scheduling - // policy, then this parameter must not be specified. If the job queue has a - // scheduling policy, then this parameter must be specified. + // The share identifier for the job. Don't specify this parameter if the job queue + // doesn't have a scheduling policy. If the job queue has a scheduling policy, then + // this parameter must be specified. This string is limited to 255 alphanumeric + // characters, and can be followed by an asterisk (*). ShareIdentifier *string // The tags that you apply to the job request to help you categorize and organize diff --git a/service/batch/deserializers.go b/service/batch/deserializers.go index dccdb802fe0..c6618ed05cd 100644 --- a/service/batch/deserializers.go +++ b/service/batch/deserializers.go @@ -4292,6 +4292,11 @@ func awsRestjson1_deserializeDocumentContainerDetail(v **types.ContainerDetail, return err } + case "runtimePlatform": + if err := awsRestjson1_deserializeDocumentRuntimePlatform(&sv.RuntimePlatform, value); err != nil { + return err + } + case "secrets": if err := awsRestjson1_deserializeDocumentSecretList(&sv.Secrets, value); err != nil { return err @@ -4481,6 +4486,11 @@ func awsRestjson1_deserializeDocumentContainerProperties(v **types.ContainerProp return err } + case "runtimePlatform": + if err := awsRestjson1_deserializeDocumentRuntimePlatform(&sv.RuntimePlatform, value); err != nil { + return err + } + case "secrets": if err := awsRestjson1_deserializeDocumentSecretList(&sv.Secrets, value); err != nil { return err @@ -8552,6 +8562,55 @@ func awsRestjson1_deserializeDocumentRetryStrategy(v **types.RetryStrategy, valu return nil } +func awsRestjson1_deserializeDocumentRuntimePlatform(v **types.RuntimePlatform, 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.RuntimePlatform + if *v == nil { + sv = &types.RuntimePlatform{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cpuArchitecture": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CpuArchitecture = ptr.String(jtv) + } + + case "operatingSystemFamily": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OperatingSystemFamily = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSchedulingPolicyDetail(v **types.SchedulingPolicyDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/batch/serializers.go b/service/batch/serializers.go index bfa83d48960..048c76312fa 100644 --- a/service/batch/serializers.go +++ b/service/batch/serializers.go @@ -2441,6 +2441,13 @@ func awsRestjson1_serializeDocumentContainerProperties(v *types.ContainerPropert } } + if v.RuntimePlatform != nil { + ok := object.Key("runtimePlatform") + if err := awsRestjson1_serializeDocumentRuntimePlatform(v.RuntimePlatform, ok); err != nil { + return err + } + } + if v.Secrets != nil { ok := object.Key("secrets") if err := awsRestjson1_serializeDocumentSecretList(v.Secrets, ok); err != nil { @@ -3634,6 +3641,23 @@ func awsRestjson1_serializeDocumentRetryStrategy(v *types.RetryStrategy, value s return nil } +func awsRestjson1_serializeDocumentRuntimePlatform(v *types.RuntimePlatform, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CpuArchitecture != nil { + ok := object.Key("cpuArchitecture") + ok.String(*v.CpuArchitecture) + } + + if v.OperatingSystemFamily != nil { + ok := object.Key("operatingSystemFamily") + ok.String(*v.OperatingSystemFamily) + } + + return nil +} + func awsRestjson1_serializeDocumentSecret(v *types.Secret, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/batch/types/types.go b/service/batch/types/types.go index daa097d28d2..cfb195bd1cd 100644 --- a/service/batch/types/types.go +++ b/service/batch/types/types.go @@ -217,13 +217,13 @@ type ComputeEnvironmentOrder struct { // in the Batch User Guide. type ComputeResource struct { - // The maximum number of Amazon EC2 vCPUs that a compute environment can reach. - // With both BEST_FIT_PROGRESSIVE and SPOT_CAPACITY_OPTIMIZED allocation - // strategies using On-Demand or Spot Instances, and the BEST_FIT strategy using - // Spot Instances, Batch might need to exceed maxvCpus to meet your capacity - // requirements. In this event, Batch never exceeds maxvCpus by more than a single - // instance. For example, no more than a single instance from among those specified - // in your compute environment is allocated. + // The maximum number of vCPUs that a compute environment can support. With both + // BEST_FIT_PROGRESSIVE and SPOT_CAPACITY_OPTIMIZED allocation strategies using + // On-Demand or Spot Instances, and the BEST_FIT strategy using Spot Instances, + // Batch might need to exceed maxvCpus to meet your capacity requirements. In this + // event, Batch never exceeds maxvCpus by more than a single instance. For + // example, no more than a single instance from among those specified in your + // compute environment is allocated. // // This member is required. MaxvCpus *int32 @@ -295,10 +295,10 @@ type ComputeResource struct { // applicable to jobs that are running on Fargate resources. Don't specify it. BidPercentage *int32 - // The desired number of Amazon EC2 vCPUS in the compute environment. Batch - // modifies this value between the minimum and maximum values based on job queue - // demand. This parameter isn't applicable to jobs that are running on Fargate - // resources. Don't specify it. + // The desired number of vCPUS in the compute environment. Batch modifies this + // value between the minimum and maximum values based on job queue demand. This + // parameter isn't applicable to jobs that are running on Fargate resources. Don't + // specify it. DesiredvCpus *int32 // Provides information that's used to select Amazon Machine Images (AMIs) for EC2 @@ -361,9 +361,9 @@ type ComputeResource struct { // running on Fargate resources. Don't specify it. LaunchTemplate *LaunchTemplateSpecification - // The minimum number of Amazon EC2 vCPUs that an environment should maintain - // (even if the compute environment is DISABLED ). This parameter isn't applicable - // to jobs that are running on Fargate resources. Don't specify it. + // The minimum number of vCPUs that a compute environment should maintain (even if + // the compute environment is DISABLED ). This parameter isn't applicable to jobs + // that are running on Fargate resources. Don't specify it. MinvCpus *int32 // The Amazon EC2 placement group to associate with your compute resources. If you @@ -456,12 +456,12 @@ type ComputeResourceUpdate struct { // running on Fargate resources. Don't specify it. BidPercentage *int32 - // The desired number of Amazon EC2 vCPUS in the compute environment. Batch - // modifies this value between the minimum and maximum values based on job queue - // demand. This parameter isn't applicable to jobs that are running on Fargate - // resources. Don't specify it. Batch doesn't support changing the desired number - // of vCPUs of an existing compute environment. Don't specify this parameter for - // compute environments using Amazon EKS clusters. When you update the desiredvCpus + // The desired number of vCPUS in the compute environment. Batch modifies this + // value between the minimum and maximum values based on job queue demand. This + // parameter isn't applicable to jobs that are running on Fargate resources. Don't + // specify it. Batch doesn't support changing the desired number of vCPUs of an + // existing compute environment. Don't specify this parameter for compute + // environments using Amazon EKS clusters. When you update the desiredvCpus // setting, the value must be between the minvCpus and maxvCpus values. // Additionally, the updated desiredvCpus value must be greater than or equal to // the current desiredvCpus value. For more information, see Troubleshooting Batch (https://docs.aws.amazon.com/batch/latest/userguide/troubleshooting.html#error-desired-vcpus-update) @@ -560,9 +560,9 @@ type ComputeResourceUpdate struct { // environment. MaxvCpus *int32 - // The minimum number of Amazon EC2 vCPUs that an environment should maintain - // (even if the compute environment is DISABLED ). This parameter isn't applicable - // to jobs that are running on Fargate resources. Don't specify it. + // The minimum number of vCPUs that an environment should maintain (even if the + // compute environment is DISABLED ). This parameter isn't applicable to jobs that + // are running on Fargate resources. Don't specify it. MinvCpus *int32 // The Amazon EC2 placement group to associate with your compute resources. If you @@ -764,6 +764,10 @@ type ContainerDetail struct { // resources include GPU , MEMORY , and VCPU . ResourceRequirements []ResourceRequirement + // An object that represents the compute environment architecture for Batch jobs + // on Fargate. + RuntimePlatform *RuntimePlatform + // The secrets to pass to the container. For more information, see Specifying // sensitive data (https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html) // in the Batch User Guide. @@ -808,11 +812,15 @@ type ContainerDetail struct { noSmithyDocumentSerde } -// The overrides that should be sent to a container. +// The overrides that should be sent to a container. For information about using +// Batch overrides when you connect event sources to targets, see +// BatchContainerOverrides (https://docs.aws.amazon.com/eventbridge/latest/pipes-reference/API_BatchContainerOverrides.html) +// . type ContainerOverrides struct { // The command to send to the container that overrides the default command from - // the Docker image or the job definition. + // the Docker image or the job definition. This parameter can't contain an empty + // string. Command []string // The environment variables to send to the container. You can add new environment @@ -1008,6 +1016,10 @@ type ContainerProperties struct { // resources include GPU , MEMORY , and VCPU . ResourceRequirements []ResourceRequirement + // An object that represents the compute environment architecture for Batch jobs + // on Fargate. + RuntimePlatform *RuntimePlatform + // The secrets for the container. For more information, see Specifying sensitive // data (https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html) // in the Batch User Guide. @@ -2718,6 +2730,32 @@ type RetryStrategy struct { noSmithyDocumentSerde } +// An object that represents the compute environment architecture for Batch jobs +// on Fargate. +type RuntimePlatform struct { + + // The vCPU architecture. The default value is X86_64 . Valid values are X86_64 + // and ARM64 . This parameter must be set to X86_64 for Windows containers. + CpuArchitecture *string + + // The operating system for the compute environment. Valid values are: LINUX + // (default), WINDOWS_SERVER_2019_CORE , WINDOWS_SERVER_2019_FULL , + // WINDOWS_SERVER_2022_CORE , and WINDOWS_SERVER_2022_FULL . The following + // parameters can’t be set for Windows containers: linuxParameters , privileged , + // user , ulimits , readonlyRootFilesystem , and efsVolumeConfiguration . The Batch + // Scheduler checks before registering a task definition with Fargate. If the job + // requires a Windows container and the first compute environment is LINUX , the + // compute environment is skipped and the next is checked until a Windows-based + // compute environment is found. Fargate Spot is not supported for Windows-based + // containers on Fargate. A job queue will be blocked if a Fargate Windows job is + // submitted to a job queue with only Fargate Spot compute environments. However, + // you can attach both FARGATE and FARGATE_SPOT compute environments to the same + // job queue. + OperatingSystemFamily *string + + noSmithyDocumentSerde +} + // An object that represents a scheduling policy. type SchedulingPolicyDetail struct { diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index f49029a845a..adfc193e0ce 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -43933,6 +43933,11 @@ func awsAwsjson11_deserializeDocumentEndpointInputConfiguration(v **types.Endpoi sv.InstanceType = types.ProductionVariantInstanceType(jtv) } + case "ServerlessConfig": + if err := awsAwsjson11_deserializeDocumentProductionVariantServerlessConfig(&sv.ServerlessConfig, value); err != nil { + return err + } + default: _, _ = key, value @@ -44078,13 +44083,13 @@ func awsAwsjson11_deserializeDocumentEndpointOutputConfiguration(v **types.Endpo if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + return fmt.Errorf("expected InitialInstanceCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.InitialInstanceCount = int32(i64) + sv.InitialInstanceCount = ptr.Int32(int32(i64)) } case "InstanceType": @@ -44096,6 +44101,11 @@ func awsAwsjson11_deserializeDocumentEndpointOutputConfiguration(v **types.Endpo sv.InstanceType = types.ProductionVariantInstanceType(jtv) } + case "ServerlessConfig": + if err := awsAwsjson11_deserializeDocumentProductionVariantServerlessConfig(&sv.ServerlessConfig, value); err != nil { + return err + } + case "VariantName": if value != nil { jtv, ok := value.(string) @@ -64243,6 +64253,15 @@ func awsAwsjson11_deserializeDocumentRecommendationJobContainerConfig(v **types. return err } + case "SupportedEndpointType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RecommendationJobSupportedEndpointType to be of type string, got %T instead", value) + } + sv.SupportedEndpointType = types.RecommendationJobSupportedEndpointType(jtv) + } + case "SupportedInstanceTypes": if err := awsAwsjson11_deserializeDocumentRecommendationJobSupportedInstanceTypes(&sv.SupportedInstanceTypes, value); err != nil { return err @@ -64979,6 +64998,19 @@ func awsAwsjson11_deserializeDocumentRecommendationMetrics(v **types.Recommendat sv.ModelLatency = int32(i64) } + case "ModelSetupTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ModelSetupTime to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ModelSetupTime = ptr.Int32(int32(i64)) + } + default: _, _ = key, value diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index e3faad7a79c..1a9a152b9c8 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -19521,6 +19521,13 @@ func awsAwsjson11_serializeDocumentEndpointInputConfiguration(v *types.EndpointI ok.String(string(v.InstanceType)) } + if v.ServerlessConfig != nil { + ok := object.Key("ServerlessConfig") + if err := awsAwsjson11_serializeDocumentProductionVariantServerlessConfig(v.ServerlessConfig, ok); err != nil { + return err + } + } + return nil } @@ -23827,6 +23834,11 @@ func awsAwsjson11_serializeDocumentRecommendationJobContainerConfig(v *types.Rec } } + if len(v.SupportedEndpointType) > 0 { + ok := object.Key("SupportedEndpointType") + ok.String(string(v.SupportedEndpointType)) + } + if v.SupportedInstanceTypes != nil { ok := object.Key("SupportedInstanceTypes") if err := awsAwsjson11_serializeDocumentRecommendationJobSupportedInstanceTypes(v.SupportedInstanceTypes, ok); err != nil { diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 48a83eeb485..74a952f0b07 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -4502,6 +4502,25 @@ func (RecommendationJobStatus) Values() []RecommendationJobStatus { } } +type RecommendationJobSupportedEndpointType string + +// Enum values for RecommendationJobSupportedEndpointType +const ( + RecommendationJobSupportedEndpointTypeRealtime RecommendationJobSupportedEndpointType = "RealTime" + RecommendationJobSupportedEndpointTypeServerless RecommendationJobSupportedEndpointType = "Serverless" +) + +// Values returns all known values for RecommendationJobSupportedEndpointType. +// 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 (RecommendationJobSupportedEndpointType) Values() []RecommendationJobSupportedEndpointType { + return []RecommendationJobSupportedEndpointType{ + "RealTime", + "Serverless", + } +} + type RecommendationJobType string // Enum values for RecommendationJobType diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 3216b152397..4f5288a5aa4 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -1585,7 +1585,9 @@ type AutoMLProblemTypeConfigMemberTextClassificationJobConfig struct { func (*AutoMLProblemTypeConfigMemberTextClassificationJobConfig) isAutoMLProblemTypeConfig() {} // Settings used to configure an AutoML job V2 for a time-series forecasting -// problem type. +// problem type. The TimeSeriesForecastingJobConfig problem type is only available +// in private beta. Contact Amazon Web Services Support or your account manager to +// learn more about access privileges. type AutoMLProblemTypeConfigMemberTimeSeriesForecastingJobConfig struct { Value TimeSeriesForecastingJobConfig @@ -4093,17 +4095,18 @@ type EndpointInput struct { // The endpoint configuration for the load test. type EndpointInputConfiguration struct { - // The instance types to use for the load test. - // - // This member is required. - InstanceType ProductionVariantInstanceType - // The parameter you want to benchmark against. EnvironmentParameterRanges *EnvironmentParameterRanges // The inference specification name in the model package version. InferenceSpecificationName *string + // The instance types to use for the load test. + InstanceType ProductionVariantInstanceType + + // Specifies the serverless configuration for an endpoint variant. + ServerlessConfig *ProductionVariantServerlessConfig + noSmithyDocumentSerde } @@ -4139,21 +4142,20 @@ type EndpointOutputConfiguration struct { // This member is required. EndpointName *string - // The number of instances recommended to launch initially. + // The name of the production variant (deployed model) made during a + // recommendation job. // // This member is required. - InitialInstanceCount int32 + VariantName *string + + // The number of instances recommended to launch initially. + InitialInstanceCount *int32 // The instance type recommended by Amazon SageMaker Inference Recommender. - // - // This member is required. InstanceType ProductionVariantInstanceType - // The name of the production variant (deployed model) made during a - // recommendation job. - // - // This member is required. - VariantName *string + // Specifies the serverless configuration for an endpoint variant. + ServerlessConfig *ProductionVariantServerlessConfig noSmithyDocumentSerde } @@ -11021,7 +11023,11 @@ type ProductionVariantServerlessConfig struct { MemorySizeInMB *int32 // The amount of provisioned concurrency to allocate for the serverless endpoint. - // Should be less than or equal to MaxConcurrency . + // Should be less than or equal to MaxConcurrency . This field is not supported for + // serverless endpoint recommendations for Inference Recommender jobs. For more + // information about creating an Inference Recommender job, see + // CreateInferenceRecommendationsJobs (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateInferenceRecommendationsJob.html) + // . ProvisionedConcurrency *int32 noSmithyDocumentSerde @@ -11625,6 +11631,12 @@ type RecommendationJobContainerConfig struct { // Specifies the SamplePayloadUrl and all other sample payload-related fields. PayloadConfig *RecommendationJobPayloadConfig + // The endpoint type to receive recommendations for. By default this is null, and + // the results of the inference recommendation job return a combined list of both + // real-time and serverless benchmarks. By specifying a value for this field, you + // can receive a longer list of benchmarks for the desired endpoint type. + SupportedEndpointType RecommendationJobSupportedEndpointType + // A list of the instance types that are used to generate inferences in real-time. SupportedInstanceTypes []string @@ -11836,6 +11848,12 @@ type RecommendationMetrics struct { // instance. NaN indicates that the value is not available. MemoryUtilization *float32 + // The time it takes to launch new compute resources for a serverless endpoint. + // The time can vary depending on the model size, how long it takes to download the + // model, and the start-up time of the container. NaN indicates that the value is + // not available. + ModelSetupTime *int32 + noSmithyDocumentSerde } @@ -12118,9 +12136,12 @@ type RetryStrategy struct { // Specifies a rolling deployment strategy for updating a SageMaker endpoint. type RollingUpdatePolicy struct { - // Batch size for each rolling step to provision capacity and turn on traffic on - // the new endpoint fleet, and terminate capacity on the old endpoint fleet. Value - // must be between 5% to 50% of the variant's total instance count. + // Specifies the type and size of the endpoint capacity to activate for a + // blue/green deployment, a rolling deployment, or a rollback strategy. You can + // specify your batches as either instance count or the overall percentage or your + // fleet. For a rollback strategy, if you don't specify the fields in this object, + // or if you set the Value to 100%, then SageMaker uses a blue/green rollback + // strategy and rolls all traffic back to the blue fleet. // // This member is required. MaximumBatchSize *CapacitySize @@ -12134,11 +12155,12 @@ type RollingUpdatePolicy struct { // The time limit for the total deployment. Exceeding this limit causes a timeout. MaximumExecutionTimeoutInSeconds *int32 - // Batch size for rollback to the old endpoint fleet. Each rolling step to - // provision capacity and turn on traffic on the old endpoint fleet, and terminate - // capacity on the new endpoint fleet. If this field is absent, the default value - // will be set to 100% of total capacity which means to bring up the whole capacity - // of the old fleet at once during rollback. + // Specifies the type and size of the endpoint capacity to activate for a + // blue/green deployment, a rolling deployment, or a rollback strategy. You can + // specify your batches as either instance count or the overall percentage or your + // fleet. For a rollback strategy, if you don't specify the fields in this object, + // or if you set the Value to 100%, then SageMaker uses a blue/green rollback + // strategy and rolls all traffic back to the blue fleet. RollbackMaximumBatchSize *CapacitySize noSmithyDocumentSerde diff --git a/service/sagemaker/validators.go b/service/sagemaker/validators.go index b8d42b899bf..872495bd58a 100644 --- a/service/sagemaker/validators.go +++ b/service/sagemaker/validators.go @@ -7609,14 +7609,16 @@ func validateEndpointInputConfiguration(v *types.EndpointInputConfiguration) err return nil } invalidParams := smithy.InvalidParamsError{Context: "EndpointInputConfiguration"} - if len(v.InstanceType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("InstanceType")) - } if v.EnvironmentParameterRanges != nil { if err := validateEnvironmentParameterRanges(v.EnvironmentParameterRanges); err != nil { invalidParams.AddNested("EnvironmentParameterRanges", err.(smithy.InvalidParamsError)) } } + if v.ServerlessConfig != nil { + if err := validateProductionVariantServerlessConfig(v.ServerlessConfig); err != nil { + invalidParams.AddNested("ServerlessConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/servicediscovery/internal/endpoints/endpoints.go b/service/servicediscovery/internal/endpoints/endpoints.go index 06eae9d6a0b..4a320d8846d 100644 --- a/service/servicediscovery/internal/endpoints/endpoints.go +++ b/service/servicediscovery/internal/endpoints/endpoints.go @@ -361,33 +361,6 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "servicediscovery.sa-east-1.amazonaws.com", }, - endpoints.EndpointKey{ - Region: "servicediscovery", - }: endpoints.Endpoint{ - CredentialScope: endpoints.CredentialScope{ - Region: "ca-central-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "servicediscovery", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ca-central-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "servicediscovery-fips", - }: endpoints.Endpoint{ - Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ca-central-1", - }, - Deprecated: aws.TrueTernary, - }, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, diff --git a/service/ssmcontacts/internal/endpoints/endpoints.go b/service/ssmcontacts/internal/endpoints/endpoints.go index 4728c7771e7..6b1b93433be 100644 --- a/service/ssmcontacts/internal/endpoints/endpoints.go +++ b/service/ssmcontacts/internal/endpoints/endpoints.go @@ -138,6 +138,116 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "ap-northeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "fips-us-east-1", + }: endpoints.Endpoint{ + Hostname: "ssm-contacts-fips.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-east-2", + }: endpoints.Endpoint{ + Hostname: "ssm-contacts-fips.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-1", + }: endpoints.Endpoint{ + Hostname: "ssm-contacts-fips.us-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-2", + }: endpoints.Endpoint{ + Hostname: "ssm-contacts-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "sa-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-contacts-fips.us-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-contacts-fips.us-east-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-contacts-fips.us-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-contacts-fips.us-west-2.amazonaws.com", + }, + }, }, { ID: "aws-cn", diff --git a/service/storagegateway/internal/endpoints/endpoints.go b/service/storagegateway/internal/endpoints/endpoints.go index 9d4659e93aa..c0a4d7c98c0 100644 --- a/service/storagegateway/internal/endpoints/endpoints.go +++ b/service/storagegateway/internal/endpoints/endpoints.go @@ -214,15 +214,6 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "fips", - }: endpoints.Endpoint{ - Hostname: "storagegateway-fips.ca-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ca-central-1", - }, - Deprecated: aws.TrueTernary, - }, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{},