1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package storagegateway 4 5import ( 6 "context" 7 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 8 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 9 "github.com/aws/aws-sdk-go-v2/service/storagegateway/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Returns the description of the gateway volumes specified in the request. The 15// list of gateway volumes in the request must be from one gateway. In the 16// response, AWS Storage Gateway returns volume information sorted by volume ARNs. 17// This operation is only supported in stored volume gateway type. 18func (c *Client) DescribeStorediSCSIVolumes(ctx context.Context, params *DescribeStorediSCSIVolumesInput, optFns ...func(*Options)) (*DescribeStorediSCSIVolumesOutput, error) { 19 if params == nil { 20 params = &DescribeStorediSCSIVolumesInput{} 21 } 22 23 result, metadata, err := c.invokeOperation(ctx, "DescribeStorediSCSIVolumes", params, optFns, addOperationDescribeStorediSCSIVolumesMiddlewares) 24 if err != nil { 25 return nil, err 26 } 27 28 out := result.(*DescribeStorediSCSIVolumesOutput) 29 out.ResultMetadata = metadata 30 return out, nil 31} 32 33// A JSON object containing a list of DescribeStorediSCSIVolumesInput$VolumeARNs. 34type DescribeStorediSCSIVolumesInput struct { 35 36 // An array of strings where each string represents the Amazon Resource Name (ARN) 37 // of a stored volume. All of the specified stored volumes must be from the same 38 // gateway. Use ListVolumes to get volume ARNs for a gateway. 39 // 40 // This member is required. 41 VolumeARNs []string 42} 43 44type DescribeStorediSCSIVolumesOutput struct { 45 46 // Describes a single unit of output from DescribeStorediSCSIVolumes. The following 47 // fields are returned: 48 // 49 // * ChapEnabled: Indicates whether mutual CHAP is enabled 50 // for the iSCSI target. 51 // 52 // * LunNumber: The logical disk number. 53 // 54 // * 55 // NetworkInterfaceId: The network interface ID of the stored volume that initiator 56 // use to map the stored volume as an iSCSI target. 57 // 58 // * NetworkInterfacePort: The 59 // port used to communicate with iSCSI targets. 60 // 61 // * PreservedExistingData: Indicates 62 // when the stored volume was created, existing data on the underlying local disk 63 // was preserved. 64 // 65 // * SourceSnapshotId: If the stored volume was created from a 66 // snapshot, this field contains the snapshot ID used, e.g. snap-1122aabb. 67 // Otherwise, this field is not included. 68 // 69 // * StorediSCSIVolumes: An array of 70 // StorediSCSIVolume objects where each object contains metadata about one stored 71 // volume. 72 // 73 // * TargetARN: The Amazon Resource Name (ARN) of the volume target. 74 // 75 // * 76 // VolumeARN: The Amazon Resource Name (ARN) of the stored volume. 77 // 78 // * VolumeDiskId: 79 // The disk ID of the local disk that was specified in the CreateStorediSCSIVolume 80 // operation. 81 // 82 // * VolumeId: The unique identifier of the storage volume, e.g. 83 // vol-1122AABB. 84 // 85 // * VolumeiSCSIAttributes: An VolumeiSCSIAttributes object that 86 // represents a collection of iSCSI attributes for one stored volume. 87 // 88 // * 89 // VolumeProgress: Represents the percentage complete if the volume is restoring or 90 // bootstrapping that represents the percent of data transferred. This field does 91 // not appear in the response if the stored volume is not restoring or 92 // bootstrapping. 93 // 94 // * VolumeSizeInBytes: The size of the volume in bytes. 95 // 96 // * 97 // VolumeStatus: One of the VolumeStatus values that indicates the state of the 98 // volume. 99 // 100 // * VolumeType: One of the enumeration values describing the type of the 101 // volume. Currently, only STORED volumes are supported. 102 StorediSCSIVolumes []types.StorediSCSIVolume 103 104 // Metadata pertaining to the operation's result. 105 ResultMetadata middleware.Metadata 106} 107 108func addOperationDescribeStorediSCSIVolumesMiddlewares(stack *middleware.Stack, options Options) (err error) { 109 err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeStorediSCSIVolumes{}, middleware.After) 110 if err != nil { 111 return err 112 } 113 err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeStorediSCSIVolumes{}, middleware.After) 114 if err != nil { 115 return err 116 } 117 if err = addSetLoggerMiddleware(stack, options); err != nil { 118 return err 119 } 120 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 121 return err 122 } 123 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 124 return err 125 } 126 if err = addResolveEndpointMiddleware(stack, options); err != nil { 127 return err 128 } 129 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 130 return err 131 } 132 if err = addRetryMiddlewares(stack, options); err != nil { 133 return err 134 } 135 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 136 return err 137 } 138 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 139 return err 140 } 141 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 142 return err 143 } 144 if err = addClientUserAgent(stack); err != nil { 145 return err 146 } 147 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 148 return err 149 } 150 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 151 return err 152 } 153 if err = addOpDescribeStorediSCSIVolumesValidationMiddleware(stack); err != nil { 154 return err 155 } 156 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStorediSCSIVolumes(options.Region), middleware.Before); err != nil { 157 return err 158 } 159 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 160 return err 161 } 162 if err = addResponseErrorMiddleware(stack); err != nil { 163 return err 164 } 165 if err = addRequestResponseLogging(stack, options); err != nil { 166 return err 167 } 168 return nil 169} 170 171func newServiceMetadataMiddleware_opDescribeStorediSCSIVolumes(region string) *awsmiddleware.RegisterServiceMetadata { 172 return &awsmiddleware.RegisterServiceMetadata{ 173 Region: region, 174 ServiceID: ServiceID, 175 SigningName: "storagegateway", 176 OperationName: "DescribeStorediSCSIVolumes", 177 } 178} 179