list_fleets
¶
list_fleets(
*,
config_overrides: Optional[GameLiftClientConfig] = None,
build_id: Optional[BuildIdOrArn] = None,
script_id: Optional[ScriptIdOrArn] = None,
limit: Optional[PositiveInteger] = None,
next_token: Optional[NonZeroAndMaxString] = None,
) -> ListFleetsOutput
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves a collection of fleet resources in an Amazon Web Services Region. You can filter the result set to find only those fleets that are deployed with a specific build or script. For fleets that have multiple locations, this operation retrieves fleets based on their home Region only.
You can use this operation in the following ways:
-
To get a list of all fleets in a Region, don't provide a build or script identifier.
-
To get a list of all fleets where a specific game build is deployed, provide the build ID.
-
To get a list of all Amazon GameLift Servers Realtime fleets with a specific configuration script, provide the script ID.
Use the pagination parameters to retrieve results as a set of sequential pages.
If successful, this operation returns a list of fleet IDs that match the request parameters. A NextToken value is also returned if there are more result pages to retrieve.
Fleet IDs are returned in no particular order.
Parameters:
-
build_id(Optional[BuildIdOrArn], default:None) –A unique identifier for the build to request fleets for. Use this parameter to return only fleets using a specified build. Use either the build ID or ARN value.
-
script_id(Optional[ScriptIdOrArn], default:None) –A unique identifier for the Realtime script to request fleets for. Use this parameter to return only fleets using a specified script. Use either the script ID or ARN value.
-
limit(Optional[PositiveInteger], default:None) –The maximum number of results to return. Use this parameter with
NextTokento get results as a set of sequential pages. -
next_token(Optional[NonZeroAndMaxString], default:None) –A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.
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.
-
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/game_lift.py
6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 | |