Amazon Redshift

2021/12/20 - Amazon Redshift - 8 updated api methods

Changes  This release adds API support for managed Redshift datashares. Customers can now interact with a Redshift datashare that is managed by a different service, such as AWS Data Exchange.

AssociateDataShareConsumer (updated) Link ¶
Changes (response)
{'ManagedBy': 'string'}

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.

See also: AWS API Documentation

Request Syntax

client.associate_data_share_consumer(
    DataShareArn='string',
    AssociateEntireAccount=True|False,
    ConsumerArn='string'
)
type DataShareArn

string

param DataShareArn

[REQUIRED]

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

type AssociateEntireAccount

boolean

param AssociateEntireAccount

A value that specifies whether the datashare is associated with the entire account.

type ConsumerArn

string

param ConsumerArn

The Amazon Resource Name (ARN) of the consumer that is associated with the datashare.

rtype

dict

returns

Response Syntax

{
    'DataShareArn': 'string',
    'ProducerArn': 'string',
    'AllowPubliclyAccessibleConsumers': True|False,
    'DataShareAssociations': [
        {
            'ConsumerIdentifier': 'string',
            'Status': 'ACTIVE'|'PENDING_AUTHORIZATION'|'AUTHORIZED'|'DEAUTHORIZED'|'REJECTED'|'AVAILABLE',
            'CreatedDate': datetime(2015, 1, 1),
            'StatusChangeDate': datetime(2015, 1, 1)
        },
    ],
    'ManagedBy': 'string'
}

Response Structure

  • (dict) --

    • DataShareArn (string) --

      An Amazon Resource Name (ARN) that references the datashare that is owned by a specific namespace of the producer cluster. A datashare ARN is in the arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name} format.

    • ProducerArn (string) --

      The Amazon Resource Name (ARN) of the producer.

    • AllowPubliclyAccessibleConsumers (boolean) --

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

    • DataShareAssociations (list) --

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

      • (dict) --

        The association of a datashare from a producer account with a data consumer.

        • ConsumerIdentifier (string) --

          The name of the consumer accounts that have an association with a producer datashare.

        • Status (string) --

          The status of the datashare that is associated.

        • CreatedDate (datetime) --

          The creation date of the datashare that is associated.

        • StatusChangeDate (datetime) --

          The status change data of the datashare that is associated.

    • ManagedBy (string) --

      The identifier of a datashare to show its managing entity.

AuthorizeDataShare (updated) Link ¶
Changes (response)
{'ManagedBy': 'string'}

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 privileges.

See also: AWS API Documentation

Request Syntax

client.authorize_data_share(
    DataShareArn='string',
    ConsumerIdentifier='string'
)
type DataShareArn

string

param DataShareArn

[REQUIRED]

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

type ConsumerIdentifier

string

param ConsumerIdentifier

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'DataShareArn': 'string',
    'ProducerArn': 'string',
    'AllowPubliclyAccessibleConsumers': True|False,
    'DataShareAssociations': [
        {
            'ConsumerIdentifier': 'string',
            'Status': 'ACTIVE'|'PENDING_AUTHORIZATION'|'AUTHORIZED'|'DEAUTHORIZED'|'REJECTED'|'AVAILABLE',
            'CreatedDate': datetime(2015, 1, 1),
            'StatusChangeDate': datetime(2015, 1, 1)
        },
    ],
    'ManagedBy': 'string'
}

Response Structure

  • (dict) --

    • DataShareArn (string) --

      An Amazon Resource Name (ARN) that references the datashare that is owned by a specific namespace of the producer cluster. A datashare ARN is in the arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name} format.

    • ProducerArn (string) --

      The Amazon Resource Name (ARN) of the producer.

    • AllowPubliclyAccessibleConsumers (boolean) --

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

    • DataShareAssociations (list) --

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

      • (dict) --

        The association of a datashare from a producer account with a data consumer.

        • ConsumerIdentifier (string) --

          The name of the consumer accounts that have an association with a producer datashare.

        • Status (string) --

          The status of the datashare that is associated.

        • CreatedDate (datetime) --

          The creation date of the datashare that is associated.

        • StatusChangeDate (datetime) --

          The status change data of the datashare that is associated.

    • ManagedBy (string) --

      The identifier of a datashare to show its managing entity.

