DataZone / Client / create_subscription_request

create_subscription_request#

DataZone.Client.create_subscription_request(**kwargs)#

Creates a subscription request in Amazon DataZone.

See also: AWS API Documentation

Request Syntax

response = client.create_subscription_request(
    clientToken='string',
    domainIdentifier='string',
    requestReason='string',
    subscribedListings=[
        {
            'identifier': 'string'
        },
    ],
    subscribedPrincipals=[
        {
            'project': {
                'identifier': 'string'
            }
        },
    ]
)
Parameters:
  • clientToken (string) –

    A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

    This field is autopopulated if not provided.

  • domainIdentifier (string) –

    [REQUIRED]

    The ID of the Amazon DataZone domain in which the subscription request is created.

  • requestReason (string) –

    [REQUIRED]

    The reason for the subscription request.

  • subscribedListings (list) –

    [REQUIRED]

    The published asset for which the subscription grant is to be created.

    • (dict) –

      The published asset for which the subscription grant is to be created.

      • identifier (string) – [REQUIRED]

        The identifier of the published asset for which the subscription grant is to be created.

  • subscribedPrincipals (list) –

    [REQUIRED]

    The Amazon DataZone principals for whom the subscription request is created.

    • (dict) –

      The principal that is to be given a subscriptiong grant.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: project.

      • project (dict) –

        The project that is to be given a subscription grant.

        • identifier (string) –

          The identifier of the project that is to be given a subscription grant.

Return type:

dict

Returns:

Response Syntax

{
    'createdAt': datetime(2015, 1, 1),
    'createdBy': 'string',
    'decisionComment': 'string',
    'domainId': 'string',
    'id': 'string',
    'requestReason': 'string',
    'reviewerId': 'string',
    'status': 'PENDING'|'ACCEPTED'|'REJECTED',
    'subscribedListings': [
        {
            'description': 'string',
            'id': 'string',
            'item': {
                'assetListing': {
                    'entityId': 'string',
                    'entityRevision': 'string',
                    'entityType': 'string',
                    'forms': 'string',
                    'glossaryTerms': [
                        {
                            'name': 'string',
                            'shortDescription': 'string'
                        },
                    ]
                },
                'productListing': {
                    'assetListings': [
                        {
                            'entityId': 'string',
                            'entityRevision': 'string',
                            'entityType': 'string'
                        },
                    ],
                    'description': 'string',
                    'entityId': 'string',
                    'entityRevision': 'string',
                    'glossaryTerms': [
                        {
                            'name': 'string',
                            'shortDescription': 'string'
                        },
                    ],
                    'name': 'string'
                }
            },
            'name': 'string',
            'ownerProjectId': 'string',
            'ownerProjectName': 'string',
            'revision': 'string'
        },
    ],
    'subscribedPrincipals': [
        {
            'project': {
                'id': 'string',
                'name': 'string'
            }
        },
    ],
    'updatedAt': datetime(2015, 1, 1),
    'updatedBy': 'string'
}

Response Structure

  • (dict) –

    • createdAt (datetime) –

      A timestamp of when the subscription request is created.

    • createdBy (string) –

      The Amazon DataZone user who created the subscription request.

    • decisionComment (string) –

      The decision comment of the subscription request.

    • domainId (string) –

      The ID of the Amazon DataZone domain in whcih the subscription request is created.

    • id (string) –

      The ID of the subscription request.

    • requestReason (string) –

      The reason for the subscription request.

    • reviewerId (string) –

      The ID of the reviewer of the subscription request.

    • status (string) –

      The status of the subscription request.

    • subscribedListings (list) –

      The published asset for which the subscription grant is to be created.

      • (dict) –

        The details of the published asset for which the subscription grant is created.

        • description (string) –

          The description of the published asset for which the subscription grant is created.

        • id (string) –

          The identifier of the published asset for which the subscription grant is created.

        • item (dict) –

          The published asset for which the subscription grant is created.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: assetListing, productListing. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
          
          • assetListing (dict) –

            The asset for which the subscription grant is created.

            • entityId (string) –

              The identifier of the published asset for which the subscription grant is created.

            • entityRevision (string) –

              The revision of the published asset for which the subscription grant is created.

            • entityType (string) –

              The type of the published asset for which the subscription grant is created.

            • forms (string) –

              The forms attached to the published asset for which the subscription grant is created.

            • glossaryTerms (list) –

              The glossary terms attached to the published asset for which the subscription grant is created.

              • (dict) –

                Details of a glossary term attached to the inventory asset.

                • name (string) –

                  The name of a glossary term attached to the inventory asset.

                • shortDescription (string) –

                  The shoft description of a glossary term attached to the inventory asset.

          • productListing (dict) –

            The data product listing.

            • assetListings (list) –

              The data assets of the data product listing.

              • (dict) –

                The listing of the asset in a data product.

                • entityId (string) –

                  The entity ID of the listing of the asset in a data product.

                • entityRevision (string) –

                  The entity revision of the listing of the asset in a data product.

                • entityType (string) –

                  The entity type of the listing of the asset in a data product.

            • description (string) –

              The description of the data product listing.

            • entityId (string) –

              The ID of the data product listing.

            • entityRevision (string) –

              The revision of the data product listing.

            • glossaryTerms (list) –

              The glossary terms of the data product listing.

              • (dict) –

                Details of a glossary term attached to the inventory asset.

                • name (string) –

                  The name of a glossary term attached to the inventory asset.

                • shortDescription (string) –

                  The shoft description of a glossary term attached to the inventory asset.

            • name (string) –

              The name of the data product listing.

        • name (string) –

          The name of the published asset for which the subscription grant is created.

        • ownerProjectId (string) –

          The identifier of the project of the published asset for which the subscription grant is created.

        • ownerProjectName (string) –

          The name of the project that owns the published asset for which the subscription grant is created.

        • revision (string) –

          The revision of the published asset for which the subscription grant is created.

    • subscribedPrincipals (list) –

      The subscribed principals of the subscription request.

      • (dict) –

        The principal that has the subscription grant for the asset.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: project. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • project (dict) –

          The project that has the subscription grant.

          • id (string) –

            The identifier of the project that has the subscription grant.

          • name (string) –

            The name of the project that has the subscription grant.

    • updatedAt (datetime) –

      The timestamp of when the subscription request was updated.

    • updatedBy (string) –

      The Amazon DataZone user who updated the subscription request.

Exceptions

  • DataZone.Client.exceptions.InternalServerException

  • DataZone.Client.exceptions.ResourceNotFoundException

  • DataZone.Client.exceptions.AccessDeniedException

  • DataZone.Client.exceptions.ThrottlingException

  • DataZone.Client.exceptions.ConflictException

  • DataZone.Client.exceptions.ValidationException

  • DataZone.Client.exceptions.UnauthorizedException