AWS Marketplace Catalog Service

2023/04/10 - AWS Marketplace Catalog Service - 3 new1 updated api methods

Changes  Added three new APIs to support resource sharing: GetResourcePolicy, PutResourcePolicy, and DeleteResourcePolicy. Added new OwnershipType field to ListEntities request to let users filter on entities that are shared with them. Increased max page size of ListEntities response from 20 to 50 results.

DeleteResourcePolicy (new) Link ¶

Deletes a resource-based policy on an Entity that is identified by its resource ARN.

See also: AWS API Documentation

Request Syntax

client.delete_resource_policy(
    ResourceArn='string'
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the Entity resource that is associated with the resource policy.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

PutResourcePolicy (new) Link ¶

Attaches a resource-based policy to an Entity. Examples of an entity include: AmiProduct and ContainerProduct.

See also: AWS API Documentation

Request Syntax

client.put_resource_policy(
    ResourceArn='string',
    Policy='string'
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the Entity resource you want to associate with a resource policy.

type Policy:

string

param Policy:

[REQUIRED]

The policy document to set; formatted in JSON.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetResourcePolicy (new) Link ¶

Gets a resource-based policy of an Entity that is identified by its resource ARN.

See also: AWS API Documentation

Request Syntax

client.get_resource_policy(
    ResourceArn='string'
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the Entity resource that is associated with the resource policy.

rtype:

dict

returns:

Response Syntax

{
    'Policy': 'string'
}

Response Structure

  • (dict) --

    • Policy (string) --

      The policy document to set; formatted in JSON.

ListEntities (updated) Link ¶
Changes (request)
{'OwnershipType': 'SELF | SHARED'}

Provides the list of entities of a given type.

See also: AWS API Documentation

Request Syntax

client.list_entities(
    Catalog='string',
    EntityType='string',
    FilterList=[
        {
            'Name': 'string',
            'ValueList': [
                'string',
            ]
        },
    ],
    Sort={
        'SortBy': 'string',
        'SortOrder': 'ASCENDING'|'DESCENDING'
    },
    NextToken='string',
    MaxResults=123,
    OwnershipType='SELF'|'SHARED'
)
type Catalog:

string

param Catalog:

[REQUIRED]

The catalog related to the request. Fixed value: AWSMarketplace

type EntityType:

string

param EntityType:

[REQUIRED]

The type of entities to retrieve.

type FilterList:

list

param FilterList:

An array of filter objects. Each filter object contains two attributes, filterName and filterValues.

  • (dict) --

    A filter object, used to optionally filter results from calls to the ListEntities and ListChangeSets actions.

    • Name (string) --

      For ListEntities, the supported value for this is an EntityId.

      For ListChangeSets, the supported values are as follows:

    • ValueList (list) --

      ListEntities - This is a list of unique ``EntityId``s.

      ListChangeSets - The supported filter names and associated ``ValueList``s is as follows:

      • ChangeSetName - The supported ValueList is a list of non-unique ChangeSetName``s. These are defined when you call the ``StartChangeSet action.

      • Status - The supported ValueList is a list of statuses for all change set requests.

      • EntityId - The supported ValueList is a list of unique ``EntityId``s.

      • BeforeStartTime - The supported ValueList is a list of all change sets that started before the filter value.

      • AfterStartTime - The supported ValueList is a list of all change sets that started after the filter value.

      • BeforeEndTime - The supported ValueList is a list of all change sets that ended before the filter value.

      • AfterEndTime - The supported ValueList is a list of all change sets that ended after the filter value.

      • (string) --

type Sort:

dict

param Sort:

An object that contains two attributes, SortBy and SortOrder.

  • SortBy (string) --

    For ListEntities, supported attributes include LastModifiedDate (default), Visibility, EntityId, and Name.

    For ListChangeSets, supported attributes include StartTime and EndTime.

  • SortOrder (string) --

    The sorting order. Can be ASCENDING or DESCENDING. The default value is DESCENDING.

type NextToken:

string

param NextToken:

The value of the next token, if it exists. Null if there are no more results.

type MaxResults:

integer

param MaxResults:

Specifies the upper limit of the elements on a single page. If a value isn't provided, the default value is 20.

type OwnershipType:

string

param OwnershipType:

rtype:

dict

returns:

Response Syntax

{
    'EntitySummaryList': [
        {
            'Name': 'string',
            'EntityType': 'string',
            'EntityId': 'string',
            'EntityArn': 'string',
            'LastModifiedDate': 'string',
            'Visibility': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • EntitySummaryList (list) --

      Array of EntitySummary object.

      • (dict) --

        This object is a container for common summary information about the entity. The summary doesn't contain the whole entity structure, but it does contain information common across all entities.

        • Name (string) --

          The name for the entity. This value is not unique. It is defined by the seller.

        • EntityType (string) --

          The type of the entity.

        • EntityId (string) --

          The unique identifier for the entity.

        • EntityArn (string) --

          The ARN associated with the unique identifier for the entity.

        • LastModifiedDate (string) --

          The last time the entity was published, using ISO 8601 format (2018-02-27T13:45:22Z).

        • Visibility (string) --

          The visibility status of the entity to buyers. This value can be Public (everyone can view the entity), Limited (the entity is visible to limited accounts only), or Restricted (the entity was published and then unpublished and only existing buyers can view it).

    • NextToken (string) --

      The value of the next token if it exists. Null if there is no more result.