Skip to content

list_quota_shares

list_quota_shares(
    *,
    config_overrides: Optional[BatchClientConfig] = None,
    job_queue: Optional[String] = None,
    max_results: Optional[Integer] = None,
    next_token: Optional[String] = None,
) -> ListQuotaSharesResponse

Returns a list of Batch quota shares associated with a job queue.

Parameters:

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

    The name or full Amazon Resource Name (ARN) of the job queue used to list quota shares.

  • max_results (Optional[Integer], default: None ) –

    The maximum number of results returned by ListQuotaShares in paginated output. When this parameter is used, ListQuotaShares only returns maxResults results in a single page and a nextToken response element. You can see the remaining results of the initial request by sending another ListQuotaShares request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, ListQuotaShares returns up to 100 results and a nextToken value if applicable.

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

    The nextToken value that's returned from a previous paginated ListQuotaShares request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

    Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.

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 list_quota_shares(
    self,
    *,
    config_overrides: Optional[BatchClientConfig] = None,
    job_queue: Optional["capo_batch.types.string.String"] = None,
    max_results: Optional["capo_batch.types.integer.Integer"] = None,
    next_token: Optional["capo_batch.types.string.String"] = None,
) -> "capo_batch.types.list_quota_shares_response.ListQuotaSharesResponse":
    """<p>Returns a list of Batch quota shares associated with a job queue.</p>

    Args:
        job_queue: <p>The name or full Amazon Resource Name (ARN) of the job queue used to list quota shares.</p>
        max_results: <p>The maximum number of results returned by <code>ListQuotaShares</code> in paginated output. When this parameter is used, <code>ListQuotaShares</code> only returns <code>maxResults</code> results in a single page and a <code>nextToken</code> response element. You can see the remaining results of the initial request by sending another <code>ListQuotaShares</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter isn't used, <code>ListQuotaShares</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p>
        next_token: <p>The <code>nextToken</code> value that's returned from a previous paginated <code>ListQuotaShares</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is <code>null</code> when there are no more results to return.</p> <note> <p>Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note>

    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.list_quota_shares_request.ListQuotaSharesRequest]",
    ) -> OperationResponse[
        "capo_batch.types.list_quota_shares_response.ListQuotaSharesResponse"
    ]:
        import capo_batch._operations.aws_batch_v20160810.list_quota_shares

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListQuotaShares")
    )
    input_: capo_batch.types.list_quota_shares_request.ListQuotaSharesRequest = {}
    if job_queue is not None:
        input_["job_queue"] = job_queue
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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