createPortalProduct method
Creates a new portal product.
May throw AccessDeniedException.
May throw BadRequestException.
May throw TooManyRequestsException.
Parameter displayName :
The name of the portal product as it appears in a published portal.
Parameter description :
A description of the portal product.
Parameter tags :
The collection of tags. Each tag element is associated with a given
resource.
Implementation
Future<CreatePortalProductResponse> createPortalProduct({
required String displayName,
String? description,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'displayName': displayName,
if (description != null) 'description': description,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v2/portalproducts',
exceptionFnMap: _exceptionFns,
);
return CreatePortalProductResponse.fromJson(response);
}