updateImagePermissions method

Future<void> updateImagePermissions({
  1. required ImagePermissions imagePermissions,
  2. required String name,
  3. required String sharedAccountId,
})

Adds or updates permissions for the specified private image.

May throw ResourceNotFoundException. May throw ResourceNotAvailableException. May throw LimitExceededException.

Parameter imagePermissions : The permissions for the image.

Parameter name : The name of the private image.

Parameter sharedAccountId : The 12-digit identifier of the AWS account for which you want add or update image permissions.

Implementation

Future<void> updateImagePermissions({
  required ImagePermissions imagePermissions,
  required String name,
  required String sharedAccountId,
}) async {
  ArgumentError.checkNotNull(imagePermissions, 'imagePermissions');
  ArgumentError.checkNotNull(name, 'name');
  ArgumentError.checkNotNull(sharedAccountId, 'sharedAccountId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.UpdateImagePermissions'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ImagePermissions': imagePermissions,
      'Name': name,
      'SharedAccountId': sharedAccountId,
    },
  );
}