data_shares
Creates, updates, deletes, gets or lists a data_shares resource.
Overview
| Name | data_shares |
| Type | Resource |
| Id | aws.redshift.data_shares |
Fields
The following fields are returned by SELECT queries:
- describe_data_shares
| Name | Datatype | Description |
|---|---|---|
allow_publicly_accessible_consumers | boolean | A value that specifies whether the datashare can be shared to a publicly accessible cluster. |
data_share_arn | string | The Amazon Resource Name (ARN) of the datashare that the consumer is to use. |
data_share_associations | string | A value that specifies when the datashare has an association between producer and data consumers. |
data_share_type | string | The type of the datashare created by RegisterNamespace. |
managed_by | string | The identifier of a datashare to show its managing entity. |
producer_arn | string | The Amazon Resource Name (ARN) of the producer namespace. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_data_shares | select | region | DataShareArn, MaxRecords, Marker | Shows the status of any inbound or outbound datashares available in the specified account. |
authorize_data_share | update | DataShareArn, ConsumerIdentifier, region | AllowWrites | From a data producer account, authorizes the sharing of a datashare with one or more consumer accounts or managing entities. To authorize a datashare for a data consumer, the producer account must have the correct access permissions. |
associate_data_share_consumer | update | DataShareArn, region | AssociateEntireAccount, ConsumerArn, ConsumerRegion, AllowWrites | From a datashare consumer account, associates a datashare with the account (AssociateEntireAccount) or the specified namespace (ConsumerArn). If you make this association, the consumer can consume the datashare. |
deauthorize_data_share | exec | DataShareArn, ConsumerIdentifier, region | From a datashare producer account, removes authorization from the specified datashare. | |
disassociate_data_share_consumer | exec | DataShareArn, region | DisassociateEntireAccount, ConsumerArn, ConsumerRegion | From a datashare consumer account, remove association for the specified datashare. |
reject_data_share | exec | DataShareArn, region | From a datashare consumer account, rejects the specified datashare. |
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.
| Name | Datatype | Description |
|---|---|---|
ConsumerIdentifier | string | The identifier of the data consumer that is to have authorization removed from the datashare. This identifier is an Amazon Web Services account ID or a keyword, such as ADX. |
DataShareArn | string | The Amazon Resource Name (ARN) of the datashare to reject. |
region | string | AWS region (default: us-east-1) |
AllowWrites | boolean | If set to true, allows write operations for a datashare. |
AssociateEntireAccount | boolean | A value that specifies whether the datashare is associated with the entire account. |
ConsumerArn | string | The Amazon Resource Name (ARN) of the consumer namespace that association for the datashare is removed from. |
ConsumerRegion | string | From a datashare consumer account, removes association of a datashare from all the existing and future namespaces in the specified Amazon Web Services Region. |
DataShareArn | string | The Amazon resource name (ARN) of the datashare to describe details of. |
DisassociateEntireAccount | boolean | A value that specifies whether association for the datashare is removed from the entire account. |
Marker | string | An optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeDataShares request exceed the value specified in MaxRecords, Amazon Web Services returns a value in the Marker field of the response. You can retrieve the next set of response records by providing the returned marker value in the Marker parameter and retrying the request. |
MaxRecords | integer | The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value. |
SELECT examples
- describe_data_shares
Shows the status of any inbound or outbound datashares available in the specified account.
SELECT
allow_publicly_accessible_consumers,
data_share_arn,
data_share_associations,
data_share_type,
managed_by,
producer_arn
FROM aws.redshift.data_shares
WHERE region = '{{ region }}' -- required
AND DataShareArn = '{{ DataShareArn }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
;
UPDATE examples
- authorize_data_share
- associate_data_share_consumer
From a data producer account, authorizes the sharing of a datashare with one or more consumer accounts or managing entities. To authorize a datashare for a data consumer, the producer account must have the correct access permissions.
UPDATE aws.redshift.data_shares
SET
-- No updatable properties
WHERE
DataShareArn = '{{ DataShareArn }}' --required
AND ConsumerIdentifier = '{{ ConsumerIdentifier }}' --required
AND region = '{{ region }}' --required
AND AllowWrites = {{ AllowWrites}}
RETURNING
allow_publicly_accessible_consumers,
data_share_arn,
data_share_associations,
data_share_type,
managed_by,
producer_arn;
From a datashare consumer account, associates a datashare with the account (AssociateEntireAccount) or the specified namespace (ConsumerArn). If you make this association, the consumer can consume the datashare.
UPDATE aws.redshift.data_shares
SET
-- No updatable properties
WHERE
DataShareArn = '{{ DataShareArn }}' --required
AND region = '{{ region }}' --required
AND AssociateEntireAccount = {{ AssociateEntireAccount}}
AND ConsumerArn = '{{ ConsumerArn}}'
AND ConsumerRegion = '{{ ConsumerRegion}}'
AND AllowWrites = {{ AllowWrites}}
RETURNING
allow_publicly_accessible_consumers,
data_share_arn,
data_share_associations,
data_share_type,
managed_by,
producer_arn;
Lifecycle Methods
- deauthorize_data_share
- disassociate_data_share_consumer
- reject_data_share
From a datashare producer account, removes authorization from the specified datashare.
EXEC aws.redshift.data_shares.deauthorize_data_share
@DataShareArn='{{ DataShareArn }}' --required,
@ConsumerIdentifier='{{ ConsumerIdentifier }}' --required,
@region='{{ region }}' --required
;
From a datashare consumer account, remove association for the specified datashare.
EXEC aws.redshift.data_shares.disassociate_data_share_consumer
@DataShareArn='{{ DataShareArn }}' --required,
@region='{{ region }}' --required,
@DisassociateEntireAccount={{ DisassociateEntireAccount }},
@ConsumerArn='{{ ConsumerArn }}',
@ConsumerRegion='{{ ConsumerRegion }}'
;
From a datashare consumer account, rejects the specified datashare.
EXEC aws.redshift.data_shares.reject_data_share
@DataShareArn='{{ DataShareArn }}' --required,
@region='{{ region }}' --required
;