listPortfolioAccess method
Lists the account IDs that have access to the specified portfolio.
A delegated admin can list the accounts that have access to the shared portfolio. Note that if a delegated admin is de-registered, they can no longer perform this operation.
May throw ResourceNotFoundException. May throw InvalidParametersException.
Parameter portfolioId
:
The portfolio identifier.
Parameter acceptLanguage
:
The language code.
-
en
- English (default) -
jp
- Japanese -
zh
- Chinese
Parameter organizationParentId
:
The ID of an organization node the portfolio is shared with. All children
of this node with an inherited portfolio share will be returned.
Parameter pageSize
:
The maximum number of items to return with this call.
Parameter pageToken
:
The page token for the next set of results. To retrieve the first set of
results, use null.
Implementation
Future<ListPortfolioAccessOutput> listPortfolioAccess({
required String portfolioId,
String? acceptLanguage,
String? organizationParentId,
int? pageSize,
String? pageToken,
}) async {
ArgumentError.checkNotNull(portfolioId, 'portfolioId');
_s.validateStringLength(
'portfolioId',
portfolioId,
1,
100,
isRequired: true,
);
_s.validateStringLength(
'acceptLanguage',
acceptLanguage,
0,
100,
);
_s.validateStringLength(
'organizationParentId',
organizationParentId,
1,
100,
);
_s.validateNumRange(
'pageSize',
pageSize,
0,
100,
);
_s.validateStringLength(
'pageToken',
pageToken,
0,
2024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWS242ServiceCatalogService.ListPortfolioAccess'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PortfolioId': portfolioId,
if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
if (organizationParentId != null)
'OrganizationParentId': organizationParentId,
if (pageSize != null) 'PageSize': pageSize,
if (pageToken != null) 'PageToken': pageToken,
},
);
return ListPortfolioAccessOutput.fromJson(jsonResponse.body);
}