listOrganizationPortfolioAccess method
- required OrganizationNodeType organizationNodeType,
- required String portfolioId,
- String? acceptLanguage,
- int? pageSize,
- String? pageToken,
Lists the organization nodes that have access to the specified portfolio. This API can only be called by the management account in the organization or by a delegated admin.
If a delegated admin is de-registered, they can no longer perform this operation.
May throw ResourceNotFoundException. May throw InvalidParametersException. May throw OperationNotSupportedException.
Parameter organizationNodeType
:
The organization node type that will be returned in the output.
-
ORGANIZATION
- Organization that has access to the portfolio. -
ORGANIZATIONAL_UNIT
- Organizational unit that has access to the portfolio within your organization. -
ACCOUNT
- Account that has access to the portfolio within your organization.
Parameter portfolioId
:
The portfolio identifier. For example, port-2abcdext3y5fk
.
Parameter acceptLanguage
:
The language code.
-
en
- English (default) -
jp
- Japanese -
zh
- Chinese
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<ListOrganizationPortfolioAccessOutput>
listOrganizationPortfolioAccess({
required OrganizationNodeType organizationNodeType,
required String portfolioId,
String? acceptLanguage,
int? pageSize,
String? pageToken,
}) async {
ArgumentError.checkNotNull(organizationNodeType, 'organizationNodeType');
ArgumentError.checkNotNull(portfolioId, 'portfolioId');
_s.validateStringLength(
'portfolioId',
portfolioId,
1,
100,
isRequired: true,
);
_s.validateStringLength(
'acceptLanguage',
acceptLanguage,
0,
100,
);
_s.validateNumRange(
'pageSize',
pageSize,
0,
20,
);
_s.validateStringLength(
'pageToken',
pageToken,
0,
2024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWS242ServiceCatalogService.ListOrganizationPortfolioAccess'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OrganizationNodeType': organizationNodeType.toValue(),
'PortfolioId': portfolioId,
if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
if (pageSize != null) 'PageSize': pageSize,
if (pageToken != null) 'PageToken': pageToken,
},
);
return ListOrganizationPortfolioAccessOutput.fromJson(jsonResponse.body);
}