AWS Data Exchange

2024/10/17 - AWS Data Exchange - 7 new 4 updated api methods

Changes  This release adds Data Grant support, through which customers can programmatically create data grants to share with other AWS accounts and accept data grants from other AWS accounts.

ListDataGrants (new) Link ¶

This operation returns information about all data grants.

See also: AWS API Documentation

Request Syntax

client.list_data_grants(
    MaxResults=123,
    NextToken='string'
)
type MaxResults

integer

param MaxResults

The maximum number of results to be included in the next page.

type NextToken

string

param NextToken

The pagination token used to retrieve the next page of results for this operation.

rtype

dict

returns

Response Syntax

{
    'DataGrantSummaries': [
        {
            'Name': 'string',
            'SenderPrincipal': 'string',
            'ReceiverPrincipal': 'string',
            'AcceptanceState': 'PENDING_RECEIVER_ACCEPTANCE'|'ACCEPTED',
            'AcceptedAt': datetime(2015, 1, 1),
            'EndsAt': datetime(2015, 1, 1),
            'DataSetId': 'string',
            'SourceDataSetId': 'string',
            'Id': 'string',
            'Arn': 'string',
            'CreatedAt': datetime(2015, 1, 1),
            'UpdatedAt': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • DataGrantSummaries (list) --

      An object that contains a list of data grant information.

      • (dict) --

        Information about a data grant.

        • Name (string) --

          The name of the data grant.

        • SenderPrincipal (string) --

          The Amazon Web Services account ID of the data grant sender.

        • ReceiverPrincipal (string) --

          The Amazon Web Services account ID of the data grant receiver.

        • AcceptanceState (string) --

          The acceptance state of the data grant.

        • AcceptedAt (datetime) --

          The timestamp of when the data grant was accepted.

        • EndsAt (datetime) --

          The timestamp of when access to the associated data set ends.

        • DataSetId (string) --

          The ID of the data set associated to the data grant.

        • SourceDataSetId (string) --

          The ID of the data set used to create the data grant.

        • Id (string) --

          The ID of the data grant.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the data grant.

        • CreatedAt (datetime) --

          The timestamp of when the data grant was created.

        • UpdatedAt (datetime) --

          The timestamp of when the data grant was last updated.

    • NextToken (string) --

      The pagination token used to retrieve the next page of results for this operation.

CreateDataGrant (new) Link ¶

This operation creates a data grant.

See also: AWS API Documentation

Request Syntax

client.create_data_grant(
    Name='string',
    GrantDistributionScope='AWS_ORGANIZATION'|'NONE',
    ReceiverPrincipal='string',
    SourceDataSetId='string',
    EndsAt=datetime(2015, 1, 1),
    Description='string',
    Tags={
        'string': 'string'
    }
)
type Name

string

param Name

[REQUIRED]

The name of the data grant.

type GrantDistributionScope

string

param GrantDistributionScope

[REQUIRED]

The distribution scope of the data grant.

type ReceiverPrincipal

string

param ReceiverPrincipal

[REQUIRED]

The Amazon Web Services account ID of the data grant receiver.

type SourceDataSetId

string

param SourceDataSetId

[REQUIRED]

The ID of the data set used to create the data grant.

type EndsAt

datetime

param EndsAt

The timestamp of when access to the associated data set ends.

type Description

string

param Description

The description of the data grant.

type Tags

dict

param Tags

The tags to add to the data grant. A tag is a key-value pair.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'Name': 'string',
    'SenderPrincipal': 'string',
    'ReceiverPrincipal': 'string',
    'Description': 'string',
    'AcceptanceState': 'PENDING_RECEIVER_ACCEPTANCE'|'ACCEPTED',
    'AcceptedAt': datetime(2015, 1, 1),
    'EndsAt': datetime(2015, 1, 1),
    'GrantDistributionScope': 'AWS_ORGANIZATION'|'NONE',
    'DataSetId': 'string',
    'SourceDataSetId': 'string',
    'Id': 'string',
    'Arn': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'UpdatedAt': datetime(2015, 1, 1),
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • Name (string) --

      The name of the data grant.

    • SenderPrincipal (string) --

      The Amazon Web Services account ID of the data grant sender.

    • ReceiverPrincipal (string) --

      The Amazon Web Services account ID of the data grant receiver.

    • Description (string) --

      The description of the data grant.

    • AcceptanceState (string) --

      The acceptance state of the data grant.

    • AcceptedAt (datetime) --

      The timestamp of when the data grant was accepted.

    • EndsAt (datetime) --

      The timestamp of when access to the associated data set ends.

    • GrantDistributionScope (string) --

      The distribution scope for the data grant.

    • DataSetId (string) --

      The ID of the data set associated to the data grant.

    • SourceDataSetId (string) --

      The ID of the data set used to create the data grant.

    • Id (string) --

      The ID of the data grant.

    • Arn (string) --

      The Amazon Resource Name (ARN) of the data grant.

    • CreatedAt (datetime) --

      The timestamp of when the data grant was created.

    • UpdatedAt (datetime) --

      The timestamp of when the data grant was last updated.

    • Tags (dict) --

      The tags associated to the data grant. A tag is a key-value pair.

      • (string) --

        • (string) --

DeleteDataGrant (new) Link ¶

This operation deletes a data grant.

See also: AWS API Documentation

Request Syntax

client.delete_data_grant(
    DataGrantId='string'
)
type DataGrantId

string

param DataGrantId

[REQUIRED]

The ID of the data grant to delete.

returns

None

GetReceivedDataGrant (new) Link ¶

This operation returns information about a received data grant.

See also: AWS API Documentation

Request Syntax

client.get_received_data_grant(
    DataGrantArn='string'
)
type DataGrantArn

string

param DataGrantArn

[REQUIRED]

The Amazon Resource Name (ARN) of the data grant.

rtype

dict

returns

Response Syntax

{
    'Name': 'string',
    'SenderPrincipal': 'string',
    'ReceiverPrincipal': 'string',
    'Description': 'string',
    'AcceptanceState': 'PENDING_RECEIVER_ACCEPTANCE'|'ACCEPTED',
    'AcceptedAt': datetime(2015, 1, 1),
    'EndsAt': datetime(2015, 1, 1),
    'GrantDistributionScope': 'AWS_ORGANIZATION'|'NONE',
    'DataSetId': 'string',
    'Id': 'string',
    'Arn': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'UpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • Name (string) --

      The name of the data grant.

    • SenderPrincipal (string) --

      The Amazon Web Services account ID of the data grant sender.

    • ReceiverPrincipal (string) --

      The Amazon Web Services account ID of the data grant receiver.

    • Description (string) --

      The description of the data grant.

    • AcceptanceState (string) --

      The acceptance state of the data grant.

    • AcceptedAt (datetime) --

      The timestamp of when the data grant was accepted.

    • EndsAt (datetime) --

      The timestamp of when access to the associated data set ends.

    • GrantDistributionScope (string) --

      The distribution scope for the data grant.

    • DataSetId (string) --

      The ID of the data set associated to the data grant.

    • Id (string) --

      The ID of the data grant.

    • Arn (string) --

      The Amazon Resource Name (ARN) of the data grant.

    • CreatedAt (datetime) --

      The timestamp of when the data grant was created.

    • UpdatedAt (datetime) --

      The timestamp of when the data grant was last updated.

GetDataGrant (new) Link ¶

This operation returns information about a data grant.

See also: AWS API Documentation

Request Syntax

client.get_data_grant(
    DataGrantId='string'
)
type DataGrantId

string

param DataGrantId

[REQUIRED]

The ID of the data grant.

rtype

dict

returns

Response Syntax

{
    'Name': 'string',
    'SenderPrincipal': 'string',
    'ReceiverPrincipal': 'string',
    'Description': 'string',
    'AcceptanceState': 'PENDING_RECEIVER_ACCEPTANCE'|'ACCEPTED',
    'AcceptedAt': datetime(2015, 1, 1),
    'EndsAt': datetime(2015, 1, 1),
    'GrantDistributionScope': 'AWS_ORGANIZATION'|'NONE',
    'DataSetId': 'string',
    'SourceDataSetId': 'string',
    'Id': 'string',
    'Arn': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'UpdatedAt': datetime(2015, 1, 1),
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • Name (string) --

      The name of the data grant.

    • SenderPrincipal (string) --

      The Amazon Web Services account ID of the data grant sender.

    • ReceiverPrincipal (string) --

      The Amazon Web Services account ID of the data grant receiver.

    • Description (string) --

      The description of the data grant.

    • AcceptanceState (string) --

      The acceptance state of the data grant.

    • AcceptedAt (datetime) --

      The timestamp of when the data grant was accepted.

    • EndsAt (datetime) --

      The timestamp of when access to the associated data set ends.

    • GrantDistributionScope (string) --

      The distribution scope for the data grant.

    • DataSetId (string) --

      The ID of the data set associated to the data grant.

    • SourceDataSetId (string) --

      The ID of the data set used to create the data grant.

    • Id (string) --

      The ID of the data grant.

    • Arn (string) --

      The Amazon Resource Name (ARN) of the data grant.

    • CreatedAt (datetime) --

      The timestamp of when the data grant was created.

    • UpdatedAt (datetime) --

      The timestamp of when the data grant was last updated.

    • Tags (dict) --

      The tags associated to the data grant. A tag is a key-value pair.

      • (string) --

        • (string) --

ListReceivedDataGrants (new) Link ¶

This operation returns information about all received data grants.

See also: AWS API Documentation

Request Syntax

client.list_received_data_grants(
    MaxResults=123,
    NextToken='string',
    AcceptanceState=[
        'PENDING_RECEIVER_ACCEPTANCE'|'ACCEPTED',
    ]
)
type MaxResults

integer

param MaxResults

The maximum number of results to be included in the next page.

type NextToken

string

param NextToken

The pagination token used to retrieve the next page of results for this operation.

type AcceptanceState

list

param AcceptanceState

The acceptance state of the data grants to list.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'DataGrantSummaries': [
        {
            'Name': 'string',
            'SenderPrincipal': 'string',
            'ReceiverPrincipal': 'string',
            'AcceptanceState': 'PENDING_RECEIVER_ACCEPTANCE'|'ACCEPTED',
            'AcceptedAt': datetime(2015, 1, 1),
            'EndsAt': datetime(2015, 1, 1),
            'DataSetId': 'string',
            'Id': 'string',
            'Arn': 'string',
            'CreatedAt': datetime(2015, 1, 1),
            'UpdatedAt': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • DataGrantSummaries (list) --

      An object that contains a list of received data grant information.

      • (dict) --

        Information about a received data grant.

        • Name (string) --

          The name of the data grant.

        • SenderPrincipal (string) --

          The Amazon Web Services account ID of the data grant sender.

        • ReceiverPrincipal (string) --

          The Amazon Web Services account ID of the data grant receiver.

        • AcceptanceState (string) --

          The acceptance state of the data grant.

        • AcceptedAt (datetime) --

          The timestamp of when the data grant was accepted.

        • EndsAt (datetime) --

          The timestamp of when access to the associated data set ends.

        • DataSetId (string) --

          The ID of the data set associated to the data grant.

        • Id (string) --

          The ID of the data grant.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the data grant.

        • CreatedAt (datetime) --

          The timestamp of when the data grant was created.

        • UpdatedAt (datetime) --

          The timestamp of when the data grant was last updated.

    • NextToken (string) --

      The pagination token used to retrieve the next page of results for this operation.

AcceptDataGrant (new) Link ¶

This operation accepts a data grant.

See also: AWS API Documentation

Request Syntax

client.accept_data_grant(
    DataGrantArn='string'
)
type DataGrantArn

string

param DataGrantArn

[REQUIRED]

The Amazon Resource Name (ARN) of the data grant to accept.

rtype

dict

returns

Response Syntax

{
    'Name': 'string',
    'SenderPrincipal': 'string',
    'ReceiverPrincipal': 'string',
    'Description': 'string',
    'AcceptanceState': 'PENDING_RECEIVER_ACCEPTANCE'|'ACCEPTED',
    'AcceptedAt': datetime(2015, 1, 1),
    'EndsAt': datetime(2015, 1, 1),
    'GrantDistributionScope': 'AWS_ORGANIZATION'|'NONE',
    'DataSetId': 'string',
    'Id': 'string',
    'Arn': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'UpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • Name (string) --

      The name of the accepted data grant.

    • SenderPrincipal (string) --

      The Amazon Web Services account ID of the data grant sender.

    • ReceiverPrincipal (string) --

      The Amazon Web Services account ID of the data grant receiver.

    • Description (string) --

      The description of the accepted data grant.

    • AcceptanceState (string) --

      The acceptance state of the data grant.

    • AcceptedAt (datetime) --

      The timestamp of when the data grant was accepted.

    • EndsAt (datetime) --

      The timestamp of when access to the associated data set ends.

    • GrantDistributionScope (string) --

      The distribution scope for the data grant.

    • DataSetId (string) --

      The ID of the data set associated to the data grant.

    • Id (string) --

      The ID of the data grant.

    • Arn (string) --

      The Amazon Resource Name (ARN) of the accepted data grant.

    • CreatedAt (datetime) --

      The timestamp of when the data grant was created.

    • UpdatedAt (datetime) --

      The timestamp of when the data grant was last updated.

CreateDataSet (updated) Link ¶
Changes (response)
{'OriginDetails': {'DataGrantId': 'string'}}

This operation creates a data set.

See also: AWS API Documentation

Request Syntax

client.create_data_set(
    AssetType='S3_SNAPSHOT'|'REDSHIFT_DATA_SHARE'|'API_GATEWAY_API'|'S3_DATA_ACCESS'|'LAKE_FORMATION_DATA_PERMISSION',
    Description='string',
    Name='string',
    Tags={
        'string': 'string'
    }
)
type AssetType

string

param AssetType

[REQUIRED]

The type of asset that is added to a data set.

type Description

string

param Description

[REQUIRED]

A description for the data set. This value can be up to 16,348 characters long.

type Name

string

param Name

[REQUIRED]

The name of the data set.

type Tags

dict

param Tags

A data set tag is an optional label that you can assign to a data set when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to these data sets and revisions.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'AssetType': 'S3_SNAPSHOT'|'REDSHIFT_DATA_SHARE'|'API_GATEWAY_API'|'S3_DATA_ACCESS'|'LAKE_FORMATION_DATA_PERMISSION',
    'CreatedAt': datetime(2015, 1, 1),
    'Description': 'string',
    'Id': 'string',
    'Name': 'string',
    'Origin': 'OWNED'|'ENTITLED',
    'OriginDetails': {
        'ProductId': 'string',
        'DataGrantId': 'string'
    },
    'SourceId': 'string',
    'Tags': {
        'string': 'string'
    },
    'UpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • Arn (string) --

      The ARN for the data set.

    • AssetType (string) --

      The type of asset that is added to a data set.

    • CreatedAt (datetime) --

      The date and time that the data set was created, in ISO 8601 format.

    • Description (string) --

      The description for the data set.

    • Id (string) --

      The unique identifier for the data set.

    • Name (string) --

      The name of the data set.

    • Origin (string) --

      A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).

    • OriginDetails (dict) --

      If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.

      • ProductId (string) --

        The product ID of the origin of the data set.

      • DataGrantId (string) --

        The ID of the data grant.

    • SourceId (string) --

      The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.

    • Tags (dict) --

      The tags for the data set.

      • (string) --

        • (string) --

    • UpdatedAt (datetime) --

      The date and time that the data set was last updated, in ISO 8601 format.

GetDataSet (updated) Link ¶
Changes (response)
{'OriginDetails': {'DataGrantId': 'string'}}

This operation returns information about a data set.

See also: AWS API Documentation

Request Syntax

client.get_data_set(
    DataSetId='string'
)
type DataSetId

string

param DataSetId

[REQUIRED]

The unique identifier for a data set.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'AssetType': 'S3_SNAPSHOT'|'REDSHIFT_DATA_SHARE'|'API_GATEWAY_API'|'S3_DATA_ACCESS'|'LAKE_FORMATION_DATA_PERMISSION',
    'CreatedAt': datetime(2015, 1, 1),
    'Description': 'string',
    'Id': 'string',
    'Name': 'string',
    'Origin': 'OWNED'|'ENTITLED',
    'OriginDetails': {
        'ProductId': 'string',
        'DataGrantId': 'string'
    },
    'SourceId': 'string',
    'Tags': {
        'string': 'string'
    },
    'UpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • Arn (string) --

      The ARN for the data set.

    • AssetType (string) --

      The type of asset that is added to a data set.

    • CreatedAt (datetime) --

      The date and time that the data set was created, in ISO 8601 format.

    • Description (string) --

      The description for the data set.

    • Id (string) --

      The unique identifier for the data set.

    • Name (string) --

      The name of the data set.

    • Origin (string) --

      A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).

    • OriginDetails (dict) --

      If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.

      • ProductId (string) --

        The product ID of the origin of the data set.

      • DataGrantId (string) --

        The ID of the data grant.

    • SourceId (string) --

      The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.

    • Tags (dict) --

      The tags for the data set.

      • (string) --

        • (string) --

    • UpdatedAt (datetime) --

      The date and time that the data set was last updated, in ISO 8601 format.

ListDataSets (updated) Link ¶
Changes (response)
{'DataSets': {'OriginDetails': {'DataGrantId': 'string'}}}

This operation lists your data sets. When listing by origin OWNED, results are sorted by CreatedAt in descending order. When listing by origin ENTITLED, there is no order.

See also: AWS API Documentation

Request Syntax

client.list_data_sets(
    MaxResults=123,
    NextToken='string',
    Origin='string'
)
type MaxResults

integer

param MaxResults

The maximum number of results returned by a single call.

type NextToken

string

param NextToken

The token value retrieved from a previous call to access the next page of results.

type Origin

string

param Origin

A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).

rtype

dict

returns

Response Syntax

{
    'DataSets': [
        {
            'Arn': 'string',
            'AssetType': 'S3_SNAPSHOT'|'REDSHIFT_DATA_SHARE'|'API_GATEWAY_API'|'S3_DATA_ACCESS'|'LAKE_FORMATION_DATA_PERMISSION',
            'CreatedAt': datetime(2015, 1, 1),
            'Description': 'string',
            'Id': 'string',
            'Name': 'string',
            'Origin': 'OWNED'|'ENTITLED',
            'OriginDetails': {
                'ProductId': 'string',
                'DataGrantId': 'string'
            },
            'SourceId': 'string',
            'UpdatedAt': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • DataSets (list) --

      The data set objects listed by the request.

      • (dict) --

        A data set is an AWS resource with one or more revisions.

        • Arn (string) --

          The ARN for the data set.

        • AssetType (string) --

          The type of asset that is added to a data set.

        • CreatedAt (datetime) --

          The date and time that the data set was created, in ISO 8601 format.

        • Description (string) --

          The description for the data set.

        • Id (string) --

          The unique identifier for the data set.

        • Name (string) --

          The name of the data set.

        • Origin (string) --

          A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).

        • OriginDetails (dict) --

          If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.

          • ProductId (string) --

            The product ID of the origin of the data set.

          • DataGrantId (string) --

            The ID of the data grant.

        • SourceId (string) --

          The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.

        • UpdatedAt (datetime) --

          The date and time that the data set was last updated, in ISO 8601 format.

    • NextToken (string) --

      The token value retrieved from a previous call to access the next page of results.

UpdateDataSet (updated) Link ¶
Changes (response)
{'OriginDetails': {'DataGrantId': 'string'}}

This operation updates a data set.

See also: AWS API Documentation

Request Syntax

client.update_data_set(
    DataSetId='string',
    Description='string',
    Name='string'
)
type DataSetId

string

param DataSetId

[REQUIRED]

The unique identifier for a data set.

type Description

string

param Description

The description for the data set.

type Name

string

param Name

The name of the data set.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'AssetType': 'S3_SNAPSHOT'|'REDSHIFT_DATA_SHARE'|'API_GATEWAY_API'|'S3_DATA_ACCESS'|'LAKE_FORMATION_DATA_PERMISSION',
    'CreatedAt': datetime(2015, 1, 1),
    'Description': 'string',
    'Id': 'string',
    'Name': 'string',
    'Origin': 'OWNED'|'ENTITLED',
    'OriginDetails': {
        'ProductId': 'string',
        'DataGrantId': 'string'
    },
    'SourceId': 'string',
    'UpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • Arn (string) --

      The ARN for the data set.

    • AssetType (string) --

      The type of asset that is added to a data set.

    • CreatedAt (datetime) --

      The date and time that the data set was created, in ISO 8601 format.

    • Description (string) --

      The description for the data set.

    • Id (string) --

      The unique identifier for the data set.

    • Name (string) --

      The name of the data set.

    • Origin (string) --

      A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).

    • OriginDetails (dict) --

      If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.

      • ProductId (string) --

        The product ID of the origin of the data set.

      • DataGrantId (string) --

        The ID of the data grant.

    • SourceId (string) --

      The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.

    • UpdatedAt (datetime) --

      The date and time that the data set was last updated, in ISO 8601 format.