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
4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 | |