Get credentials from the fleet role for a worker.
Parameters:
-
farm_id
(FarmId)
–
The farm ID for the fleet's farm.
-
fleet_id
(FleetId)
–
The fleet ID that contains the worker.
-
worker_id
(WorkerId)
–
The ID of the worker assuming the fleet role.
Raises:
Source code in docs_src/capo_deadline/_services/deadline.py
| def assume_fleet_role_for_worker(
self,
farm_id: "capo_deadline.types.farm_id.FarmId",
fleet_id: "capo_deadline.types.fleet_id.FleetId",
worker_id: "capo_deadline.types.worker_id.WorkerId",
*,
config_overrides: Optional[deadlineClientConfig] = None,
) -> "capo_deadline.types.assume_fleet_role_for_worker_response.AssumeFleetRoleForWorkerResponse":
"""<p>Get credentials from the fleet role for a worker.</p>
Args:
farm_id: <p>The farm ID for the fleet's farm.</p>
fleet_id: <p>The fleet ID that contains the worker.</p>
worker_id: <p>The ID of the worker assuming the fleet role.</p>
Raises:
capo_deadline.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
capo_deadline.errors.conflict_exception.ConflictException: <p>Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.</p>
capo_deadline.errors.internal_server_error_exception.InternalServerErrorException: <p>Deadline Cloud can't process your request right now. Try again later.</p>
capo_deadline.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
capo_deadline.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a request rate quota.</p>
capo_deadline.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
capo_deadline.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_deadline.types.assume_fleet_role_for_worker_request.AssumeFleetRoleForWorkerRequest]",
) -> OperationResponse[
"capo_deadline.types.assume_fleet_role_for_worker_response.AssumeFleetRoleForWorkerResponse"
]:
import capo_deadline._operations.deadline.assume_fleet_role_for_worker
output, http_response = (
capo_deadline._operations.deadline.assume_fleet_role_for_worker.assume_fleet_role_for_worker(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssumeFleetRoleForWorker")
)
input_: capo_deadline.types.assume_fleet_role_for_worker_request.AssumeFleetRoleForWorkerRequest = {
"farm_id": farm_id,
"fleet_id": fleet_id,
"worker_id": worker_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|