updateFleetMetadata method
Updates fleet metadata, such as DisplayName.
May throw UnauthorizedException. May throw InternalServerErrorException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw TooManyRequestsException.
Parameter fleetArn
:
The ARN of the fleet.
Parameter displayName
:
The fleet name to display. The existing DisplayName is unset if null is
passed.
Parameter optimizeForEndUserLocation
:
The option to optimize for better performance by routing traffic through
the closest AWS Region to users, which may be outside of your home Region.
Implementation
Future<void> updateFleetMetadata({
required String fleetArn,
String? displayName,
bool? optimizeForEndUserLocation,
}) async {
ArgumentError.checkNotNull(fleetArn, 'fleetArn');
_s.validateStringLength(
'fleetArn',
fleetArn,
20,
2048,
isRequired: true,
);
_s.validateStringLength(
'displayName',
displayName,
0,
100,
);
final $payload = <String, dynamic>{
'FleetArn': fleetArn,
if (displayName != null) 'DisplayName': displayName,
if (optimizeForEndUserLocation != null)
'OptimizeForEndUserLocation': optimizeForEndUserLocation,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/UpdateFleetMetadata',
exceptionFnMap: _exceptionFns,
);
}