diff --git a/.changelog/15760c550096411c84baead105f1a5bd.json b/.changelog/15760c550096411c84baead105f1a5bd.json new file mode 100644 index 00000000000..057cbabc4a2 --- /dev/null +++ b/.changelog/15760c550096411c84baead105f1a5bd.json @@ -0,0 +1,8 @@ +{ + "id": "15760c55-0096-411c-84ba-ead105f1a5bd", + "type": "feature", + "description": "Release new API GetExternalDataViewAccessDetails", + "modules": [ + "service/finspacedata" + ] +} \ No newline at end of file diff --git a/.changelog/2cf0418d82d44ce1b8c4b04225df24bf.json b/.changelog/2cf0418d82d44ce1b8c4b04225df24bf.json new file mode 100644 index 00000000000..8e16ce18ced --- /dev/null +++ b/.changelog/2cf0418d82d44ce1b8c4b04225df24bf.json @@ -0,0 +1,8 @@ +{ + "id": "2cf0418d-82d4-4ce1-b8c4-b04225df24bf", + "type": "feature", + "description": "This release adds a new spread placement group to EC2 Placement Groups: host level spread, which spread instances between physical hosts, available to Outpost customers only. CreatePlacementGroup and DescribePlacementGroups APIs were updated with a new parameter: SpreadLevel to support this feature.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/3987b66a64e8448fb31c658e3286d63d.json b/.changelog/3987b66a64e8448fb31c658e3286d63d.json new file mode 100644 index 00000000000..24309446471 --- /dev/null +++ b/.changelog/3987b66a64e8448fb31c658e3286d63d.json @@ -0,0 +1,8 @@ +{ + "id": "3987b66a-64e8-448f-b31c-658e3286d63d", + "type": "feature", + "description": "AWS DataSync now supports Amazon FSx for NetApp ONTAP locations.", + "modules": [ + "service/datasync" + ] +} \ No newline at end of file diff --git a/.changelog/ce925975fb8a40db9479af03da181be2.json b/.changelog/ce925975fb8a40db9479af03da181be2.json new file mode 100644 index 00000000000..a59b28b2fc1 --- /dev/null +++ b/.changelog/ce925975fb8a40db9479af03da181be2.json @@ -0,0 +1,8 @@ +{ + "id": "ce925975-fb8a-40db-9479-af03da181be2", + "type": "feature", + "description": "Add 4 new neural voices - Pedro (es-US), Liam (fr-CA), Daniel (de-DE) and Arthur (en-GB).", + "modules": [ + "service/polly" + ] +} \ No newline at end of file diff --git a/service/datasync/api_op_CreateLocationEfs.go b/service/datasync/api_op_CreateLocationEfs.go index 83c7822bb61..51fa095d25b 100644 --- a/service/datasync/api_op_CreateLocationEfs.go +++ b/service/datasync/api_op_CreateLocationEfs.go @@ -51,10 +51,10 @@ type CreateLocationEfsInput struct { // when mounting the Amazon EFS file system. FileSystemAccessRoleArn *string - // Specifies whether you want DataSync to use TLS encryption when transferring data - // to or from your Amazon EFS file system. If you specify an access point using - // AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this - // parameter to TLS1_2. + // Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 + // encryption when it copies data to or from the Amazon EFS file system. If you + // specify an access point using AccessPointArn or an IAM role using + // FileSystemAccessRoleArn, you must set this parameter to TLS1_2. InTransitEncryption types.EfsInTransitEncryption // Specifies a mount path for your Amazon EFS file system. This is where DataSync diff --git a/service/datasync/api_op_CreateLocationFsxOntap.go b/service/datasync/api_op_CreateLocationFsxOntap.go new file mode 100644 index 00000000000..0ad50a31b44 --- /dev/null +++ b/service/datasync/api_op_CreateLocationFsxOntap.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datasync + +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/datasync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an endpoint for an Amazon FSx for NetApp ONTAP file system that DataSync +// can access for a transfer. For more information, see Creating a location for FSx +// for ONTAP +// (https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html). +func (c *Client) CreateLocationFsxOntap(ctx context.Context, params *CreateLocationFsxOntapInput, optFns ...func(*Options)) (*CreateLocationFsxOntapOutput, error) { + if params == nil { + params = &CreateLocationFsxOntapInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLocationFsxOntap", params, optFns, c.addOperationCreateLocationFsxOntapMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLocationFsxOntapOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLocationFsxOntapInput struct { + + // Specifies the data transfer protocol that DataSync uses to access your Amazon + // FSx file system. + // + // This member is required. + Protocol *types.FsxProtocol + + // Specifies the security groups that DataSync can use to access your FSx for ONTAP + // file system. You must configure the security groups to allow outbound traffic on + // the following ports (depending on the protocol that you're using): + // + // * Network + // File System (NFS): TCP port 2049 + // + // * Server Message Block (SMB): TCP port + // 445 + // + // Your file system's security groups must also allow inbound traffic on the + // same port. + // + // This member is required. + SecurityGroupArns []string + + // Specifies the ARN of the storage virtual machine (SVM) on your file system where + // you're copying data to or from. + // + // This member is required. + StorageVirtualMachineArn *string + + // Specifies the junction path (also known as a mount point) in the SVM volume + // where you're copying data to or from (for example, /vol1). Don't specify a + // junction path in the SVM's root volume. For more information, see Managing FSx + // for ONTAP storage virtual machines + // (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html) in the + // Amazon FSx for NetApp ONTAP User Guide. + Subdirectory *string + + // Specifies labels that help you categorize, filter, and search for your Amazon + // Web Services resources. We recommend creating at least a name tag for your + // location. + Tags []types.TagListEntry + + noSmithyDocumentSerde +} + +type CreateLocationFsxOntapOutput struct { + + // Specifies the ARN of the FSx for ONTAP file system location that you create. + LocationArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLocationFsxOntapMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateLocationFsxOntap{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateLocationFsxOntap{}, 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 = addOpCreateLocationFsxOntapValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLocationFsxOntap(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_opCreateLocationFsxOntap(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "datasync", + OperationName: "CreateLocationFsxOntap", + } +} diff --git a/service/datasync/api_op_CreateLocationObjectStorage.go b/service/datasync/api_op_CreateLocationObjectStorage.go index 8e885aa58ea..32664585151 100644 --- a/service/datasync/api_op_CreateLocationObjectStorage.go +++ b/service/datasync/api_op_CreateLocationObjectStorage.go @@ -11,9 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates an endpoint for a self-managed object storage bucket. For more -// information about self-managed object storage locations, see Creating a location -// for object storage +// Creates an endpoint for an object storage system that DataSync can access for a +// transfer. For more information, see Creating a location for object storage // (https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html). func (c *Client) CreateLocationObjectStorage(ctx context.Context, params *CreateLocationObjectStorageInput, optFns ...func(*Options)) (*CreateLocationObjectStorageOutput, error) { if params == nil { @@ -33,54 +32,46 @@ func (c *Client) CreateLocationObjectStorage(ctx context.Context, params *Create // CreateLocationObjectStorageRequest type CreateLocationObjectStorageInput struct { - // The Amazon Resource Name (ARN) of the agents associated with the self-managed - // object storage server location. + // Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can + // securely connect with your location. // // This member is required. AgentArns []string - // The bucket on the self-managed object storage server that is used to read data - // from. + // Specifies the name of the object storage bucket involved in the transfer. // // This member is required. BucketName *string - // The name of the self-managed object storage server. This value is the IP address - // or Domain Name Service (DNS) name of the object storage server. An agent uses - // this hostname to mount the object storage server in a network. + // Specifies the domain name or IP address of the object storage server. A DataSync + // agent uses this hostname to mount the object storage server in a network. // // This member is required. ServerHostname *string - // Optional. The access key is used if credentials are required to access the - // self-managed object storage server. If your object storage requires a user name - // and password to authenticate, use AccessKey and SecretKey to provide the user - // name and password, respectively. + // Specifies the access key (for example, a user name) if credentials are required + // to authenticate with the object storage server. AccessKey *string - // Optional. The secret key is used if credentials are required to access the - // self-managed object storage server. If your object storage requires a user name - // and password to authenticate, use AccessKey and SecretKey to provide the user - // name and password, respectively. + // Specifies the secret key (for example, a password) if credentials are required + // to authenticate with the object storage server. SecretKey *string - // The port that your self-managed object storage server accepts inbound network - // traffic on. The server port is set by default to TCP 80 (HTTP) or TCP 443 - // (HTTPS). You can specify a custom port if your self-managed object storage - // server requires one. + // Specifies the port that your object storage server accepts inbound network + // traffic on (for example, port 443). ServerPort *int32 - // The protocol that the object storage server uses to communicate. Valid values - // are HTTP or HTTPS. + // Specifies the protocol that your object storage server uses to communicate. ServerProtocol types.ObjectStorageServerProtocol - // The subdirectory in the self-managed object storage server that is used to read - // data from. + // Specifies the object prefix for your object storage server. If this is a source + // location, DataSync only copies objects with this prefix. If this is a + // destination location, DataSync writes all objects with this prefix. Subdirectory *string - // The key-value pair that represents the tag that you want to add to the location. - // The value can be an empty string. We recommend using tags to name your - // resources. + // Specifies the key-value pair that represents a tag that you want to add to the + // resource. Tags can help you manage, filter, and search for your resources. We + // recommend creating a name tag for your location. Tags []types.TagListEntry noSmithyDocumentSerde @@ -89,8 +80,7 @@ type CreateLocationObjectStorageInput struct { // CreateLocationObjectStorageResponse type CreateLocationObjectStorageOutput struct { - // The Amazon Resource Name (ARN) of the agents associated with the self-managed - // object storage server location. + // Specifies the ARN of the object storage system location that you create. LocationArn *string // Metadata pertaining to the operation's result. diff --git a/service/datasync/api_op_CreateLocationSmb.go b/service/datasync/api_op_CreateLocationSmb.go index 600e6ffb78a..5fcfbb11e21 100644 --- a/service/datasync/api_op_CreateLocationSmb.go +++ b/service/datasync/api_op_CreateLocationSmb.go @@ -70,7 +70,8 @@ type CreateLocationSmbInput struct { // The user who can mount the share, has the permissions to access files and // folders in the SMB share. For information about choosing a user name that - // ensures sufficient permissions to files, folders, and metadata, see user. + // ensures sufficient permissions to files, folders, and metadata, see the User + // setting for SMB locations. // // This member is required. User *string diff --git a/service/datasync/api_op_DescribeLocationEfs.go b/service/datasync/api_op_DescribeLocationEfs.go index 2f6b0697de2..44c859f8165 100644 --- a/service/datasync/api_op_DescribeLocationEfs.go +++ b/service/datasync/api_op_DescribeLocationEfs.go @@ -58,8 +58,8 @@ type DescribeLocationEfsOutput struct { // mounting the Amazon EFS file system. FileSystemAccessRoleArn *string - // Whether DataSync uses TLS encryption when transferring data to or from your - // Amazon EFS file system. + // Describes whether DataSync uses Transport Layer Security (TLS) encryption when + // copying data to or from the Amazon EFS file system. InTransitEncryption types.EfsInTransitEncryption // The ARN of the Amazon EFS file system location. diff --git a/service/datasync/api_op_DescribeLocationFsxOntap.go b/service/datasync/api_op_DescribeLocationFsxOntap.go new file mode 100644 index 00000000000..8ad8e139d35 --- /dev/null +++ b/service/datasync/api_op_DescribeLocationFsxOntap.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package datasync + +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/datasync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Provides details about how an DataSync location for an Amazon FSx for NetApp +// ONTAP file system is configured. +func (c *Client) DescribeLocationFsxOntap(ctx context.Context, params *DescribeLocationFsxOntapInput, optFns ...func(*Options)) (*DescribeLocationFsxOntapOutput, error) { + if params == nil { + params = &DescribeLocationFsxOntapInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeLocationFsxOntap", params, optFns, c.addOperationDescribeLocationFsxOntapMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeLocationFsxOntapOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeLocationFsxOntapInput struct { + + // Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP file system + // location that you want information about. + // + // This member is required. + LocationArn *string + + noSmithyDocumentSerde +} + +type DescribeLocationFsxOntapOutput struct { + + // The time that the location was created. + CreationTime *time.Time + + // The ARN of the FSx for ONTAP file system. + FsxFilesystemArn *string + + // The ARN of the FSx for ONTAP file system location. + LocationArn *string + + // The uniform resource identifier (URI) of the FSx for ONTAP file system location. + LocationUri *string + + // Specifies the data transfer protocol that DataSync uses to access your Amazon + // FSx file system. + Protocol *types.FsxProtocol + + // The security groups that DataSync uses to access your FSx for ONTAP file system. + SecurityGroupArns []string + + // The ARN of the storage virtual machine (SVM) on your FSx for ONTAP file system + // where you're copying data to or from. + StorageVirtualMachineArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeLocationFsxOntapMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeLocationFsxOntap{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeLocationFsxOntap{}, 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 = addOpDescribeLocationFsxOntapValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocationFsxOntap(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_opDescribeLocationFsxOntap(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "datasync", + OperationName: "DescribeLocationFsxOntap", + } +} diff --git a/service/datasync/api_op_DescribeLocationObjectStorage.go b/service/datasync/api_op_DescribeLocationObjectStorage.go index f738ac233d7..d8ef2df7f4d 100644 --- a/service/datasync/api_op_DescribeLocationObjectStorage.go +++ b/service/datasync/api_op_DescribeLocationObjectStorage.go @@ -12,10 +12,7 @@ import ( "time" ) -// Returns metadata about a self-managed object storage server location. For more -// information about self-managed object storage locations, see Creating a location -// for object storage -// (https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html). +// Returns metadata about your DataSync location for an object storage system. func (c *Client) DescribeLocationObjectStorage(ctx context.Context, params *DescribeLocationObjectStorageInput, optFns ...func(*Options)) (*DescribeLocationObjectStorageOutput, error) { if params == nil { params = &DescribeLocationObjectStorageInput{} @@ -34,8 +31,8 @@ func (c *Client) DescribeLocationObjectStorage(ctx context.Context, params *Desc // DescribeLocationObjectStorageRequest type DescribeLocationObjectStorageInput struct { - // The Amazon Resource Name (ARN) of the self-managed object storage server - // location that was described. + // The Amazon Resource Name (ARN) of the object storage system location that you + // want information about. // // This member is required. LocationArn *string @@ -46,34 +43,27 @@ type DescribeLocationObjectStorageInput struct { // DescribeLocationObjectStorageResponse type DescribeLocationObjectStorageOutput struct { - // Optional. The access key is used if credentials are required to access the - // self-managed object storage server. If your object storage requires a user name - // and password to authenticate, use AccessKey and SecretKey to provide the user - // name and password, respectively. + // The access key (for example, a user name) required to authenticate with the + // object storage server. AccessKey *string - // The Amazon Resource Name (ARN) of the agents associated with the self-managed - // object storage server location. + // The ARNs of the DataSync agents that can securely connect with your location. AgentArns []string - // The time that the self-managed object storage server agent was created. + // The time that the location was created. CreationTime *time.Time - // The Amazon Resource Name (ARN) of the self-managed object storage server - // location to describe. + // The ARN of the object storage system location. LocationArn *string - // The URL of the source self-managed object storage server location that was - // described. + // The URL of the object storage system location. LocationUri *string - // The port that your self-managed object storage server accepts inbound network - // traffic on. The server port is set by default to TCP 80 (HTTP) or TCP 443 - // (HTTPS). + // The port that your object storage server accepts inbound network traffic on (for + // example, port 443). ServerPort *int32 - // The protocol that the object storage server uses to communicate. Valid values - // are HTTP or HTTPS. + // The protocol that your object storage server uses to communicate. ServerProtocol types.ObjectStorageServerProtocol // Metadata pertaining to the operation's result. diff --git a/service/datasync/api_op_UpdateLocationNfs.go b/service/datasync/api_op_UpdateLocationNfs.go index da680e41d93..52aa931036a 100644 --- a/service/datasync/api_op_UpdateLocationNfs.go +++ b/service/datasync/api_op_UpdateLocationNfs.go @@ -37,8 +37,7 @@ type UpdateLocationNfsInput struct { // This member is required. LocationArn *string - // Represents the mount options that are available for DataSync to access an NFS - // location. + // Specifies how DataSync can access a location using the NFS protocol. MountOptions *types.NfsMountOptions // A list of Amazon Resource Names (ARNs) of agents to use for a Network File diff --git a/service/datasync/api_op_UpdateLocationSmb.go b/service/datasync/api_op_UpdateLocationSmb.go index 396a480b76a..8afad027188 100644 --- a/service/datasync/api_op_UpdateLocationSmb.go +++ b/service/datasync/api_op_UpdateLocationSmb.go @@ -44,8 +44,7 @@ type UpdateLocationSmbInput struct { // The name of the Windows domain that the SMB server belongs to. Domain *string - // Represents the mount options that are available for DataSync to access an SMB - // location. + // Specifies how DataSync can access a location using the SMB protocol. MountOptions *types.SmbMountOptions // The password of the user who can mount the share has the permissions to access diff --git a/service/datasync/deserializers.go b/service/datasync/deserializers.go index 2f6178822c5..f29aacb226a 100644 --- a/service/datasync/deserializers.go +++ b/service/datasync/deserializers.go @@ -475,6 +475,120 @@ func awsAwsjson11_deserializeOpErrorCreateLocationFsxLustre(response *smithyhttp } } +type awsAwsjson11_deserializeOpCreateLocationFsxOntap struct { +} + +func (*awsAwsjson11_deserializeOpCreateLocationFsxOntap) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateLocationFsxOntap) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateLocationFsxOntap(response, &metadata) + } + output := &CreateLocationFsxOntapOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateLocationFsxOntapOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateLocationFsxOntap(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalException", errorCode): + return awsAwsjson11_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateLocationFsxOpenZfs struct { } @@ -2071,6 +2185,120 @@ func awsAwsjson11_deserializeOpErrorDescribeLocationFsxLustre(response *smithyht } } +type awsAwsjson11_deserializeOpDescribeLocationFsxOntap struct { +} + +func (*awsAwsjson11_deserializeOpDescribeLocationFsxOntap) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeLocationFsxOntap) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeLocationFsxOntap(response, &metadata) + } + output := &DescribeLocationFsxOntapOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeLocationFsxOntapOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeLocationFsxOntap(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalException", errorCode): + return awsAwsjson11_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDescribeLocationFsxOpenZfs struct { } @@ -5232,6 +5460,11 @@ func awsAwsjson11_deserializeDocumentFsxProtocol(v **types.FsxProtocol, value in return err } + case "SMB": + if err := awsAwsjson11_deserializeDocumentFsxProtocolSmb(&sv.SMB, value); err != nil { + return err + } + default: _, _ = key, value @@ -5277,6 +5510,69 @@ func awsAwsjson11_deserializeDocumentFsxProtocolNfs(v **types.FsxProtocolNfs, va return nil } +func awsAwsjson11_deserializeDocumentFsxProtocolSmb(v **types.FsxProtocolSmb, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FsxProtocolSmb + if *v == nil { + sv = &types.FsxProtocolSmb{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SmbDomain to be of type string, got %T instead", value) + } + sv.Domain = ptr.String(jtv) + } + + case "MountOptions": + if err := awsAwsjson11_deserializeDocumentSmbMountOptions(&sv.MountOptions, value); err != nil { + return err + } + + case "Password": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SmbPassword to be of type string, got %T instead", value) + } + sv.Password = ptr.String(jtv) + } + + case "User": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SmbUser to be of type string, got %T instead", value) + } + sv.User = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentHdfsNameNode(v **types.HdfsNameNode, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6673,6 +6969,46 @@ func awsAwsjson11_deserializeOpDocumentCreateLocationFsxLustreOutput(v **CreateL return nil } +func awsAwsjson11_deserializeOpDocumentCreateLocationFsxOntapOutput(v **CreateLocationFsxOntapOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateLocationFsxOntapOutput + if *v == nil { + sv = &CreateLocationFsxOntapOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LocationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LocationArn to be of type string, got %T instead", value) + } + sv.LocationArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateLocationFsxOpenZfsOutput(v **CreateLocationFsxOpenZfsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7357,6 +7693,99 @@ func awsAwsjson11_deserializeOpDocumentDescribeLocationFsxLustreOutput(v **Descr return nil } +func awsAwsjson11_deserializeOpDocumentDescribeLocationFsxOntapOutput(v **DescribeLocationFsxOntapOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeLocationFsxOntapOutput + if *v == nil { + sv = &DescribeLocationFsxOntapOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Time to be a JSON Number, got %T instead", value) + + } + } + + case "FsxFilesystemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FsxFilesystemArn to be of type string, got %T instead", value) + } + sv.FsxFilesystemArn = ptr.String(jtv) + } + + case "LocationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LocationArn to be of type string, got %T instead", value) + } + sv.LocationArn = ptr.String(jtv) + } + + case "LocationUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LocationUri to be of type string, got %T instead", value) + } + sv.LocationUri = ptr.String(jtv) + } + + case "Protocol": + if err := awsAwsjson11_deserializeDocumentFsxProtocol(&sv.Protocol, value); err != nil { + return err + } + + case "SecurityGroupArns": + if err := awsAwsjson11_deserializeDocumentEc2SecurityGroupArnList(&sv.SecurityGroupArns, value); err != nil { + return err + } + + case "StorageVirtualMachineArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StorageVirtualMachineArn to be of type string, got %T instead", value) + } + sv.StorageVirtualMachineArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeLocationFsxOpenZfsOutput(v **DescribeLocationFsxOpenZfsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/datasync/generated.json b/service/datasync/generated.json index 836f69f291d..1bb09067807 100644 --- a/service/datasync/generated.json +++ b/service/datasync/generated.json @@ -12,6 +12,7 @@ "api_op_CreateAgent.go", "api_op_CreateLocationEfs.go", "api_op_CreateLocationFsxLustre.go", + "api_op_CreateLocationFsxOntap.go", "api_op_CreateLocationFsxOpenZfs.go", "api_op_CreateLocationFsxWindows.go", "api_op_CreateLocationHdfs.go", @@ -26,6 +27,7 @@ "api_op_DescribeAgent.go", "api_op_DescribeLocationEfs.go", "api_op_DescribeLocationFsxLustre.go", + "api_op_DescribeLocationFsxOntap.go", "api_op_DescribeLocationFsxOpenZfs.go", "api_op_DescribeLocationFsxWindows.go", "api_op_DescribeLocationHdfs.go", diff --git a/service/datasync/serializers.go b/service/datasync/serializers.go index 15d14f3f026..b2477965623 100644 --- a/service/datasync/serializers.go +++ b/service/datasync/serializers.go @@ -235,6 +235,61 @@ func (m *awsAwsjson11_serializeOpCreateLocationFsxLustre) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateLocationFsxOntap struct { +} + +func (*awsAwsjson11_serializeOpCreateLocationFsxOntap) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateLocationFsxOntap) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateLocationFsxOntapInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("FmrsService.CreateLocationFsxOntap") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateLocationFsxOntapInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCreateLocationFsxOpenZfs struct { } @@ -1005,6 +1060,61 @@ func (m *awsAwsjson11_serializeOpDescribeLocationFsxLustre) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeLocationFsxOntap struct { +} + +func (*awsAwsjson11_serializeOpDescribeLocationFsxOntap) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeLocationFsxOntap) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeLocationFsxOntapInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("FmrsService.DescribeLocationFsxOntap") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeLocationFsxOntapInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeLocationFsxOpenZfs struct { } @@ -2417,6 +2527,13 @@ func awsAwsjson11_serializeDocumentFsxProtocol(v *types.FsxProtocol, value smith } } + if v.SMB != nil { + ok := object.Key("SMB") + if err := awsAwsjson11_serializeDocumentFsxProtocolSmb(v.SMB, ok); err != nil { + return err + } + } + return nil } @@ -2434,6 +2551,35 @@ func awsAwsjson11_serializeDocumentFsxProtocolNfs(v *types.FsxProtocolNfs, value return nil } +func awsAwsjson11_serializeDocumentFsxProtocolSmb(v *types.FsxProtocolSmb, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Domain != nil { + ok := object.Key("Domain") + ok.String(*v.Domain) + } + + if v.MountOptions != nil { + ok := object.Key("MountOptions") + if err := awsAwsjson11_serializeDocumentSmbMountOptions(v.MountOptions, ok); err != nil { + return err + } + } + + if v.Password != nil { + ok := object.Key("Password") + ok.String(*v.Password) + } + + if v.User != nil { + ok := object.Key("User") + ok.String(*v.User) + } + + return nil +} + func awsAwsjson11_serializeDocumentHdfsNameNode(v *types.HdfsNameNode, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2894,6 +3040,44 @@ func awsAwsjson11_serializeOpDocumentCreateLocationFsxLustreInput(v *CreateLocat return nil } +func awsAwsjson11_serializeOpDocumentCreateLocationFsxOntapInput(v *CreateLocationFsxOntapInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Protocol != nil { + ok := object.Key("Protocol") + if err := awsAwsjson11_serializeDocumentFsxProtocol(v.Protocol, ok); err != nil { + return err + } + } + + if v.SecurityGroupArns != nil { + ok := object.Key("SecurityGroupArns") + if err := awsAwsjson11_serializeDocumentEc2SecurityGroupArnList(v.SecurityGroupArns, ok); err != nil { + return err + } + } + + if v.StorageVirtualMachineArn != nil { + ok := object.Key("StorageVirtualMachineArn") + ok.String(*v.StorageVirtualMachineArn) + } + + if v.Subdirectory != nil { + ok := object.Key("Subdirectory") + ok.String(*v.Subdirectory) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentInputTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateLocationFsxOpenZfsInput(v *CreateLocationFsxOpenZfsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3382,6 +3566,18 @@ func awsAwsjson11_serializeOpDocumentDescribeLocationFsxLustreInput(v *DescribeL return nil } +func awsAwsjson11_serializeOpDocumentDescribeLocationFsxOntapInput(v *DescribeLocationFsxOntapInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LocationArn != nil { + ok := object.Key("LocationArn") + ok.String(*v.LocationArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeLocationFsxOpenZfsInput(v *DescribeLocationFsxOpenZfsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/datasync/types/types.go b/service/datasync/types/types.go index 02f6d66dd8c..c8f8dc71692 100644 --- a/service/datasync/types/types.go +++ b/service/datasync/types/types.go @@ -69,28 +69,59 @@ type FilterRule struct { noSmithyDocumentSerde } -// Represents the protocol that DataSync uses to access your Amazon FSx for OpenZFS -// file system. +// Specifies the data transfer protocol that DataSync uses to access your Amazon +// FSx file system. type FsxProtocol struct { - // Represents the Network File System (NFS) protocol that DataSync uses to access - // your FSx for OpenZFS file system. + // Specifies the Network File System (NFS) protocol configuration that DataSync + // uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's + // storage virtual machine (SVM). NFS *FsxProtocolNfs + // Specifies the Server Message Block (SMB) protocol configuration that DataSync + // uses to access your FSx for ONTAP file system's SVM. + SMB *FsxProtocolSmb + noSmithyDocumentSerde } -// Represents the Network File System (NFS) protocol that DataSync uses to access -// your Amazon FSx for OpenZFS file system. +// Specifies the Network File System (NFS) protocol configuration that DataSync +// uses to access your Amazon FSx for OpenZFS or Amazon FSx for NetApp ONTAP file +// system. type FsxProtocolNfs struct { - // Represents the mount options that are available for DataSync to access an NFS - // location. + // Specifies how DataSync can access a location using the NFS protocol. MountOptions *NfsMountOptions noSmithyDocumentSerde } +// Specifies the Server Message Block (SMB) protocol configuration that DataSync +// uses to access your Amazon FSx for NetApp ONTAP file system. For more +// information, see Accessing FSx for ONTAP file systems +// (https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html#create-ontap-location-access). +type FsxProtocolSmb struct { + + // Specifies the password of a user who has permission to access your SVM. + // + // This member is required. + Password *string + + // Specifies a user who has permission to access your SVM. + // + // This member is required. + User *string + + // Specifies the fully qualified domain name (FQDN) of the Microsoft Active + // Directory that your storage virtual machine (SVM) belongs to. + Domain *string + + // Specifies how DataSync can access a location using the SMB protocol. + MountOptions *SmbMountOptions + + noSmithyDocumentSerde +} + // The NameNode of the Hadoop Distributed File System (HDFS). The NameNode manages // the file system's namespace. The NameNode performs operations such as opening, // closing, and renaming files and directories. The NameNode contains the @@ -168,28 +199,29 @@ type LocationListEntry struct { noSmithyDocumentSerde } -// Represents the mount options that are available for DataSync to access an NFS -// location. +// Specifies how DataSync can access a location using the NFS protocol. type NfsMountOptions struct { - // The specific NFS version that you want DataSync to use to mount your NFS share. - // If the server refuses to use the version specified, the sync will fail. If you - // don't specify a version, DataSync defaults to AUTOMATIC. That is, DataSync - // automatically selects a version based on negotiation with the NFS server. You - // can specify the following NFS versions: + // Specifies the NFS version that you want DataSync to use when mounting your NFS + // share. If the server refuses to use the version specified, the task fails. You + // can specify the following options: + // + // * AUTOMATIC (default): DataSync chooses NFS + // version 4.1. // - // * NFSv3 - // (https://tools.ietf.org/html/rfc1813) - stateless protocol version that allows - // for asynchronous writes on the server. + // * NFS3: Stateless protocol version that allows for asynchronous + // writes on the server. // - // * NFSv4.0 - // (https://tools.ietf.org/html/rfc3530) - stateful, firewall-friendly protocol - // version that supports delegations and pseudo file systems. + // * NFSv4_0: Stateful, firewall-friendly protocol version + // that supports delegations and pseudo file systems. // - // * NFSv4.1 - // (https://tools.ietf.org/html/rfc5661) - stateful protocol version that supports - // sessions, directory delegations, and parallel data processing. Version 4.1 also - // includes all features available in version 4.0. + // * NFSv4_1: Stateful protocol + // version that supports sessions, directory delegations, and parallel data + // processing. NFS version 4.1 also includes all features available in version + // 4.0. + // + // DataSync currently only supports NFS version 3 with Amazon FSx for NetApp + // ONTAP locations. Version NfsVersion noSmithyDocumentSerde @@ -225,7 +257,7 @@ type Options struct { // attempts to preserve the original Atime attribute on all source files (that is, // the version before the PREPARING phase). However, Atime's behavior is not fully // standard across platforms, so DataSync can only do this on a best-effort basis. - // Default value: BEST_EFFORT. BEST_EFFORT: Attempt to preserve the per-file Atime + // Default value: BEST_EFFORTBEST_EFFORT: Attempt to preserve the per-file Atime // value (recommended). NONE: Ignore Atime. If Atime is set to BEST_EFFORT, Mtime // must be set to PRESERVE. If Atime is set to NONE, Mtime must also be NONE. Atime Atime @@ -234,9 +266,8 @@ type Options struct { // DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024). BytesPerSecond *int64 - // The POSIX group ID (GID) of the file's owners. This option should only be set - // for NFS, EFS, and S3 locations. For more information about what metadata is - // copied by DataSync, see Metadata Copied by DataSync + // The POSIX group ID (GID) of the file's owners. For more information, see + // Metadata copied by DataSync // (https://docs.aws.amazon.com/datasync/latest/userguide/special-files.html#metadata-copied). // Default value: INT_VALUE. This preserves the integer value of the ID. INT_VALUE: // Preserve the integer value of user ID (UID) and GID (recommended). NONE: Ignore @@ -254,10 +285,10 @@ type Options struct { // A value that indicates the last time that a file was modified (that is, a file // was written to) before the PREPARING phase. This option is required for cases - // when you need to run the same task more than one time. Default Value: PRESERVE - // PRESERVE: Preserve original Mtime (recommended) NONE: Ignore Mtime. If Mtime is - // set to PRESERVE, Atime must be set to BEST_EFFORT. If Mtime is set to NONE, - // Atime must also be set to NONE. + // when you need to run the same task more than one time. Default Value: + // PRESERVEPRESERVE: Preserve original Mtime (recommended) NONE: Ignore Mtime. If + // Mtime is set to PRESERVE, Atime must be set to BEST_EFFORT. If Mtime is set to + // NONE, Atime must also be set to NONE. Mtime Mtime // Specifies whether object tags are maintained when transferring between object @@ -278,13 +309,12 @@ type Options struct { OverwriteMode OverwriteMode // A value that determines which users or groups can access a file for a specific - // purpose such as reading, writing, or execution of the file. This option should - // only be set for NFS, EFS, and S3 locations. For more information about what - // metadata is copied by DataSync, see Metadata Copied by DataSync + // purpose such as reading, writing, or execution of the file. For more + // information, see Metadata copied by DataSync // (https://docs.aws.amazon.com/datasync/latest/userguide/special-files.html#metadata-copied). - // Default value: PRESERVE. PRESERVE: Preserve POSIX-style permissions - // (recommended). NONE: Ignore permissions. DataSync can preserve extant - // permissions of a source location. + // Default value: PRESERVEPRESERVE: Preserve POSIX-style permissions (recommended). + // NONE: Ignore permissions. DataSync can preserve extant permissions of a source + // location. PosixPermissions PosixPermissions // A value that specifies whether files in the destination that don't exist in the @@ -293,7 +323,7 @@ type Options struct { // charges for certain storage classes. For detailed information, see // Considerations when working with Amazon S3 storage classes in DataSync // (https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#using-storage-classes) - // in the DataSync User Guide. Default value: PRESERVE. PRESERVE: Ignore such + // in the DataSync User Guide. Default value: PRESERVEPRESERVE: Ignore such // destination files (recommended). REMOVE: Delete destination files that aren’t // present in the source. PreserveDeletedFiles PreserveDeletedFiles @@ -303,7 +333,7 @@ type Options struct { // that device name and metadata on the destination. DataSync does not copy the // contents of such devices, only the name and metadata. DataSync can't sync the // actual contents of such devices, because they are nonterminal and don't return - // an end-of-file (EOF) marker. Default value: NONE. NONE: Ignore special devices + // an end-of-file (EOF) marker. Default value: NONENONE: Ignore special devices // (recommended). PRESERVE: Preserve character and block device metadata. This // option isn't currently supported for Amazon EFS. PreserveDevices PreserveDevices @@ -314,36 +344,36 @@ type Options struct { // Amazon FSx for Windows File Server locations. For more information about how // DataSync handles metadata, see How DataSync Handles Metadata and Special Files // (https://docs.aws.amazon.com/datasync/latest/userguide/special-files.html). - // Default value: OWNER_DACL. OWNER_DACL: For each copied object, DataSync copies - // the following metadata: + // Default value: OWNER_DACLOWNER_DACL: For each copied object, DataSync copies the + // following metadata: // // * Object owner. // - // * NTFS discretionary access control - // lists (DACLs), which determine whether to grant access to an object. + // * NTFS discretionary access control lists + // (DACLs), which determine whether to grant access to an object. // - // When - // choosing this option, DataSync does NOT copy the NTFS system access control - // lists (SACLs), which are used by administrators to log attempts to access a - // secured object. OWNER_DACL_SACL: For each copied object, DataSync copies the - // following metadata: + // When choosing + // this option, DataSync does NOT copy the NTFS system access control lists + // (SACLs), which are used by administrators to log attempts to access a secured + // object. OWNER_DACL_SACL: For each copied object, DataSync copies the following + // metadata: // // * Object owner. // - // * NTFS discretionary access control lists - // (DACLs), which determine whether to grant access to an object. + // * NTFS discretionary access control lists (DACLs), + // which determine whether to grant access to an object. // - // * NTFS system - // access control lists (SACLs), which are used by administrators to log attempts - // to access a secured object. + // * NTFS system access + // control lists (SACLs), which are used by administrators to log attempts to + // access a secured object. // - // Copying SACLs requires granting additional - // permissions to the Windows user that DataSync uses to access your SMB location. - // For information about choosing a user that ensures sufficient permissions to - // files, folders, and metadata, see user. NONE: None of the SMB security - // descriptor components are copied. Destination objects are owned by the user that - // was provided for accessing the destination location. DACLs and SACLs are set - // based on the destination server’s configuration. + // Copying SACLs requires granting additional permissions + // to the Windows user that DataSync uses to access your SMB location. For + // information about choosing a user that ensures sufficient permissions to files, + // folders, and metadata, see user. NONE: None of the SMB security descriptor + // components are copied. Destination objects are owned by the user that was + // provided for accessing the destination location. DACLs and SACLs are set based + // on the destination server’s configuration. SecurityDescriptorCopyFlags SmbSecurityDescriptorCopyFlags // A value that determines whether tasks should be queued before executing the @@ -362,9 +392,8 @@ type Options struct { // comparing to existing content on the destination. TransferMode TransferMode - // The POSIX user ID (UID) of the file's owner. This option should only be set for - // NFS, EFS, and S3 locations. To learn more about what metadata is copied by - // DataSync, see Metadata Copied by DataSync + // The POSIX user ID (UID) of the file's owner. For more information, see Metadata + // copied by DataSync // (https://docs.aws.amazon.com/datasync/latest/userguide/special-files.html#metadata-copied). // Default value: INT_VALUE. This preserves the integer value of the ID. INT_VALUE: // Preserve the integer value of UID and group ID (GID) (recommended). NONE: Ignore @@ -375,7 +404,7 @@ type Options struct { // performed at the end of a task execution after all data and metadata have been // transferred. For more information, see Configure task settings // (https://docs.aws.amazon.com/datasync/latest/userguide/create-task.html). - // Default value: POINT_IN_TIME_CONSISTENT. ONLY_FILES_TRANSFERRED (recommended): + // Default value: POINT_IN_TIME_CONSISTENTONLY_FILES_TRANSFERRED (recommended): // Perform verification only on files that were transferred. // POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the // end of the transfer to verify that source and destination are fully @@ -447,14 +476,12 @@ type S3Config struct { noSmithyDocumentSerde } -// Represents the mount options that are available for DataSync to access an SMB -// location. +// Specifies how DataSync can access a location using the SMB protocol. type SmbMountOptions struct { - // The specific SMB version that you want DataSync to use to mount your SMB share. - // If you don't specify a version, DataSync defaults to AUTOMATIC. That is, - // DataSync automatically selects a version based on negotiation with the SMB - // server. + // Specifies the SMB version that you want DataSync to use when mounting your SMB + // share. If you don't specify a version, DataSync defaults to AUTOMATIC and + // chooses a version based on negotiation with the SMB server. Version SmbVersion noSmithyDocumentSerde diff --git a/service/datasync/validators.go b/service/datasync/validators.go index 86533c8016e..68850f87d15 100644 --- a/service/datasync/validators.go +++ b/service/datasync/validators.go @@ -90,6 +90,26 @@ func (m *validateOpCreateLocationFsxLustre) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpCreateLocationFsxOntap struct { +} + +func (*validateOpCreateLocationFsxOntap) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLocationFsxOntap) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLocationFsxOntapInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLocationFsxOntapInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateLocationFsxOpenZfs struct { } @@ -370,6 +390,26 @@ func (m *validateOpDescribeLocationFsxLustre) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpDescribeLocationFsxOntap struct { +} + +func (*validateOpDescribeLocationFsxOntap) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeLocationFsxOntap) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeLocationFsxOntapInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeLocationFsxOntapInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeLocationFsxOpenZfs struct { } @@ -826,6 +866,10 @@ func addOpCreateLocationFsxLustreValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpCreateLocationFsxLustre{}, middleware.After) } +func addOpCreateLocationFsxOntapValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLocationFsxOntap{}, middleware.After) +} + func addOpCreateLocationFsxOpenZfsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateLocationFsxOpenZfs{}, middleware.After) } @@ -882,6 +926,10 @@ func addOpDescribeLocationFsxLustreValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpDescribeLocationFsxLustre{}, middleware.After) } +func addOpDescribeLocationFsxOntapValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeLocationFsxOntap{}, middleware.After) +} + func addOpDescribeLocationFsxOpenZfsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeLocationFsxOpenZfs{}, middleware.After) } @@ -988,6 +1036,41 @@ func validateEc2Config(v *types.Ec2Config) error { } } +func validateFsxProtocol(v *types.FsxProtocol) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FsxProtocol"} + if v.SMB != nil { + if err := validateFsxProtocolSmb(v.SMB); err != nil { + invalidParams.AddNested("SMB", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFsxProtocolSmb(v *types.FsxProtocolSmb) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FsxProtocolSmb"} + if v.Password == nil { + invalidParams.Add(smithy.NewErrParamRequired("Password")) + } + if v.User == nil { + invalidParams.Add(smithy.NewErrParamRequired("User")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateHdfsNameNode(v *types.HdfsNameNode) error { if v == nil { return nil @@ -1261,6 +1344,36 @@ func validateOpCreateLocationFsxLustreInput(v *CreateLocationFsxLustreInput) err } } +func validateOpCreateLocationFsxOntapInput(v *CreateLocationFsxOntapInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLocationFsxOntapInput"} + if v.Protocol == nil { + invalidParams.Add(smithy.NewErrParamRequired("Protocol")) + } else if v.Protocol != nil { + if err := validateFsxProtocol(v.Protocol); err != nil { + invalidParams.AddNested("Protocol", err.(smithy.InvalidParamsError)) + } + } + if v.SecurityGroupArns == nil { + invalidParams.Add(smithy.NewErrParamRequired("SecurityGroupArns")) + } + if v.StorageVirtualMachineArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("StorageVirtualMachineArn")) + } + if v.Tags != nil { + if err := validateInputTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateLocationFsxOpenZfsInput(v *CreateLocationFsxOpenZfsInput) error { if v == nil { return nil @@ -1271,6 +1384,10 @@ func validateOpCreateLocationFsxOpenZfsInput(v *CreateLocationFsxOpenZfsInput) e } if v.Protocol == nil { invalidParams.Add(smithy.NewErrParamRequired("Protocol")) + } else if v.Protocol != nil { + if err := validateFsxProtocol(v.Protocol); err != nil { + invalidParams.AddNested("Protocol", err.(smithy.InvalidParamsError)) + } } if v.SecurityGroupArns == nil { invalidParams.Add(smithy.NewErrParamRequired("SecurityGroupArns")) @@ -1579,6 +1696,21 @@ func validateOpDescribeLocationFsxLustreInput(v *DescribeLocationFsxLustreInput) } } +func validateOpDescribeLocationFsxOntapInput(v *DescribeLocationFsxOntapInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeLocationFsxOntapInput"} + if v.LocationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeLocationFsxOpenZfsInput(v *DescribeLocationFsxOpenZfsInput) error { if v == nil { return nil diff --git a/service/ec2/api_op_CreateCapacityReservation.go b/service/ec2/api_op_CreateCapacityReservation.go index 98333e6d5c5..79683d37afe 100644 --- a/service/ec2/api_op_CreateCapacityReservation.go +++ b/service/ec2/api_op_CreateCapacityReservation.go @@ -115,8 +115,7 @@ type CreateCapacityReservationInput struct { // the EndDateType value is limited. EndDateType types.EndDateType - // Indicates whether the Capacity Reservation supports instances with temporary, - // block-level storage. + // Deprecated. EphemeralStorage *bool // Indicates the type of instance launches that the Capacity Reservation accepts. diff --git a/service/ec2/api_op_CreateLaunchTemplate.go b/service/ec2/api_op_CreateLaunchTemplate.go index a5e243a70dc..f66c97cfa9c 100644 --- a/service/ec2/api_op_CreateLaunchTemplate.go +++ b/service/ec2/api_op_CreateLaunchTemplate.go @@ -62,7 +62,12 @@ type CreateLaunchTemplateInput struct { // UnauthorizedOperation. DryRun *bool - // The tags to apply to the launch template during creation. + // The tags to apply to the launch template on creation. To tag the launch + // template, the resource type must be launch-template. To specify the tags for the + // resources that are created when an instance is launched, you must use the + // TagSpecifications parameter in the launch template data + // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestLaunchTemplateData.html) + // structure. TagSpecifications []types.TagSpecification // A description for the first version of the launch template. diff --git a/service/ec2/api_op_CreatePlacementGroup.go b/service/ec2/api_op_CreatePlacementGroup.go index 30221373741..2ca03f83924 100644 --- a/service/ec2/api_op_CreatePlacementGroup.go +++ b/service/ec2/api_op_CreatePlacementGroup.go @@ -51,6 +51,14 @@ type CreatePlacementGroupInput struct { // The number of partitions. Valid only when Strategy is set to partition. PartitionCount *int32 + // Determines how placement groups spread instances. + // + // * Host – You can use host + // only with Outpost placement groups. + // + // * Rack – No usage restrictions. + SpreadLevel types.SpreadLevel + // The placement strategy. Strategy types.PlacementStrategy diff --git a/service/ec2/api_op_CreateRoute.go b/service/ec2/api_op_CreateRoute.go index 88b006df30d..2a7ab272b08 100644 --- a/service/ec2/api_op_CreateRoute.go +++ b/service/ec2/api_op_CreateRoute.go @@ -10,12 +10,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a route in a route table within a VPC. You must specify one of the -// following targets: internet gateway or virtual private gateway, NAT instance, -// NAT gateway, VPC peering connection, network interface, egress-only internet -// gateway, or transit gateway. When determining how to route traffic, we use the -// route with the most specific match. For example, traffic is destined for the -// IPv4 address 192.0.2.3, and the route table includes the following two IPv4 +// Creates a route in a route table within a VPC. You must specify either a +// destination CIDR block or a prefix list ID. You must also specify exactly one of +// the resources from the parameter list. When determining how to route traffic, we +// use the route with the most specific match. For example, traffic is destined for +// the IPv4 address 192.0.2.3, and the route table includes the following two IPv4 // routes: // // * 192.0.2.0/24 (goes to some target A) diff --git a/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go b/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go index 709ca90d9c3..783c255cd59 100644 --- a/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go +++ b/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go @@ -12,11 +12,10 @@ import ( ) // Requests a transit gateway peering attachment between the specified transit -// gateway (requester) and a peer transit gateway (accepter). The transit gateways -// must be in different Regions. The peer transit gateway can be in your account or -// a different Amazon Web Services account. After you create the peering -// attachment, the owner of the accepter transit gateway must accept the attachment -// request. +// gateway (requester) and a peer transit gateway (accepter). The peer transit +// gateway can be in your account or a different Amazon Web Services account. After +// you create the peering attachment, the owner of the accepter transit gateway +// must accept the attachment request. func (c *Client) CreateTransitGatewayPeeringAttachment(ctx context.Context, params *CreateTransitGatewayPeeringAttachmentInput, optFns ...func(*Options)) (*CreateTransitGatewayPeeringAttachmentOutput, error) { if params == nil { params = &CreateTransitGatewayPeeringAttachmentInput{} diff --git a/service/ec2/api_op_DescribeNetworkAcls.go b/service/ec2/api_op_DescribeNetworkAcls.go index 52007776675..a618369a00d 100644 --- a/service/ec2/api_op_DescribeNetworkAcls.go +++ b/service/ec2/api_op_DescribeNetworkAcls.go @@ -76,26 +76,30 @@ type DescribeNetworkAclsInput struct { // * entry.rule-action - Allows or denies the matching traffic // (allow | deny). // - // * entry.rule-number - The number of an entry (in other words, - // rule) in the set of ACL entries. + // * entry.egress - A Boolean that indicates the type of rule. + // Specify true for egress rules, or false for ingress rules. // - // * network-acl-id - The ID of the network - // ACL. + // * entry.rule-number + // - The number of an entry (in other words, rule) in the set of ACL entries. // - // * owner-id - The ID of the Amazon Web Services account that owns the - // network ACL. + // * + // network-acl-id - The ID of the network ACL. + // + // * owner-id - The ID of the Amazon + // Web Services account that owns the network ACL. // - // * tag: - The key/value combination of a tag assigned to the - // resource. Use the tag key in the filter name and the tag value as the filter - // value. For example, to find all resources that have a tag with the key Owner and - // the value TeamA, specify tag:Owner for the filter name and TeamA for the filter - // value. + // * tag: - The key/value + // combination of a tag assigned to the resource. Use the tag key in the filter + // name and the tag value as the filter value. For example, to find all resources + // that have a tag with the key Owner and the value TeamA, specify tag:Owner for + // the filter name and TeamA for the filter value. // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of the tag - // value. + // * tag-key - The key of a tag + // assigned to the resource. Use this filter to find all resources assigned a tag + // with a specific key, regardless of the tag value. // - // * vpc-id - The ID of the VPC for the network ACL. + // * vpc-id - The ID of the VPC + // for the network ACL. Filters []types.Filter // The maximum number of results to return with a single call. To retrieve the diff --git a/service/ec2/api_op_DescribePlacementGroups.go b/service/ec2/api_op_DescribePlacementGroups.go index b1f67d43ac0..71f07852fa8 100644 --- a/service/ec2/api_op_DescribePlacementGroups.go +++ b/service/ec2/api_op_DescribePlacementGroups.go @@ -45,6 +45,9 @@ type DescribePlacementGroupsInput struct { // * group-arn - The // Amazon Resource Name (ARN) of the placement group. // + // * spread-level - The spread + // level for the placement group (host | rack). + // // * state - The state of the // placement group (pending | available | deleting | deleted). // diff --git a/service/ec2/api_op_ReleaseAddress.go b/service/ec2/api_op_ReleaseAddress.go index 202d5858075..f88d03b8181 100644 --- a/service/ec2/api_op_ReleaseAddress.go +++ b/service/ec2/api_op_ReleaseAddress.go @@ -22,6 +22,9 @@ import ( // an AuthFailure error if the address is already allocated to another Amazon Web // Services account. [EC2-VPC] After you release an Elastic IP address for use in a // VPC, you might be able to recover it. For more information, see AllocateAddress. +// For more information, see Elastic IP Addresses +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) +// in the Amazon Elastic Compute Cloud User Guide. func (c *Client) ReleaseAddress(ctx context.Context, params *ReleaseAddressInput, optFns ...func(*Options)) (*ReleaseAddressOutput, error) { if params == nil { params = &ReleaseAddressInput{} diff --git a/service/ec2/api_op_ReplaceRoute.go b/service/ec2/api_op_ReplaceRoute.go index 2ff6238bd33..50d7afcc2da 100644 --- a/service/ec2/api_op_ReplaceRoute.go +++ b/service/ec2/api_op_ReplaceRoute.go @@ -10,10 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Replaces an existing route within a route table in a VPC. You must provide only -// one of the following: internet gateway, virtual private gateway, NAT instance, -// NAT gateway, VPC peering connection, network interface, egress-only internet -// gateway, or transit gateway. For more information, see Route tables +// Replaces an existing route within a route table in a VPC. You must specify +// either a destination CIDR block or a prefix list ID. You must also specify +// exactly one of the resources from the parameter list, or reset the local route +// to its default target. For more information, see Route tables // (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) in the // Amazon Virtual Private Cloud User Guide. func (c *Client) ReplaceRoute(ctx context.Context, params *ReplaceRouteInput, optFns ...func(*Options)) (*ReplaceRouteOutput, error) { diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index eb04a0a7a5b..bf33a16fab0 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -90851,6 +90851,19 @@ func awsEc2query_deserializeDocumentPlacementGroup(v **types.PlacementGroup, dec sv.PartitionCount = ptr.Int32(int32(i64)) } + case strings.EqualFold("spreadLevel", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SpreadLevel = types.SpreadLevel(xtv) + } + case strings.EqualFold("state", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index f152f09a54a..2105195caf8 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -45196,6 +45196,11 @@ func awsEc2query_serializeOpDocumentCreatePlacementGroupInput(v *CreatePlacement objectKey.Integer(*v.PartitionCount) } + if len(v.SpreadLevel) > 0 { + objectKey := object.Key("SpreadLevel") + objectKey.String(string(v.SpreadLevel)) + } + if len(v.Strategy) > 0 { objectKey := object.Key("Strategy") objectKey.String(string(v.Strategy)) diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index 45363a1e18c..39622dd9507 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -5732,6 +5732,24 @@ func (SpotInstanceType) Values() []SpotInstanceType { } } +type SpreadLevel string + +// Enum values for SpreadLevel +const ( + SpreadLevelHost SpreadLevel = "host" + SpreadLevelRack SpreadLevel = "rack" +) + +// Values returns all known values for SpreadLevel. 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 (SpreadLevel) Values() []SpreadLevel { + return []SpreadLevel{ + "host", + "rack", + } +} + type State string // Enum values for State diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index 357715868ae..044724e75c5 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -893,8 +893,7 @@ type CapacityReservation struct { // Reservation expires automatically at a specified date and time. EndDateType EndDateType - // Indicates whether the Capacity Reservation supports instances with temporary, - // block-level storage. + // Deprecated. EphemeralStorage *bool // Indicates the type of instance launches that the Capacity Reservation accepts. @@ -3067,22 +3066,24 @@ type EventInformation struct { // request has been validated and Amazon EC2 is attempting to maintain the target // number of running instances. // - // * cancelled - The EC2 Fleet or Spot Fleet request - // is canceled and has no running instances. The EC2 Fleet or Spot Fleet will be - // deleted two days after its instances are terminated. + // * deleted (EC2 Fleet) / cancelled (Spot Fleet) - + // The EC2 Fleet is deleted or the Spot Fleet request is canceled and has no + // running instances. The EC2 Fleet or Spot Fleet will be deleted two days after + // its instances are terminated. // - // * cancelled_running - The - // EC2 Fleet or Spot Fleet request is canceled and does not launch additional - // instances. Its existing instances continue to run until they are interrupted or - // terminated. The request remains in this state until all instances are - // interrupted or terminated. + // * deleted_running (EC2 Fleet) / cancelled_running + // (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled + // and does not launch additional instances. Its existing instances continue to run + // until they are interrupted or terminated. The request remains in this state + // until all instances are interrupted or terminated. // - // * cancelled_terminating - The EC2 Fleet or Spot - // Fleet request is canceled and its instances are terminating. The request remains - // in this state until all instances are terminated. + // * deleted_terminating (EC2 + // Fleet) / cancelled_terminating (Spot Fleet) - The EC2 Fleet is deleted or the + // Spot Fleet request is canceled and its instances are terminating. The request + // remains in this state until all instances are terminated. // - // * expired - The EC2 Fleet or - // Spot Fleet request has expired. If the request was created with + // * expired - The EC2 + // Fleet or Spot Fleet request has expired. If the request was created with // TerminateInstancesWithExpiration set, a subsequent terminated event indicates // that the instances are terminated. // @@ -5970,9 +5971,9 @@ type InstanceRequirements struct { // drive (HDD) storage, specify hdd. // // * For instance types with solid state drive - // (SDD) storage, specify sdd. + // (SSD) storage, specify ssd. // - // Default: hdd and sdd + // Default: hdd and ssd LocalStorageTypes []LocalStorageType // The minimum and maximum amount of memory per vCPU, in GiB. Default: No minimum @@ -6217,9 +6218,9 @@ type InstanceRequirementsRequest struct { // drive (HDD) storage, specify hdd. // // * For instance types with solid state drive - // (SDD) storage, specify sdd. + // (SSD) storage, specify ssd. // - // Default: hdd and sdd + // Default: hdd and ssd LocalStorageTypes []LocalStorageType // The minimum and maximum amount of memory per vCPU, in GiB. Default: No minimum @@ -8272,10 +8273,10 @@ type LaunchTemplateSpotMarketOptionsRequest struct { noSmithyDocumentSerde } -// The tag specification for the launch template. +// The tags specification for the launch template. type LaunchTemplateTagSpecification struct { - // The type of resource. + // The type of resource to tag. ResourceType ResourceType // The tags for the resource. @@ -8284,13 +8285,15 @@ type LaunchTemplateTagSpecification struct { noSmithyDocumentSerde } -// The tags specification for the launch template. +// The tags specification for the resources that are created during instance +// launch. type LaunchTemplateTagSpecificationRequest struct { - // The type of resource to tag. Currently, the resource types that support tagging - // on creation are instance, volume, elastic-gpu, network-interface, and - // spot-instances-request. To tag a resource after it has been created, see - // CreateTags + // The type of resource to tag. The Valid Values are all the resource types that + // can be tagged. However, when creating a launch template, you can specify tags + // for the following resource types only: instance | volume | elastic-gpu | + // network-interface | spot-instances-request To tag a resource after it has been + // created, see CreateTags // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html). ResourceType ResourceType @@ -9719,7 +9722,7 @@ type PathComponent struct { // The subnet. Subnet *AnalysisComponent - // Describes a path component. + // The transit gateway. TransitGateway *AnalysisComponent // The route in a transit gateway route table. @@ -10019,6 +10022,10 @@ type PlacementGroup struct { // The number of partitions. Valid only if strategy is set to partition. PartitionCount *int32 + // The spread level for the placement group. Only Outpost placement groups can be + // spread across hosts. + SpreadLevel SpreadLevel + // The state of the placement group. State PlacementGroupState @@ -10635,8 +10642,7 @@ type RequestLaunchTemplateData struct { // in the Amazon Elastic Compute Cloud User Guide. CpuOptions *LaunchTemplateCpuOptionsRequest - // The credit option for CPU usage of the instance. Valid for T2, T3, or T3a - // instances only. + // The credit option for CPU usage of the instance. Valid only for T instances. CreditSpecification *CreditSpecificationRequest // Indicates whether to enable the instance for stop protection. For more @@ -10763,11 +10769,26 @@ type RequestLaunchTemplateData struct { // group ID and security name in the same request. SecurityGroups []string - // The tags to apply to the resources during launch. You can only tag instances and - // volumes on launch. The specified tags are applied to all instances or volumes - // that are created during launch. To tag a resource after it has been created, see - // CreateTags - // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html). + // The tags to apply to the resources that are created during instance launch. You + // can specify tags for the following resources only: + // + // * Instances + // + // * Volumes + // + // * + // Elastic graphics + // + // * Spot Instance requests + // + // * Network interfaces + // + // To tag a + // resource after it has been created, see CreateTags + // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html). To + // tag the launch template itself, you must use the TagSpecification + // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html) + // parameter. TagSpecifications []LaunchTemplateTagSpecificationRequest // The user data to make available to the instance. You must provide base64-encoded @@ -11353,7 +11374,8 @@ type ResponseLaunchTemplateData struct { // The security group names. SecurityGroups []string - // The tags. + // The tags that are applied to the resources that are created during instance + // launch. TagSpecifications []LaunchTemplateTagSpecification // The user data for the instance. diff --git a/service/finspacedata/api_op_CreatePermissionGroup.go b/service/finspacedata/api_op_CreatePermissionGroup.go index 119ae392c2c..2f9169f34db 100644 --- a/service/finspacedata/api_op_CreatePermissionGroup.go +++ b/service/finspacedata/api_op_CreatePermissionGroup.go @@ -32,27 +32,33 @@ func (c *Client) CreatePermissionGroup(ctx context.Context, params *CreatePermis type CreatePermissionGroupInput struct { // The option to indicate FinSpace application permissions that are granted to a - // specific group. + // specific group. When assigning application permissions, be aware that the + // permission ManageUsersAndGroups allows users to grant themselves or others + // access to any functionality in their FinSpace environment's application. It + // should only be granted to trusted users. // - // * CreateDataset – Group members can create new datasets. + // * CreateDataset – Group members can + // create new datasets. // - // * - // ManageClusters – Group members can manage Apache Spark clusters from FinSpace - // notebooks. + // * ManageClusters – Group members can manage Apache Spark + // clusters from FinSpace notebooks. // - // * ManageUsersAndGroups – Group members can manage users and - // permission groups. + // * ManageUsersAndGroups – Group members can + // manage users and permission groups. This is a privileged permission that allows + // users to grant themselves or others access to any functionality in the + // application. It should only be granted to trusted users. // - // * ManageAttributeSets – Group members can manage attribute - // sets. + // * ManageAttributeSets + // – Group members can manage attribute sets. // - // * ViewAuditData – Group members can view audit data. + // * ViewAuditData – Group members can + // view audit data. // - // * AccessNotebooks – - // Group members will have access to FinSpace notebooks. + // * AccessNotebooks – Group members will have access to FinSpace + // notebooks. // - // * GetTemporaryCredentials - // – Group members can get temporary API credentials. + // * GetTemporaryCredentials – Group members can get temporary API + // credentials. // // This member is required. ApplicationPermissions []types.ApplicationPermission diff --git a/service/finspacedata/api_op_GetExternalDataViewAccessDetails.go b/service/finspacedata/api_op_GetExternalDataViewAccessDetails.go new file mode 100644 index 00000000000..5da2f4d1402 --- /dev/null +++ b/service/finspacedata/api_op_GetExternalDataViewAccessDetails.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +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/finspacedata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the credentials to access the external Dataview from an S3 location. To +// call this API: +// +// * You must retrieve the programmatic credentials. +// +// * You must be +// a member of a FinSpace user group, where the dataset that you want to access has +// Read Dataset Data permissions. +func (c *Client) GetExternalDataViewAccessDetails(ctx context.Context, params *GetExternalDataViewAccessDetailsInput, optFns ...func(*Options)) (*GetExternalDataViewAccessDetailsOutput, error) { + if params == nil { + params = &GetExternalDataViewAccessDetailsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetExternalDataViewAccessDetails", params, optFns, c.addOperationGetExternalDataViewAccessDetailsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetExternalDataViewAccessDetailsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetExternalDataViewAccessDetailsInput struct { + + // The unique identifier for the Dataview that you want to access. + // + // This member is required. + DataViewId *string + + // The unique identifier for the Dataset. + // + // This member is required. + DatasetId *string + + noSmithyDocumentSerde +} + +type GetExternalDataViewAccessDetailsOutput struct { + + // The credentials required to access the external Dataview from the S3 location. + Credentials *types.AwsCredentials + + // The location where the external Dataview is stored. + S3Location *types.S3Location + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetExternalDataViewAccessDetailsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetExternalDataViewAccessDetails{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetExternalDataViewAccessDetails{}, 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 = addRestJsonContentTypeCustomization(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 = addOpGetExternalDataViewAccessDetailsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetExternalDataViewAccessDetails(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_opGetExternalDataViewAccessDetails(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "GetExternalDataViewAccessDetails", + } +} diff --git a/service/finspacedata/api_op_UpdatePermissionGroup.go b/service/finspacedata/api_op_UpdatePermissionGroup.go index 806c37c0df1..f6cb5fe7a8f 100644 --- a/service/finspacedata/api_op_UpdatePermissionGroup.go +++ b/service/finspacedata/api_op_UpdatePermissionGroup.go @@ -37,27 +37,33 @@ type UpdatePermissionGroupInput struct { PermissionGroupId *string // The permissions that are granted to a specific group for accessing the FinSpace - // application. + // application. When assigning application permissions, be aware that the + // permission ManageUsersAndGroups allows users to grant themselves or others + // access to any functionality in their FinSpace environment's application. It + // should only be granted to trusted users. // - // * CreateDataset – Group members can create new datasets. + // * CreateDataset – Group members can + // create new datasets. // - // * - // ManageClusters – Group members can manage Apache Spark clusters from FinSpace - // notebooks. + // * ManageClusters – Group members can manage Apache Spark + // clusters from FinSpace notebooks. // - // * ManageUsersAndGroups – Group members can manage users and - // permission groups. + // * ManageUsersAndGroups – Group members can + // manage users and permission groups. This is a privileged permission that allows + // users to grant themselves or others access to any functionality in the + // application. It should only be granted to trusted users. // - // * ManageAttributeSets – Group members can manage attribute - // sets. + // * ManageAttributeSets + // – Group members can manage attribute sets. // - // * ViewAuditData – Group members can view audit data. + // * ViewAuditData – Group members can + // view audit data. // - // * AccessNotebooks – - // Group members will have access to FinSpace notebooks. + // * AccessNotebooks – Group members will have access to FinSpace + // notebooks. // - // * GetTemporaryCredentials - // – Group members can get temporary API credentials. + // * GetTemporaryCredentials – Group members can get temporary API + // credentials. ApplicationPermissions []types.ApplicationPermission // A token that ensures idempotency. This token expires in 10 minutes. diff --git a/service/finspacedata/deserializers.go b/service/finspacedata/deserializers.go index aee5844c9d3..5bfce2f8f0f 100644 --- a/service/finspacedata/deserializers.go +++ b/service/finspacedata/deserializers.go @@ -2554,6 +2554,170 @@ func awsRestjson1_deserializeOpDocumentGetDataViewOutput(v **GetDataViewOutput, return nil } +type awsRestjson1_deserializeOpGetExternalDataViewAccessDetails struct { +} + +func (*awsRestjson1_deserializeOpGetExternalDataViewAccessDetails) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetExternalDataViewAccessDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetExternalDataViewAccessDetails(response, &metadata) + } + output := &GetExternalDataViewAccessDetailsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetExternalDataViewAccessDetailsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetExternalDataViewAccessDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetExternalDataViewAccessDetailsOutput(v **GetExternalDataViewAccessDetailsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetExternalDataViewAccessDetailsOutput + if *v == nil { + sv = &GetExternalDataViewAccessDetailsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "credentials": + if err := awsRestjson1_deserializeDocumentAwsCredentials(&sv.Credentials, value); err != nil { + return err + } + + case "s3Location": + if err := awsRestjson1_deserializeDocumentS3Location(&sv.S3Location, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetPermissionGroup struct { } @@ -5669,6 +5833,77 @@ func awsRestjson1_deserializeDocumentApplicationPermissionList(v *[]types.Applic return nil } +func awsRestjson1_deserializeDocumentAwsCredentials(v **types.AwsCredentials, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsCredentials + if *v == nil { + sv = &types.AwsCredentials{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessKeyId to be of type string, got %T instead", value) + } + sv.AccessKeyId = ptr.String(jtv) + } + + case "expiration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Expiration = i64 + } + + case "secretAccessKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SecretAccessKey to be of type string, got %T instead", value) + } + sv.SecretAccessKey = ptr.String(jtv) + } + + case "sessionToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionToken to be of type string, got %T instead", value) + } + sv.SessionToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentChangesetErrorInfo(v **types.ChangesetErrorInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7081,6 +7316,55 @@ func awsRestjson1_deserializeDocumentS3DestinationFormatOptions(v *map[string]st return nil } +func awsRestjson1_deserializeDocumentS3Location(v **types.S3Location, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3Location + if *v == nil { + sv = &types.S3Location{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.Bucket = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSchemaDefinition(v **types.SchemaDefinition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/finspacedata/generated.json b/service/finspacedata/generated.json index a629030b879..f71371b95cb 100644 --- a/service/finspacedata/generated.json +++ b/service/finspacedata/generated.json @@ -22,6 +22,7 @@ "api_op_GetChangeset.go", "api_op_GetDataView.go", "api_op_GetDataset.go", + "api_op_GetExternalDataViewAccessDetails.go", "api_op_GetPermissionGroup.go", "api_op_GetProgrammaticAccessCredentials.go", "api_op_GetUser.go", diff --git a/service/finspacedata/serializers.go b/service/finspacedata/serializers.go index c64905fbeeb..0e8bcf774b9 100644 --- a/service/finspacedata/serializers.go +++ b/service/finspacedata/serializers.go @@ -1157,6 +1157,73 @@ func awsRestjson1_serializeOpHttpBindingsGetDataViewInput(v *GetDataViewInput, e return nil } +type awsRestjson1_serializeOpGetExternalDataViewAccessDetails struct { +} + +func (*awsRestjson1_serializeOpGetExternalDataViewAccessDetails) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetExternalDataViewAccessDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetExternalDataViewAccessDetailsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasets/{datasetId}/dataviewsv2/{dataViewId}/external-access-details") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetExternalDataViewAccessDetailsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetExternalDataViewAccessDetailsInput(v *GetExternalDataViewAccessDetailsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member datasetId must not be empty")} + } + if v.DatasetId != nil { + if err := encoder.SetURI("datasetId").String(*v.DatasetId); err != nil { + return err + } + } + + if v.DataViewId == nil || len(*v.DataViewId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member dataViewId must not be empty")} + } + if v.DataViewId != nil { + if err := encoder.SetURI("dataViewId").String(*v.DataViewId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetPermissionGroup struct { } diff --git a/service/finspacedata/types/types.go b/service/finspacedata/types/types.go index 64e75449661..6a538a2ca9d 100644 --- a/service/finspacedata/types/types.go +++ b/service/finspacedata/types/types.go @@ -6,6 +6,24 @@ import ( smithydocument "github.com/aws/smithy-go/document" ) +// The credentials required to access the external Dataview from the S3 location. +type AwsCredentials struct { + + // The unique identifier for the security credentials. + AccessKeyId *string + + // The Epoch time when the current credentials expire. + Expiration int64 + + // The secret access key that can be used to sign requests. + SecretAccessKey *string + + // The token that users must pass to use the credentials. + SessionToken *string + + noSmithyDocumentSerde +} + // The structure with error messages. type ChangesetErrorInfo struct { @@ -351,27 +369,33 @@ type DataViewSummary struct { type PermissionGroup struct { // Indicates the permissions that are granted to a specific group for accessing the - // FinSpace application. + // FinSpace application. When assigning application permissions, be aware that the + // permission ManageUsersAndGroups allows users to grant themselves or others + // access to any functionality in their FinSpace environment's application. It + // should only be granted to trusted users. // - // * CreateDataset – Group members can create new - // datasets. + // * CreateDataset – Group members can + // create new datasets. // - // * ManageClusters – Group members can manage Apache Spark clusters - // from FinSpace notebooks. + // * ManageClusters – Group members can manage Apache Spark + // clusters from FinSpace notebooks. // - // * ManageUsersAndGroups – Group members can manage - // users and permission groups. + // * ManageUsersAndGroups – Group members can + // manage users and permission groups. This is a privileged permission that allows + // users to grant themselves or others access to any functionality in the + // application. It should only be granted to trusted users. // - // * ManageAttributeSets – Group members can manage - // attribute sets. + // * ManageAttributeSets + // – Group members can manage attribute sets. // - // * ViewAuditData – Group members can view audit data. + // * ViewAuditData – Group members can + // view audit data. // - // * - // AccessNotebooks – Group members will have access to FinSpace notebooks. + // * AccessNotebooks – Group members will have access to FinSpace + // notebooks. // - // * - // GetTemporaryCredentials – Group members can get temporary API credentials. + // * GetTemporaryCredentials – Group members can get temporary API + // credentials. ApplicationPermissions []ApplicationPermission // The timestamp at which the group was created in FinSpace. The value is @@ -479,6 +503,22 @@ type ResourcePermission struct { noSmithyDocumentSerde } +// The location of an external Dataview in an S3 bucket. +type S3Location struct { + + // The name of the S3 bucket. + // + // This member is required. + Bucket *string + + // The path of the folder, within the S3 bucket that contains the Dataset. + // + // This member is required. + Key *string + + noSmithyDocumentSerde +} + // Definition for a schema on a tabular Dataset. type SchemaDefinition struct { diff --git a/service/finspacedata/validators.go b/service/finspacedata/validators.go index ee1ccb3db79..47d4b93b5ac 100644 --- a/service/finspacedata/validators.go +++ b/service/finspacedata/validators.go @@ -290,6 +290,26 @@ func (m *validateOpGetDataView) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpGetExternalDataViewAccessDetails struct { +} + +func (*validateOpGetExternalDataViewAccessDetails) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetExternalDataViewAccessDetails) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetExternalDataViewAccessDetailsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetExternalDataViewAccessDetailsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetPermissionGroup struct { } @@ -626,6 +646,10 @@ func addOpGetDataViewValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDataView{}, middleware.After) } +func addOpGetExternalDataViewAccessDetailsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetExternalDataViewAccessDetails{}, middleware.After) +} + func addOpGetPermissionGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetPermissionGroup{}, middleware.After) } @@ -947,6 +971,24 @@ func validateOpGetDataViewInput(v *GetDataViewInput) error { } } +func validateOpGetExternalDataViewAccessDetailsInput(v *GetExternalDataViewAccessDetailsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetExternalDataViewAccessDetailsInput"} + if v.DataViewId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataViewId")) + } + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetPermissionGroupInput(v *GetPermissionGroupInput) error { if v == nil { return nil diff --git a/service/polly/types/enums.go b/service/polly/types/enums.go index 76560358264..38683c65fb4 100644 --- a/service/polly/types/enums.go +++ b/service/polly/types/enums.go @@ -273,6 +273,10 @@ const ( VoiceIdAyanda VoiceId = "Ayanda" VoiceIdArlet VoiceId = "Arlet" VoiceIdHannah VoiceId = "Hannah" + VoiceIdArthur VoiceId = "Arthur" + VoiceIdDaniel VoiceId = "Daniel" + VoiceIdLiam VoiceId = "Liam" + VoiceIdPedro VoiceId = "Pedro" ) // Values returns all known values for VoiceId. Note that this can be expanded in @@ -347,5 +351,9 @@ func (VoiceId) Values() []VoiceId { "Ayanda", "Arlet", "Hannah", + "Arthur", + "Daniel", + "Liam", + "Pedro", } }