DeauthorizeDataShare (updated) Link ¶
Changes (response)
{'ManagedBy': 'string'}

From the producer account, removes authorization from the specified datashare.

See also: AWS API Documentation

Request Syntax

client.deauthorize_data_share(
    DataShareArn='string',
    ConsumerIdentifier='string'
)
type DataShareArn

string

param DataShareArn

[REQUIRED]

The Amazon Resource Name (ARN) of the datashare to remove authorization from.

type ConsumerIdentifier

string

param ConsumerIdentifier

[REQUIRED]

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.

rtype

dict

returns

Response Syntax

{
    'DataShareArn': 'string',
    'ProducerArn': 'string',
    'AllowPubliclyAccessibleConsumers': True|False,
    'DataShareAssociations': [
        {
            'ConsumerIdentifier': 'string',
            'Status': 'ACTIVE'|'PENDING_AUTHORIZATION'|'AUTHORIZED'|'DEAUTHORIZED'|'REJECTED'|'AVAILABLE',
            'CreatedDate': datetime(2015, 1, 1),
            'StatusChangeDate': datetime(2015, 1, 1)
        },
    ],
    'ManagedBy': 'string'
}

Response Structure

  • (dict) --

    • DataShareArn (string) --

      An Amazon Resource Name (ARN) that references the datashare that is owned by a specific namespace of the producer cluster. A datashare ARN is in the arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name} format.

    • ProducerArn (string) --

      The Amazon Resource Name (ARN) of the producer.

    • AllowPubliclyAccessibleConsumers (boolean) --

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

    • DataShareAssociations (list) --

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

      • (dict) --

        The association of a datashare from a producer account with a data consumer.

        • ConsumerIdentifier (string) --

          The name of the consumer accounts that have an association with a producer datashare.

        • Status (string) --

          The status of the datashare that is associated.

        • CreatedDate (datetime) --

          The creation date of the datashare that is associated.

        • StatusChangeDate (datetime) --

          The status change data of the datashare that is associated.

    • ManagedBy (string) --

      The identifier of a datashare to show its managing entity.

DescribeDataShares (updated) Link ¶
Changes (response)
{'DataShares': {'ManagedBy': 'string'}}

Shows the status of any inbound or outbound datashares available in the specified account.

See also: AWS API Documentation

Request Syntax

client.describe_data_shares(
    DataShareArn='string',
    MaxRecords=123,
    Marker='string'
)
type DataShareArn

string

param DataShareArn

The identifier of the datashare to describe details of.

type MaxRecords

integer

param MaxRecords

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.

type Marker

string

param Marker

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.

rtype

dict

returns

Response Syntax

