deletePortfolioShare method
Stops sharing the specified portfolio with the specified account or organization node. Shares to an organization node can only be deleted by the management account of an organization or by a delegated administrator.
Note that if a delegated admin is de-registered, portfolio shares created from that account are removed.
May throw InvalidParametersException.
May throw InvalidStateException.
May throw OperationNotSupportedException.
May throw ResourceNotFoundException.
Parameter portfolioId :
The portfolio identifier.
Parameter acceptLanguage :
The language code.
-
jp- Japanese -
zh- Chinese
Parameter accountId :
The Amazon Web Services account ID.
Parameter organizationNode :
The organization node to whom you are going to stop sharing.
Implementation
Future<DeletePortfolioShareOutput> deletePortfolioShare({
required String portfolioId,
String? acceptLanguage,
String? accountId,
OrganizationNode? organizationNode,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWS242ServiceCatalogService.DeletePortfolioShare'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PortfolioId': portfolioId,
if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
if (accountId != null) 'AccountId': accountId,
if (organizationNode != null) 'OrganizationNode': organizationNode,
},
);
return DeletePortfolioShareOutput.fromJson(jsonResponse.body);
}