acceptPortfolioShare method
Accepts an offer to share the specified portfolio.
May throw InvalidParametersException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
Parameter portfolioId :
The portfolio identifier.
Parameter acceptLanguage :
The language code.
-
jp- Japanese -
zh- Chinese
Parameter portfolioShareType :
The type of shared portfolios to accept. The default is to accept imported
portfolios.
-
AWS_ORGANIZATIONS- Accept portfolios shared by the management account of your organization. -
IMPORTED- Accept imported portfolios. -
AWS_SERVICECATALOG- Not supported. (Throws ResourceNotFoundException.)
aws servicecatalog accept-portfolio-share
--portfolio-id "port-2qwzkwxt3y5fk" --portfolio-share-type
AWS_ORGANIZATIONS
Implementation
Future<void> acceptPortfolioShare({
required String portfolioId,
String? acceptLanguage,
PortfolioShareType? portfolioShareType,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWS242ServiceCatalogService.AcceptPortfolioShare'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PortfolioId': portfolioId,
if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
if (portfolioShareType != null)
'PortfolioShareType': portfolioShareType.value,
},
);
}