Removes the association between Amazon CodeGuru Reviewer and a repository.
Parameters:
Raises:
-
AccessDeniedException
–
You do not have sufficient access to perform this action.
-
ConflictException
–
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
-
InternalServerException
–
The server encountered an internal error and is unable to complete the request.
-
NotFoundException
–
The resource specified in the request was not found.
-
ThrottlingException
–
The request was denied due to request throttling.
-
ValidationException
–
The input fails to satisfy the specified constraints.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_codeguru_reviewer/_services/code_guru_reviewer.py
| def disassociate_repository(
self,
association_arn: "capo_codeguru_reviewer.types.association_arn.AssociationArn",
*,
config_overrides: Optional[CodeGuruReviewerClientConfig] = None,
) -> "capo_codeguru_reviewer.types.disassociate_repository_response.DisassociateRepositoryResponse":
"""<p>Removes the association between Amazon CodeGuru Reviewer and a repository.</p>
Args:
association_arn: <p>The Amazon Resource Name (ARN) of the <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html">RepositoryAssociation</a> object. You can retrieve this ARN by calling <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html">ListRepositoryAssociations</a>.</p>
Raises:
capo_codeguru_reviewer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_codeguru_reviewer.errors.conflict_exception.ConflictException: <p>The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. </p>
capo_codeguru_reviewer.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
capo_codeguru_reviewer.errors.not_found_exception.NotFoundException: <p>The resource specified in the request was not found.</p>
capo_codeguru_reviewer.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_codeguru_reviewer.errors.validation_exception.ValidationException: <p>The input fails to satisfy the specified constraints.</p>
capo_codeguru_reviewer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_codeguru_reviewer.types.disassociate_repository_request.DisassociateRepositoryRequest]",
) -> OperationResponse[
"capo_codeguru_reviewer.types.disassociate_repository_response.DisassociateRepositoryResponse"
]:
import capo_codeguru_reviewer._operations.aws_guru_frontend_service.disassociate_repository
output, http_response = (
capo_codeguru_reviewer._operations.aws_guru_frontend_service.disassociate_repository.disassociate_repository(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateRepository")
)
input_: capo_codeguru_reviewer.types.disassociate_repository_request.DisassociateRepositoryRequest = {
"association_arn": association_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|