Skip to content

disassociate_fleet

disassociate_fleet(
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    fleet_name: Optional[String] = None,
    stack_name: Optional[String] = None,
) -> DisassociateFleetResult

Disassociates the specified fleet from the specified stack.

Parameters:

  • fleet_name (Optional[String], default: None ) –

    The name of the fleet.

  • stack_name (Optional[String], default: None ) –

    The name of the stack.

Raises:

Source code in docs_src/capo_appstream/_services/app_stream.py
def disassociate_fleet(
    self,
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    fleet_name: Optional["capo_appstream.types.string.String"] = None,
    stack_name: Optional["capo_appstream.types.string.String"] = None,
) -> "capo_appstream.types.disassociate_fleet_result.DisassociateFleetResult":
    """<p>Disassociates the specified fleet from 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.operation_not_permitted_exception.OperationNotPermittedException: <p>The attempted operation is not permitted.</p>
        capo_appstream.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is in use.</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.disassociate_fleet_request.DisassociateFleetRequest]",
    ) -> OperationResponse[
        "capo_appstream.types.disassociate_fleet_result.DisassociateFleetResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.disassociate_fleet

        output, http_response = (
            capo_appstream._operations.photon_admin_proxy_service.disassociate_fleet.disassociate_fleet(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateFleet")
    )
    input_: capo_appstream.types.disassociate_fleet_request.DisassociateFleetRequest = {}
    if fleet_name is not None:
        input_["fleet_name"] = fleet_name
    if stack_name is not None:
        input_["stack_name"] = stack_name

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output