This API works with the following fleet types: EC2
Updates permissions that allow inbound traffic to connect to game sessions in the fleet.
To update settings, specify the fleet ID to be updated and specify the changes to be made. 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 identifiers for the updated fleet are returned. For fleets with remote locations, port setting updates can take time to propagate across all locations. You can check the status of updates in each location by calling DescribeFleetPortSettings with a location name.
Learn more
Setting up Amazon GameLift Servers fleets
Parameters:
-
fleet_id
(Optional[FleetIdOrArn], default:
None
)
–
A unique identifier for the fleet to update port settings for. You can use either the fleet ID or ARN value.
-
inbound_permission_authorizations
(Optional[IpPermissionsList], default:
None
)
–
A collection of port settings to be added to the fleet resource.
-
inbound_permission_revocations
(Optional[IpPermissionsList], default:
None
)
–
A collection of port settings to be removed from the fleet resource.
Raises:
-
ConflictException
–
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
-
InternalServiceException
–
The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
-
InvalidFleetStatusException
–
The requested operation would cause a conflict with the current state of a resource associated with the request and/or the fleet. Resolve the conflict before retrying.
-
InvalidRequestException
–
One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.
-
LimitExceededException
–
The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue before retrying.
-
NotFoundException
–
The requested resource was not found. The resource was either not created yet or deleted.
-
UnauthorizedException
–
The client failed authentication. Clients should not retry such requests.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_gamelift/_services/async_game_lift.py
| async def update_fleet_port_settings(
self,
*,
config_overrides: Optional[AsyncGameLiftClientConfig] = None,
fleet_id: Optional["capo_gamelift.types.fleet_id_or_arn.FleetIdOrArn"] = None,
inbound_permission_authorizations: Optional[
"capo_gamelift.types.ip_permissions_list.IpPermissionsList"
] = None,
inbound_permission_revocations: Optional[
"capo_gamelift.types.ip_permissions_list.IpPermissionsList"
] = None,
) -> "capo_gamelift.types.update_fleet_port_settings_output.UpdateFleetPortSettingsOutput":
"""<p> <b>This API works with the following fleet types:</b> EC2</p> <p>Updates permissions that allow inbound traffic to connect to game sessions in the fleet. </p> <p>To update settings, specify the fleet ID to be updated and specify the changes to be made. List the permissions you want to add in <code>InboundPermissionAuthorizations</code>, and permissions you want to remove in <code>InboundPermissionRevocations</code>. Permissions to be removed must match existing fleet permissions. </p> <p>If successful, the fleet identifiers for the updated fleet are returned. For fleets with remote locations, port setting updates can take time to propagate across all locations. You can check the status of updates in each location by calling <code>DescribeFleetPortSettings</code> with a location name.</p> <p> <b>Learn more</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html">Setting up Amazon GameLift Servers fleets</a> </p>
Args:
fleet_id: <p>A unique identifier for the fleet to update port settings for. You can use either the fleet ID or ARN value.</p>
inbound_permission_authorizations: <p>A collection of port settings to be added to the fleet resource.</p>
inbound_permission_revocations: <p>A collection of port settings to be removed from the fleet resource.</p>
Raises:
capo_gamelift.errors.conflict_exception.ConflictException: <p>The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.</p> <p></p>
capo_gamelift.errors.internal_service_exception.InternalServiceException: <p>The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.</p>
capo_gamelift.errors.invalid_fleet_status_exception.InvalidFleetStatusException: <p>The requested operation would cause a conflict with the current state of a resource associated with the request and/or the fleet. Resolve the conflict before retrying.</p>
capo_gamelift.errors.invalid_request_exception.InvalidRequestException: <p>One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.</p>
capo_gamelift.errors.limit_exceeded_exception.LimitExceededException: <p>The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue before retrying.</p>
capo_gamelift.errors.not_found_exception.NotFoundException: <p>The requested resource was not found. The resource was either not created yet or deleted.</p>
capo_gamelift.errors.unauthorized_exception.UnauthorizedException: <p>The client failed authentication. Clients should not retry such requests.</p>
capo_gamelift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_gamelift.types.update_fleet_port_settings_input.UpdateFleetPortSettingsInput]",
) -> AsyncOperationResponse[
"capo_gamelift.types.update_fleet_port_settings_output.UpdateFleetPortSettingsOutput"
]:
import capo_gamelift._operations.game_lift.update_fleet_port_settings
(
output,
http_response,
) = await capo_gamelift._operations.game_lift.update_fleet_port_settings.async_update_fleet_port_settings(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_gamelift.types.update_fleet_port_settings_input.UpdateFleetPortSettingsInput",
) -> dict[str, Any]:
import capo_gamelift.types.update_fleet_port_settings_input
return (
capo_gamelift.types.update_fleet_port_settings_input.redact_sensitive(
input_
)
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("UpdateFleetPortSettings", redact_input=_redact_input),
)
input_: capo_gamelift.types.update_fleet_port_settings_input.UpdateFleetPortSettingsInput = {}
if fleet_id is not None:
input_["fleet_id"] = fleet_id
if inbound_permission_authorizations is not None:
input_["inbound_permission_authorizations"] = (
inbound_permission_authorizations
)
if inbound_permission_revocations is not None:
input_["inbound_permission_revocations"] = inbound_permission_revocations
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|