1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package appstream 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/appstream/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Updates the specified fleet. If the fleet is in the STOPPED state, you can 15// update any attribute except the fleet name. If the fleet is in the RUNNING 16// state, you can update the DisplayName, ComputeCapacity, ImageARN, ImageName, 17// IdleDisconnectTimeoutInSeconds, and DisconnectTimeoutInSeconds attributes. If 18// the fleet is in the STARTING or STOPPING state, you can't update it. 19func (c *Client) UpdateFleet(ctx context.Context, params *UpdateFleetInput, optFns ...func(*Options)) (*UpdateFleetOutput, error) { 20 if params == nil { 21 params = &UpdateFleetInput{} 22 } 23 24 result, metadata, err := c.invokeOperation(ctx, "UpdateFleet", params, optFns, addOperationUpdateFleetMiddlewares) 25 if err != nil { 26 return nil, err 27 } 28 29 out := result.(*UpdateFleetOutput) 30 out.ResultMetadata = metadata 31 return out, nil 32} 33 34type UpdateFleetInput struct { 35 36 // The fleet attributes to delete. 37 AttributesToDelete []types.FleetAttribute 38 39 // The desired capacity for the fleet. 40 ComputeCapacity *types.ComputeCapacity 41 42 // Deletes the VPC association for the specified fleet. 43 // 44 // Deprecated: This member has been deprecated. 45 DeleteVpcConfig bool 46 47 // The description to display. 48 Description *string 49 50 // The amount of time that a streaming session remains active after users 51 // disconnect. If users try to reconnect to the streaming session after a 52 // disconnection or network interruption within this time interval, they are 53 // connected to their previous session. Otherwise, they are connected to a new 54 // session with a new streaming instance. Specify a value between 60 and 360000. 55 DisconnectTimeoutInSeconds *int32 56 57 // The fleet name to display. 58 DisplayName *string 59 60 // The name of the directory and organizational unit (OU) to use to join the fleet 61 // to a Microsoft Active Directory domain. 62 DomainJoinInfo *types.DomainJoinInfo 63 64 // Enables or disables default internet access for the fleet. 65 EnableDefaultInternetAccess *bool 66 67 // The Amazon Resource Name (ARN) of the IAM role to apply to the fleet. To assume 68 // a role, a fleet instance calls the AWS Security Token Service (STS) AssumeRole 69 // API operation and passes the ARN of the role to use. The operation creates a new 70 // session with temporary credentials. AppStream 2.0 retrieves the temporary 71 // credentials and creates the appstream_machine_role credential profile on the 72 // instance. For more information, see Using an IAM Role to Grant Permissions to 73 // Applications and Scripts Running on AppStream 2.0 Streaming Instances 74 // (https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html) 75 // in the Amazon AppStream 2.0 Administration Guide. 76 IamRoleArn *string 77 78 // The amount of time that users can be idle (inactive) before they are 79 // disconnected from their streaming session and the DisconnectTimeoutInSeconds 80 // time interval begins. Users are notified before they are disconnected due to 81 // inactivity. If users try to reconnect to the streaming session before the time 82 // interval specified in DisconnectTimeoutInSeconds elapses, they are connected to 83 // their previous session. Users are considered idle when they stop providing 84 // keyboard or mouse input during their streaming session. File uploads and 85 // downloads, audio in, audio out, and pixels changing do not qualify as user 86 // activity. If users continue to be idle after the time interval in 87 // IdleDisconnectTimeoutInSeconds elapses, they are disconnected. To prevent users 88 // from being disconnected due to inactivity, specify a value of 0. Otherwise, 89 // specify a value between 60 and 3600. The default value is 0. If you enable this 90 // feature, we recommend that you specify a value that corresponds exactly to a 91 // whole number of minutes (for example, 60, 120, and 180). If you don't do this, 92 // the value is rounded to the nearest minute. For example, if you specify a value 93 // of 70, users are disconnected after 1 minute of inactivity. If you specify a 94 // value that is at the midpoint between two different minutes, the value is 95 // rounded up. For example, if you specify a value of 90, users are disconnected 96 // after 2 minutes of inactivity. 97 IdleDisconnectTimeoutInSeconds *int32 98 99 // The ARN of the public, private, or shared image to use. 100 ImageArn *string 101 102 // The name of the image used to create the fleet. 103 ImageName *string 104 105 // The instance type to use when launching fleet instances. The following instance 106 // types are available: 107 // 108 // * stream.standard.medium 109 // 110 // * stream.standard.large 111 // 112 // * 113 // stream.compute.large 114 // 115 // * stream.compute.xlarge 116 // 117 // * stream.compute.2xlarge 118 // 119 // * 120 // stream.compute.4xlarge 121 // 122 // * stream.compute.8xlarge 123 // 124 // * stream.memory.large 125 // 126 // * 127 // stream.memory.xlarge 128 // 129 // * stream.memory.2xlarge 130 // 131 // * stream.memory.4xlarge 132 // 133 // * 134 // stream.memory.8xlarge 135 // 136 // * stream.memory.z1d.large 137 // 138 // * stream.memory.z1d.xlarge 139 // 140 // * 141 // stream.memory.z1d.2xlarge 142 // 143 // * stream.memory.z1d.3xlarge 144 // 145 // * 146 // stream.memory.z1d.6xlarge 147 // 148 // * stream.memory.z1d.12xlarge 149 // 150 // * 151 // stream.graphics-design.large 152 // 153 // * stream.graphics-design.xlarge 154 // 155 // * 156 // stream.graphics-design.2xlarge 157 // 158 // * stream.graphics-design.4xlarge 159 // 160 // * 161 // stream.graphics-desktop.2xlarge 162 // 163 // * stream.graphics.g4dn.xlarge 164 // 165 // * 166 // stream.graphics.g4dn.2xlarge 167 // 168 // * stream.graphics.g4dn.4xlarge 169 // 170 // * 171 // stream.graphics.g4dn.8xlarge 172 // 173 // * stream.graphics.g4dn.12xlarge 174 // 175 // * 176 // stream.graphics.g4dn.16xlarge 177 // 178 // * stream.graphics-pro.4xlarge 179 // 180 // * 181 // stream.graphics-pro.8xlarge 182 // 183 // * stream.graphics-pro.16xlarge 184 InstanceType *string 185 186 // The maximum amount of time that a streaming session can remain active, in 187 // seconds. If users are still connected to a streaming instance five minutes 188 // before this limit is reached, they are prompted to save any open documents 189 // before being disconnected. After this time elapses, the instance is terminated 190 // and replaced by a new instance. Specify a value between 600 and 360000. 191 MaxUserDurationInSeconds *int32 192 193 // A unique name for the fleet. 194 Name *string 195 196 // The AppStream 2.0 view that is displayed to your users when they stream from the 197 // fleet. When APP is specified, only the windows of applications opened by users 198 // display. When DESKTOP is specified, the standard desktop that is provided by the 199 // operating system displays. The default value is APP. 200 StreamView types.StreamView 201 202 // The VPC configuration for the fleet. 203 VpcConfig *types.VpcConfig 204} 205 206type UpdateFleetOutput struct { 207 208 // Information about the fleet. 209 Fleet *types.Fleet 210 211 // Metadata pertaining to the operation's result. 212 ResultMetadata middleware.Metadata 213} 214 215func addOperationUpdateFleetMiddlewares(stack *middleware.Stack, options Options) (err error) { 216 err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateFleet{}, middleware.After) 217 if err != nil { 218 return err 219 } 220 err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateFleet{}, middleware.After) 221 if err != nil { 222 return err 223 } 224 if err = addSetLoggerMiddleware(stack, options); err != nil { 225 return err 226 } 227 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 228 return err 229 } 230 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 231 return err 232 } 233 if err = addResolveEndpointMiddleware(stack, options); err != nil { 234 return err 235 } 236 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 237 return err 238 } 239 if err = addRetryMiddlewares(stack, options); err != nil { 240 return err 241 } 242 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 243 return err 244 } 245 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 246 return err 247 } 248 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 249 return err 250 } 251 if err = addClientUserAgent(stack); err != nil { 252 return err 253 } 254 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 255 return err 256 } 257 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 258 return err 259 } 260 if err = addOpUpdateFleetValidationMiddleware(stack); err != nil { 261 return err 262 } 263 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFleet(options.Region), middleware.Before); err != nil { 264 return err 265 } 266 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 267 return err 268 } 269 if err = addResponseErrorMiddleware(stack); err != nil { 270 return err 271 } 272 if err = addRequestResponseLogging(stack, options); err != nil { 273 return err 274 } 275 return nil 276} 277 278func newServiceMetadataMiddleware_opUpdateFleet(region string) *awsmiddleware.RegisterServiceMetadata { 279 return &awsmiddleware.RegisterServiceMetadata{ 280 Region: region, 281 ServiceID: ServiceID, 282 SigningName: "appstream", 283 OperationName: "UpdateFleet", 284 } 285} 286