chore(aws): upgrade aws dependencies

This commit is contained in:
2021-11-24 19:35:20 +01:00
parent 165108d1c3
commit b13ff06b36
229 changed files with 13263 additions and 1613 deletions
+24
View File
@@ -1,3 +1,27 @@
# v1.19.0 (2021-11-12)
* **Feature**: Service clients now support custom endpoints that have an initial URI path defined.
* **Feature**: Updated service to latest API model.
* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature.
# v1.18.0 (2021-11-06)
* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
* **Feature**: Updated service to latest API model.
* **Dependency Update**: Updated to the latest SDK module versions
# v1.17.0 (2021-10-21)
* **Feature**: API client updated
* **Feature**: Updated to latest version
* **Dependency Update**: Updated to the latest SDK module versions
# v1.16.0 (2021-10-11)
* **Feature**: API client updated
* **Dependency Update**: Updated to the latest SDK module versions
# v1.15.0 (2021-09-17)
* **Feature**: Updated API client and endpoints to latest revision.
+36 -1
View File
@@ -10,6 +10,7 @@ import (
"github.com/aws/aws-sdk-go-v2/aws/retry"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
smithy "github.com/aws/smithy-go"
smithydocument "github.com/aws/smithy-go/document"
"github.com/aws/smithy-go/logging"
@@ -133,6 +134,8 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf
fn(&options)
}
finalizeClientEndpointResolverOptions(&options)
for _, fn := range stackFns {
if err := fn(stack, options); err != nil {
return nil, metadata, err
@@ -182,6 +185,8 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
}
resolveAWSRetryerProvider(cfg, &opts)
resolveAWSEndpointResolver(cfg, &opts)
resolveUseDualStackEndpoint(cfg, &opts)
resolveUseFIPSEndpoint(cfg, &opts)
return New(opts, optFns...)
}
@@ -210,7 +215,7 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
if cfg.EndpointResolver == nil {
return
}
o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, NewDefaultEndpointResolver())
o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
}
func addClientUserAgent(stack *middleware.Stack) error {
@@ -259,6 +264,36 @@ func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
return retry.AddRetryMiddlewares(stack, mo)
}
// resolves dual-stack endpoint configuration
func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
if len(cfg.ConfigSources) == 0 {
return nil
}
value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
if err != nil {
return err
}
if found {
o.EndpointOptions.UseDualStackEndpoint = value
}
return nil
}
// resolves FIPS endpoint configuration
func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
if len(cfg.ConfigSources) == 0 {
return nil
}
value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
if err != nil {
return err
}
if found {
o.EndpointOptions.UseFIPSEndpoint = value
}
return nil
}
// IdempotencyTokenProvider interface for providing idempotency token
type IdempotencyTokenProvider interface {
GetIdempotencyToken() (string, error)
@@ -0,0 +1,125 @@
// Code generated by smithy-go-codegen DO NOT EDIT.
package sagemaker
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sagemaker/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This action batch describes a list of versioned model packages
func (c *Client) BatchDescribeModelPackage(ctx context.Context, params *BatchDescribeModelPackageInput, optFns ...func(*Options)) (*BatchDescribeModelPackageOutput, error) {
if params == nil {
params = &BatchDescribeModelPackageInput{}
}
result, metadata, err := c.invokeOperation(ctx, "BatchDescribeModelPackage", params, optFns, c.addOperationBatchDescribeModelPackageMiddlewares)
if err != nil {
return nil, err
}
out := result.(*BatchDescribeModelPackageOutput)
out.ResultMetadata = metadata
return out, nil
}
type BatchDescribeModelPackageInput struct {
// The list of Amazon Resource Name (ARN) of the model package groups.
//
// This member is required.
ModelPackageArnList []string
noSmithyDocumentSerde
}
type BatchDescribeModelPackageOutput struct {
// A map of the resource and BatchDescribeModelPackageError objects reporting the
// error associated with describing the model package.
BatchDescribeModelPackageErrorMap map[string]types.BatchDescribeModelPackageError
// The summaries for the model package versions
ModelPackageSummaries map[string]types.BatchDescribeModelPackageSummary
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationBatchDescribeModelPackageMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchDescribeModelPackage{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchDescribeModelPackage{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpBatchDescribeModelPackageValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDescribeModelPackage(options.Region), middleware.Before); 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
}
return nil
}
func newServiceMetadataMiddleware_opBatchDescribeModelPackage(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "sagemaker",
OperationName: "BatchDescribeModelPackage",
}
}
@@ -104,6 +104,16 @@ type CreateDomainInput struct {
// All Studio traffic is through the specified VPC and subnets
AppNetworkAccessType types.AppNetworkAccessType
// The entity that creates and manages the required security groups for inter-app
// communication in VPCOnly mode. Required when CreateDomain.AppNetworkAccessType
// is VPCOnly and
// DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn is
// provided.
AppSecurityGroupManagement types.AppSecurityGroupManagement
// A collection of Domain settings.
DomainSettings *types.DomainSettings
// This member is deprecated and replaced with KmsKeyId.
//
// Deprecated: This property is deprecated, use KmsKeyId instead.
@@ -54,16 +54,16 @@ import (
// CreateEndpoint and CreateEndpointConfig API operations, add the following
// policies to the role.
//
// * Option 1: For a full Amazon SageMaker access, search
// and attach the AmazonSageMakerFullAccess policy.
// * Option 1: For a full SageMaker access, search and
// attach the AmazonSageMakerFullAccess policy.
//
// * Option 2: For granting a
// limited access to an IAM role, paste the following Action elements manually into
// the JSON file of the IAM role: "Action": ["sagemaker:CreateEndpoint",
// * Option 2: For granting a limited
// access to an IAM role, paste the following Action elements manually into the
// JSON file of the IAM role: "Action": ["sagemaker:CreateEndpoint",
// "sagemaker:CreateEndpointConfig"]"Resource":
// ["arn:aws:sagemaker:region:account-id:endpoint/endpointName""arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName"]
// For more information, see Amazon SageMaker API Permissions: Actions,
// Permissions, and Resources Reference
// For more information, see SageMaker API Permissions: Actions, Permissions, and
// Resources Reference
// (https://docs.aws.amazon.com/sagemaker/latest/dg/api-permissions-reference.html).
func (c *Client) CreateEndpoint(ctx context.Context, params *CreateEndpointInput, optFns ...func(*Options)) (*CreateEndpointOutput, error) {
if params == nil {
@@ -95,6 +95,10 @@ type CreateEndpointInput struct {
// This member is required.
EndpointName *string
// The deployment configuration for an endpoint, which contains the desired
// deployment strategy and rollback configurations.
DeploymentConfig *types.DeploymentConfig
// An array of key-value pairs. You can use tags to categorize your Amazon Web
// Services resources in different ways, for example, by purpose, owner, or
// environment. For more information, see Tagging Amazon Web Services Resources
@@ -100,13 +100,17 @@ type CreateFeatureGroupInput struct {
// OfflineStore.
//
// * A configuration for an Amazon Web Services Glue or Amazon Web
// Services Hive data cataolgue.
// Services Hive data catalog.
//
// * An KMS encryption key to encrypt the Amazon S3
// location used for OfflineStore.
// location used for OfflineStore. If KMS encryption key is not specified, by
// default we encrypt all data at rest using Amazon Web Services KMS key. By
// defining your bucket-level key
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html) for SSE,
// you can reduce Amazon Web Services KMS requests costs by up to 99 percent.
//
// To learn more about this parameter, see
// OfflineStoreConfig.
// To
// learn more about this parameter, see OfflineStoreConfig.
OfflineStoreConfig *types.OfflineStoreConfig
// You can turn the OnlineStore on or off by specifying True for the
@@ -52,6 +52,9 @@ type CreateModelPackageInput struct {
// A unique token that guarantees that the call to this API is idempotent.
ClientToken *string
// The metadata properties associated with the model package versions.
CustomerMetadataProperties map[string]string
// Specifies details about inference jobs that can be run with models based on this
// model package, including the following:
//
@@ -80,8 +83,9 @@ type CreateModelPackageInput struct {
// A description of the model package.
ModelPackageDescription *string
// The name of the model group that this model version belongs to. This parameter
// is required for versioned models, and does not apply to unversioned models.
// The name or Amazon Resource Name (ARN) of the model package group that this
// model version belongs to. This parameter is required for versioned models, and
// does not apply to unversioned models.
ModelPackageGroupName *string
// The name of the model package. The name must have 1 to 63 characters. Valid
@@ -35,7 +35,9 @@ type CreateProjectInput struct {
// This member is required.
ProjectName *string
// The product ID and provisioning artifact ID to provision a service catalog. For
// The product ID and provisioning artifact ID to provision a service catalog. The
// provisioning artifact ID will default to the latest provisioning artifact ID of
// the product, if you don't provide the provisioning artifact ID. For more
// information, see What is Amazon Web Services Service Catalog
// (https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html).
//
@@ -76,7 +76,9 @@ type DescribeAppOutput struct {
// The timestamp of the last health check.
LastHealthCheckTimestamp *time.Time
// The timestamp of the last user's activity.
// The timestamp of the last user's activity. LastUserActivityTimestamp is also
// updated when SageMaker performs health checks without user activity. As a
// result, this value is set to the same value as LastHealthCheckTimestamp.
LastUserActivityTimestamp *time.Time
// The instance type and the Amazon Resource Name (ARN) of the SageMaker image
@@ -63,6 +63,9 @@ type DescribeDeviceOutput struct {
// This member is required.
RegistrationTime *time.Time
// Edge Manager agent version.
AgentVersion *string
// A description of the device.
Description *string
@@ -50,6 +50,13 @@ type DescribeDomainOutput struct {
// All Studio traffic is through the specified VPC and subnets
AppNetworkAccessType types.AppNetworkAccessType
// The entity that creates and manages the required security groups for inter-app
// communication in VPCOnly mode. Required when CreateDomain.AppNetworkAccessType
// is VPCOnly and
// DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn is
// provided.
AppSecurityGroupManagement types.AppSecurityGroupManagement
// The domain's authentication mode.
AuthMode types.AuthMode
@@ -69,6 +76,9 @@ type DescribeDomainOutput struct {
// The domain name.
DomainName *string
// A collection of Domain settings.
DomainSettings *types.DomainSettings
// The failure reason.
FailureReason *string
@@ -87,6 +97,10 @@ type DescribeDomainOutput struct {
// The last modified time.
LastModifiedTime *time.Time
// The ID of the security group that authorizes traffic between the RSessionGateway
// apps and the RStudioServerPro app.
SecurityGroupIdForDomainBoundary *string
// The SSO managed application instance ID.
SingleSignOnManagedApplicationInstanceId *string
@@ -123,6 +123,10 @@ type DescribeEndpointOutput struct {
// The most recent deployment configuration for the endpoint.
LastDeploymentConfig *types.DeploymentConfig
// Returns the summary of an in-progress deployment. This field is only returned
// when the endpoint is creating or updating with a new endpoint configuration.
PendingDeploymentSummary *types.PendingDeploymentSummary
// An array of ProductionVariantSummary objects, one for each model hosted behind
// this endpoint.
ProductionVariants []types.ProductionVariantSummary
@@ -263,8 +267,17 @@ func NewEndpointDeletedWaiter(client DescribeEndpointAPIClient, optFns ...func(*
// maximum wait duration the waiter will wait. The maxWaitDur is required and must
// be greater than zero.
func (w *EndpointDeletedWaiter) Wait(ctx context.Context, params *DescribeEndpointInput, maxWaitDur time.Duration, optFns ...func(*EndpointDeletedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for EndpointDeleted waiter and returns
// the output of the successful operation. The maxWaitDur is the maximum wait
// duration the waiter will wait. The maxWaitDur is required and must be greater
// than zero.
func (w *EndpointDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeEndpointInput, maxWaitDur time.Duration, optFns ...func(*EndpointDeletedWaiterOptions)) (*DescribeEndpointOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -277,7 +290,7 @@ func (w *EndpointDeletedWaiter) Wait(ctx context.Context, params *DescribeEndpoi
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -305,10 +318,10 @@ func (w *EndpointDeletedWaiter) Wait(ctx context.Context, params *DescribeEndpoi
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -321,16 +334,16 @@ func (w *EndpointDeletedWaiter) Wait(ctx context.Context, params *DescribeEndpoi
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for EndpointDeleted waiter")
return nil, fmt.Errorf("exceeded max wait time for EndpointDeleted waiter")
}
func endpointDeletedStateRetryable(ctx context.Context, input *DescribeEndpointInput, output *DescribeEndpointOutput, err error) (bool, error) {
@@ -426,8 +439,17 @@ func NewEndpointInServiceWaiter(client DescribeEndpointAPIClient, optFns ...func
// the maximum wait duration the waiter will wait. The maxWaitDur is required and
// must be greater than zero.
func (w *EndpointInServiceWaiter) Wait(ctx context.Context, params *DescribeEndpointInput, maxWaitDur time.Duration, optFns ...func(*EndpointInServiceWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for EndpointInService waiter and returns
// the output of the successful operation. The maxWaitDur is the maximum wait
// duration the waiter will wait. The maxWaitDur is required and must be greater
// than zero.
func (w *EndpointInServiceWaiter) WaitForOutput(ctx context.Context, params *DescribeEndpointInput, maxWaitDur time.Duration, optFns ...func(*EndpointInServiceWaiterOptions)) (*DescribeEndpointOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -440,7 +462,7 @@ func (w *EndpointInServiceWaiter) Wait(ctx context.Context, params *DescribeEndp
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -468,10 +490,10 @@ func (w *EndpointInServiceWaiter) Wait(ctx context.Context, params *DescribeEndp
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -484,16 +506,16 @@ func (w *EndpointInServiceWaiter) Wait(ctx context.Context, params *DescribeEndp
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for EndpointInService waiter")
return nil, fmt.Errorf("exceeded max wait time for EndpointInService waiter")
}
func endpointInServiceStateRetryable(ctx context.Context, input *DescribeEndpointInput, output *DescribeEndpointOutput, err error) (bool, error) {
@@ -209,8 +209,16 @@ func NewImageCreatedWaiter(client DescribeImageAPIClient, optFns ...func(*ImageC
// maximum wait duration the waiter will wait. The maxWaitDur is required and must
// be greater than zero.
func (w *ImageCreatedWaiter) Wait(ctx context.Context, params *DescribeImageInput, maxWaitDur time.Duration, optFns ...func(*ImageCreatedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for ImageCreated waiter and returns the
// output of the successful operation. The maxWaitDur is the maximum wait duration
// the waiter will wait. The maxWaitDur is required and must be greater than zero.
func (w *ImageCreatedWaiter) WaitForOutput(ctx context.Context, params *DescribeImageInput, maxWaitDur time.Duration, optFns ...func(*ImageCreatedWaiterOptions)) (*DescribeImageOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -223,7 +231,7 @@ func (w *ImageCreatedWaiter) Wait(ctx context.Context, params *DescribeImageInpu
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -251,10 +259,10 @@ func (w *ImageCreatedWaiter) Wait(ctx context.Context, params *DescribeImageInpu
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -267,16 +275,16 @@ func (w *ImageCreatedWaiter) Wait(ctx context.Context, params *DescribeImageInpu
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for ImageCreated waiter")
return nil, fmt.Errorf("exceeded max wait time for ImageCreated waiter")
}
func imageCreatedStateRetryable(ctx context.Context, input *DescribeImageInput, output *DescribeImageOutput, err error) (bool, error) {
@@ -389,8 +397,16 @@ func NewImageDeletedWaiter(client DescribeImageAPIClient, optFns ...func(*ImageD
// maximum wait duration the waiter will wait. The maxWaitDur is required and must
// be greater than zero.
func (w *ImageDeletedWaiter) Wait(ctx context.Context, params *DescribeImageInput, maxWaitDur time.Duration, optFns ...func(*ImageDeletedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for ImageDeleted waiter and returns the
// output of the successful operation. The maxWaitDur is the maximum wait duration
// the waiter will wait. The maxWaitDur is required and must be greater than zero.
func (w *ImageDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeImageInput, maxWaitDur time.Duration, optFns ...func(*ImageDeletedWaiterOptions)) (*DescribeImageOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -403,7 +419,7 @@ func (w *ImageDeletedWaiter) Wait(ctx context.Context, params *DescribeImageInpu
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -431,10 +447,10 @@ func (w *ImageDeletedWaiter) Wait(ctx context.Context, params *DescribeImageInpu
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -447,16 +463,16 @@ func (w *ImageDeletedWaiter) Wait(ctx context.Context, params *DescribeImageInpu
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for ImageDeleted waiter")
return nil, fmt.Errorf("exceeded max wait time for ImageDeleted waiter")
}
func imageDeletedStateRetryable(ctx context.Context, input *DescribeImageInput, output *DescribeImageOutput, err error) (bool, error) {
@@ -564,8 +580,16 @@ func NewImageUpdatedWaiter(client DescribeImageAPIClient, optFns ...func(*ImageU
// maximum wait duration the waiter will wait. The maxWaitDur is required and must
// be greater than zero.
func (w *ImageUpdatedWaiter) Wait(ctx context.Context, params *DescribeImageInput, maxWaitDur time.Duration, optFns ...func(*ImageUpdatedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for ImageUpdated waiter and returns the
// output of the successful operation. The maxWaitDur is the maximum wait duration
// the waiter will wait. The maxWaitDur is required and must be greater than zero.
func (w *ImageUpdatedWaiter) WaitForOutput(ctx context.Context, params *DescribeImageInput, maxWaitDur time.Duration, optFns ...func(*ImageUpdatedWaiterOptions)) (*DescribeImageOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -578,7 +602,7 @@ func (w *ImageUpdatedWaiter) Wait(ctx context.Context, params *DescribeImageInpu
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -606,10 +630,10 @@ func (w *ImageUpdatedWaiter) Wait(ctx context.Context, params *DescribeImageInpu
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -622,16 +646,16 @@ func (w *ImageUpdatedWaiter) Wait(ctx context.Context, params *DescribeImageInpu
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for ImageUpdated waiter")
return nil, fmt.Errorf("exceeded max wait time for ImageUpdated waiter")
}
func imageUpdatedStateRetryable(ctx context.Context, input *DescribeImageInput, output *DescribeImageOutput, err error) (bool, error) {
@@ -213,8 +213,17 @@ func NewImageVersionCreatedWaiter(client DescribeImageVersionAPIClient, optFns .
// the maximum wait duration the waiter will wait. The maxWaitDur is required and
// must be greater than zero.
func (w *ImageVersionCreatedWaiter) Wait(ctx context.Context, params *DescribeImageVersionInput, maxWaitDur time.Duration, optFns ...func(*ImageVersionCreatedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for ImageVersionCreated waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *ImageVersionCreatedWaiter) WaitForOutput(ctx context.Context, params *DescribeImageVersionInput, maxWaitDur time.Duration, optFns ...func(*ImageVersionCreatedWaiterOptions)) (*DescribeImageVersionOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -227,7 +236,7 @@ func (w *ImageVersionCreatedWaiter) Wait(ctx context.Context, params *DescribeIm
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -255,10 +264,10 @@ func (w *ImageVersionCreatedWaiter) Wait(ctx context.Context, params *DescribeIm
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -271,16 +280,16 @@ func (w *ImageVersionCreatedWaiter) Wait(ctx context.Context, params *DescribeIm
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for ImageVersionCreated waiter")
return nil, fmt.Errorf("exceeded max wait time for ImageVersionCreated waiter")
}
func imageVersionCreatedStateRetryable(ctx context.Context, input *DescribeImageVersionInput, output *DescribeImageVersionOutput, err error) (bool, error) {
@@ -394,8 +403,17 @@ func NewImageVersionDeletedWaiter(client DescribeImageVersionAPIClient, optFns .
// the maximum wait duration the waiter will wait. The maxWaitDur is required and
// must be greater than zero.
func (w *ImageVersionDeletedWaiter) Wait(ctx context.Context, params *DescribeImageVersionInput, maxWaitDur time.Duration, optFns ...func(*ImageVersionDeletedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for ImageVersionDeleted waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *ImageVersionDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeImageVersionInput, maxWaitDur time.Duration, optFns ...func(*ImageVersionDeletedWaiterOptions)) (*DescribeImageVersionOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -408,7 +426,7 @@ func (w *ImageVersionDeletedWaiter) Wait(ctx context.Context, params *DescribeIm
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -436,10 +454,10 @@ func (w *ImageVersionDeletedWaiter) Wait(ctx context.Context, params *DescribeIm
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -452,16 +470,16 @@ func (w *ImageVersionDeletedWaiter) Wait(ctx context.Context, params *DescribeIm
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for ImageVersionDeleted waiter")
return nil, fmt.Errorf("exceeded max wait time for ImageVersionDeleted waiter")
}
func imageVersionDeletedStateRetryable(ctx context.Context, input *DescribeImageVersionInput, output *DescribeImageVersionOutput, err error) (bool, error) {
@@ -13,9 +13,9 @@ import (
)
// Returns a description of the specified model package, which is used to create
// Amazon SageMaker models or list them on Amazon Web Services Marketplace. To
// create models in Amazon SageMaker, buyers can subscribe to model packages listed
// on Amazon Web Services Marketplace.
// SageMaker models or list them on Amazon Web Services Marketplace. To create
// models in SageMaker, buyers can subscribe to model packages listed on Amazon Web
// Services Marketplace.
func (c *Client) DescribeModelPackage(ctx context.Context, params *DescribeModelPackageInput, optFns ...func(*Options)) (*DescribeModelPackageOutput, error) {
if params == nil {
params = &DescribeModelPackageInput{}
@@ -81,6 +81,9 @@ type DescribeModelPackageOutput struct {
// component, or project.
CreatedBy *types.UserContext
// The metadata properties associated with the model package versions.
CustomerMetadataProperties map[string]string
// Details about inference jobs that can be run with models based on this model
// package.
InferenceSpecification *types.InferenceSpecification
@@ -114,8 +117,8 @@ type DescribeModelPackageOutput struct {
// Details about the algorithm that was used to create the model package.
SourceAlgorithmSpecification *types.SourceAlgorithmSpecification
// Configurations for one or more transform jobs that Amazon SageMaker runs to test
// the model package.
// Configurations for one or more transform jobs that SageMaker runs to test the
// model package.
ValidationSpecification *types.ModelPackageValidationSpecification
// Metadata pertaining to the operation's result.
@@ -281,8 +281,17 @@ func NewNotebookInstanceDeletedWaiter(client DescribeNotebookInstanceAPIClient,
// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
// required and must be greater than zero.
func (w *NotebookInstanceDeletedWaiter) Wait(ctx context.Context, params *DescribeNotebookInstanceInput, maxWaitDur time.Duration, optFns ...func(*NotebookInstanceDeletedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for NotebookInstanceDeleted waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *NotebookInstanceDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeNotebookInstanceInput, maxWaitDur time.Duration, optFns ...func(*NotebookInstanceDeletedWaiterOptions)) (*DescribeNotebookInstanceOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -295,7 +304,7 @@ func (w *NotebookInstanceDeletedWaiter) Wait(ctx context.Context, params *Descri
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -323,10 +332,10 @@ func (w *NotebookInstanceDeletedWaiter) Wait(ctx context.Context, params *Descri
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -339,16 +348,16 @@ func (w *NotebookInstanceDeletedWaiter) Wait(ctx context.Context, params *Descri
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for NotebookInstanceDeleted waiter")
return nil, fmt.Errorf("exceeded max wait time for NotebookInstanceDeleted waiter")
}
func notebookInstanceDeletedStateRetryable(ctx context.Context, input *DescribeNotebookInstanceInput, output *DescribeNotebookInstanceOutput, err error) (bool, error) {
@@ -447,8 +456,17 @@ func NewNotebookInstanceInServiceWaiter(client DescribeNotebookInstanceAPIClient
// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
// required and must be greater than zero.
func (w *NotebookInstanceInServiceWaiter) Wait(ctx context.Context, params *DescribeNotebookInstanceInput, maxWaitDur time.Duration, optFns ...func(*NotebookInstanceInServiceWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for NotebookInstanceInService waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *NotebookInstanceInServiceWaiter) WaitForOutput(ctx context.Context, params *DescribeNotebookInstanceInput, maxWaitDur time.Duration, optFns ...func(*NotebookInstanceInServiceWaiterOptions)) (*DescribeNotebookInstanceOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -461,7 +479,7 @@ func (w *NotebookInstanceInServiceWaiter) Wait(ctx context.Context, params *Desc
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -489,10 +507,10 @@ func (w *NotebookInstanceInServiceWaiter) Wait(ctx context.Context, params *Desc
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -505,16 +523,16 @@ func (w *NotebookInstanceInServiceWaiter) Wait(ctx context.Context, params *Desc
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for NotebookInstanceInService waiter")
return nil, fmt.Errorf("exceeded max wait time for NotebookInstanceInService waiter")
}
func notebookInstanceInServiceStateRetryable(ctx context.Context, input *DescribeNotebookInstanceInput, output *DescribeNotebookInstanceOutput, err error) (bool, error) {
@@ -617,8 +635,17 @@ func NewNotebookInstanceStoppedWaiter(client DescribeNotebookInstanceAPIClient,
// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
// required and must be greater than zero.
func (w *NotebookInstanceStoppedWaiter) Wait(ctx context.Context, params *DescribeNotebookInstanceInput, maxWaitDur time.Duration, optFns ...func(*NotebookInstanceStoppedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for NotebookInstanceStopped waiter and
// returns the output of the successful operation. The maxWaitDur is the maximum
// wait duration the waiter will wait. The maxWaitDur is required and must be
// greater than zero.
func (w *NotebookInstanceStoppedWaiter) WaitForOutput(ctx context.Context, params *DescribeNotebookInstanceInput, maxWaitDur time.Duration, optFns ...func(*NotebookInstanceStoppedWaiterOptions)) (*DescribeNotebookInstanceOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -631,7 +658,7 @@ func (w *NotebookInstanceStoppedWaiter) Wait(ctx context.Context, params *Descri
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -659,10 +686,10 @@ func (w *NotebookInstanceStoppedWaiter) Wait(ctx context.Context, params *Descri
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -675,16 +702,16 @@ func (w *NotebookInstanceStoppedWaiter) Wait(ctx context.Context, params *Descri
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for NotebookInstanceStopped waiter")
return nil, fmt.Errorf("exceeded max wait time for NotebookInstanceStopped waiter")
}
func notebookInstanceStoppedStateRetryable(ctx context.Context, input *DescribeNotebookInstanceInput, output *DescribeNotebookInstanceOutput, err error) (bool, error) {
@@ -270,8 +270,17 @@ func NewProcessingJobCompletedOrStoppedWaiter(client DescribeProcessingJobAPICli
// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
// required and must be greater than zero.
func (w *ProcessingJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params *DescribeProcessingJobInput, maxWaitDur time.Duration, optFns ...func(*ProcessingJobCompletedOrStoppedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for ProcessingJobCompletedOrStopped
// waiter and returns the output of the successful operation. The maxWaitDur is the
// maximum wait duration the waiter will wait. The maxWaitDur is required and must
// be greater than zero.
func (w *ProcessingJobCompletedOrStoppedWaiter) WaitForOutput(ctx context.Context, params *DescribeProcessingJobInput, maxWaitDur time.Duration, optFns ...func(*ProcessingJobCompletedOrStoppedWaiterOptions)) (*DescribeProcessingJobOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -284,7 +293,7 @@ func (w *ProcessingJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -312,10 +321,10 @@ func (w *ProcessingJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -328,16 +337,16 @@ func (w *ProcessingJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for ProcessingJobCompletedOrStopped waiter")
return nil, fmt.Errorf("exceeded max wait time for ProcessingJobCompletedOrStopped waiter")
}
func processingJobCompletedOrStoppedStateRetryable(ctx context.Context, input *DescribeProcessingJobInput, output *DescribeProcessingJobOutput, err error) (bool, error) {
@@ -76,6 +76,13 @@ type DescribeProjectOutput struct {
// component, or project.
CreatedBy *types.UserContext
// Information about the user who created or modified an experiment, trial, trial
// component, or project.
LastModifiedBy *types.UserContext
// The timestamp when project was last modified.
LastModifiedTime *time.Time
// The description of the project.
ProjectDescription *string
@@ -182,8 +182,8 @@ type DescribeTrainingJobOutput struct {
// The billable time in seconds. Billable time refers to the absolute wall-clock
// time. Multiply BillableTimeInSeconds by the number of instances (InstanceCount)
// in your training cluster to get the total compute time Amazon SageMaker will
// bill you if you run distributed training. The formula is as follows:
// in your training cluster to get the total compute time SageMaker will bill you
// if you run distributed training. The formula is as follows:
// BillableTimeInSeconds * InstanceCount . You can calculate the savings from using
// managed spot training using the formula (1 - BillableTimeInSeconds /
// TrainingTimeInSeconds) * 100. For example, if BillableTimeInSeconds is 100 and
@@ -460,8 +460,17 @@ func NewTrainingJobCompletedOrStoppedWaiter(client DescribeTrainingJobAPIClient,
// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
// required and must be greater than zero.
func (w *TrainingJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params *DescribeTrainingJobInput, maxWaitDur time.Duration, optFns ...func(*TrainingJobCompletedOrStoppedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for TrainingJobCompletedOrStopped waiter
// and returns the output of the successful operation. The maxWaitDur is the
// maximum wait duration the waiter will wait. The maxWaitDur is required and must
// be greater than zero.
func (w *TrainingJobCompletedOrStoppedWaiter) WaitForOutput(ctx context.Context, params *DescribeTrainingJobInput, maxWaitDur time.Duration, optFns ...func(*TrainingJobCompletedOrStoppedWaiterOptions)) (*DescribeTrainingJobOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -474,7 +483,7 @@ func (w *TrainingJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params *
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -502,10 +511,10 @@ func (w *TrainingJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params *
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -518,16 +527,16 @@ func (w *TrainingJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params *
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for TrainingJobCompletedOrStopped waiter")
return nil, fmt.Errorf("exceeded max wait time for TrainingJobCompletedOrStopped waiter")
}
func trainingJobCompletedOrStoppedStateRetryable(ctx context.Context, input *DescribeTrainingJobInput, output *DescribeTrainingJobOutput, err error) (bool, error) {
@@ -294,8 +294,17 @@ func NewTransformJobCompletedOrStoppedWaiter(client DescribeTransformJobAPIClien
// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
// required and must be greater than zero.
func (w *TransformJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params *DescribeTransformJobInput, maxWaitDur time.Duration, optFns ...func(*TransformJobCompletedOrStoppedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for TransformJobCompletedOrStopped
// waiter and returns the output of the successful operation. The maxWaitDur is the
// maximum wait duration the waiter will wait. The maxWaitDur is required and must
// be greater than zero.
func (w *TransformJobCompletedOrStoppedWaiter) WaitForOutput(ctx context.Context, params *DescribeTransformJobInput, maxWaitDur time.Duration, optFns ...func(*TransformJobCompletedOrStoppedWaiterOptions)) (*DescribeTransformJobOutput, error) {
if maxWaitDur <= 0 {
return fmt.Errorf("maximum wait time for waiter must be greater than zero")
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
@@ -308,7 +317,7 @@ func (w *TransformJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params
}
if options.MinDelay > options.MaxDelay {
return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
@@ -336,10 +345,10 @@ func (w *TransformJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return err
return nil, err
}
if !retryable {
return nil
return out, nil
}
remainingTime -= time.Since(start)
@@ -352,16 +361,16 @@ func (w *TransformJobCompletedOrStoppedWaiter) Wait(ctx context.Context, params
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return fmt.Errorf("error computing waiter delay, %w", err)
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return fmt.Errorf("request cancelled while waiting, %w", err)
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return fmt.Errorf("exceeded max wait time for TransformJobCompletedOrStopped waiter")
return nil, fmt.Errorf("exceeded max wait time for TransformJobCompletedOrStopped waiter")
}
func transformJobCompletedOrStoppedStateRetryable(ctx context.Context, input *DescribeTransformJobInput, output *DescribeTransformJobOutput, err error) (bool, error) {
@@ -37,6 +37,9 @@ type UpdateDomainInput struct {
// A collection of settings.
DefaultUserSettings *types.UserSettings
// A collection of DomainSettings configuration values to update.
DomainSettingsForUpdate *types.DomainSettingsForUpdate
noSmithyDocumentSerde
}
@@ -50,7 +50,8 @@ type UpdateEndpointInput struct {
// This member is required.
EndpointName *string
// The deployment configuration for the endpoint to be updated.
// The deployment configuration for an endpoint, which contains the desired
// deployment strategy and rollback configurations.
DeploymentConfig *types.DeploymentConfig
// When you are updating endpoint resources with
@@ -70,6 +71,10 @@ type UpdateEndpointInput struct {
// false.
RetainAllVariantProperties bool
// Specifies whether to reuse the last deployment configuration. The default value
// is false (the configuration is not reused).
RetainDeploymentConfig bool
noSmithyDocumentSerde
}
@@ -29,12 +29,7 @@ func (c *Client) UpdateModelPackage(ctx context.Context, params *UpdateModelPack
type UpdateModelPackageInput struct {
// The approval status of the model.
//
// This member is required.
ModelApprovalStatus types.ModelApprovalStatus
// The Amazon Resource Name (ARN) of the model.
// The Amazon Resource Name (ARN) of the model package.
//
// This member is required.
ModelPackageArn *string
@@ -42,6 +37,15 @@ type UpdateModelPackageInput struct {
// A description for the approval status of the model.
ApprovalDescription *string
// The metadata properties associated with the model package versions.
CustomerMetadataProperties map[string]string
// The metadata properties associated with the model package versions to remove.
CustomerMetadataPropertiesToRemove []string
// The approval status of the model.
ModelApprovalStatus types.ModelApprovalStatus
noSmithyDocumentSerde
}
@@ -0,0 +1,143 @@
// Code generated by smithy-go-codegen DO NOT EDIT.
package sagemaker
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sagemaker/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates a machine learning (ML) project that is created from a template that
// sets up an ML pipeline from training to deploying an approved model. You must
// not update a project that is in use. If you update the
// ServiceCatalogProvisioningUpdateDetails of a project that is active or being
// created, or updated, you may lose resources already created by the project.
func (c *Client) UpdateProject(ctx context.Context, params *UpdateProjectInput, optFns ...func(*Options)) (*UpdateProjectOutput, error) {
if params == nil {
params = &UpdateProjectInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateProject", params, optFns, c.addOperationUpdateProjectMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateProjectOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateProjectInput struct {
// The name of the project.
//
// This member is required.
ProjectName *string
// The description for the project.
ProjectDescription *string
// The product ID and provisioning artifact ID to provision a service catalog. The
// provisioning artifact ID will default to the latest provisioning artifact ID of
// the product, if you don't provide the provisioning artifact ID. For more
// information, see What is Amazon Web Services Service Catalog
// (https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html).
ServiceCatalogProvisioningUpdateDetails *types.ServiceCatalogProvisioningUpdateDetails
// An array of key-value pairs. You can use tags to categorize your Amazon Web
// Services resources in different ways, for example, by purpose, owner, or
// environment. For more information, see Tagging Amazon Web Services Resources
// (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).
Tags []types.Tag
noSmithyDocumentSerde
}
type UpdateProjectOutput struct {
// The Amazon Resource Name (ARN) of the project.
//
// This member is required.
ProjectArn *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateProject{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateProject{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateProjectValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProject(options.Region), middleware.Before); 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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateProject(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "sagemaker",
OperationName: "UpdateProject",
}
}
File diff suppressed because it is too large Load Diff
+49 -9
View File
@@ -12,6 +12,7 @@ import (
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"net/url"
"strings"
)
// EndpointResolverOptions is the service endpoint resolver options
@@ -87,8 +88,11 @@ func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.Ser
return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
}
eo := m.Options
eo.Logger = middleware.GetLogger(ctx)
var endpoint aws.Endpoint
endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options)
endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
if err != nil {
return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
}
@@ -124,7 +128,7 @@ func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
}
type wrappedEndpointResolver struct {
awsResolver aws.EndpointResolver
awsResolver aws.EndpointResolverWithOptions
resolver EndpointResolver
}
@@ -132,7 +136,7 @@ func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options Endpoin
if w.awsResolver == nil {
goto fallback
}
endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region)
endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
if err == nil {
return endpoint, nil
}
@@ -148,13 +152,49 @@ fallback:
return w.resolver.ResolveEndpoint(region, options)
}
// withEndpointResolver returns an EndpointResolver that first delegates endpoint
// resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError
// error, the resolver will use the the provided fallbackResolver for resolution.
// awsResolver and fallbackResolver must not be nil
func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver {
type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
return a(service, region)
}
var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
// fallbackResolver for resolution.
//
// fallbackResolver must not be nil
func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
var resolver aws.EndpointResolverWithOptions
if awsResolverWithOptions != nil {
resolver = awsResolverWithOptions
} else if awsResolver != nil {
resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
}
return &wrappedEndpointResolver{
awsResolver: awsResolver,
awsResolver: resolver,
resolver: fallbackResolver,
}
}
func finalizeClientEndpointResolverOptions(options *Options) {
options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
if len(options.EndpointOptions.ResolvedRegion) == 0 {
const fipsInfix = "-fips-"
const fipsPrefix = "fips-"
const fipsSuffix = "-fips"
if strings.Contains(options.Region, fipsInfix) ||
strings.Contains(options.Region, fipsPrefix) ||
strings.Contains(options.Region, fipsSuffix) {
options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
}
}
}
+4
View File
@@ -1,6 +1,8 @@
{
"dependencies": {
"github.com/aws/aws-sdk-go-v2": "v1.4.0",
"github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
"github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
"github.com/aws/smithy-go": "v1.4.0",
"github.com/jmespath/go-jmespath": "v0.4.0"
},
@@ -9,6 +11,7 @@
"api_op_AddAssociation.go",
"api_op_AddTags.go",
"api_op_AssociateTrialComponent.go",
"api_op_BatchDescribeModelPackage.go",
"api_op_CreateAction.go",
"api_op_CreateAlgorithm.go",
"api_op_CreateApp.go",
@@ -240,6 +243,7 @@
"api_op_UpdateNotebookInstanceLifecycleConfig.go",
"api_op_UpdatePipeline.go",
"api_op_UpdatePipelineExecution.go",
"api_op_UpdateProject.go",
"api_op_UpdateTrainingJob.go",
"api_op_UpdateTrial.go",
"api_op_UpdateTrialComponent.go",
@@ -3,4 +3,4 @@
package sagemaker
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.15.0"
const goModuleVersion = "1.19.0"
@@ -4,13 +4,62 @@ package endpoints
import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/endpoints"
endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
"github.com/aws/smithy-go/logging"
"regexp"
)
// Options is the endpoint resolver configuration options
type Options struct {
// Logger is a logging implementation that log events should be sent to.
Logger logging.Logger
// LogDeprecated indicates that deprecated endpoints should be logged to the
// provided logger.
LogDeprecated bool
// ResolvedRegion is used to override the region to be resolved, rather then the
// using the value passed to the ResolveEndpoint method. This value is used by the
// SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
// name. You must not set this value directly in your application.
ResolvedRegion string
// DisableHTTPS informs the resolver to return an endpoint that does not use the
// HTTPS scheme.
DisableHTTPS bool
// UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
UseDualStackEndpoint aws.DualStackEndpointState
// UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
UseFIPSEndpoint aws.FIPSEndpointState
}
func (o Options) GetResolvedRegion() string {
return o.ResolvedRegion
}
func (o Options) GetDisableHTTPS() bool {
return o.DisableHTTPS
}
func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
return o.UseDualStackEndpoint
}
func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
return o.UseFIPSEndpoint
}
func transformToSharedOptions(options Options) endpoints.Options {
return endpoints.Options{
Logger: options.Logger,
LogDeprecated: options.LogDeprecated,
ResolvedRegion: options.ResolvedRegion,
DisableHTTPS: options.DisableHTTPS,
UseDualStackEndpoint: options.UseDualStackEndpoint,
UseFIPSEndpoint: options.UseFIPSEndpoint,
}
}
// Resolver SageMaker endpoint resolver
@@ -24,9 +73,7 @@ func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws
return endpoint, &aws.MissingRegionError{}
}
opt := endpoints.Options{
DisableHTTPS: options.DisableHTTPS,
}
opt := transformToSharedOptions(options)
return r.partitions.ResolveEndpoint(region, opt)
}
@@ -55,120 +102,333 @@ var partitionRegexp = struct {
var defaultPartitions = endpoints.Partitions{
{
ID: "aws",
Defaults: endpoints.Endpoint{
Hostname: "api.sagemaker.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "api.sagemaker.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api-fips.sagemaker.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "api.sagemaker-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "api.sagemaker.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.Aws,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
"af-south-1": endpoints.Endpoint{},
"ap-east-1": endpoints.Endpoint{},
"ap-northeast-1": endpoints.Endpoint{},
"ap-northeast-2": endpoints.Endpoint{},
"ap-northeast-3": endpoints.Endpoint{},
"ap-south-1": endpoints.Endpoint{},
"ap-southeast-1": endpoints.Endpoint{},
"ap-southeast-2": endpoints.Endpoint{},
"ca-central-1": endpoints.Endpoint{},
"eu-central-1": endpoints.Endpoint{},
"eu-north-1": endpoints.Endpoint{},
"eu-south-1": endpoints.Endpoint{},
"eu-west-1": endpoints.Endpoint{},
"eu-west-2": endpoints.Endpoint{},
"eu-west-3": endpoints.Endpoint{},
"me-south-1": endpoints.Endpoint{},
"sa-east-1": endpoints.Endpoint{},
"us-east-1": endpoints.Endpoint{},
"us-east-1-fips": endpoints.Endpoint{
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-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-south-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: "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-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-east-1-fips",
}: endpoints.Endpoint{
Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-1",
},
Deprecated: aws.TrueTernary,
},
"us-east-2": endpoints.Endpoint{},
"us-east-2-fips": endpoints.Endpoint{
endpoints.EndpointKey{
Region: "us-east-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-east-2-fips",
}: endpoints.Endpoint{
Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-2",
},
Deprecated: aws.TrueTernary,
},
"us-west-1": endpoints.Endpoint{},
"us-west-1-fips": endpoints.Endpoint{
endpoints.EndpointKey{
Region: "us-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-west-1-fips",
}: endpoints.Endpoint{
Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-1",
},
Deprecated: aws.TrueTernary,
},
"us-west-2": endpoints.Endpoint{},
"us-west-2-fips": endpoints.Endpoint{
endpoints.EndpointKey{
Region: "us-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-west-2-fips",
}: endpoints.Endpoint{
Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-2",
},
Deprecated: aws.TrueTernary,
},
},
},
{
ID: "aws-cn",
Defaults: endpoints.Endpoint{
Hostname: "api.sagemaker.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "api.sagemaker.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api.sagemaker-fips.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "api.sagemaker-fips.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "api.sagemaker.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsCn,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
"cn-north-1": endpoints.Endpoint{},
"cn-northwest-1": endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "cn-north-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "cn-northwest-1",
}: endpoints.Endpoint{},
},
},
{
ID: "aws-iso",
Defaults: endpoints.Endpoint{
Hostname: "api.sagemaker.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api.sagemaker-fips.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "api.sagemaker.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIso,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
"us-iso-east-1": endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-iso-east-1",
}: endpoints.Endpoint{},
},
},
{
ID: "aws-iso-b",
Defaults: endpoints.Endpoint{
Hostname: "api.sagemaker.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api.sagemaker-fips.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "api.sagemaker.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoB,
IsRegionalized: true,
},
{
ID: "aws-us-gov",
Defaults: endpoints.Endpoint{
Hostname: "api.sagemaker.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "api.sagemaker.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api-fips.sagemaker.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "api.sagemaker-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "api.sagemaker.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsUsGov,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
"us-gov-west-1": endpoints.Endpoint{},
"us-gov-west-1-fips": endpoints.Endpoint{
endpoints.EndpointKey{
Region: "us-gov-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-gov-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-gov-west-1-fips",
}: endpoints.Endpoint{
Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
Deprecated: aws.TrueTernary,
},
"us-gov-west-1-fips-secondary": endpoints.Endpoint{
endpoints.EndpointKey{
Region: "us-gov-west-1-fips-secondary",
}: endpoints.Endpoint{
Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-gov-west-1-secondary",
}: endpoints.Endpoint{
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-gov-west-1-secondary",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
Deprecated: aws.TrueTernary,
},
},
},
File diff suppressed because it is too large Load Diff
+97 -5
View File
@@ -220,6 +220,24 @@ func (AppNetworkAccessType) Values() []AppNetworkAccessType {
}
}
type AppSecurityGroupManagement string
// Enum values for AppSecurityGroupManagement
const (
AppSecurityGroupManagementService AppSecurityGroupManagement = "Service"
AppSecurityGroupManagementCustomer AppSecurityGroupManagement = "Customer"
)
// Values returns all known values for AppSecurityGroupManagement. 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 (AppSecurityGroupManagement) Values() []AppSecurityGroupManagement {
return []AppSecurityGroupManagement{
"Service",
"Customer",
}
}
type AppSortKey string
// Enum values for AppSortKey
@@ -264,9 +282,11 @@ type AppType string
// Enum values for AppType
const (
AppTypeJupyterServer AppType = "JupyterServer"
AppTypeKernelGateway AppType = "KernelGateway"
AppTypeTensorBoard AppType = "TensorBoard"
AppTypeJupyterServer AppType = "JupyterServer"
AppTypeKernelGateway AppType = "KernelGateway"
AppTypeTensorBoard AppType = "TensorBoard"
AppTypeRStudioServerPro AppType = "RStudioServerPro"
AppTypeRSessionGateway AppType = "RSessionGateway"
)
// Values returns all known values for AppType. Note that this can be expanded in
@@ -277,6 +297,8 @@ func (AppType) Values() []AppType {
"JupyterServer",
"KernelGateway",
"TensorBoard",
"RStudioServerPro",
"RSessionGateway",
}
}
@@ -2985,6 +3007,9 @@ const (
ProjectStatusDeleteInProgress ProjectStatus = "DeleteInProgress"
ProjectStatusDeleteFailed ProjectStatus = "DeleteFailed"
ProjectStatusDeleteCompleted ProjectStatus = "DeleteCompleted"
ProjectStatusUpdateInProgress ProjectStatus = "UpdateInProgress"
ProjectStatusUpdateCompleted ProjectStatus = "UpdateCompleted"
ProjectStatusUpdateFailed ProjectStatus = "UpdateFailed"
)
// Values returns all known values for ProjectStatus. Note that this can be
@@ -2999,6 +3024,9 @@ func (ProjectStatus) Values() []ProjectStatus {
"DeleteInProgress",
"DeleteFailed",
"DeleteCompleted",
"UpdateInProgress",
"UpdateCompleted",
"UpdateFailed",
}
}
@@ -3153,6 +3181,42 @@ func (RootAccess) Values() []RootAccess {
}
}
type RStudioServerProAccessStatus string
// Enum values for RStudioServerProAccessStatus
const (
RStudioServerProAccessStatusEnabled RStudioServerProAccessStatus = "ENABLED"
RStudioServerProAccessStatusDisabled RStudioServerProAccessStatus = "DISABLED"
)
// Values returns all known values for RStudioServerProAccessStatus. 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 (RStudioServerProAccessStatus) Values() []RStudioServerProAccessStatus {
return []RStudioServerProAccessStatus{
"ENABLED",
"DISABLED",
}
}
type RStudioServerProUserGroup string
// Enum values for RStudioServerProUserGroup
const (
RStudioServerProUserGroupAdmin RStudioServerProUserGroup = "R_STUDIO_ADMIN"
RStudioServerProUserGroupUser RStudioServerProUserGroup = "R_STUDIO_USER"
)
// Values returns all known values for RStudioServerProUserGroup. 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 (RStudioServerProUserGroup) Values() []RStudioServerProUserGroup {
return []RStudioServerProUserGroup{
"R_STUDIO_ADMIN",
"R_STUDIO_USER",
}
}
type RuleEvaluationStatus string
// Enum values for RuleEvaluationStatus
@@ -3756,6 +3820,7 @@ type TrafficRoutingConfigType string
const (
TrafficRoutingConfigTypeAllAtOnce TrafficRoutingConfigType = "ALL_AT_ONCE"
TrafficRoutingConfigTypeCanary TrafficRoutingConfigType = "CANARY"
TrafficRoutingConfigTypeLinear TrafficRoutingConfigType = "LINEAR"
)
// Values returns all known values for TrafficRoutingConfigType. Note that this can
@@ -3765,6 +3830,7 @@ func (TrafficRoutingConfigType) Values() []TrafficRoutingConfigType {
return []TrafficRoutingConfigType{
"ALL_AT_ONCE",
"CANARY",
"LINEAR",
}
}
@@ -3772,8 +3838,9 @@ type TrainingInputMode string
// Enum values for TrainingInputMode
const (
TrainingInputModePipe TrainingInputMode = "Pipe"
TrainingInputModeFile TrainingInputMode = "File"
TrainingInputModePipe TrainingInputMode = "Pipe"
TrainingInputModeFile TrainingInputMode = "File"
TrainingInputModeFastfile TrainingInputMode = "FastFile"
)
// Values returns all known values for TrainingInputMode. Note that this can be
@@ -3783,6 +3850,7 @@ func (TrainingInputMode) Values() []TrainingInputMode {
return []TrainingInputMode{
"Pipe",
"File",
"FastFile",
}
}
@@ -4133,3 +4201,27 @@ func (VariantPropertyType) Values() []VariantPropertyType {
"DataCaptureConfig",
}
}
type VariantStatus string
// Enum values for VariantStatus
const (
VariantStatusCreating VariantStatus = "Creating"
VariantStatusUpdating VariantStatus = "Updating"
VariantStatusDeleting VariantStatus = "Deleting"
VariantStatusActivatingTraffic VariantStatus = "ActivatingTraffic"
VariantStatusBaking VariantStatus = "Baking"
)
// Values returns all known values for VariantStatus. 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 (VariantStatus) Values() []VariantStatus {
return []VariantStatus{
"Creating",
"Updating",
"Deleting",
"ActivatingTraffic",
"Baking",
}
}
+457 -104
View File
@@ -69,10 +69,10 @@ type AgentVersion struct {
noSmithyDocumentSerde
}
// This API is not supported.
// An Amazon CloudWatch alarm configured to monitor metrics on an endpoint.
type Alarm struct {
//
// The name of a CloudWatch alarm in your account.
AlarmName *string
noSmithyDocumentSerde
@@ -86,23 +86,28 @@ type Alarm struct {
// (https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html).
type AlgorithmSpecification struct {
// The input mode that the algorithm supports. For the input modes that Amazon
// SageMaker algorithms support, see Algorithms
// (https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). If an algorithm
// supports the File input mode, Amazon SageMaker downloads the training data from
// S3 to the provisioned ML storage Volume, and mounts the directory to docker
// volume for training container. If an algorithm supports the Pipe input mode,
// Amazon SageMaker streams data directly from S3 to the container. In File mode,
// make sure you provision ML storage volume with sufficient capacity to
// accommodate the data download from S3. In addition to the training data, the ML
// storage volume also stores the output model. The algorithm container use ML
// storage volume to also store intermediate information, if any. For distributed
// algorithms using File mode, training data is distributed uniformly, and your
// training duration is predictable if the input data objects size is approximately
// same. Amazon SageMaker does not split the files any further for model training.
// If the object sizes are skewed, training won't be optimal as the data
// distribution is also skewed where one host in a training cluster is overloaded,
// thus becoming bottleneck in training.
// The training input mode that the algorithm supports. For more information about
// input modes, see Algorithms
// (https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). Pipe mode If an
// algorithm supports Pipe mode, Amazon SageMaker streams data directly from Amazon
// S3 to the container. File mode If an algorithm supports File mode, SageMaker
// downloads the training data from S3 to the provisioned ML storage volume, and
// mounts the directory to the Docker volume for the training container. You must
// provision the ML storage volume with sufficient capacity to accommodate the data
// downloaded from S3. In addition to the training data, the ML storage volume also
// stores the output model. The algorithm container uses the ML storage volume to
// also store intermediate information, if any. For distributed algorithms,
// training data is distributed uniformly. Your training duration is predictable if
// the input data objects sizes are approximately the same. SageMaker does not
// split the files any further for model training. If the object sizes are skewed,
// training won't be optimal as the data distribution is also skewed when one host
// in a training cluster is overloaded, thus becoming a bottleneck in training.
// FastFile mode If an algorithm supports FastFile mode, SageMaker streams data
// directly from S3 to the container with no code changes, and provides file system
// access to the data. Users can author their training script to interact with
// these files as if they were stored on disk. FastFile mode works best when the
// data is read sequentially. Augmented manifest files aren't supported. The
// startup time is lower when there are fewer files in the S3 bucket provided.
//
// This member is required.
TrainingInputMode TrainingInputMode
@@ -1583,14 +1588,20 @@ type AutoMLJobArtifacts struct {
// generate.
type AutoMLJobCompletionCriteria struct {
// The maximum runtime, in seconds, an AutoML job has to complete.
// The maximum runtime, in seconds, an AutoML job has to complete. If an AutoML job
// exceeds the maximum runtime, the job is stopped automatically and its processing
// is ended gracefully. The AutoML job identifies the best model whose training was
// completed and marks it as the best-performing model. Any unfinished steps of the
// job, such as automatic one-click Autopilot model deployment, will not be
// completed.
MaxAutoMLJobRuntimeInSeconds *int32
// The maximum number of times a training job is allowed to run.
MaxCandidates *int32
// The maximum time, in seconds, a training job is allowed to run as part of an
// AutoML job.
// The maximum time, in seconds, that each training job is allowed to run as part
// of a hyperparameter tuning job. For more information, see the used by the
// action.
MaxRuntimePerTrainingJobInSeconds *int32
noSmithyDocumentSerde
@@ -1786,15 +1797,74 @@ type AutoMLSecurityConfig struct {
noSmithyDocumentSerde
}
// Currently, the AutoRollbackConfig API is not supported.
// Automatic rollback configuration for handling endpoint deployment failures and
// recovery.
type AutoRollbackConfig struct {
//
// List of CloudWatch alarms in your account that are configured to monitor metrics
// on an endpoint. If any alarms are tripped during a deployment, SageMaker rolls
// back the deployment.
Alarms []Alarm
noSmithyDocumentSerde
}
// The error code and error description associated with the resource.
type BatchDescribeModelPackageError struct {
//
//
// This member is required.
ErrorCode *string
//
//
// This member is required.
ErrorResponse *string
noSmithyDocumentSerde
}
// Provides summary information about the model package.
type BatchDescribeModelPackageSummary struct {
// The creation time of the mortgage package summary.
//
// This member is required.
CreationTime *time.Time
// Defines how to perform inference generation after a training job is run.
//
// This member is required.
InferenceSpecification *InferenceSpecification
// The Amazon Resource Name (ARN) of the model package.
//
// This member is required.
ModelPackageArn *string
// The group name for the model package
//
// This member is required.
ModelPackageGroupName *string
// The status of the mortgage package.
//
// This member is required.
ModelPackageStatus ModelPackageStatus
// The approval status of the model.
ModelApprovalStatus ModelApprovalStatus
// The description of the model package.
ModelPackageDescription *string
// The version number of a versioned model.
ModelPackageVersion *int32
noSmithyDocumentSerde
}
// Contains bias metrics for a model.
type Bias struct {
@@ -1804,18 +1874,27 @@ type Bias struct {
noSmithyDocumentSerde
}
// Currently, the BlueGreenUpdatePolicy API is not supported.
// Update policy for a blue/green deployment. If this update policy is specified,
// SageMaker creates a new fleet during the deployment while maintaining the old
// fleet. SageMaker flips traffic to the new fleet according to the specified
// traffic routing configuration. Only one update policy should be used in the
// deployment configuration. If no update policy is specified, SageMaker uses a
// blue/green deployment strategy with all at once traffic shifting by default.
type BlueGreenUpdatePolicy struct {
//
// Defines the traffic routing strategy to shift traffic from the old fleet to the
// new fleet during an endpoint deployment.
//
// This member is required.
TrafficRoutingConfiguration *TrafficRoutingConfig
//
// Maximum execution timeout for the deployment. Note that the timeout value should
// be larger than the total waiting time specified in TerminationWaitInSeconds and
// WaitIntervalInSeconds.
MaximumExecutionTimeoutInSeconds *int32
//
// Additional waiting time in seconds after the completion of an endpoint
// deployment before terminating the old endpoint fleet. Default is 0.
TerminationWaitInSeconds *int32
noSmithyDocumentSerde
@@ -1870,15 +1949,22 @@ type CandidateProperties struct {
noSmithyDocumentSerde
}
// Currently, the CapacitySize API is not supported.
// Specifies the endpoint capacity to activate for production.
type CapacitySize struct {
// This API is not supported.
// Specifies the endpoint capacity type.
//
// * INSTANCE_COUNT: The endpoint activates
// based on the number of instances.
//
// * CAPACITY_PERCENT: The endpoint activates
// based on the specified percentage of capacity.
//
// This member is required.
Type CapacitySizeType
//
// Defines the capacity size, either as a number of instances or a capacity
// percentage.
//
// This member is required.
Value *int32
@@ -2493,14 +2579,14 @@ type DataProcessing struct {
// join the original input data with the transformed data, set JoinSource to Input.
// You can specify OutputFilter as an additional filter to select a portion of the
// joined dataset and store it in the output file. For JSON or JSONLines objects,
// such as a JSON array, Amazon SageMaker adds the transformed data to the input
// JSON object in an attribute called SageMakerOutput. The joined result for JSON
// must be a key-value pair object. If the input is not a key-value pair object,
// Amazon SageMaker creates a new JSON file. In the new JSON file, and the input
// data is stored under the SageMakerInput key and the results are stored in
// SageMakerOutput. For CSV data, Amazon SageMaker takes each row as a JSON array
// and joins the transformed data with the input by appending each transformed row
// to the end of the input. The joined data has the original input data followed by
// such as a JSON array, SageMaker adds the transformed data to the input JSON
// object in an attribute called SageMakerOutput. The joined result for JSON must
// be a key-value pair object. If the input is not a key-value pair object,
// SageMaker creates a new JSON file. In the new JSON file, and the input data is
// stored under the SageMakerInput key and the results are stored in
// SageMakerOutput. For CSV data, SageMaker takes each row as a JSON array and
// joins the transformed data with the input by appending each transformed row to
// the end of the input. The joined data has the original input data followed by
// the transformed data and the output is a CSV file. For information on how
// joining in applied, see Workflow for Associating Inferences with Input Records
// (https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform-data-processing.html#batch-transform-data-processing-workflow).
@@ -2730,15 +2816,22 @@ type DeployedImage struct {
noSmithyDocumentSerde
}
// Currently, the DeploymentConfig API is not supported.
// The deployment configuration for an endpoint, which contains the desired
// deployment strategy and rollback configurations.
type DeploymentConfig struct {
//
// Update policy for a blue/green deployment. If this update policy is specified,
// SageMaker creates a new fleet during the deployment while maintaining the old
// fleet. SageMaker flips traffic to the new fleet according to the specified
// traffic routing configuration. Only one update policy should be used in the
// deployment configuration. If no update policy is specified, SageMaker uses a
// blue/green deployment strategy with all at once traffic shifting by default.
//
// This member is required.
BlueGreenUpdatePolicy *BlueGreenUpdatePolicy
//
// Automatic rollback configuration for handling endpoint deployment failures and
// recovery.
AutoRollbackConfiguration *AutoRollbackConfig
noSmithyDocumentSerde
@@ -2829,6 +2922,9 @@ type DeviceSummary struct {
// This member is required.
DeviceName *string
// Edge Manager agent version.
AgentVersion *string
// A description of the device.
Description *string
@@ -2878,6 +2974,29 @@ type DomainDetails struct {
noSmithyDocumentSerde
}
// A collection of settings that apply to the SageMaker Domain. These settings are
// specified through the CreateDomain API call.
type DomainSettings struct {
// A collection of settings that configure the RStudioServerPro Domain-level app.
RStudioServerProDomainSettings *RStudioServerProDomainSettings
// The security groups for the Amazon Virtual Private Cloud that the Domain uses
// for communication between Domain-level apps and user apps.
SecurityGroupIds []string
noSmithyDocumentSerde
}
// A collection of Domain configuration settings to update.
type DomainSettingsForUpdate struct {
// A collection of RStudioServerPro Domain-level app settings to update.
RStudioServerProDomainSettingsForUpdate *RStudioServerProDomainSettingsForUpdate
noSmithyDocumentSerde
}
// The model on the edge device.
type EdgeModel struct {
@@ -3172,7 +3291,7 @@ type EndpointInput struct {
// S3 key. Defaults to FullyReplicated
S3DataDistributionType ProcessingS3DataDistributionType
// Whether the Pipe or File is used as the input mode for transfering data for the
// Whether the Pipe or File is used as the input mode for transferring data for the
// monitoring job. Pipe mode is recommended for large datasets. File mode is useful
// for small files that fit in memory. Defaults to File.
S3InputMode ProcessingS3InputMode
@@ -5007,8 +5126,9 @@ type HumanTaskConfig struct {
// * For 3D point cloud
// (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-point-cloud.html) and video
// frame (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-video.html) labeling
// jobs, the maximum is 7 days (604,800 seconds). If you want to change these
// limits, contact Amazon Web Services Support.
// jobs, the maximum is 30 days (2952,000 seconds) for non-AL mode. For most users,
// the maximum is also 30 days. If you want to change these limits, contact Amazon
// Web Services Support.
//
// This member is required.
TaskTimeLimitInSeconds *int32
@@ -5047,8 +5167,8 @@ type HumanTaskConfig struct {
// seconds).
//
// * If you choose a private or vendor workforce, the default value is
// 10 days (864,000 seconds). For most users, the maximum is also 10 days. If you
// want to change this limit, contact Amazon Web Services Support.
// 30 days (2592,000 seconds) for non-AL mode. For most users, the maximum is also
// 30 days. If you want to change this limit, contact Amazon Web Services Support.
TaskAvailabilityLifetimeInSeconds *int32
// Keywords used to describe the task so that workers on Amazon Mechanical Turk can
@@ -5083,16 +5203,28 @@ type HumanTaskUiSummary struct {
// hyperparameter tuning job launches and the metrics to monitor.
type HyperParameterAlgorithmSpecification struct {
// The input mode that the algorithm supports: File or Pipe. In File input mode,
// Amazon SageMaker downloads the training data from Amazon S3 to the storage
// volume that is attached to the training instance and mounts the directory to the
// Docker volume for the training container. In Pipe input mode, Amazon SageMaker
// streams data directly from Amazon S3 to the container. If you specify File mode,
// make sure that you provision the storage volume that is attached to the training
// instance with enough capacity to accommodate the training data downloaded from
// Amazon S3, the model artifacts, and intermediate information. For more
// information about input modes, see Algorithms
// (https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html).
// The training input mode that the algorithm supports. For more information about
// input modes, see Algorithms
// (https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). Pipe mode If an
// algorithm supports Pipe mode, Amazon SageMaker streams data directly from Amazon
// S3 to the container. File mode If an algorithm supports File mode, SageMaker
// downloads the training data from S3 to the provisioned ML storage volume, and
// mounts the directory to the Docker volume for the training container. You must
// provision the ML storage volume with sufficient capacity to accommodate the data
// downloaded from S3. In addition to the training data, the ML storage volume also
// stores the output model. The algorithm container uses the ML storage volume to
// also store intermediate information, if any. For distributed algorithms,
// training data is distributed uniformly. Your training duration is predictable if
// the input data objects sizes are approximately the same. SageMaker does not
// split the files any further for model training. If the object sizes are skewed,
// training won't be optimal as the data distribution is also skewed when one host
// in a training cluster is overloaded, thus becoming a bottleneck in training.
// FastFile mode If an algorithm supports FastFile mode, SageMaker streams data
// directly from S3 to the container with no code changes, and provides file system
// access to the data. Users can author their training script to interact with
// these files as if they were stored on disk. FastFile mode works best when the
// data is read sequentially. Augmented manifest files aren't supported. The
// startup time is lower when there are fewer files in the S3 bucket provided.
//
// This member is required.
TrainingInputMode TrainingInputMode
@@ -6454,7 +6586,7 @@ type MetricsSource struct {
// Provides information about the location that is configured for storing model
// artifacts. Model artifacts are the output that results from training a model,
// and typically consist of trained parameters, a model defintion that describes
// and typically consist of trained parameters, a model definition that describes
// how to compute inferences, and other metadata.
type ModelArtifacts struct {
@@ -6662,6 +6794,9 @@ type ModelPackage struct {
// The time that the model package was created.
CreationTime *time.Time
// The metadata properties for the model package.
CustomerMetadataProperties map[string]string
// Defines how to perform inference generation after a training job is run.
InferenceSpecification *InferenceSpecification
@@ -8255,6 +8390,71 @@ type ParentHyperParameterTuningJob struct {
noSmithyDocumentSerde
}
// The summary of an in-progress deployment when an endpoint is creating or
// updating with a new endpoint configuration.
type PendingDeploymentSummary struct {
// The name of the endpoint configuration used in the deployment.
//
// This member is required.
EndpointConfigName *string
// List of PendingProductionVariantSummary objects.
ProductionVariants []PendingProductionVariantSummary
// The start time of the deployment.
StartTime *time.Time
noSmithyDocumentSerde
}
// The production variant summary for a deployment when an endpoint is creating or
// updating with the CreateEndpoint or UpdateEndpoint operations. Describes the
// VariantStatus , weight and capacity for a production variant associated with an
// endpoint.
type PendingProductionVariantSummary struct {
// The name of the variant.
//
// This member is required.
VariantName *string
// The size of the Elastic Inference (EI) instance to use for the production
// variant. EI instances provide on-demand GPU computing for inference. For more
// information, see Using Elastic Inference in Amazon SageMaker
// (https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html).
AcceleratorType ProductionVariantAcceleratorType
// The number of instances associated with the variant.
CurrentInstanceCount *int32
// The weight associated with the variant.
CurrentWeight *float32
// An array of DeployedImage objects that specify the Amazon EC2 Container Registry
// paths of the inference images deployed on instances of this ProductionVariant.
DeployedImages []DeployedImage
// The number of instances requested in this deployment, as specified in the
// endpoint configuration for the endpoint. The value is taken from the request to
// the CreateEndpointConfig operation.
DesiredInstanceCount *int32
// The requested weight for the variant in this deployment, as specified in the
// endpoint configuration for the endpoint. The value is taken from the request to
// the CreateEndpointConfig operation.
DesiredWeight *float32
// The type of instances associated with the variant.
InstanceType ProductionVariantInstanceType
// The endpoint variant status which describes the current deployment stage status
// or operational status.
VariantStatus []ProductionVariantStatus
noSmithyDocumentSerde
}
// A SageMaker Model Building Pipeline instance.
type Pipeline struct {
@@ -8933,6 +9133,39 @@ type ProductionVariantCoreDumpConfig struct {
noSmithyDocumentSerde
}
// Describes the status of the production variant.
type ProductionVariantStatus struct {
// The endpoint variant status which describes the current deployment stage status
// or operational status.
//
// * Creating: Creating inference resources for the
// production variant.
//
// * Deleting: Terminating inference resources for the
// production variant.
//
// * Updating: Updating capacity for the production
// variant.
//
// * ActivatingTraffic: Turning on traffic for the production variant.
//
// *
// Baking: Waiting period to monitor the CloudWatch alarms in the automatic
// rollback configuration.
//
// This member is required.
Status VariantStatus
// The start time of the current status change.
StartTime *time.Time
// A message that describes the status of the production variant.
StatusMessage *string
noSmithyDocumentSerde
}
// Describes weight and capacities for a production variant associated with an
// endpoint. If you sent a request to the UpdateEndpointWeightsAndCapacities API
// and the endpoint status is Updating, you get different desired and current
@@ -8962,6 +9195,10 @@ type ProductionVariantSummary struct {
// request.
DesiredWeight *float32
// The endpoint variant status which describes the current deployment stage status
// or operational status.
VariantStatus []ProductionVariantStatus
noSmithyDocumentSerde
}
@@ -9083,6 +9320,13 @@ type Project struct {
// A timestamp specifying when the project was created.
CreationTime *time.Time
// Information about the user who created or modified an experiment, trial, trial
// component, or project.
LastModifiedBy *UserContext
// A timestamp container for when the project was last modified.
LastModifiedTime *time.Time
// The Amazon Resource Name (ARN) of the project.
ProjectArn *string
@@ -9658,6 +9902,64 @@ type RetryStrategy struct {
noSmithyDocumentSerde
}
// A collection of settings that apply to an RSessionGateway app.
type RSessionAppSettings struct {
noSmithyDocumentSerde
}
// A collection of settings that configure user interaction with the
// RStudioServerPro app. RStudioServerProAppSettings cannot be updated. The
// RStudioServerPro app must be deleted and a new one created to make any changes.
type RStudioServerProAppSettings struct {
// Indicates whether the current user has access to the RStudioServerPro app.
AccessStatus RStudioServerProAccessStatus
// The level of permissions that the user has within the RStudioServerPro app. This
// value defaults to `User`. The `Admin` value allows the user access to the
// RStudio Administrative Dashboard.
UserGroup RStudioServerProUserGroup
noSmithyDocumentSerde
}
// A collection of settings that configure the RStudioServerPro Domain-level app.
type RStudioServerProDomainSettings struct {
// The ARN of the execution role for the RStudioServerPro Domain-level app.
//
// This member is required.
DomainExecutionRoleArn *string
// Specifies the ARN's of a SageMaker image and SageMaker image version, and the
// instance type that the version runs on.
DefaultResourceSpec *ResourceSpec
// A URL pointing to an RStudio Connect server.
RStudioConnectUrl *string
// A URL pointing to an RStudio Package Manager server.
RStudioPackageManagerUrl *string
noSmithyDocumentSerde
}
// A collection of settings that update the current configuration for the
// RStudioServerPro Domain-level app.
type RStudioServerProDomainSettingsForUpdate struct {
// The execution role for the RStudioServerPro Domain-level app.
//
// This member is required.
DomainExecutionRoleArn *string
// Specifies the ARN's of a SageMaker image and SageMaker image version, and the
// instance type that the version runs on.
DefaultResourceSpec *ResourceSpec
noSmithyDocumentSerde
}
// Describes the S3 data source.
type S3DataSource struct {
@@ -10034,15 +10336,27 @@ type ServiceCatalogProvisioningDetails struct {
// This member is required.
ProductId *string
// The ID of the provisioning artifact.
//
// This member is required.
ProvisioningArtifactId *string
// The path identifier of the product. This value is optional if the product has a
// default path, and required if the product has more than one path.
PathId *string
// The ID of the provisioning artifact.
ProvisioningArtifactId *string
// A list of key value pairs that you specify when you provision a product.
ProvisioningParameters []ProvisioningParameter
noSmithyDocumentSerde
}
// Details that you specify to provision a service catalog product. For information
// about service catalog, see What is Amazon Web Services Service Catalog
// (https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html).
type ServiceCatalogProvisioningUpdateDetails struct {
// The ID of the provisioning artifact.
ProvisioningArtifactId *string
// A list of key value pairs that you specify when you provision a product.
ProvisioningParameters []ProvisioningParameter
@@ -10143,22 +10457,22 @@ type SourceIpConfig struct {
noSmithyDocumentSerde
}
// Specifies a limit to how long a model training job, model compilation job, or
// hyperparameter tuning job can run. It also specifies how long a managed Spot
// training job has to complete. When the job reaches the time limit, Amazon
// SageMaker ends the training or compilation job. Use this API to cap model
// training costs. To stop a training job, Amazon SageMaker sends the algorithm the
// SIGTERM signal, which delays job termination for 120 seconds. Algorithms can use
// this 120-second window to save the model artifacts, so the results of training
// are not lost. The training algorithms provided by Amazon SageMaker automatically
// save the intermediate results of a model training job when possible. This
// attempt to save artifacts is only a best effort case as model might not be in a
// state from which it can be saved. For example, if training has just started, the
// model might not be ready to save. When saved, this intermediate data is a valid
// model artifact. You can use it to create a model with CreateModel. The Neural
// Topic Model (NTM) currently does not support saving intermediate model
// artifacts. When training NTMs, make sure that the maximum runtime is sufficient
// for the training job to complete.
// Specifies a limit to how long a model training job or model compilation job can
// run. It also specifies how long a managed spot training job has to complete.
// When the job reaches the time limit, Amazon SageMaker ends the training or
// compilation job. Use this API to cap model training costs. To stop a training
// job, Amazon SageMaker sends the algorithm the SIGTERM signal, which delays job
// termination for 120 seconds. Algorithms can use this 120-second window to save
// the model artifacts, so the results of training are not lost. The training
// algorithms provided by Amazon SageMaker automatically save the intermediate
// results of a model training job when possible. This attempt to save artifacts is
// only a best effort case as model might not be in a state from which it can be
// saved. For example, if training has just started, the model might not be ready
// to save. When saved, this intermediate data is a valid model artifact. You can
// use it to create a model with CreateModel. The Neural Topic Model (NTM)
// currently does not support saving intermediate model artifacts. When training
// NTMs, make sure that the maximum runtime is sufficient for the training job to
// complete.
type StoppingCondition struct {
// The maximum length of time, in seconds, that a training or compilation job can
@@ -10240,12 +10554,12 @@ type SuggestionQuery struct {
}
// A tag object that consists of a key and an optional value, used to manage
// metadata for Amazon SageMaker Amazon Web Services resources. You can add tags to
// metadata for SageMaker Amazon Web Services resources. You can add tags to
// notebook instances, training jobs, hyperparameter tuning jobs, batch transform
// jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints.
// For more information on adding tags to Amazon SageMaker resources, see AddTags.
// For more information on adding metadata to your Amazon Web Services resources
// with tagging, see Tagging Amazon Web Services resources
// For more information on adding tags to SageMaker resources, see AddTags. For
// more information on adding metadata to your Amazon Web Services resources with
// tagging, see Tagging Amazon Web Services resources
// (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). For advice on
// best practices for managing Amazon Web Services resources with tagging, see
// Tagging Best Practices: Implement an Effective Amazon Web Services Resource
@@ -10341,22 +10655,39 @@ type TensorBoardOutputConfig struct {
noSmithyDocumentSerde
}
// Currently, the TrafficRoutingConfig API is not supported.
// Defines the traffic routing strategy during an endpoint deployment to shift
// traffic from the old fleet to the new fleet.
type TrafficRoutingConfig struct {
// Traffic routing strategy type.
//
// * ALL_AT_ONCE: Endpoint traffic shifts to the
// new fleet in a single step.
//
// * CANARY: Endpoint traffic shifts to the new fleet
// in two steps. The first step is the canary, which is a small portion of the
// traffic. The second step is the remainder of the traffic.
//
// * LINEAR: Endpoint
// traffic shifts to the new fleet in n steps of a configurable size.
//
// This member is required.
Type TrafficRoutingConfigType
//
// The waiting time (in seconds) between incremental steps to turn on traffic on
// the new endpoint fleet.
//
// This member is required.
WaitIntervalInSeconds *int32
//
// Batch size for the first step to turn on traffic on the new endpoint fleet.
// Value must be less than or equal to 50% of the variant's total instance count.
CanarySize *CapacitySize
// Batch size for each step to turn on traffic on the new endpoint fleet. Value
// must be 10-50% of the variant's total instance count.
LinearStepSize *CapacitySize
noSmithyDocumentSerde
}
@@ -10623,13 +10954,28 @@ type TrainingJobDefinition struct {
// This member is required.
StoppingCondition *StoppingCondition
// The input mode used by the algorithm for the training job. For the input modes
// that Amazon SageMaker algorithms support, see Algorithms
// (https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). If an algorithm
// supports the File input mode, Amazon SageMaker downloads the training data from
// S3 to the provisioned ML storage Volume, and mounts the directory to docker
// volume for training container. If an algorithm supports the Pipe input mode,
// Amazon SageMaker streams data directly from S3 to the container.
// The training input mode that the algorithm supports. For more information about
// input modes, see Algorithms
// (https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). Pipe mode If an
// algorithm supports Pipe mode, Amazon SageMaker streams data directly from Amazon
// S3 to the container. File mode If an algorithm supports File mode, SageMaker
// downloads the training data from S3 to the provisioned ML storage volume, and
// mounts the directory to the Docker volume for the training container. You must
// provision the ML storage volume with sufficient capacity to accommodate the data
// downloaded from S3. In addition to the training data, the ML storage volume also
// stores the output model. The algorithm container uses the ML storage volume to
// also store intermediate information, if any. For distributed algorithms,
// training data is distributed uniformly. Your training duration is predictable if
// the input data objects sizes are approximately the same. SageMaker does not
// split the files any further for model training. If the object sizes are skewed,
// training won't be optimal as the data distribution is also skewed when one host
// in a training cluster is overloaded, thus becoming a bottleneck in training.
// FastFile mode If an algorithm supports FastFile mode, SageMaker streams data
// directly from S3 to the container with no code changes, and provides file system
// access to the data. Users can author their training script to interact with
// these files as if they were stored on disk. FastFile mode works best when the
// data is read sequentially. Augmented manifest files aren't supported. The
// startup time is lower when there are fewer files in the S3 bucket provided.
//
// This member is required.
TrainingInputMode TrainingInputMode
@@ -11346,22 +11692,12 @@ type TrialComponentMetricSummary struct {
// specified. This object is specified in the CreateTrialComponent request.
//
// The following types satisfy this interface:
// TrialComponentParameterValueMemberStringValue
// TrialComponentParameterValueMemberNumberValue
// TrialComponentParameterValueMemberStringValue
type TrialComponentParameterValue interface {
isTrialComponentParameterValue()
}
// The string value of a categorical hyperparameter. If you specify a value for
// this parameter, you can't specify the NumberValue parameter.
type TrialComponentParameterValueMemberStringValue struct {
Value string
noSmithyDocumentSerde
}
func (*TrialComponentParameterValueMemberStringValue) isTrialComponentParameterValue() {}
// The numeric value of a numeric hyperparameter. If you specify a value for this
// parameter, you can't specify the StringValue parameter.
type TrialComponentParameterValueMemberNumberValue struct {
@@ -11372,6 +11708,16 @@ type TrialComponentParameterValueMemberNumberValue struct {
func (*TrialComponentParameterValueMemberNumberValue) isTrialComponentParameterValue() {}
// The string value of a categorical hyperparameter. If you specify a value for
// this parameter, you can't specify the NumberValue parameter.
type TrialComponentParameterValueMemberStringValue struct {
Value string
noSmithyDocumentSerde
}
func (*TrialComponentParameterValueMemberStringValue) isTrialComponentParameterValue() {}
// A short summary of a trial component.
type TrialComponentSimpleSummary struct {
@@ -11702,6 +12048,13 @@ type UserSettings struct {
// The kernel gateway app settings.
KernelGatewayAppSettings *KernelGatewayAppSettings
// A collection of settings that configure the RSessionGateway app.
RSessionAppSettings *RSessionAppSettings
// A collection of settings that configure user interaction with the
// RStudioServerPro app.
RStudioServerProAppSettings *RStudioServerProAppSettings
// The security groups for the Amazon Virtual Private Cloud (VPC) that Studio uses
// for communication. Optional when the CreateDomain.AppNetworkAccessType parameter
// is set to PublicInternetOnly. Required when the
+167 -6
View File
@@ -70,6 +70,26 @@ func (m *validateOpAssociateTrialComponent) HandleInitialize(ctx context.Context
return next.HandleInitialize(ctx, in)
}
type validateOpBatchDescribeModelPackage struct {
}
func (*validateOpBatchDescribeModelPackage) ID() string {
return "OperationInputValidation"
}
func (m *validateOpBatchDescribeModelPackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*BatchDescribeModelPackageInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpBatchDescribeModelPackageInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateAction struct {
}
@@ -3690,6 +3710,26 @@ func (m *validateOpUpdatePipeline) HandleInitialize(ctx context.Context, in midd
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateProject struct {
}
func (*validateOpUpdateProject) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateProjectInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateProjectInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateTrainingJob struct {
}
@@ -3822,6 +3862,10 @@ func addOpAssociateTrialComponentValidationMiddleware(stack *middleware.Stack) e
return stack.Initialize.Add(&validateOpAssociateTrialComponent{}, middleware.After)
}
func addOpBatchDescribeModelPackageValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpBatchDescribeModelPackage{}, middleware.After)
}
func addOpCreateActionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateAction{}, middleware.After)
}
@@ -4546,6 +4590,10 @@ func addOpUpdatePipelineValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdatePipeline{}, middleware.After)
}
func addOpUpdateProjectValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateProject{}, middleware.After)
}
func addOpUpdateTrainingJobValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateTrainingJob{}, middleware.After)
}
@@ -5609,6 +5657,40 @@ func validateDevices(v []types.Device) error {
}
}
func validateDomainSettings(v *types.DomainSettings) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DomainSettings"}
if v.RStudioServerProDomainSettings != nil {
if err := validateRStudioServerProDomainSettings(v.RStudioServerProDomainSettings); err != nil {
invalidParams.AddNested("RStudioServerProDomainSettings", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateDomainSettingsForUpdate(v *types.DomainSettingsForUpdate) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DomainSettingsForUpdate"}
if v.RStudioServerProDomainSettingsForUpdate != nil {
if err := validateRStudioServerProDomainSettingsForUpdate(v.RStudioServerProDomainSettingsForUpdate); err != nil {
invalidParams.AddNested("RStudioServerProDomainSettingsForUpdate", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateEdgeOutputConfig(v *types.EdgeOutputConfig) error {
if v == nil {
return nil
@@ -7808,6 +7890,36 @@ func validateRetryStrategy(v *types.RetryStrategy) error {
}
}
func validateRStudioServerProDomainSettings(v *types.RStudioServerProDomainSettings) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RStudioServerProDomainSettings"}
if v.DomainExecutionRoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("DomainExecutionRoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateRStudioServerProDomainSettingsForUpdate(v *types.RStudioServerProDomainSettingsForUpdate) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RStudioServerProDomainSettingsForUpdate"}
if v.DomainExecutionRoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("DomainExecutionRoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateS3DataSource(v *types.S3DataSource) error {
if v == nil {
return nil
@@ -7908,9 +8020,6 @@ func validateServiceCatalogProvisioningDetails(v *types.ServiceCatalogProvisioni
if v.ProductId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ProductId"))
}
if v.ProvisioningArtifactId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ProvisioningArtifactId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
@@ -8097,6 +8206,11 @@ func validateTrafficRoutingConfig(v *types.TrafficRoutingConfig) error {
invalidParams.AddNested("CanarySize", err.(smithy.InvalidParamsError))
}
}
if v.LinearStepSize != nil {
if err := validateCapacitySize(v.LinearStepSize); err != nil {
invalidParams.AddNested("LinearStepSize", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
@@ -8493,6 +8607,21 @@ func validateOpAssociateTrialComponentInput(v *AssociateTrialComponentInput) err
}
}
func validateOpBatchDescribeModelPackageInput(v *BatchDescribeModelPackageInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BatchDescribeModelPackageInput"}
if v.ModelPackageArnList == nil {
invalidParams.Add(smithy.NewErrParamRequired("ModelPackageArnList"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateActionInput(v *CreateActionInput) error {
if v == nil {
return nil
@@ -8907,6 +9036,11 @@ func validateOpCreateDomainInput(v *CreateDomainInput) error {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if v.DomainSettings != nil {
if err := validateDomainSettings(v.DomainSettings); err != nil {
invalidParams.AddNested("DomainSettings", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
@@ -9001,6 +9135,11 @@ func validateOpCreateEndpointInput(v *CreateEndpointInput) error {
if v.EndpointConfigName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndpointConfigName"))
}
if v.DeploymentConfig != nil {
if err := validateDeploymentConfig(v.DeploymentConfig); err != nil {
invalidParams.AddNested("DeploymentConfig", err.(smithy.InvalidParamsError))
}
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
@@ -12094,6 +12233,11 @@ func validateOpUpdateDomainInput(v *UpdateDomainInput) error {
invalidParams.AddNested("DefaultUserSettings", err.(smithy.InvalidParamsError))
}
}
if v.DomainSettingsForUpdate != nil {
if err := validateDomainSettingsForUpdate(v.DomainSettingsForUpdate); err != nil {
invalidParams.AddNested("DomainSettingsForUpdate", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
@@ -12189,9 +12333,6 @@ func validateOpUpdateModelPackageInput(v *UpdateModelPackageInput) error {
if v.ModelPackageArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("ModelPackageArn"))
}
if len(v.ModelApprovalStatus) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ModelApprovalStatus"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
@@ -12281,6 +12422,26 @@ func validateOpUpdatePipelineInput(v *UpdatePipelineInput) error {
}
}
func validateOpUpdateProjectInput(v *UpdateProjectInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateProjectInput"}
if v.ProjectName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ProjectName"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateTrainingJobInput(v *UpdateTrainingJobInput) error {
if v == nil {
return nil