put_repository_permissions_policy
async
¶
put_repository_permissions_policy(
domain: DomainName,
repository: RepositoryName,
policy_document: PolicyDocument,
*,
config_overrides: Optional[AsynccodeartifactClientConfig] = None,
domain_owner: Optional[AccountId] = None,
policy_revision: Optional[PolicyRevision] = None,
) -> PutRepositoryPermissionsPolicyResult
Sets the resource policy on a repository that specifies permissions to access it.
When you call PutRepositoryPermissionsPolicy, the resource policy on the repository is ignored when evaluting permissions. This ensures that the owner of a repository cannot lock themselves out of the repository, which would prevent them from being able to update the resource policy.
Parameters:
-
domain(DomainName) –The name of the domain containing the repository to set the resource policy on.
-
domain_owner(Optional[AccountId], default:None) –The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
-
repository(RepositoryName) –The name of the repository to set the resource policy on.
-
policy_revision(Optional[PolicyRevision], default:None) –Sets the revision of the resource policy that specifies permissions to access the repository. This revision is used for optimistic locking, which prevents others from overwriting your changes to the repository's resource policy.
-
policy_document(PolicyDocument) –A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided repository.
Raises:
-
AccessDeniedException–The operation did not succeed because of an unauthorized access attempt.
-
ConflictException–The operation did not succeed because prerequisites are not met.
-
InternalServerException–The operation did not succeed because of an error that occurred inside CodeArtifact.
-
ResourceNotFoundException–The operation did not succeed because the resource requested is not found in the service.
-
ServiceQuotaExceededException–The operation did not succeed because it would have exceeded a service limit for your account.
-
ThrottlingException–The operation did not succeed because too many requests are sent to the service.
-
ValidationException–The operation did not succeed because a parameter in the request was sent with an invalid value.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codeartifact/_services/async_codeartifact.py
3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 | |