createShare method

Future<CreateShareResponse> createShare({
  1. required String principalSubscriber,
  2. required String resourceArn,
  3. String? shareName,
})

Creates a cross-account shared resource. The resource owner makes an offer to share the resource with the principal subscriber (an AWS user with a different account than the resource owner).

The following resources support cross-account sharing:

  • HealthOmics variant stores
  • HealthOmics annotation stores
  • Private workflows

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter principalSubscriber : The principal subscriber is the account being offered shared access to the resource.

Parameter resourceArn : The ARN of the resource to be shared.

Parameter shareName : A name that the owner defines for the share.

Implementation

Future<CreateShareResponse> createShare({
  required String principalSubscriber,
  required String resourceArn,
  String? shareName,
}) async {
  final $payload = <String, dynamic>{
    'principalSubscriber': principalSubscriber,
    'resourceArn': resourceArn,
    if (shareName != null) 'shareName': shareName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/share',
    exceptionFnMap: _exceptionFns,
  );
  return CreateShareResponse.fromJson(response);
}