updateTemplatePermissions method
Updates the resource permissions for a template.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnsupportedUserEditionException.
Parameter awsAccountId :
The ID of the Amazon Web Services account that contains the template.
Parameter templateId :
The ID for the template.
Parameter grantPermissions :
A list of resource permissions to be granted on the template.
Parameter revokePermissions :
A list of resource permissions to be revoked from the template.
Implementation
Future<UpdateTemplatePermissionsResponse> updateTemplatePermissions({
required String awsAccountId,
required String templateId,
List<ResourcePermission>? grantPermissions,
List<ResourcePermission>? revokePermissions,
}) async {
final $payload = <String, dynamic>{
if (grantPermissions != null) 'GrantPermissions': grantPermissions,
if (revokePermissions != null) 'RevokePermissions': revokePermissions,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/templates/${Uri.encodeComponent(templateId)}/permissions',
exceptionFnMap: _exceptionFns,
);
return UpdateTemplatePermissionsResponse.fromJson(response);
}