list_offerings

list_offerings(**kwargs)

Returns a list of products or offerings that the user can manage through the API. Each offering record indicates the recurring price per unit and the frequency for that offering. The API returns a NotEligible error if the user is not permitted to invoke the operation. If you must be able to invoke this operation, contact aws-devicefarm-support@amazon.com.

See also: AWS API Documentation

Request Syntax

response = client.list_offerings(
    nextToken='string'
)
Parameters
nextToken (string) -- An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
Return type
dict
Returns
Response Syntax
{
    'offerings': [
        {
            'id': 'string',
            'description': 'string',
            'type': 'RECURRING',
            'platform': 'ANDROID'|'IOS',
            'recurringCharges': [
                {
                    'cost': {
                        'amount': 123.0,
                        'currencyCode': 'USD'
                    },
                    'frequency': 'MONTHLY'
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the return values of the list of offerings.

    • offerings (list) --

      A value that represents the list offering results.

      • (dict) --

        Represents the metadata of a device offering.

        • id (string) --

          The ID that corresponds to a device offering.

        • description (string) --

          A string that describes the offering.

        • type (string) --

          The type of offering (for example, RECURRING ) for a device.

        • platform (string) --

          The platform of the device (for example, ANDROID or IOS ).

        • recurringCharges (list) --

          Specifies whether there are recurring charges for the offering.

          • (dict) --

            Specifies whether charges for devices are recurring.

            • cost (dict) --

              The cost of the recurring charge.

              • amount (float) --

                The numerical amount of an offering or transaction.

              • currencyCode (string) --

                The currency code of a monetary amount. For example, USD means U.S. dollars.

            • frequency (string) --

              The frequency in which charges recur.

    • nextToken (string) --

      An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Exceptions

  • DeviceFarm.Client.exceptions.ArgumentException
  • DeviceFarm.Client.exceptions.NotFoundException
  • DeviceFarm.Client.exceptions.NotEligibleException
  • DeviceFarm.Client.exceptions.LimitExceededException
  • DeviceFarm.Client.exceptions.ServiceAccountException

Examples

The following example returns information about available device offerings.

response = client.list_offerings(
    # A dynamically generated value, used for paginating results.
    nextToken='RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE=',
)

print(response)

Expected Output:

{
    'offerings': [
        {
            'type': 'RECURRING',
            'description': 'iOS Unmetered Device Slot',
            'id': 'A53D4D73-A6F6-4B82-A0B0-12345EXAMPLE',
            'platform': 'IOS',
            'recurringCharges': [
                {
                    'cost': {
                        'amount': 250,
                        'currencyCode': 'USD',
                    },
                    'frequency': 'MONTHLY',
                },
            ],
        },
        {
            'type': 'RECURRING',
            'description': 'Android Unmetered Device Slot',
            'id': '8980F81C-00D7-469D-8EC6-12345EXAMPLE',
            'platform': 'ANDROID',
            'recurringCharges': [
                {
                    'cost': {
                        'amount': 250,
                        'currencyCode': 'USD',
                    },
                    'frequency': 'MONTHLY',
                },
            ],
        },
        {
            'type': 'RECURRING',
            'description': 'Android Remote Access Unmetered Device Slot',
            'id': 'D68B3C05-1BA6-4360-BC69-12345EXAMPLE',
            'platform': 'ANDROID',
            'recurringCharges': [
                {
                    'cost': {
                        'amount': 250,
                        'currencyCode': 'USD',
                    },
                    'frequency': 'MONTHLY',
                },
            ],
        },
        {
            'type': 'RECURRING',
            'description': 'iOS Remote Access Unmetered Device Slot',
            'id': '552B4DAD-A6C9-45C4-94FB-12345EXAMPLE',
            'platform': 'IOS',
            'recurringCharges': [
                {
                    'cost': {
                        'amount': 250,
                        'currencyCode': 'USD',
                    },
                    'frequency': 'MONTHLY',
                },
            ],
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}