Associates the specified fleet with the specified stack.
Parameters:
Raises:
Source code in docs_src/capo_appstream/_services/async_app_stream.py
| async def associate_fleet(
self,
*,
config_overrides: Optional[AsyncAppStreamClientConfig] = None,
fleet_name: Optional["capo_appstream.types.string.String"] = None,
stack_name: Optional["capo_appstream.types.string.String"] = None,
) -> "capo_appstream.types.associate_fleet_result.AssociateFleetResult":
"""<p>Associates the specified fleet with the specified stack.</p>
Args:
fleet_name: <p>The name of the fleet. </p>
stack_name: <p>The name of the stack.</p>
Raises:
capo_appstream.errors.concurrent_modification_exception.ConcurrentModificationException: <p>An API error occurred. Wait a few minutes and try again.</p>
capo_appstream.errors.incompatible_image_exception.IncompatibleImageException: <p>The image can't be updated because it's not compatible for updates.</p>
capo_appstream.errors.invalid_account_status_exception.InvalidAccountStatusException: <p>The resource cannot be created because your AWS account is suspended. For assistance, contact AWS Support. </p>
capo_appstream.errors.limit_exceeded_exception.LimitExceededException: <p>The requested limit exceeds the permitted limit for an account.</p>
capo_appstream.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>The attempted operation is not permitted.</p>
capo_appstream.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_appstream.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_appstream.types.associate_fleet_request.AssociateFleetRequest]",
) -> AsyncOperationResponse[
"capo_appstream.types.associate_fleet_result.AssociateFleetResult"
]:
import capo_appstream._operations.photon_admin_proxy_service.associate_fleet
(
output,
http_response,
) = await capo_appstream._operations.photon_admin_proxy_service.associate_fleet.async_associate_fleet(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociateFleet")
)
input_: capo_appstream.types.associate_fleet_request.AssociateFleetRequest = {}
if fleet_name is not None:
input_["fleet_name"] = fleet_name
if stack_name is not None:
input_["stack_name"] = stack_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|