describe_container_group_port_mappings
¶
describe_container_group_port_mappings(
*,
config_overrides: Optional[GameLiftClientConfig] = None,
fleet_id: Optional[FleetIdOrArn] = None,
container_group_type: Optional[ContainerGroupType] = None,
compute_name: Optional[ComputeNameOrArn] = None,
instance_id: Optional[InstanceId] = None,
container_name: Optional[ContainerNameQueryFilter] = None,
) -> DescribeContainerGroupPortMappingsOutput
This API works with the following fleet types: Container
Retrieves the port mappings for a container group running on a container fleet. Port mappings show how container ports are mapped to connection ports on the fleet instance. Use this operation to find the connection port for a specific container on a fleet instance.
Request options
-
Get port mappings for a game server container group. Provide the fleet ID, set
ContainerGroupTypetoGAME_SERVER, and specify theComputeNamefor the game server container group. -
Get port mappings for a per-instance container group. Provide the fleet ID, set
ContainerGroupTypetoPER_INSTANCE, and specify theInstanceIdfor the instance. -
Optionally filter results to a single container by providing a
ContainerName.
Results
This operation returns the fleet ID, fleet ARN, location, container group definition ARN, container group type, compute name (for game server container groups), instance ID, and a list of ContainerGroupPortMapping objects. Each object contains the container name, runtime ID, and a list of port mappings that show how container ports map to connection ports on the instance.
Learn more
Create a container group definition
Parameters:
-
fleet_id(Optional[FleetIdOrArn], default:None) –A unique identifier for the container fleet. You can use either the fleet ID or ARN value.
-
container_group_type(Optional[ContainerGroupType], default:None) –The type of container group to retrieve port mappings for.
-
GAME_SERVER-- Get port mappings for a game server container group. -
PER_INSTANCE-- Get port mappings for a per-instance container group.
-
-
compute_name(Optional[ComputeNameOrArn], default:None) –A unique identifier for the compute resource for which to retrieve port mappings. For a container fleet, a compute represents a game server container group running on a fleet instance. You can use either the compute name or ARN value.
When
ContainerGroupTypeisGAME_SERVER, this parameter is required.When
ContainerGroupTypeisPER_INSTANCE, do not provide this parameter. If you provide a compute name withPER_INSTANCE, the request fails with anInvalidRequestException. -
instance_id(Optional[InstanceId], default:None) –A unique identifier for the fleet instance to retrieve port mappings for.
When
ContainerGroupTypeisPER_INSTANCE, this parameter is required.When
ContainerGroupTypeisGAME_SERVER, this parameter is optional. If you provide an instance ID, it must match the instance that's running the specified compute. If the instance ID doesn't match, the request fails with anInvalidRequestException. -
container_name(Optional[ContainerNameQueryFilter], default:None) –A container name to filter the results. When provided, the operation returns port mappings for the specified container only. If no container with the specified name exists in the container group, the request fails with a
NotFoundException.If not provided, the operation returns port mappings for all containers in the container group.
Raises:
-
InternalServiceException–The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
-
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.
-
UnsupportedRegionException–The requested operation is not supported in the Region specified.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_gamelift/_services/game_lift.py
3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 | |