{
    'DataShares': [
        {
            'DataShareArn': 'string',
            'ProducerArn': 'string',
            'AllowPubliclyAccessibleConsumers': True|False,
            'DataShareAssociations': [
                {
                    'ConsumerIdentifier': 'string',
                    'Status': 'ACTIVE'|'PENDING_AUTHORIZATION'|'AUTHORIZED'|'DEAUTHORIZED'|'REJECTED'|'AVAILABLE',
                    'CreatedDate': datetime(2015, 1, 1),
                    'StatusChangeDate': datetime(2015, 1, 1)
                },
            ],
            'ManagedBy': 'string'
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    • DataShares (list) --

      The results returned from describing datashares.

      • (dict) --

        • DataShareArn (string) --

          An Amazon Resource Name (ARN) that references the datashare that is owned by a specific namespace of the producer cluster. A datashare ARN is in the arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name} format.

        • ProducerArn (string) --

          The Amazon Resource Name (ARN) of the producer.

        • AllowPubliclyAccessibleConsumers (boolean) --

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

        • DataShareAssociations (list) --

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

          • (dict) --

            The association of a datashare from a producer account with a data consumer.

            • ConsumerIdentifier (string) --

              The name of the consumer accounts that have an association with a producer datashare.

            • Status (string) --

              The status of the datashare that is associated.

            • CreatedDate (datetime) --

              The creation date of the datashare that is associated.

            • StatusChangeDate (datetime) --

              The status change data of the datashare that is associated.

        • ManagedBy (string) --

          The identifier of a datashare to show its managing entity.

    • 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.

DescribeDataSharesForConsumer (updated) Link ¶
Changes (response)
{'DataShares': {'ManagedBy': 'string'}}

Returns a list of datashares where the account identifier being called is a consumer account identifier.

See also: AWS API Documentation

Request Syntax

client.describe_data_shares_for_consumer(
    ConsumerArn='string',
    Status='ACTIVE'|'AVAILABLE',
    MaxRecords=123,
    Marker='string'
)
type ConsumerArn

string

param ConsumerArn

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

type Status

string

param Status

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

type MaxRecords

integer

param MaxRecords

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.

type Marker

string

param Marker

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

rtype

dict

returns

Response Syntax

{
    'DataShares': [
        {
            'DataShareArn': 'string',
            'ProducerArn': 'string',
            'AllowPubliclyAccessibleConsumers': True|False,
            'DataShareAssociations': [
                {
                    'ConsumerIdentifier': 'string',
                    'Status': 'ACTIVE'|'PENDING_AUTHORIZATION'|'AUTHORIZED'|'DEAUTHORIZED'|'REJECTED'|'AVAILABLE',
                    'CreatedDate': datetime(2015, 1, 1),
                    'StatusChangeDate': datetime(2015, 1, 1)
                },
            ],
            'ManagedBy': 'string'
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    • DataShares (list) --

      Shows the results of datashares available for consumers.

      • (dict) --

        • DataShareArn (string) --

          An Amazon Resource Name (ARN) that references the datashare that is owned by a specific namespace of the producer cluster. A datashare ARN is in the arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name} format.

        • ProducerArn (string) --

          The Amazon Resource Name (ARN) of the producer.

        • AllowPubliclyAccessibleConsumers (boolean) --

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

        • DataShareAssociations (list) --

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

          • (dict) --

            The association of a datashare from a producer account with a data consumer.

            • ConsumerIdentifier (string) --

              The name of the consumer accounts that have an association with a producer datashare.

            • Status (string) --

              The status of the datashare that is associated.

            • CreatedDate (datetime) --

              The creation date of the datashare that is associated.

            • StatusChangeDate (datetime) --

              The status change data of the datashare that is associated.

        • ManagedBy (string) --

          The identifier of a datashare to show its managing entity.

    • Marker (string) --

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

DescribeDataSharesForProducer (updated) Link ¶
Changes (response)
{'DataShares': {'ManagedBy': 'string'}}

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

See also: AWS API Documentation

Request Syntax

client.describe_data_shares_for_producer(
    ProducerArn='string',
    Status='ACTIVE'|'AUTHORIZED'|'PENDING_AUTHORIZATION'|'DEAUTHORIZED'|'REJECTED',
    MaxRecords=123,
    Marker='string'
)
type ProducerArn

string

param ProducerArn

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

type Status

string

param Status

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.

type MaxRecords

integer

param MaxRecords

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.

type Marker

string

param Marker

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.

rtype

dict

returns

Response Syntax

{
    'DataShares': [
        {
            'DataShareArn': 'string',
            'ProducerArn': 'string',
            'AllowPubliclyAccessibleConsumers': True|False,
            'DataShareAssociations': [
                {
                    'ConsumerIdentifier': 'string',
                    'Status': 'ACTIVE'|'PENDING_AUTHORIZATION'|'AUTHORIZED'|'DEAUTHORIZED'|'REJECTED'|'AVAILABLE',
                    'CreatedDate': datetime(2015, 1, 1),
                    'StatusChangeDate': datetime(2015, 1, 1)
                },
            ],
            'ManagedBy': 'string'
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    • DataShares (list) --

      Shows the results of datashares available for producers.

      • (dict) --

        • DataShareArn (string) --

          An Amazon Resource Name (ARN) that references the datashare that is owned by a specific namespace of the producer cluster. A datashare ARN is in the arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name} format.

        • ProducerArn (string) --

          The Amazon Resource Name (ARN) of the producer.

        • AllowPubliclyAccessibleConsumers (boolean) --

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

        • DataShareAssociations (list) --

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

          • (dict) --

            The association of a datashare from a producer account with a data consumer.

            • ConsumerIdentifier (string) --

              The name of the consumer accounts that have an association with a producer datashare.

            • Status (string) --

              The status of the datashare that is associated.

            • CreatedDate (datetime) --

              The creation date of the datashare that is associated.

            • StatusChangeDate (datetime) --

              The status change data of the datashare that is associated.

        • ManagedBy (string) --

          The identifier of a datashare to show its managing entity.

    • Marker (string) --

      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.

DisassociateDataShareConsumer (updated) Link ¶
Changes (response)
{'ManagedBy': 'string'}

From a consumer account, remove association for the specified datashare.

See also: AWS API Documentation

Request Syntax

client.disassociate_data_share_consumer(
    DataShareArn='string',
    DisassociateEntireAccount=True|False,
    ConsumerArn='string'
)
type DataShareArn

string

param DataShareArn

[REQUIRED]

The Amazon Resource Name (ARN) of the datashare to remove association for.

type DisassociateEntireAccount

boolean

param DisassociateEntireAccount

A value that specifies whether association for the datashare is removed from the entire account.

type ConsumerArn

string

param ConsumerArn

The Amazon Resource Name (ARN) of the consumer that association for the datashare is removed from.

rtype

dict

returns

Response Syntax

{
    'DataShareArn': 'string',
    'ProducerArn': 'string',
    'AllowPubliclyAccessibleConsumers': True|False,
    'DataShareAssociations': [
        {
            'ConsumerIdentifier': 'string',
            'Status': 'ACTIVE'|'PENDING_AUTHORIZATION'|'AUTHORIZED'|'DEAUTHORIZED'|'REJECTED'|'AVAILABLE',
            'CreatedDate': datetime(2015, 1, 1),
            'StatusChangeDate': datetime(2015, 1, 1)
        },
    ],
    'ManagedBy': 'string'
}

Response Structure

  • (dict) --

    • DataShareArn (string) --

      An Amazon Resource Name (ARN) that references the datashare that is owned by a specific namespace of the producer cluster. A datashare ARN is in the arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name} format.

    • ProducerArn (string) --

      The Amazon Resource Name (ARN) of the producer.

    • AllowPubliclyAccessibleConsumers (boolean) --

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

    • DataShareAssociations (list) --

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

      • (dict) --

        The association of a datashare from a producer account with a data consumer.

        • ConsumerIdentifier (string) --

          The name of the consumer accounts that have an association with a producer datashare.

        • Status (string) --

          The status of the datashare that is associated.

        • CreatedDate (datetime) --

          The creation date of the datashare that is associated.

        • StatusChangeDate (datetime) --

          The status change data of the datashare that is associated.

    • ManagedBy (string) --

      The identifier of a datashare to show its managing entity.

RejectDataShare (updated) Link ¶
Changes (response)
{'ManagedBy': 'string'}

From the consumer account, rejects the specified datashare.

See also: AWS API Documentation

Request Syntax

client.reject_data_share(
    DataShareArn='string'
)
type DataShareArn

string

param DataShareArn

[REQUIRED]

The Amazon Resource Name (ARN) of the datashare to reject.

rtype

dict

returns

Response Syntax

{
    'DataShareArn': 'string',
    'ProducerArn': 'string',
    'AllowPubliclyAccessibleConsumers': True|False,
    'DataShareAssociations': [
        {
            'ConsumerIdentifier': 'string',
            'Status': 'ACTIVE'|'PENDING_AUTHORIZATION'|'AUTHORIZED'|'DEAUTHORIZED'|'REJECTED'|'AVAILABLE',
            'CreatedDate': datetime(2015, 1, 1),
            'StatusChangeDate': datetime(2015, 1, 1)
        },
    ],
    'ManagedBy': 'string'
}

Response Structure

  • (dict) --

    • DataShareArn (string) --

      An Amazon Resource Name (ARN) that references the datashare that is owned by a specific namespace of the producer cluster. A datashare ARN is in the arn:aws:redshift:{region}:{account-id}:{datashare}:{namespace-guid}/{datashare-name} format.

    • ProducerArn (string) --

      The Amazon Resource Name (ARN) of the producer.

    • AllowPubliclyAccessibleConsumers (boolean) --

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

    • DataShareAssociations (list) --

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

      • (dict) --

        The association of a datashare from a producer account with a data consumer.

        • ConsumerIdentifier (string) --

          The name of the consumer accounts that have an association with a producer datashare.

        • Status (string) --

          The status of the datashare that is associated.

        • CreatedDate (datetime) --

          The creation date of the datashare that is associated.

        • StatusChangeDate (datetime) --

          The status change data of the datashare that is associated.

    • ManagedBy (string) --

      The identifier of a datashare to show its managing entity.