Updates a scheduling policy.
Parameters:
-
arn
(Optional[String], default:
None
)
–
The Amazon Resource Name (ARN) of the scheduling policy to update.
-
quota_share_policy
(Optional[QuotaSharePolicy], default:
None
)
–
The quota share scheduling policy details. Once set during creation, a quotaSharePolicy cannot be removed or changed to a fairsharePolicy.
-
fairshare_policy
(Optional[FairsharePolicy], default:
None
)
–
The fair-share policy scheduling details. Once set during creation, a fairsharePolicy cannot be removed or changed to a quotaSharePolicy.
Raises:
-
ClientException
–
These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.
-
ServerException
–
These errors are usually caused by a server issue.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_batch/_services/batch.py
| def update_scheduling_policy(
self,
*,
config_overrides: Optional[BatchClientConfig] = None,
arn: Optional["capo_batch.types.string.String"] = None,
quota_share_policy: Optional[
"capo_batch.types.quota_share_policy.QuotaSharePolicy"
] = None,
fairshare_policy: Optional[
"capo_batch.types.fairshare_policy.FairsharePolicy"
] = None,
) -> "capo_batch.types.update_scheduling_policy_response.UpdateSchedulingPolicyResponse":
"""<p>Updates a scheduling policy.</p>
Args:
arn: <p>The Amazon Resource Name (ARN) of the scheduling policy to update.</p>
quota_share_policy: <p>The quota share scheduling policy details. Once set during creation, a quotaSharePolicy cannot be removed or changed to a fairsharePolicy.</p>
fairshare_policy: <p>The fair-share policy scheduling details. Once set during creation, a fairsharePolicy cannot be removed or changed to a quotaSharePolicy.</p>
Raises:
capo_batch.errors.client_exception.ClientException: <p>These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.</p>
capo_batch.errors.server_exception.ServerException: <p>These errors are usually caused by a server issue.</p>
capo_batch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_batch.types.update_scheduling_policy_request.UpdateSchedulingPolicyRequest]",
) -> OperationResponse[
"capo_batch.types.update_scheduling_policy_response.UpdateSchedulingPolicyResponse"
]:
import capo_batch._operations.aws_batch_v20160810.update_scheduling_policy
output, http_response = (
capo_batch._operations.aws_batch_v20160810.update_scheduling_policy.update_scheduling_policy(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateSchedulingPolicy")
)
input_: capo_batch.types.update_scheduling_policy_request.UpdateSchedulingPolicyRequest = {}
if arn is not None:
input_["arn"] = arn
if quota_share_policy is not None:
input_["quota_share_policy"] = quota_share_policy
if fairshare_policy is not None:
input_["fairshare_policy"] = fairshare_policy
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|