This API works with the following fleet types: EC2, Anywhere
Retrieves core fleet-wide properties for fleets in an Amazon Web Services Region. Properties include the computing hardware and deployment configuration for instances in the fleet.
You can use this operation in the following ways:
-
To get attributes for specific fleets, provide a list of fleet IDs or fleet ARNs.
-
To get attributes for all fleets, do not provide a fleet identifier.
When requesting attributes for multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages.
If successful, a FleetAttributes object is returned for each fleet requested, unless the fleet identifier is not found.
Some API operations limit the number of fleet IDs that are allowed in one request. If a request exceeds this limit, the request fails and the error message contains the maximum allowed number.
Learn more
Setting up Amazon GameLift Servers fleets
Parameters:
-
fleet_ids
(Optional[FleetIdOrArnList], default:
None
)
–
A list of unique fleet identifiers to retrieve attributes for. You can use either the fleet ID or ARN value. To retrieve attributes for all current fleets, do not include this parameter.
-
limit
(Optional[PositiveInteger], default:
None
)
–
The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.
-
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. This parameter is ignored when the request specifies one or a list of fleet IDs.
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
| async def describe_fleet_attributes(
self,
*,
config_overrides: Optional[AsyncGameLiftClientConfig] = None,
fleet_ids: Optional[
"capo_gamelift.types.fleet_id_or_arn_list.FleetIdOrArnList"
] = None,
limit: Optional["capo_gamelift.types.positive_integer.PositiveInteger"] = None,
next_token: Optional[
"capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
] = None,
) -> "capo_gamelift.types.describe_fleet_attributes_output.DescribeFleetAttributesOutput":
"""<p> <b>This API works with the following fleet types:</b> EC2, Anywhere</p> <p>Retrieves core fleet-wide properties for fleets in an Amazon Web Services Region. Properties include the computing hardware and deployment configuration for instances in the fleet.</p> <p>You can use this operation in the following ways: </p> <ul> <li> <p>To get attributes for specific fleets, provide a list of fleet IDs or fleet ARNs.</p> </li> <li> <p>To get attributes for all fleets, do not provide a fleet identifier.</p> </li> </ul> <p>When requesting attributes for multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. </p> <p>If successful, a <code>FleetAttributes</code> object is returned for each fleet requested, unless the fleet identifier is not found. </p> <note> <p>Some API operations limit the number of fleet IDs that are allowed in one request. If a request exceeds this limit, the request fails and the error message contains the maximum allowed number.</p> </note> <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_ids: <p>A list of unique fleet identifiers to retrieve attributes for. You can use either the fleet ID or ARN value. To retrieve attributes for all current fleets, do not include this parameter. </p>
limit: <p>The maximum number of results to return. Use this parameter with <code>NextToken</code> to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.</p>
next_token: <p>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. This parameter is ignored when the request specifies one or a list of fleet IDs.</p>
Raises:
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_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.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.describe_fleet_attributes_input.DescribeFleetAttributesInput]",
) -> AsyncOperationResponse[
"capo_gamelift.types.describe_fleet_attributes_output.DescribeFleetAttributesOutput"
]:
import capo_gamelift._operations.game_lift.describe_fleet_attributes
(
output,
http_response,
) = await capo_gamelift._operations.game_lift.describe_fleet_attributes.async_describe_fleet_attributes(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeFleetAttributes")
)
input_: capo_gamelift.types.describe_fleet_attributes_input.DescribeFleetAttributesInput = {}
if fleet_ids is not None:
input_["fleet_ids"] = fleet_ids
if limit is not None:
input_["limit"] = limit
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|