Skip to content

update_quota_share

update_quota_share(
    *,
    config_overrides: Optional[BatchClientConfig] = None,
    quota_share_arn: Optional[String] = None,
    capacity_limits: Optional[QuotaShareCapacityLimits] = None,
    resource_sharing_configuration: Optional[
        QuotaShareResourceSharingConfiguration
    ] = None,
    preemption_configuration: Optional[QuotaSharePreemptionConfiguration] = None,
    state: Optional[QuotaShareState] = None,
) -> UpdateQuotaShareResponse

Updates a quota share.

Parameters:

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

    The Amazon Resource Name (ARN) of the quota share to update.

  • capacity_limits (Optional[QuotaShareCapacityLimits], default: None ) –

    A list that specifies the quantity and type of compute capacity allocated to the quota share.

  • resource_sharing_configuration (Optional[QuotaShareResourceSharingConfiguration], default: None ) –

    Specifies whether a quota share reserves, lends, or both lends and borrows idle compute capacity.

  • preemption_configuration (Optional[QuotaSharePreemptionConfiguration], default: None ) –

    Specifies the preemption behavior for jobs in a quota share.

  • state (Optional[QuotaShareState], default: None ) –

    The state of the quota share. If the quota share is ENABLED, it is able to accept jobs. If the quota share is DISABLED, new jobs won't be accepted but jobs already submitted can finish.

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_quota_share(
    self,
    *,
    config_overrides: Optional[BatchClientConfig] = None,
    quota_share_arn: Optional["capo_batch.types.string.String"] = None,
    capacity_limits: Optional[
        "capo_batch.types.quota_share_capacity_limits.QuotaShareCapacityLimits"
    ] = None,
    resource_sharing_configuration: Optional[
        "capo_batch.types.quota_share_resource_sharing_configuration.QuotaShareResourceSharingConfiguration"
    ] = None,
    preemption_configuration: Optional[
        "capo_batch.types.quota_share_preemption_configuration.QuotaSharePreemptionConfiguration"
    ] = None,
    state: Optional["capo_batch.types.quota_share_state.QuotaShareState"] = None,
) -> "capo_batch.types.update_quota_share_response.UpdateQuotaShareResponse":
    """<p>Updates a quota share.</p>

    Args:
        quota_share_arn: <p>The Amazon Resource Name (ARN) of the quota share to update.</p>
        capacity_limits: <p>A list that specifies the quantity and type of compute capacity allocated to the quota share.</p>
        resource_sharing_configuration: <p>Specifies whether a quota share reserves, lends, or both lends and borrows idle compute capacity.</p>
        preemption_configuration: <p>Specifies the preemption behavior for jobs in a quota share.</p>
        state: <p>The state of the quota share. If the quota share is <code>ENABLED</code>, it is able to accept jobs. If the quota share is <code>DISABLED</code>, new jobs won't be accepted but jobs already submitted can finish.</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_quota_share_request.UpdateQuotaShareRequest]",
    ) -> OperationResponse[
        "capo_batch.types.update_quota_share_response.UpdateQuotaShareResponse"
    ]:
        import capo_batch._operations.aws_batch_v20160810.update_quota_share

        output, http_response = (
            capo_batch._operations.aws_batch_v20160810.update_quota_share.update_quota_share(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateQuotaShare")
    )
    input_: capo_batch.types.update_quota_share_request.UpdateQuotaShareRequest = {}
    if quota_share_arn is not None:
        input_["quota_share_arn"] = quota_share_arn
    if capacity_limits is not None:
        input_["capacity_limits"] = capacity_limits
    if resource_sharing_configuration is not None:
        input_["resource_sharing_configuration"] = resource_sharing_configuration
    if preemption_configuration is not None:
        input_["preemption_configuration"] = preemption_configuration
    if state is not None:
        input_["state"] = state

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