acceptSubscriptionRequest method

Future<AcceptSubscriptionRequestOutput> acceptSubscriptionRequest({
  1. required String domainIdentifier,
  2. required String identifier,
  3. List<AssetPermission>? assetPermissions,
  4. List<AcceptedAssetScope>? assetScopes,
  5. String? decisionComment,
})

Accepts a subscription request to a specific asset.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The Amazon DataZone domain where the specified subscription request is being accepted.

Parameter identifier : The unique identifier of the subscription request that is to be accepted.

Parameter assetPermissions : The asset permissions of the accept subscription request.

Parameter assetScopes : The asset scopes of the accept subscription request.

Parameter decisionComment : A description that specifies the reason for accepting the specified subscription request.

Implementation

Future<AcceptSubscriptionRequestOutput> acceptSubscriptionRequest({
  required String domainIdentifier,
  required String identifier,
  List<AssetPermission>? assetPermissions,
  List<AcceptedAssetScope>? assetScopes,
  String? decisionComment,
}) async {
  final $payload = <String, dynamic>{
    if (assetPermissions != null) 'assetPermissions': assetPermissions,
    if (assetScopes != null) 'assetScopes': assetScopes,
    if (decisionComment != null) 'decisionComment': decisionComment,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/subscription-requests/${Uri.encodeComponent(identifier)}/accept',
    exceptionFnMap: _exceptionFns,
  );
  return AcceptSubscriptionRequestOutput.fromJson(response);
}