grantFlowEntitlements method

Future<GrantFlowEntitlementsResponse> grantFlowEntitlements({
  1. required List<GrantEntitlementRequest> entitlements,
  2. required String flowArn,
})

Grants entitlements to an existing flow.

May throw GrantFlowEntitlements420Exception. May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException.

Parameter entitlements : The list of entitlements that you want to grant.

Parameter flowArn : The flow that you want to grant entitlements on.

Implementation

Future<GrantFlowEntitlementsResponse> grantFlowEntitlements({
  required List<GrantEntitlementRequest> entitlements,
  required String flowArn,
}) async {
  ArgumentError.checkNotNull(entitlements, 'entitlements');
  ArgumentError.checkNotNull(flowArn, 'flowArn');
  final $payload = <String, dynamic>{
    'entitlements': entitlements,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/flows/${Uri.encodeComponent(flowArn)}/entitlements',
    exceptionFnMap: _exceptionFns,
  );
  return GrantFlowEntitlementsResponse.fromJson(response);
}