Skip to content

list_repositories_for_approval_rule_template async

list_repositories_for_approval_rule_template(
    approval_rule_template_name: ApprovalRuleTemplateName,
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListRepositoriesForApprovalRuleTemplateOutput

Lists all repositories associated with the specified approval rule template.

Parameters:

  • approval_rule_template_name (ApprovalRuleTemplateName) –

    The name of the approval rule template for which you want to list repositories that are associated with that template.

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

    An enumeration token that, when provided in a request, returns the next batch of the results.

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

    A non-zero, non-negative integer used to limit the number of returned results.

Raises:

Source code in docs_src/capo_codecommit/_services/async_code_commit.py
async def list_repositories_for_approval_rule_template(
    self,
    approval_rule_template_name: "capo_codecommit.types.approval_rule_template_name.ApprovalRuleTemplateName",
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
    next_token: Optional["capo_codecommit.types.next_token.NextToken"] = None,
    max_results: Optional["capo_codecommit.types.max_results.MaxResults"] = None,
) -> "capo_codecommit.types.list_repositories_for_approval_rule_template_output.ListRepositoriesForApprovalRuleTemplateOutput":
    """<p>Lists all repositories associated with the specified approval rule template.</p>

    Args:
        approval_rule_template_name: <p>The name of the approval rule template for which you want to list repositories that are associated with that template.</p>
        next_token: <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
        max_results: <p>A non-zero, non-negative integer used to limit the number of returned results.</p>

    Raises:
        capo_codecommit.errors.approval_rule_template_does_not_exist_exception.ApprovalRuleTemplateDoesNotExistException: <p>The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.</p>
        capo_codecommit.errors.approval_rule_template_name_required_exception.ApprovalRuleTemplateNameRequiredException: <p>An approval rule template name is required, but was not specified.</p>
        capo_codecommit.errors.encryption_integrity_checks_failed_exception.EncryptionIntegrityChecksFailedException: <p>An encryption integrity check failed.</p>
        capo_codecommit.errors.encryption_key_access_denied_exception.EncryptionKeyAccessDeniedException: <p>An encryption key could not be accessed.</p>
        capo_codecommit.errors.encryption_key_disabled_exception.EncryptionKeyDisabledException: <p>The encryption key is disabled.</p>
        capo_codecommit.errors.encryption_key_not_found_exception.EncryptionKeyNotFoundException: <p>No encryption key was found.</p>
        capo_codecommit.errors.encryption_key_unavailable_exception.EncryptionKeyUnavailableException: <p>The encryption key is not available.</p>
        capo_codecommit.errors.invalid_approval_rule_template_name_exception.InvalidApprovalRuleTemplateNameException: <p>The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html">Quotas</a> in the <i>CodeCommit User Guide</i>.</p>
        capo_codecommit.errors.invalid_continuation_token_exception.InvalidContinuationTokenException: <p>The specified continuation token is not valid.</p>
        capo_codecommit.errors.invalid_max_results_exception.InvalidMaxResultsException: <p>The specified number of maximum results is not valid.</p>
        capo_codecommit.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codecommit.types.list_repositories_for_approval_rule_template_input.ListRepositoriesForApprovalRuleTemplateInput]",
    ) -> AsyncOperationResponse[
        "capo_codecommit.types.list_repositories_for_approval_rule_template_output.ListRepositoriesForApprovalRuleTemplateOutput"
    ]:
        import capo_codecommit._operations.code_commit_20150413.list_repositories_for_approval_rule_template

        (
            output,
            http_response,
        ) = await capo_codecommit._operations.code_commit_20150413.list_repositories_for_approval_rule_template.async_list_repositories_for_approval_rule_template(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListRepositoriesForApprovalRuleTemplate"),
    )
    input_: capo_codecommit.types.list_repositories_for_approval_rule_template_input.ListRepositoriesForApprovalRuleTemplateInput = {
        "approval_rule_template_name": approval_rule_template_name
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output