DeviceFarm / Client / get_offering_status

get_offering_status#

DeviceFarm.Client.get_offering_status(**kwargs)#

Gets the current status and future status of all offerings purchased by an AWS account. The response indicates how many offerings are currently available and the offerings that will be available in the next period. 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.get_offering_status(
    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

{
    'current': {
        'string': {
            'type': 'PURCHASE'|'RENEW'|'SYSTEM',
            'offering': {
                'id': 'string',
                'description': 'string',
                'type': 'RECURRING',
                'platform': 'ANDROID'|'IOS',
                'recurringCharges': [
                    {
                        'cost': {
                            'amount': 123.0,
                            'currencyCode': 'USD'
                        },
                        'frequency': 'MONTHLY'
                    },
                ]
            },
            'quantity': 123,
            'effectiveOn': datetime(2015, 1, 1)
        }
    },
    'nextPeriod': {
        'string': {
            'type': 'PURCHASE'|'RENEW'|'SYSTEM',
            'offering': {
                'id': 'string',
                'description': 'string',
                'type': 'RECURRING',
                'platform': 'ANDROID'|'IOS',
                'recurringCharges': [
                    {
                        'cost': {
                            'amount': 123.0,
                            'currencyCode': 'USD'
                        },
                        'frequency': 'MONTHLY'
                    },
                ]
            },
            'quantity': 123,
            'effectiveOn': datetime(2015, 1, 1)
        }
    },
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    Returns the status result for a device offering.

    • current (dict) –

      When specified, gets the offering status for the current period.

      • (string) –

        • (dict) –

          The status of the offering.

          • type (string) –

            The type specified for the offering status.

          • offering (dict) –

            Represents the metadata of an offering status.

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

          • quantity (integer) –

            The number of available devices in the offering.

          • effectiveOn (datetime) –

            The date on which the offering is effective.

    • nextPeriod (dict) –

      When specified, gets the offering status for the next period.

      • (string) –

        • (dict) –

          The status of the offering.

          • type (string) –

            The type specified for the offering status.

          • offering (dict) –

            Represents the metadata of an offering status.

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

          • quantity (integer) –

            The number of available devices in the offering.

          • effectiveOn (datetime) –

            The date on which the offering is effective.

    • 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 Device Farm offerings available to your account.

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

print(response)

Expected Output:

{
    'current': {
        'D68B3C05-1BA6-4360-BC69-12345EXAMPLE': {
            'offering': {
                'type': 'RECURRING',
                'description': 'Android Remote Access Unmetered Device Slot',
                'id': 'D68B3C05-1BA6-4360-BC69-12345EXAMPLE',
                'platform': 'ANDROID',
            },
            'quantity': 1,
        },
    },
    'nextPeriod': {
        'D68B3C05-1BA6-4360-BC69-12345EXAMPLE': {
            'effectiveOn': datetime(2016, 9, 1, 0, 0, 0, 3, 245, 0),
            'offering': {
                'type': 'RECURRING',
                'description': 'Android Remote Access Unmetered Device Slot',
                'id': 'D68B3C05-1BA6-4360-BC69-12345EXAMPLE',
                'platform': 'ANDROID',
            },
            'quantity': 1,
        },
    },
    'ResponseMetadata': {
        '...': '...',
    },
}