describeDocumentPermission method
Future<DescribeDocumentPermissionResponse>
describeDocumentPermission({
- required String name,
- required DocumentPermissionType permissionType,
Describes the permissions for a Systems Manager 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 AWS account ID) or publicly (All).
May throw InternalServerError. May throw InvalidDocument. 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.
Implementation
Future<DescribeDocumentPermissionResponse> describeDocumentPermission({
required String name,
required DocumentPermissionType permissionType,
}) async {
ArgumentError.checkNotNull(name, 'name');
ArgumentError.checkNotNull(permissionType, 'permissionType');
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.toValue(),
},
);
return DescribeDocumentPermissionResponse.fromJson(jsonResponse.body);
}