describeEntitlements method

Future<DescribeEntitlementsResult> describeEntitlements({
  1. required String stackName,
  2. int? maxResults,
  3. String? name,
  4. String? nextToken,
})

Retrieves a list that describes one of more entitlements.

May throw EntitlementNotFoundException. May throw OperationNotPermittedException. May throw ResourceNotFoundException.

Parameter stackName : The name of the stack with which the entitlement is associated.

Parameter maxResults : The maximum size of each page of results.

Parameter name : The name of the entitlement.

Parameter nextToken : The pagination token used to retrieve the next page of results for this operation.

Implementation

Future<DescribeEntitlementsResult> describeEntitlements({
  required String stackName,
  int? maxResults,
  String? name,
  String? nextToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.DescribeEntitlements'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'StackName': stackName,
      if (maxResults != null) 'MaxResults': maxResults,
      if (name != null) 'Name': name,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return DescribeEntitlementsResult.fromJson(jsonResponse.body);
}