RenewOfferingCommand

Explicitly sets the quantity of devices to renew for an offering, starting from the effectiveDate of 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-supportamazon.com .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { DeviceFarmClient, RenewOfferingCommand } from "@aws-sdk/client-device-farm"; // ES Modules import
// const { DeviceFarmClient, RenewOfferingCommand } = require("@aws-sdk/client-device-farm"); // CommonJS import
const client = new DeviceFarmClient(config);
const input = { // RenewOfferingRequest
  offeringId: "STRING_VALUE", // required
  quantity: Number("int"), // required
};
const command = new RenewOfferingCommand(input);
const response = await client.send(command);
// { // RenewOfferingResult
//   offeringTransaction: { // OfferingTransaction
//     offeringStatus: { // OfferingStatus
//       type: "PURCHASE" || "RENEW" || "SYSTEM",
//       offering: { // Offering
//         id: "STRING_VALUE",
//         description: "STRING_VALUE",
//         type: "RECURRING",
//         platform: "ANDROID" || "IOS",
//         recurringCharges: [ // RecurringCharges
//           { // RecurringCharge
//             cost: { // MonetaryAmount
//               amount: Number("double"),
//               currencyCode: "USD",
//             },
//             frequency: "MONTHLY",
//           },
//         ],
//       },
//       quantity: Number("int"),
//       effectiveOn: new Date("TIMESTAMP"),
//     },
//     transactionId: "STRING_VALUE",
//     offeringPromotionId: "STRING_VALUE",
//     createdOn: new Date("TIMESTAMP"),
//     cost: {
//       amount: Number("double"),
//       currencyCode: "USD",
//     },
//   },
// };

Example Usage

 Loading code editor

RenewOfferingCommand Input

See RenewOfferingCommandInput for more details

Parameter
Type
Description
offeringId
Required
string | undefined

The ID of a request to renew an offering.

quantity
Required
number | undefined

The quantity requested in an offering renewal.

RenewOfferingCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
offeringTransaction
OfferingTransaction | undefined

Represents the status of the offering transaction for the renewal.

Throws

Name
Fault
Details
ArgumentException
client

An invalid argument was specified.

LimitExceededException
client

A limit was exceeded.

NotEligibleException
client

Exception gets thrown when a user is not eligible to perform the specified transaction.

NotFoundException
client

The specified entity was not found.

ServiceAccountException
client

There was a problem with the service account.

DeviceFarmServiceException
Base exception class for all service exceptions from DeviceFarm service.