Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class PurchaseOfferingCommandProtected

Submits a request to purchase an offering. If you already have an active reservation, you can't purchase another offering.

Example

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

import { MediaConnectClient, PurchaseOfferingCommand } from "@aws-sdk/client-mediaconnect"; // ES Modules import
// const { MediaConnectClient, PurchaseOfferingCommand } = require("@aws-sdk/client-mediaconnect"); // CommonJS import
const client = new MediaConnectClient(config);
const input = { // PurchaseOfferingRequest
OfferingArn: "STRING_VALUE", // required
ReservationName: "STRING_VALUE", // required
Start: "STRING_VALUE", // required
};
const command = new PurchaseOfferingCommand(input);
const response = await client.send(command);
// { // PurchaseOfferingResponse
// Reservation: { // Reservation
// CurrencyCode: "STRING_VALUE", // required
// Duration: Number("int"), // required
// DurationUnits: "MONTHS", // required
// End: "STRING_VALUE", // required
// OfferingArn: "STRING_VALUE", // required
// OfferingDescription: "STRING_VALUE", // required
// PricePerUnit: "STRING_VALUE", // required
// PriceUnits: "HOURLY", // required
// ReservationArn: "STRING_VALUE", // required
// ReservationName: "STRING_VALUE", // required
// ReservationState: "ACTIVE" || "EXPIRED" || "PROCESSING" || "CANCELED", // required
// ResourceSpecification: { // ResourceSpecification
// ReservedBitrate: Number("int"),
// ResourceType: "Mbps_Outbound_Bandwidth", // required
// },
// Start: "STRING_VALUE", // required
// },
// };

Param

PurchaseOfferingCommandInput

Returns

PurchaseOfferingCommandOutput

See

Throws

BadRequestException (client fault) Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.

Throws

ForbiddenException (client fault) Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.

Throws

InternalServerErrorException (server fault) Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.

Throws

NotFoundException (client fault) Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.

Throws

ServiceUnavailableException (server fault) Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.

Throws

TooManyRequestsException (client fault) Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.

Throws

MediaConnectServiceException

Base exception class for all service exceptions from MediaConnect service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods