deleteRepositoryPermissionsPolicy method

Future<DeleteRepositoryPermissionsPolicyResult> deleteRepositoryPermissionsPolicy({
  1. required String domain,
  2. required String repository,
  3. String? domainOwner,
  4. String? policyRevision,
})

Deletes the resource policy that is set on a repository. After a resource policy is deleted, the permissions allowed and denied by the deleted policy are removed. The effect of deleting a resource policy might not be immediate.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter domain : The name of the domain that contains the repository associated with the resource policy to be deleted.

Parameter repository : The name of the repository that is associated with the resource policy to be deleted

Parameter domainOwner : The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

Parameter policyRevision : The revision of the repository's resource policy to be deleted. This revision is used for optimistic locking, which prevents others from accidentally overwriting your changes to the repository's resource policy.

Implementation

Future<DeleteRepositoryPermissionsPolicyResult>
    deleteRepositoryPermissionsPolicy({
  required String domain,
  required String repository,
  String? domainOwner,
  String? policyRevision,
}) async {
  final $query = <String, List<String>>{
    'domain': [domain],
    'repository': [repository],
    if (domainOwner != null) 'domain-owner': [domainOwner],
    if (policyRevision != null) 'policy-revision': [policyRevision],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/v1/repository/permissions/policies',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DeleteRepositoryPermissionsPolicyResult.fromJson(response);
}