listRepositoryAssociations method
- int? maxResults,
- List<
String> ? names, - String? nextToken,
- List<
String> ? owners, - List<
ProviderType> ? providerTypes, - List<
RepositoryAssociationState> ? states,
Returns a list of
RepositoryAssociationSummary
objects that contain
summary information about a repository association. You can filter the
returned list by
ProviderType
,
Name
,
State
, and
Owner
.
May throw InternalServerException. May throw ValidationException. May throw ThrottlingException.
Parameter maxResults
:
The maximum number of repository association results returned by
ListRepositoryAssociations
in paginated output. When this
parameter is used, ListRepositoryAssociations
only returns
maxResults
results in a single page with a
nextToken
response element. The remaining results of the
initial request can be seen by sending another
ListRepositoryAssociations
request with the returned
nextToken
value. This value can be between 1 and 100. If this
parameter is not used, ListRepositoryAssociations
returns up
to 100 results and a nextToken
value if applicable.
Parameter names
:
List of repository names to use as a filter.
Parameter nextToken
:
The nextToken
value returned from a previous paginated
ListRepositoryAssociations
request where
maxResults
was used and the results exceeded the value of
that parameter. Pagination continues from the end of the previous results
that returned the nextToken
value.
Parameter owners
:
List of owners to use as a filter. For AWS CodeCommit, it is the name of
the CodeCommit account that was used to associate the repository. For
other repository source providers, such as Bitbucket and GitHub Enterprise
Server, this is name of the account that was used to associate the
repository.
Parameter providerTypes
:
List of provider types to use as a filter.
Parameter states
:
List of repository association states to use as a filter.
The valid repository association states are:
- Associated: The repository association is complete.
-
Associating: CodeGuru Reviewer is:
- Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.
- Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
- Failed: The repository failed to associate or disassociate.
- Disassociating: CodeGuru Reviewer is removing the repository's pull request notifications and source code access.
- Disassociated: CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in an associated repository with tags after it has been disassociated. For more information, see Using tags to control access to associated repositories in the Amazon CodeGuru Reviewer User Guide.
Implementation
Future<ListRepositoryAssociationsResponse> listRepositoryAssociations({
int? maxResults,
List<String>? names,
String? nextToken,
List<String>? owners,
List<ProviderType>? providerTypes,
List<RepositoryAssociationState>? states,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
2048,
);
final $query = <String, List<String>>{
if (maxResults != null) 'MaxResults': [maxResults.toString()],
if (names != null) 'Name': names,
if (nextToken != null) 'NextToken': [nextToken],
if (owners != null) 'Owner': owners,
if (providerTypes != null)
'ProviderType': providerTypes.map((e) => e.toValue()).toList(),
if (states != null) 'State': states.map((e) => e.toValue()).toList(),
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/associations',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListRepositoryAssociationsResponse.fromJson(response);
}