put_domain_permissions_policy
¶
put_domain_permissions_policy(
domain: DomainName,
policy_document: PolicyDocument,
*,
config_overrides: Optional[codeartifactClientConfig] = None,
domain_owner: Optional[AccountId] = None,
policy_revision: Optional[PolicyRevision] = None,
) -> PutDomainPermissionsPolicyResult
Sets a resource policy on a domain that specifies permissions to access it.
When you call PutDomainPermissionsPolicy, the resource policy on the domain is ignored when evaluting permissions. This ensures that the owner of a domain cannot lock themselves out of the domain, which would prevent them from being able to update the resource policy.
Parameters:
-
domain(DomainName) –The name of the domain on which to set the resource policy.
-
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.
-
policy_revision(Optional[PolicyRevision], default:None) –The current revision of the resource policy to be set. This revision is used for optimistic locking, which prevents others from overwriting your changes to the domain'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 domain.
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/codeartifact.py
3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 | |