describeDocumentPermission method
Describes the permissions for a Amazon Web Services Systems Manager document (SSM document). If you created the document, you are the owner. If a document is shared, it can either be shared privately (by specifying a user's Amazon Web Services account ID) or publicly (All).
May throw InternalServerError.
May throw InvalidDocument.
May throw InvalidDocumentOperation.
May throw InvalidNextToken.
May throw InvalidPermissionType.
Parameter name :
The name of the document for which you are the owner.
Parameter permissionType :
The permission type for the document. The permission type can be
Share.
Parameter maxResults :
The maximum number of items to return for this call. The call also returns
a token that you can specify in a subsequent call to get the next set of
results.
Parameter nextToken :
The token for the next set of items to return. (You received this token
from a previous call.)
Implementation
Future<DescribeDocumentPermissionResponse> describeDocumentPermission({
required String name,
required DocumentPermissionType permissionType,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
200,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.DescribeDocumentPermission'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
'PermissionType': permissionType.value,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return DescribeDocumentPermissionResponse.fromJson(jsonResponse.body);
}