updateFleetPortSettings method
- required String fleetId,
- List<
IpPermission> ? inboundPermissionAuthorizations, - List<
IpPermission> ? inboundPermissionRevocations,
Updates port settings for a fleet. To update settings, specify the fleet
ID to be updated and list the permissions you want to update. List the
permissions you want to add in
InboundPermissionAuthorizations, and permissions you want to
remove in InboundPermissionRevocations. Permissions to be
removed must match existing fleet permissions. If successful, the fleet ID
for the updated fleet is returned.
Learn more
Related operations
- CreateFleet
- ListFleets
- DeleteFleet
- DescribeFleetAttributes
- Update fleets:
- StartFleetActions or StopFleetActions
May throw NotFoundException. May throw ConflictException. May throw InvalidFleetStatusException. May throw LimitExceededException. May throw InternalServiceException. May throw InvalidRequestException. May throw UnauthorizedException.
Parameter fleetId :
A unique identifier for a fleet to update port settings for. You can use
either the fleet ID or ARN value.
Parameter inboundPermissionAuthorizations :
A collection of port settings to be added to the fleet resource.
Parameter inboundPermissionRevocations :
A collection of port settings to be removed from the fleet resource.
Implementation
Future<UpdateFleetPortSettingsOutput> updateFleetPortSettings({
required String fleetId,
List<IpPermission>? inboundPermissionAuthorizations,
List<IpPermission>? inboundPermissionRevocations,
}) async {
ArgumentError.checkNotNull(fleetId, 'fleetId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.UpdateFleetPortSettings'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FleetId': fleetId,
if (inboundPermissionAuthorizations != null)
'InboundPermissionAuthorizations': inboundPermissionAuthorizations,
if (inboundPermissionRevocations != null)
'InboundPermissionRevocations': inboundPermissionRevocations,
},
);
return UpdateFleetPortSettingsOutput.fromJson(jsonResponse.body);
}