list_fleets
async
¶
list_fleets(
*,
config_overrides: Optional[AsyncGameLiftClientConfig] = 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/async_game_lift.py
6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 | |