Skip to main content

shares

Creates, updates, deletes, gets or lists a shares resource.

Overview

Nameshares
TypeResource
Idaws.omics.shares

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The timestamp of when the resource share was created.
owner_idstringThe account ID for the data owner. The owner creates the resource share.
principal_subscriberstringThe principal subscriber is the account that is sharing the resource.
resource_arnstringThe Arn of the shared resource.
resource_idstringThe ID of the shared resource.
share_idstringThe ID of the resource share.
share_namestringThe name of the resource share. (pattern: <code>[a-zA-Z0-9_-]+</code>)
statusstringThe status of the share. (PENDING, ACTIVATING, ACTIVE, DELETING, DELETED, FAILED)
status_messagestringThe status message for a resource share. It provides additional details about the share status.
update_timestring (date-time)The timestamp of the resource share update.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_shareselectshare_id, regionRetrieves the metadata for the specified resource share.
list_sharesselectregionnextToken, maxResultsRetrieves the resource shares associated with an account. Use the filter parameter to retrieve a specific subset of the shares.
create_shareinsertregion, resourceArn, principalSubscriberCreates 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
delete_sharedeleteshare_id, regionDeletes a resource share. If you are the resource owner, the subscriber will no longer have access to the shared resource. If you are the subscriber, this operation deletes your access to the share.
accept_shareexecshare_id, regionAccept a resource share request.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
share_idstringThe ID of the resource share.
maxResultsintegerThe maximum number of shares to return in one page of results.
nextTokenstringNext token returned in the response of a previous ListReadSetUploadPartsRequest call. Used to get the next page of results.

SELECT examples

Retrieves the metadata for the specified resource share.

SELECT
creation_time,
owner_id,
principal_subscriber,
resource_arn,
resource_id,
share_id,
share_name,
status,
status_message,
update_time
FROM aws.omics.shares
WHERE share_id = '{{ share_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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

INSERT INTO aws.omics.shares (
resourceArn,
principalSubscriber,
shareName,
region
)
SELECT
'{{ resourceArn }}' /* required */,
'{{ principalSubscriber }}' /* required */,
'{{ shareName }}',
'{{ region }}'
RETURNING
share_id,
share_name,
status
;

DELETE examples

Deletes a resource share. If you are the resource owner, the subscriber will no longer have access to the shared resource. If you are the subscriber, this operation deletes your access to the share.

DELETE FROM aws.omics.shares
WHERE share_id = '{{ share_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Accept a resource share request.

EXEC aws.omics.shares.accept_share
@share_id='{{ share_id }}' --required,
@region='{{ region }}' --required
;