// Code generated by smithy-go-codegen DO NOT EDIT. package storagegateway 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Configures one or more gateway local disks as upload buffer for a specified // gateway. This operation is supported for the stored volume, cached volume, and // tape gateway types. In the request, you specify the gateway Amazon Resource Name // (ARN) to which you want to add upload buffer, and one or more disk IDs that you // want to configure as upload buffer. func (c *Client) AddUploadBuffer(ctx context.Context, params *AddUploadBufferInput, optFns ...func(*Options)) (*AddUploadBufferOutput, error) { if params == nil { params = &AddUploadBufferInput{} } result, metadata, err := c.invokeOperation(ctx, "AddUploadBuffer", params, optFns, c.addOperationAddUploadBufferMiddlewares) if err != nil { return nil, err } out := result.(*AddUploadBufferOutput) out.ResultMetadata = metadata return out, nil } type AddUploadBufferInput struct { // An array of strings that identify disks that are to be configured as working // storage. Each string has a minimum length of 1 and maximum length of 300. You // can get the disk IDs from the ListLocalDisks API. // // This member is required. DiskIds []string // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to // return a list of gateways for your account and Region. // // This member is required. GatewayARN *string noSmithyDocumentSerde } type AddUploadBufferOutput struct { // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to // return a list of gateways for your account and Region. GatewayARN *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAddUploadBufferMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpAddUploadBuffer{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAddUploadBuffer{}, 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 = addOpAddUploadBufferValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddUploadBuffer(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_opAddUploadBuffer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "storagegateway", OperationName: "AddUploadBuffer", } }