AuthorizeDataShare - Amazon Redshift

AuthorizeDataShare

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.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

ConsumerIdentifier

The identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: Yes

DataShareArn

The Amazon Resource Name (ARN) of the datashare namespace that producers are to authorize sharing for.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: Yes

AllowWrites

If set to true, allows write operations for a datashare.

Type: Boolean

Required: No

Response Elements

The following elements are returned by the service.

AllowPubliclyAccessibleConsumers

A value that specifies whether the datashare can be shared to a publicly accessible cluster.

Type: Boolean

DataShareArn

The Amazon Resource Name (ARN) of the datashare that the consumer is to use.

Type: String

Length Constraints: Maximum length of 2147483647.

DataShareAssociations.member.N

A value that specifies when the datashare has an association between producer and data consumers.

Type: Array of DataShareAssociation objects

ManagedBy

The identifier of a datashare to show its managing entity.

Type: String

Length Constraints: Maximum length of 2147483647.

ProducerArn

The Amazon Resource Name (ARN) of the producer namespace.

Type: String

Length Constraints: Maximum length of 2147483647.

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidDataShareFault

There is an error with the datashare.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of AuthorizeDataShare.

Sample Request

https://redshift.us-east-2.amazonaws.com/ ?Action=AuthorizeDataShare &ConsumerIdentifier=275247490162 &DataShareArn=arn%3Aaws%3Aredshift%3Aus-east-1%3A827630067164%3Adatashare%3Aaf06285e-8a45-4ee9-b598-648c218c8ff1%2Ftestshare2 &SignatureMethod=HmacSHA256&SignatureVersion=4 &Version=2012-12-01 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIAIOSFODNN7EXAMPLE/20190817/us-east-2/redshift/aws4_request &X-Amz-Date=20190825T160000Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=0aa1234bb5cc678ddddd901ee2ff3aa45678b90c12d345e6ff789012345a6b7b

Sample Response

<AuthorizeDataShareResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/"> <AuthorizeDataShareResult> <AllowPubliclyAccessibleConsumers>false</AllowPubliclyAccessibleConsumers> <ProducerNamespaceArn>arn:aws:redshift:us-east-1:827630067164:namespace:af06285e-8a45-4ee9-b598-648c218c8ff1</ProducerNamespaceArn> <DataShareArn>arn:aws:redshift:us-east-1:827630067164:datashare:af06285e-8a45-4ee9-b598-648c218c8ff1/testshare2</DataShareArn> <DataShareAssociations> <member> <ConsumerIdentifier>275247490162</ConsumerIdentifier> <StatusChangeDate>2020-10-30T17:39:04.021910</StatusChangeDate> <CreatedDate>2020-10-29T22:31:53.495665</CreatedDate> <Status>PENDING_ACCEPTANCE</Status> </member> </DataShareAssociations> </AuthorizeDataShareResult> <ResponseMetadata> <RequestId>7c915a04-fe35-4be1-b71d-363efaa95a08</RequestId> </ResponseMetadata> </AuthorizeDataShareResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: