getResourcePolicy method

Future<GetResourcePolicyResponse> getResourcePolicy({
  1. String? registryName,
})

Retrieves the resource-based policy attached to a given registry.

May throw BadRequestException. May throw UnauthorizedException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException.

Parameter registryName : The name of the registry.

Implementation

Future<GetResourcePolicyResponse> getResourcePolicy({
  String? registryName,
}) async {
  final $query = <String, List<String>>{
    if (registryName != null) 'registryName': [registryName],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v1/policy',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetResourcePolicyResponse.fromJson(response);
}