describePermissions method

Future<DescribePermissionsResult> describePermissions({
  1. String? iamUserArn,
  2. String? stackId,
})

Describes the permissions for a specified stack.

Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

May throw ValidationException. May throw ResourceNotFoundException.

Parameter iamUserArn : The user's IAM ARN. This can also be a federated user's ARN. For more information about IAM ARNs, see Using Identifiers.

Parameter stackId : The stack ID.

Implementation

Future<DescribePermissionsResult> describePermissions({
  String? iamUserArn,
  String? stackId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OpsWorks_20130218.DescribePermissions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (iamUserArn != null) 'IamUserArn': iamUserArn,
      if (stackId != null) 'StackId': stackId,
    },
  );

  return DescribePermissionsResult.fromJson(jsonResponse.body);
}