Associates the specified application with the specified fleet. This is only supported for Elastic fleets.
Parameters:
-
fleet_name
(Optional[Name], default:
None
)
–
-
application_arn
(Optional[Arn], default:
None
)
–
The ARN of the application.
Raises:
Source code in docs_src/capo_appstream/_services/app_stream.py
| def associate_application_fleet(
self,
*,
config_overrides: Optional[AppStreamClientConfig] = None,
fleet_name: Optional["capo_appstream.types.name.Name"] = None,
application_arn: Optional["capo_appstream.types.arn.Arn"] = None,
) -> "capo_appstream.types.associate_application_fleet_result.AssociateApplicationFleetResult":
"""<p>Associates the specified application with the specified fleet. This is only supported for Elastic fleets.</p>
Args:
fleet_name: <p>The name of the fleet.</p>
application_arn: <p>The ARN of the application.</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.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Indicates an incorrect combination of parameters, or a missing parameter.</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.
"""
def _handler(
req: "OperationRequest[capo_appstream.types.associate_application_fleet_request.AssociateApplicationFleetRequest]",
) -> OperationResponse[
"capo_appstream.types.associate_application_fleet_result.AssociateApplicationFleetResult"
]:
import capo_appstream._operations.photon_admin_proxy_service.associate_application_fleet
output, http_response = (
capo_appstream._operations.photon_admin_proxy_service.associate_application_fleet.associate_application_fleet(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociateApplicationFleet")
)
input_: capo_appstream.types.associate_application_fleet_request.AssociateApplicationFleetRequest = {}
if fleet_name is not None:
input_["fleet_name"] = fleet_name
if application_arn is not None:
input_["application_arn"] = application_arn
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|