DescribeDataSharesForProducerCommand

Returns a list of datashares when the account identifier being called is a producer account identifier.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { RedshiftClient, DescribeDataSharesForProducerCommand } from "@aws-sdk/client-redshift"; // ES Modules import
// const { RedshiftClient, DescribeDataSharesForProducerCommand } = require("@aws-sdk/client-redshift"); // CommonJS import
const client = new RedshiftClient(config);
const input = { // DescribeDataSharesForProducerMessage
  ProducerArn: "STRING_VALUE",
  Status: "ACTIVE" || "AUTHORIZED" || "PENDING_AUTHORIZATION" || "DEAUTHORIZED" || "REJECTED",
  MaxRecords: Number("int"),
  Marker: "STRING_VALUE",
};
const command = new DescribeDataSharesForProducerCommand(input);
const response = await client.send(command);
// { // DescribeDataSharesForProducerResult
//   DataShares: [ // DataShareList
//     { // DataShare
//       DataShareArn: "STRING_VALUE",
//       ProducerArn: "STRING_VALUE",
//       AllowPubliclyAccessibleConsumers: true || false,
//       DataShareAssociations: [ // DataShareAssociationList
//         { // DataShareAssociation
//           ConsumerIdentifier: "STRING_VALUE",
//           Status: "ACTIVE" || "PENDING_AUTHORIZATION" || "AUTHORIZED" || "DEAUTHORIZED" || "REJECTED" || "AVAILABLE",
//           ConsumerRegion: "STRING_VALUE",
//           CreatedDate: new Date("TIMESTAMP"),
//           StatusChangeDate: new Date("TIMESTAMP"),
//           ProducerAllowedWrites: true || false,
//           ConsumerAcceptedWrites: true || false,
//         },
//       ],
//       ManagedBy: "STRING_VALUE",
//       DataShareType: "INTERNAL",
//     },
//   ],
//   Marker: "STRING_VALUE",
// };

DescribeDataSharesForProducerCommand Input

Parameter
Type
Description
Marker
string | undefined

An optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeDataSharesForProducer 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
number | undefined

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.

ProducerArn
string | undefined

The Amazon Resource Name (ARN) of the producer namespace that returns in the list of datashares.

Status
DataShareStatusForProducer | undefined

An identifier giving the status of a datashare in the producer. If this field is specified, Amazon Redshift returns the list of datashares that have the specified status.

DescribeDataSharesForProducerCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
DataShares
DataShare[] | undefined

Shows the results of datashares available for producers.

Marker
string | undefined

An optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeDataSharesForProducer 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.

Throws

Name
Fault
Details
InvalidNamespaceFault
client

The namespace isn't valid because the namespace doesn't exist. Provide a valid namespace.

RedshiftServiceException
Base exception class for all service exceptions from Redshift service.