DeviceFarm / Client / renew_offering
renew_offering#
- DeviceFarm.Client.renew_offering(**kwargs)#
Explicitly sets the quantity of devices to renew for an offering, starting from the
effectiveDate
of the next period. The API returns aNotEligible
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.renew_offering( offeringId='string', quantity=123 )
- Parameters:
offeringId (string) –
[REQUIRED]
The ID of a request to renew an offering.
quantity (integer) –
[REQUIRED]
The quantity requested in an offering renewal.
- Return type:
dict
- Returns:
Response Syntax
{ 'offeringTransaction': { 'offeringStatus': { '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) }, 'transactionId': 'string', 'offeringPromotionId': 'string', 'createdOn': datetime(2015, 1, 1), 'cost': { 'amount': 123.0, 'currencyCode': 'USD' } } }
Response Structure
(dict) –
The result of a renewal offering.
offeringTransaction (dict) –
Represents the status of the offering transaction for the renewal.
offeringStatus (dict) –
The status of an offering transaction.
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
orIOS
).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.
transactionId (string) –
The transaction ID of the offering transaction.
offeringPromotionId (string) –
The ID that corresponds to a device offering promotion.
createdOn (datetime) –
The date on which an offering transaction was created.
cost (dict) –
The cost of an offering transaction.
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.
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 renews a specific device slot offering.
response = client.renew_offering( # You can get the offering ID by using the list-offerings CLI command. offeringId='D68B3C05-1BA6-4360-BC69-12345EXAMPLE', quantity=1, ) print(response)
Expected Output:
{ 'offeringTransaction': { 'cost': { 'amount': 250, 'currencyCode': 'USD', }, 'createdOn': datetime(2016, 8, 31, 13, 8, 0, 2, 244, 0), 'offeringStatus': { 'type': 'RENEW', '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, }, 'transactionId': 'e90f1405-8c35-4561-be43-12345EXAMPLE', }, 'ResponseMetadata': { '...': '...', }, }