getRepositoryEndpoint method
Returns the endpoint of a repository for a specific package format. A repository has one endpoint for each package format:
-
cargo -
generic -
maven -
npm -
nuget -
pypi -
ruby -
swift
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domain :
The name of the domain that contains the repository.
Parameter format :
Returns which endpoint of a repository to return. A repository has one
endpoint for each package format.
Parameter repository :
The name of the repository.
Parameter domainOwner :
The 12-digit account number of the Amazon Web Services account that owns
the domain that contains the repository. It does not include dashes or
spaces.
Parameter endpointType :
A string that specifies the type of endpoint.
Implementation
Future<GetRepositoryEndpointResult> getRepositoryEndpoint({
required String domain,
required PackageFormat format,
required String repository,
String? domainOwner,
EndpointType? endpointType,
}) async {
final $query = <String, List<String>>{
'domain': [domain],
'format': [format.value],
'repository': [repository],
if (domainOwner != null) 'domain-owner': [domainOwner],
if (endpointType != null) 'endpointType': [endpointType.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/v1/repository/endpoint',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetRepositoryEndpointResult.fromJson(response);
}