diff --git a/clients/client-mediapackagev2/README.md b/clients/client-mediapackagev2/README.md index 6383482978eca..70a77e9c23bbe 100644 --- a/clients/client-mediapackagev2/README.md +++ b/clients/client-mediapackagev2/README.md @@ -21,7 +21,7 @@ see the ; + cancelHarvestJob( + args: CancelHarvestJobCommandInput, + cb: (err: any, data?: CancelHarvestJobCommandOutput) => void + ): void; + cancelHarvestJob( + args: CancelHarvestJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CancelHarvestJobCommandOutput) => void + ): void; + /** * @see {@link CreateChannelCommand} */ @@ -172,6 +213,23 @@ export interface MediaPackageV2 { cb: (err: any, data?: CreateChannelGroupCommandOutput) => void ): void; + /** + * @see {@link CreateHarvestJobCommand} + */ + createHarvestJob( + args: CreateHarvestJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createHarvestJob( + args: CreateHarvestJobCommandInput, + cb: (err: any, data?: CreateHarvestJobCommandOutput) => void + ): void; + createHarvestJob( + args: CreateHarvestJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateHarvestJobCommandOutput) => void + ): void; + /** * @see {@link CreateOriginEndpointCommand} */ @@ -310,6 +368,17 @@ export interface MediaPackageV2 { cb: (err: any, data?: GetChannelPolicyCommandOutput) => void ): void; + /** + * @see {@link GetHarvestJobCommand} + */ + getHarvestJob(args: GetHarvestJobCommandInput, options?: __HttpHandlerOptions): Promise; + getHarvestJob(args: GetHarvestJobCommandInput, cb: (err: any, data?: GetHarvestJobCommandOutput) => void): void; + getHarvestJob( + args: GetHarvestJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetHarvestJobCommandOutput) => void + ): void; + /** * @see {@link GetOriginEndpointCommand} */ @@ -373,6 +442,20 @@ export interface MediaPackageV2 { cb: (err: any, data?: ListChannelsCommandOutput) => void ): void; + /** + * @see {@link ListHarvestJobsCommand} + */ + listHarvestJobs( + args: ListHarvestJobsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listHarvestJobs(args: ListHarvestJobsCommandInput, cb: (err: any, data?: ListHarvestJobsCommandOutput) => void): void; + listHarvestJobs( + args: ListHarvestJobsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListHarvestJobsCommandOutput) => void + ): void; + /** * @see {@link ListOriginEndpointsCommand} */ diff --git a/clients/client-mediapackagev2/src/MediaPackageV2Client.ts b/clients/client-mediapackagev2/src/MediaPackageV2Client.ts index 5b8166a6ad0ce..5678831a7e8c8 100644 --- a/clients/client-mediapackagev2/src/MediaPackageV2Client.ts +++ b/clients/client-mediapackagev2/src/MediaPackageV2Client.ts @@ -53,8 +53,10 @@ import { HttpAuthSchemeResolvedConfig, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider"; +import { CancelHarvestJobCommandInput, CancelHarvestJobCommandOutput } from "./commands/CancelHarvestJobCommand"; import { CreateChannelCommandInput, CreateChannelCommandOutput } from "./commands/CreateChannelCommand"; import { CreateChannelGroupCommandInput, CreateChannelGroupCommandOutput } from "./commands/CreateChannelGroupCommand"; +import { CreateHarvestJobCommandInput, CreateHarvestJobCommandOutput } from "./commands/CreateHarvestJobCommand"; import { CreateOriginEndpointCommandInput, CreateOriginEndpointCommandOutput, @@ -76,6 +78,7 @@ import { import { GetChannelCommandInput, GetChannelCommandOutput } from "./commands/GetChannelCommand"; import { GetChannelGroupCommandInput, GetChannelGroupCommandOutput } from "./commands/GetChannelGroupCommand"; import { GetChannelPolicyCommandInput, GetChannelPolicyCommandOutput } from "./commands/GetChannelPolicyCommand"; +import { GetHarvestJobCommandInput, GetHarvestJobCommandOutput } from "./commands/GetHarvestJobCommand"; import { GetOriginEndpointCommandInput, GetOriginEndpointCommandOutput } from "./commands/GetOriginEndpointCommand"; import { GetOriginEndpointPolicyCommandInput, @@ -83,6 +86,7 @@ import { } from "./commands/GetOriginEndpointPolicyCommand"; import { ListChannelGroupsCommandInput, ListChannelGroupsCommandOutput } from "./commands/ListChannelGroupsCommand"; import { ListChannelsCommandInput, ListChannelsCommandOutput } from "./commands/ListChannelsCommand"; +import { ListHarvestJobsCommandInput, ListHarvestJobsCommandOutput } from "./commands/ListHarvestJobsCommand"; import { ListOriginEndpointsCommandInput, ListOriginEndpointsCommandOutput, @@ -119,8 +123,10 @@ export { __Client }; * @public */ export type ServiceInputTypes = + | CancelHarvestJobCommandInput | CreateChannelCommandInput | CreateChannelGroupCommandInput + | CreateHarvestJobCommandInput | CreateOriginEndpointCommandInput | DeleteChannelCommandInput | DeleteChannelGroupCommandInput @@ -130,10 +136,12 @@ export type ServiceInputTypes = | GetChannelCommandInput | GetChannelGroupCommandInput | GetChannelPolicyCommandInput + | GetHarvestJobCommandInput | GetOriginEndpointCommandInput | GetOriginEndpointPolicyCommandInput | ListChannelGroupsCommandInput | ListChannelsCommandInput + | ListHarvestJobsCommandInput | ListOriginEndpointsCommandInput | ListTagsForResourceCommandInput | PutChannelPolicyCommandInput @@ -148,8 +156,10 @@ export type ServiceInputTypes = * @public */ export type ServiceOutputTypes = + | CancelHarvestJobCommandOutput | CreateChannelCommandOutput | CreateChannelGroupCommandOutput + | CreateHarvestJobCommandOutput | CreateOriginEndpointCommandOutput | DeleteChannelCommandOutput | DeleteChannelGroupCommandOutput @@ -159,10 +169,12 @@ export type ServiceOutputTypes = | GetChannelCommandOutput | GetChannelGroupCommandOutput | GetChannelPolicyCommandOutput + | GetHarvestJobCommandOutput | GetOriginEndpointCommandOutput | GetOriginEndpointPolicyCommandOutput | ListChannelGroupsCommandOutput | ListChannelsCommandOutput + | ListHarvestJobsCommandOutput | ListOriginEndpointsCommandOutput | ListTagsForResourceCommandOutput | PutChannelPolicyCommandOutput diff --git a/clients/client-mediapackagev2/src/commands/CancelHarvestJobCommand.ts b/clients/client-mediapackagev2/src/commands/CancelHarvestJobCommand.ts new file mode 100644 index 0000000000000..2055972e3ea4b --- /dev/null +++ b/clients/client-mediapackagev2/src/commands/CancelHarvestJobCommand.ts @@ -0,0 +1,112 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { MediaPackageV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaPackageV2Client"; +import { CancelHarvestJobRequest, CancelHarvestJobResponse } from "../models/models_0"; +import { de_CancelHarvestJobCommand, se_CancelHarvestJobCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CancelHarvestJobCommand}. + */ +export interface CancelHarvestJobCommandInput extends CancelHarvestJobRequest {} +/** + * @public + * + * The output of {@link CancelHarvestJobCommand}. + */ +export interface CancelHarvestJobCommandOutput extends CancelHarvestJobResponse, __MetadataBearer {} + +/** + *

Cancels an in-progress harvest job.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MediaPackageV2Client, CancelHarvestJobCommand } from "@aws-sdk/client-mediapackagev2"; // ES Modules import + * // const { MediaPackageV2Client, CancelHarvestJobCommand } = require("@aws-sdk/client-mediapackagev2"); // CommonJS import + * const client = new MediaPackageV2Client(config); + * const input = { // CancelHarvestJobRequest + * ChannelGroupName: "STRING_VALUE", // required + * ChannelName: "STRING_VALUE", // required + * OriginEndpointName: "STRING_VALUE", // required + * HarvestJobName: "STRING_VALUE", // required + * ETag: "STRING_VALUE", + * }; + * const command = new CancelHarvestJobCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param CancelHarvestJobCommandInput - {@link CancelHarvestJobCommandInput} + * @returns {@link CancelHarvestJobCommandOutput} + * @see {@link CancelHarvestJobCommandInput} for command's `input` shape. + * @see {@link CancelHarvestJobCommandOutput} for command's `response` shape. + * @see {@link MediaPackageV2ClientResolvedConfig | config} for MediaPackageV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide.

+ * + * @throws {@link ConflictException} (client fault) + *

Updating or deleting this resource can cause an inconsistent state.

+ * + * @throws {@link InternalServerException} (server fault) + *

Indicates that an error from the service occurred while trying to process a request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource doesn't exist.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request throughput limit was exceeded.

+ * + * @throws {@link ValidationException} (client fault) + *

The input failed to meet the constraints specified by the AWS service.

+ * + * @throws {@link MediaPackageV2ServiceException} + *

Base exception class for all service exceptions from MediaPackageV2 service.

+ * + * @public + */ +export class CancelHarvestJobCommand extends $Command + .classBuilder< + CancelHarvestJobCommandInput, + CancelHarvestJobCommandOutput, + MediaPackageV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: MediaPackageV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("mediapackagev2", "CancelHarvestJob", {}) + .n("MediaPackageV2Client", "CancelHarvestJobCommand") + .f(void 0, void 0) + .ser(se_CancelHarvestJobCommand) + .de(de_CancelHarvestJobCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CancelHarvestJobRequest; + output: {}; + }; + sdk: { + input: CancelHarvestJobCommandInput; + output: CancelHarvestJobCommandOutput; + }; + }; +} diff --git a/clients/client-mediapackagev2/src/commands/CreateHarvestJobCommand.ts b/clients/client-mediapackagev2/src/commands/CreateHarvestJobCommand.ts new file mode 100644 index 0000000000000..10a3080b5ad34 --- /dev/null +++ b/clients/client-mediapackagev2/src/commands/CreateHarvestJobCommand.ts @@ -0,0 +1,188 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { MediaPackageV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaPackageV2Client"; +import { CreateHarvestJobRequest, CreateHarvestJobResponse } from "../models/models_0"; +import { de_CreateHarvestJobCommand, se_CreateHarvestJobCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateHarvestJobCommand}. + */ +export interface CreateHarvestJobCommandInput extends CreateHarvestJobRequest {} +/** + * @public + * + * The output of {@link CreateHarvestJobCommand}. + */ +export interface CreateHarvestJobCommandOutput extends CreateHarvestJobResponse, __MetadataBearer {} + +/** + *

Creates a new harvest job to export content from a MediaPackage v2 channel to an S3 bucket.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MediaPackageV2Client, CreateHarvestJobCommand } from "@aws-sdk/client-mediapackagev2"; // ES Modules import + * // const { MediaPackageV2Client, CreateHarvestJobCommand } = require("@aws-sdk/client-mediapackagev2"); // CommonJS import + * const client = new MediaPackageV2Client(config); + * const input = { // CreateHarvestJobRequest + * ChannelGroupName: "STRING_VALUE", // required + * ChannelName: "STRING_VALUE", // required + * OriginEndpointName: "STRING_VALUE", // required + * Description: "STRING_VALUE", + * HarvestedManifests: { // HarvestedManifests + * HlsManifests: [ // HarvestedHlsManifestsList + * { // HarvestedHlsManifest + * ManifestName: "STRING_VALUE", // required + * }, + * ], + * DashManifests: [ // HarvestedDashManifestsList + * { // HarvestedDashManifest + * ManifestName: "STRING_VALUE", // required + * }, + * ], + * LowLatencyHlsManifests: [ // HarvestedLowLatencyHlsManifestsList + * { // HarvestedLowLatencyHlsManifest + * ManifestName: "STRING_VALUE", // required + * }, + * ], + * }, + * ScheduleConfiguration: { // HarvesterScheduleConfiguration + * StartTime: new Date("TIMESTAMP"), // required + * EndTime: new Date("TIMESTAMP"), // required + * }, + * Destination: { // Destination + * S3Destination: { // S3DestinationConfig + * BucketName: "STRING_VALUE", // required + * DestinationPath: "STRING_VALUE", // required + * }, + * }, + * ClientToken: "STRING_VALUE", + * HarvestJobName: "STRING_VALUE", + * Tags: { // TagMap + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateHarvestJobCommand(input); + * const response = await client.send(command); + * // { // CreateHarvestJobResponse + * // ChannelGroupName: "STRING_VALUE", // required + * // ChannelName: "STRING_VALUE", // required + * // OriginEndpointName: "STRING_VALUE", // required + * // Destination: { // Destination + * // S3Destination: { // S3DestinationConfig + * // BucketName: "STRING_VALUE", // required + * // DestinationPath: "STRING_VALUE", // required + * // }, + * // }, + * // HarvestJobName: "STRING_VALUE", // required + * // HarvestedManifests: { // HarvestedManifests + * // HlsManifests: [ // HarvestedHlsManifestsList + * // { // HarvestedHlsManifest + * // ManifestName: "STRING_VALUE", // required + * // }, + * // ], + * // DashManifests: [ // HarvestedDashManifestsList + * // { // HarvestedDashManifest + * // ManifestName: "STRING_VALUE", // required + * // }, + * // ], + * // LowLatencyHlsManifests: [ // HarvestedLowLatencyHlsManifestsList + * // { // HarvestedLowLatencyHlsManifest + * // ManifestName: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // Description: "STRING_VALUE", + * // ScheduleConfiguration: { // HarvesterScheduleConfiguration + * // StartTime: new Date("TIMESTAMP"), // required + * // EndTime: new Date("TIMESTAMP"), // required + * // }, + * // Arn: "STRING_VALUE", // required + * // CreatedAt: new Date("TIMESTAMP"), // required + * // ModifiedAt: new Date("TIMESTAMP"), // required + * // Status: "QUEUED" || "IN_PROGRESS" || "CANCELLED" || "COMPLETED" || "FAILED", // required + * // ErrorMessage: "STRING_VALUE", + * // ETag: "STRING_VALUE", + * // Tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param CreateHarvestJobCommandInput - {@link CreateHarvestJobCommandInput} + * @returns {@link CreateHarvestJobCommandOutput} + * @see {@link CreateHarvestJobCommandInput} for command's `input` shape. + * @see {@link CreateHarvestJobCommandOutput} for command's `response` shape. + * @see {@link MediaPackageV2ClientResolvedConfig | config} for MediaPackageV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide.

+ * + * @throws {@link ConflictException} (client fault) + *

Updating or deleting this resource can cause an inconsistent state.

+ * + * @throws {@link InternalServerException} (server fault) + *

Indicates that an error from the service occurred while trying to process a request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource doesn't exist.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

The request would cause a service quota to be exceeded.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request throughput limit was exceeded.

+ * + * @throws {@link ValidationException} (client fault) + *

The input failed to meet the constraints specified by the AWS service.

+ * + * @throws {@link MediaPackageV2ServiceException} + *

Base exception class for all service exceptions from MediaPackageV2 service.

+ * + * @public + */ +export class CreateHarvestJobCommand extends $Command + .classBuilder< + CreateHarvestJobCommandInput, + CreateHarvestJobCommandOutput, + MediaPackageV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: MediaPackageV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("mediapackagev2", "CreateHarvestJob", {}) + .n("MediaPackageV2Client", "CreateHarvestJobCommand") + .f(void 0, void 0) + .ser(se_CreateHarvestJobCommand) + .de(de_CreateHarvestJobCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreateHarvestJobRequest; + output: CreateHarvestJobResponse; + }; + sdk: { + input: CreateHarvestJobCommandInput; + output: CreateHarvestJobCommandOutput; + }; + }; +} diff --git a/clients/client-mediapackagev2/src/commands/GetHarvestJobCommand.ts b/clients/client-mediapackagev2/src/commands/GetHarvestJobCommand.ts new file mode 100644 index 0000000000000..71d2b536bafd6 --- /dev/null +++ b/clients/client-mediapackagev2/src/commands/GetHarvestJobCommand.ts @@ -0,0 +1,150 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { MediaPackageV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaPackageV2Client"; +import { GetHarvestJobRequest, GetHarvestJobResponse } from "../models/models_0"; +import { de_GetHarvestJobCommand, se_GetHarvestJobCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetHarvestJobCommand}. + */ +export interface GetHarvestJobCommandInput extends GetHarvestJobRequest {} +/** + * @public + * + * The output of {@link GetHarvestJobCommand}. + */ +export interface GetHarvestJobCommandOutput extends GetHarvestJobResponse, __MetadataBearer {} + +/** + *

Retrieves the details of a specific harvest job.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MediaPackageV2Client, GetHarvestJobCommand } from "@aws-sdk/client-mediapackagev2"; // ES Modules import + * // const { MediaPackageV2Client, GetHarvestJobCommand } = require("@aws-sdk/client-mediapackagev2"); // CommonJS import + * const client = new MediaPackageV2Client(config); + * const input = { // GetHarvestJobRequest + * ChannelGroupName: "STRING_VALUE", // required + * ChannelName: "STRING_VALUE", // required + * OriginEndpointName: "STRING_VALUE", // required + * HarvestJobName: "STRING_VALUE", // required + * }; + * const command = new GetHarvestJobCommand(input); + * const response = await client.send(command); + * // { // GetHarvestJobResponse + * // ChannelGroupName: "STRING_VALUE", // required + * // ChannelName: "STRING_VALUE", // required + * // OriginEndpointName: "STRING_VALUE", // required + * // Destination: { // Destination + * // S3Destination: { // S3DestinationConfig + * // BucketName: "STRING_VALUE", // required + * // DestinationPath: "STRING_VALUE", // required + * // }, + * // }, + * // HarvestJobName: "STRING_VALUE", // required + * // HarvestedManifests: { // HarvestedManifests + * // HlsManifests: [ // HarvestedHlsManifestsList + * // { // HarvestedHlsManifest + * // ManifestName: "STRING_VALUE", // required + * // }, + * // ], + * // DashManifests: [ // HarvestedDashManifestsList + * // { // HarvestedDashManifest + * // ManifestName: "STRING_VALUE", // required + * // }, + * // ], + * // LowLatencyHlsManifests: [ // HarvestedLowLatencyHlsManifestsList + * // { // HarvestedLowLatencyHlsManifest + * // ManifestName: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // Description: "STRING_VALUE", + * // ScheduleConfiguration: { // HarvesterScheduleConfiguration + * // StartTime: new Date("TIMESTAMP"), // required + * // EndTime: new Date("TIMESTAMP"), // required + * // }, + * // Arn: "STRING_VALUE", // required + * // CreatedAt: new Date("TIMESTAMP"), // required + * // ModifiedAt: new Date("TIMESTAMP"), // required + * // Status: "QUEUED" || "IN_PROGRESS" || "CANCELLED" || "COMPLETED" || "FAILED", // required + * // ErrorMessage: "STRING_VALUE", + * // ETag: "STRING_VALUE", + * // Tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param GetHarvestJobCommandInput - {@link GetHarvestJobCommandInput} + * @returns {@link GetHarvestJobCommandOutput} + * @see {@link GetHarvestJobCommandInput} for command's `input` shape. + * @see {@link GetHarvestJobCommandOutput} for command's `response` shape. + * @see {@link MediaPackageV2ClientResolvedConfig | config} for MediaPackageV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide.

+ * + * @throws {@link InternalServerException} (server fault) + *

Indicates that an error from the service occurred while trying to process a request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource doesn't exist.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request throughput limit was exceeded.

+ * + * @throws {@link ValidationException} (client fault) + *

The input failed to meet the constraints specified by the AWS service.

+ * + * @throws {@link MediaPackageV2ServiceException} + *

Base exception class for all service exceptions from MediaPackageV2 service.

+ * + * @public + */ +export class GetHarvestJobCommand extends $Command + .classBuilder< + GetHarvestJobCommandInput, + GetHarvestJobCommandOutput, + MediaPackageV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: MediaPackageV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("mediapackagev2", "GetHarvestJob", {}) + .n("MediaPackageV2Client", "GetHarvestJobCommand") + .f(void 0, void 0) + .ser(se_GetHarvestJobCommand) + .de(de_GetHarvestJobCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetHarvestJobRequest; + output: GetHarvestJobResponse; + }; + sdk: { + input: GetHarvestJobCommandInput; + output: GetHarvestJobCommandOutput; + }; + }; +} diff --git a/clients/client-mediapackagev2/src/commands/ListHarvestJobsCommand.ts b/clients/client-mediapackagev2/src/commands/ListHarvestJobsCommand.ts new file mode 100644 index 0000000000000..043c0ac3cbdb0 --- /dev/null +++ b/clients/client-mediapackagev2/src/commands/ListHarvestJobsCommand.ts @@ -0,0 +1,154 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { MediaPackageV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaPackageV2Client"; +import { ListHarvestJobsRequest, ListHarvestJobsResponse } from "../models/models_0"; +import { de_ListHarvestJobsCommand, se_ListHarvestJobsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListHarvestJobsCommand}. + */ +export interface ListHarvestJobsCommandInput extends ListHarvestJobsRequest {} +/** + * @public + * + * The output of {@link ListHarvestJobsCommand}. + */ +export interface ListHarvestJobsCommandOutput extends ListHarvestJobsResponse, __MetadataBearer {} + +/** + *

Retrieves a list of harvest jobs that match the specified criteria.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MediaPackageV2Client, ListHarvestJobsCommand } from "@aws-sdk/client-mediapackagev2"; // ES Modules import + * // const { MediaPackageV2Client, ListHarvestJobsCommand } = require("@aws-sdk/client-mediapackagev2"); // CommonJS import + * const client = new MediaPackageV2Client(config); + * const input = { // ListHarvestJobsRequest + * ChannelGroupName: "STRING_VALUE", // required + * ChannelName: "STRING_VALUE", + * OriginEndpointName: "STRING_VALUE", + * Status: "QUEUED" || "IN_PROGRESS" || "CANCELLED" || "COMPLETED" || "FAILED", + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new ListHarvestJobsCommand(input); + * const response = await client.send(command); + * // { // ListHarvestJobsResponse + * // Items: [ // HarvestJobsList + * // { // HarvestJob + * // ChannelGroupName: "STRING_VALUE", // required + * // ChannelName: "STRING_VALUE", // required + * // OriginEndpointName: "STRING_VALUE", // required + * // Destination: { // Destination + * // S3Destination: { // S3DestinationConfig + * // BucketName: "STRING_VALUE", // required + * // DestinationPath: "STRING_VALUE", // required + * // }, + * // }, + * // HarvestJobName: "STRING_VALUE", // required + * // HarvestedManifests: { // HarvestedManifests + * // HlsManifests: [ // HarvestedHlsManifestsList + * // { // HarvestedHlsManifest + * // ManifestName: "STRING_VALUE", // required + * // }, + * // ], + * // DashManifests: [ // HarvestedDashManifestsList + * // { // HarvestedDashManifest + * // ManifestName: "STRING_VALUE", // required + * // }, + * // ], + * // LowLatencyHlsManifests: [ // HarvestedLowLatencyHlsManifestsList + * // { // HarvestedLowLatencyHlsManifest + * // ManifestName: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // Description: "STRING_VALUE", + * // ScheduleConfiguration: { // HarvesterScheduleConfiguration + * // StartTime: new Date("TIMESTAMP"), // required + * // EndTime: new Date("TIMESTAMP"), // required + * // }, + * // Arn: "STRING_VALUE", // required + * // CreatedAt: new Date("TIMESTAMP"), // required + * // ModifiedAt: new Date("TIMESTAMP"), // required + * // Status: "QUEUED" || "IN_PROGRESS" || "CANCELLED" || "COMPLETED" || "FAILED", // required + * // ErrorMessage: "STRING_VALUE", + * // ETag: "STRING_VALUE", + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListHarvestJobsCommandInput - {@link ListHarvestJobsCommandInput} + * @returns {@link ListHarvestJobsCommandOutput} + * @see {@link ListHarvestJobsCommandInput} for command's `input` shape. + * @see {@link ListHarvestJobsCommandOutput} for command's `response` shape. + * @see {@link MediaPackageV2ClientResolvedConfig | config} for MediaPackageV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide.

+ * + * @throws {@link InternalServerException} (server fault) + *

Indicates that an error from the service occurred while trying to process a request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource doesn't exist.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request throughput limit was exceeded.

+ * + * @throws {@link ValidationException} (client fault) + *

The input failed to meet the constraints specified by the AWS service.

+ * + * @throws {@link MediaPackageV2ServiceException} + *

Base exception class for all service exceptions from MediaPackageV2 service.

+ * + * @public + */ +export class ListHarvestJobsCommand extends $Command + .classBuilder< + ListHarvestJobsCommandInput, + ListHarvestJobsCommandOutput, + MediaPackageV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: MediaPackageV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("mediapackagev2", "ListHarvestJobs", {}) + .n("MediaPackageV2Client", "ListHarvestJobsCommand") + .f(void 0, void 0) + .ser(se_ListHarvestJobsCommand) + .de(de_ListHarvestJobsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListHarvestJobsRequest; + output: ListHarvestJobsResponse; + }; + sdk: { + input: ListHarvestJobsCommandInput; + output: ListHarvestJobsCommandOutput; + }; + }; +} diff --git a/clients/client-mediapackagev2/src/commands/index.ts b/clients/client-mediapackagev2/src/commands/index.ts index 4b7f4f3a91813..08c5cd34a4c8b 100644 --- a/clients/client-mediapackagev2/src/commands/index.ts +++ b/clients/client-mediapackagev2/src/commands/index.ts @@ -1,6 +1,8 @@ // smithy-typescript generated code +export * from "./CancelHarvestJobCommand"; export * from "./CreateChannelCommand"; export * from "./CreateChannelGroupCommand"; +export * from "./CreateHarvestJobCommand"; export * from "./CreateOriginEndpointCommand"; export * from "./DeleteChannelCommand"; export * from "./DeleteChannelGroupCommand"; @@ -10,10 +12,12 @@ export * from "./DeleteOriginEndpointPolicyCommand"; export * from "./GetChannelCommand"; export * from "./GetChannelGroupCommand"; export * from "./GetChannelPolicyCommand"; +export * from "./GetHarvestJobCommand"; export * from "./GetOriginEndpointCommand"; export * from "./GetOriginEndpointPolicyCommand"; export * from "./ListChannelGroupsCommand"; export * from "./ListChannelsCommand"; +export * from "./ListHarvestJobsCommand"; export * from "./ListOriginEndpointsCommand"; export * from "./ListTagsForResourceCommand"; export * from "./PutChannelPolicyCommand"; diff --git a/clients/client-mediapackagev2/src/index.ts b/clients/client-mediapackagev2/src/index.ts index 7573849ec7b5e..7ace0c089454c 100644 --- a/clients/client-mediapackagev2/src/index.ts +++ b/clients/client-mediapackagev2/src/index.ts @@ -23,6 +23,7 @@ export type { RuntimeExtension } from "./runtimeExtensions"; export type { MediaPackageV2ExtensionConfiguration } from "./extensionConfiguration"; export * from "./commands"; export * from "./pagination"; +export * from "./waiters"; export * from "./models"; export { MediaPackageV2ServiceException } from "./models/MediaPackageV2ServiceException"; diff --git a/clients/client-mediapackagev2/src/models/models_0.ts b/clients/client-mediapackagev2/src/models/models_0.ts index a71409c76c7f6..72e890faede28 100644 --- a/clients/client-mediapackagev2/src/models/models_0.ts +++ b/clients/client-mediapackagev2/src/models/models_0.ts @@ -53,41 +53,45 @@ export const AdMarkerHls = { export type AdMarkerHls = (typeof AdMarkerHls)[keyof typeof AdMarkerHls]; /** - *

The configuration of the channel group.

* @public */ -export interface ChannelGroupListConfiguration { +export interface CancelHarvestJobRequest { /** - *

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

+ *

The name of the channel group containing the channel from which the harvest job is running.

* @public */ ChannelGroupName: string | undefined; /** - *

The Amazon Resource Name (ARN) associated with the resource.

+ *

The name of the channel from which the harvest job is running.

* @public */ - Arn: string | undefined; + ChannelName: string | undefined; /** - *

The date and time the channel group was created.

+ *

The name of the origin endpoint that the harvest job is harvesting from. This cannot be changed after the harvest job is submitted.

* @public */ - CreatedAt: Date | undefined; + OriginEndpointName: string | undefined; /** - *

The date and time the channel group was modified.

+ *

The name of the harvest job to cancel. This name must be unique within the channel and cannot be changed after the harvest job is submitted.

* @public */ - ModifiedAt: Date | undefined; + HarvestJobName: string | undefined; /** - *

Any descriptive information that you want to add to the channel group for future identification purposes.

+ *

The current Entity Tag (ETag) associated with the harvest job. Used for concurrency control.

* @public */ - Description?: string; + ETag?: string; } +/** + * @public + */ +export interface CancelHarvestJobResponse {} + /** * @public * @enum @@ -133,46 +137,68 @@ export class ConflictException extends __BaseException { } /** + *

Indicates that an error from the service occurred while trying to process a request.

* @public */ -export interface DeleteChannelPolicyRequest { - /** - *

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

- * @public - */ - ChannelGroupName: string | undefined; - +export class InternalServerException extends __BaseException { + readonly name: "InternalServerException" = "InternalServerException"; + readonly $fault: "server" = "server"; + Message?: string; /** - *

The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

- * @public + * @internal */ - ChannelName: string | undefined; + constructor(opts: __ExceptionOptionType) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, InternalServerException.prototype); + this.Message = opts.Message; + } } /** * @public + * @enum */ -export interface DeleteChannelPolicyResponse {} +export const ResourceTypeNotFound = { + CHANNEL: "CHANNEL", + CHANNEL_GROUP: "CHANNEL_GROUP", + HARVEST_JOB: "HARVEST_JOB", + ORIGIN_ENDPOINT: "ORIGIN_ENDPOINT", +} as const; /** - *

Indicates that an error from the service occurred while trying to process a request.

* @public */ -export class InternalServerException extends __BaseException { - readonly name: "InternalServerException" = "InternalServerException"; - readonly $fault: "server" = "server"; +export type ResourceTypeNotFound = (typeof ResourceTypeNotFound)[keyof typeof ResourceTypeNotFound]; + +/** + *

The specified resource doesn't exist.

+ * @public + */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; Message?: string; + /** + *

The specified resource type wasn't found.

+ * @public + */ + ResourceTypeNotFound?: ResourceTypeNotFound; /** * @internal */ - constructor(opts: __ExceptionOptionType) { + constructor(opts: __ExceptionOptionType) { super({ - name: "InternalServerException", - $fault: "server", + name: "ResourceNotFoundException", + $fault: "client", ...opts, }); - Object.setPrototypeOf(this, InternalServerException.prototype); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); this.Message = opts.Message; + this.ResourceTypeNotFound = opts.ResourceTypeNotFound; } } @@ -214,6 +240,13 @@ export const ValidationExceptionType = { ENCRYPTION_CONTRACT_WITHOUT_AUDIO_RENDITION_INCOMPATIBLE: "ENCRYPTION_CONTRACT_WITHOUT_AUDIO_RENDITION_INCOMPATIBLE", ENCRYPTION_METHOD_CONTAINER_TYPE_MISMATCH: "ENCRYPTION_METHOD_CONTAINER_TYPE_MISMATCH", END_TIME_EARLIER_THAN_START_TIME: "END_TIME_EARLIER_THAN_START_TIME", + HARVESTED_MANIFEST_HAS_START_END_FILTER_CONFIGURATION: "HARVESTED_MANIFEST_HAS_START_END_FILTER_CONFIGURATION", + HARVESTED_MANIFEST_NOT_FOUND_ON_ENDPOINT: "HARVESTED_MANIFEST_NOT_FOUND_ON_ENDPOINT", + HARVEST_JOB_CUSTOMER_ENDPOINT_READ_ACCESS_DENIED: "HARVEST_JOB_CUSTOMER_ENDPOINT_READ_ACCESS_DENIED", + HARVEST_JOB_INELIGIBLE_FOR_CANCELLATION: "HARVEST_JOB_INELIGIBLE_FOR_CANCELLATION", + HARVEST_JOB_S3_DESTINATION_MISSING_OR_INCOMPLETE: "HARVEST_JOB_S3_DESTINATION_MISSING_OR_INCOMPLETE", + HARVEST_JOB_UNABLE_TO_WRITE_TO_S3_DESTINATION: "HARVEST_JOB_UNABLE_TO_WRITE_TO_S3_DESTINATION", + INVALID_HARVEST_JOB_DURATION: "INVALID_HARVEST_JOB_DURATION", INVALID_MANIFEST_FILTER: "INVALID_MANIFEST_FILTER", INVALID_PAGINATION_MAX_RESULTS: "INVALID_PAGINATION_MAX_RESULTS", INVALID_PAGINATION_TOKEN: "INVALID_PAGINATION_TOKEN", @@ -242,6 +275,7 @@ export const ValidationExceptionType = { SOURCE_DISRUPTIONS_ENABLED_INCORRECTLY: "SOURCE_DISRUPTIONS_ENABLED_INCORRECTLY", START_TAG_TIME_OFFSET_INVALID: "START_TAG_TIME_OFFSET_INVALID", TIMING_SOURCE_MISSING: "TIMING_SOURCE_MISSING", + TOO_MANY_IN_PROGRESS_HARVEST_JOBS: "TOO_MANY_IN_PROGRESS_HARVEST_JOBS", TS_CONTAINER_TYPE_WITH_DASH_MANIFEST: "TS_CONTAINER_TYPE_WITH_DASH_MANIFEST", UPDATE_PERIOD_SMALLER_THAN_SEGMENT_DURATION: "UPDATE_PERIOD_SMALLER_THAN_SEGMENT_DURATION", URL_INVALID: "URL_INVALID", @@ -289,9 +323,10 @@ export class ValidationException extends __BaseException { } /** + *

The configuration of the channel group.

* @public */ -export interface GetChannelPolicyRequest { +export interface ChannelGroupListConfiguration { /** *

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

* @public @@ -299,16 +334,34 @@ export interface GetChannelPolicyRequest { ChannelGroupName: string | undefined; /** - *

The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

+ *

The Amazon Resource Name (ARN) associated with the resource.

* @public */ - ChannelName: string | undefined; + Arn: string | undefined; + + /** + *

The date and time the channel group was created.

+ * @public + */ + CreatedAt: Date | undefined; + + /** + *

The date and time the channel group was modified.

+ * @public + */ + ModifiedAt: Date | undefined; + + /** + *

Any descriptive information that you want to add to the channel group for future identification purposes.

+ * @public + */ + Description?: string; } /** * @public */ -export interface GetChannelPolicyResponse { +export interface DeleteChannelPolicyRequest { /** *

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

* @public @@ -320,55 +373,51 @@ export interface GetChannelPolicyResponse { * @public */ ChannelName: string | undefined; - - /** - *

The policy assigned to the channel.

- * @public - */ - Policy: string | undefined; } /** * @public - * @enum */ -export const ResourceTypeNotFound = { - CHANNEL: "CHANNEL", - CHANNEL_GROUP: "CHANNEL_GROUP", - ORIGIN_ENDPOINT: "ORIGIN_ENDPOINT", -} as const; +export interface DeleteChannelPolicyResponse {} /** * @public */ -export type ResourceTypeNotFound = (typeof ResourceTypeNotFound)[keyof typeof ResourceTypeNotFound]; +export interface GetChannelPolicyRequest { + /** + *

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

+ * @public + */ + ChannelGroupName: string | undefined; + + /** + *

The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

+ * @public + */ + ChannelName: string | undefined; +} /** - *

The specified resource doesn't exist.

* @public */ -export class ResourceNotFoundException extends __BaseException { - readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; - readonly $fault: "client" = "client"; - Message?: string; +export interface GetChannelPolicyResponse { /** - *

The specified resource type wasn't found.

+ *

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

* @public */ - ResourceTypeNotFound?: ResourceTypeNotFound; + ChannelGroupName: string | undefined; + /** - * @internal + *

The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

+ * @public */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ResourceNotFoundException.prototype); - this.Message = opts.Message; - this.ResourceTypeNotFound = opts.ResourceTypeNotFound; - } + ChannelName: string | undefined; + + /** + *

The policy assigned to the channel.

+ * @public + */ + Policy: string | undefined; } /** @@ -2868,6 +2917,569 @@ export interface GetChannelGroupResponse { Tags?: Record; } +/** + *

Configuration parameters for where in an S3 bucket to place the harvested content.

+ * @public + */ +export interface S3DestinationConfig { + /** + *

The name of an S3 bucket within which harvested content will be exported.

+ * @public + */ + BucketName: string | undefined; + + /** + *

The path within the specified S3 bucket where the harvested content will be placed.

+ * @public + */ + DestinationPath: string | undefined; +} + +/** + *

The configuration for the destination where the harvested content will be exported.

+ * @public + */ +export interface Destination { + /** + *

The configuration for exporting harvested content to an S3 bucket. This includes details such as the bucket name and destination path within the bucket.

+ * @public + */ + S3Destination: S3DestinationConfig | undefined; +} + +/** + *

Information about a harvested DASH manifest.

+ * @public + */ +export interface HarvestedDashManifest { + /** + *

The name of the harvested DASH manifest.

+ * @public + */ + ManifestName: string | undefined; +} + +/** + *

Information about a harvested HLS manifest.

+ * @public + */ +export interface HarvestedHlsManifest { + /** + *

The name of the harvested HLS manifest.

+ * @public + */ + ManifestName: string | undefined; +} + +/** + *

Information about a harvested Low-Latency HLS manifest.

+ * @public + */ +export interface HarvestedLowLatencyHlsManifest { + /** + *

The name of the harvested Low-Latency HLS manifest.

+ * @public + */ + ManifestName: string | undefined; +} + +/** + *

A collection of harvested manifests of different types.

+ * @public + */ +export interface HarvestedManifests { + /** + *

A list of harvested HLS manifests.

+ * @public + */ + HlsManifests?: HarvestedHlsManifest[]; + + /** + *

A list of harvested DASH manifests.

+ * @public + */ + DashManifests?: HarvestedDashManifest[]; + + /** + *

A list of harvested Low-Latency HLS manifests.

+ * @public + */ + LowLatencyHlsManifests?: HarvestedLowLatencyHlsManifest[]; +} + +/** + *

Defines the schedule configuration for a harvest job.

+ * @public + */ +export interface HarvesterScheduleConfiguration { + /** + *

The start time for the harvest job.

+ * @public + */ + StartTime: Date | undefined; + + /** + *

The end time for the harvest job.

+ * @public + */ + EndTime: Date | undefined; +} + +/** + *

The request object for creating a new harvest job.

+ * @public + */ +export interface CreateHarvestJobRequest { + /** + *

The name of the channel group containing the channel from which to harvest content.

+ * @public + */ + ChannelGroupName: string | undefined; + + /** + *

The name of the channel from which to harvest content.

+ * @public + */ + ChannelName: string | undefined; + + /** + *

The name of the origin endpoint from which to harvest content.

+ * @public + */ + OriginEndpointName: string | undefined; + + /** + *

An optional description for the harvest job.

+ * @public + */ + Description?: string; + + /** + *

A list of manifests to be harvested.

+ * @public + */ + HarvestedManifests: HarvestedManifests | undefined; + + /** + *

The configuration for when the harvest job should run, including start and end times.

+ * @public + */ + ScheduleConfiguration: HarvesterScheduleConfiguration | undefined; + + /** + *

The S3 destination where the harvested content will be placed.

+ * @public + */ + Destination: Destination | undefined; + + /** + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

+ * @public + */ + ClientToken?: string; + + /** + *

A name for the harvest job. This name must be unique within the channel.

+ * @public + */ + HarvestJobName?: string; + + /** + *

A collection of tags associated with the harvest job.

+ * @public + */ + Tags?: Record; +} + +/** + * @public + * @enum + */ +export const HarvestJobStatus = { + CANCELLED: "CANCELLED", + COMPLETED: "COMPLETED", + FAILED: "FAILED", + IN_PROGRESS: "IN_PROGRESS", + QUEUED: "QUEUED", +} as const; + +/** + * @public + */ +export type HarvestJobStatus = (typeof HarvestJobStatus)[keyof typeof HarvestJobStatus]; + +/** + *

The response object returned after creating a harvest job.

+ * @public + */ +export interface CreateHarvestJobResponse { + /** + *

The name of the channel group containing the channel from which content is being harvested.

+ * @public + */ + ChannelGroupName: string | undefined; + + /** + *

The name of the channel from which content is being harvested.

+ * @public + */ + ChannelName: string | undefined; + + /** + *

The name of the origin endpoint from which content is being harvested.

+ * @public + */ + OriginEndpointName: string | undefined; + + /** + *

The S3 destination where the harvested content will be placed.

+ * @public + */ + Destination: Destination | undefined; + + /** + *

The name of the created harvest job.

+ * @public + */ + HarvestJobName: string | undefined; + + /** + *

A list of manifests that will be harvested.

+ * @public + */ + HarvestedManifests: HarvestedManifests | undefined; + + /** + *

The description of the harvest job, if provided.

+ * @public + */ + Description?: string; + + /** + *

The configuration for when the harvest job will run, including start and end times.

+ * @public + */ + ScheduleConfiguration: HarvesterScheduleConfiguration | undefined; + + /** + *

The Amazon Resource Name (ARN) of the created harvest job.

+ * @public + */ + Arn: string | undefined; + + /** + *

The date and time the harvest job was created.

+ * @public + */ + CreatedAt: Date | undefined; + + /** + *

The date and time the harvest job was last modified.

+ * @public + */ + ModifiedAt: Date | undefined; + + /** + *

The current status of the harvest job (e.g., CREATED, IN_PROGRESS, ABORTED, COMPLETED, FAILED).

+ * @public + */ + Status: HarvestJobStatus | undefined; + + /** + *

An error message if the harvest job creation failed.

+ * @public + */ + ErrorMessage?: string; + + /** + *

The current version of the harvest job. Used for concurrency control.

+ * @public + */ + ETag?: string; + + /** + *

A collection of tags associated with the harvest job.

+ * @public + */ + Tags?: Record; +} + +/** + *

The request object for retrieving a specific harvest job.

+ * @public + */ +export interface GetHarvestJobRequest { + /** + *

The name of the channel group containing the channel associated with the harvest job.

+ * @public + */ + ChannelGroupName: string | undefined; + + /** + *

The name of the channel associated with the harvest job.

+ * @public + */ + ChannelName: string | undefined; + + /** + *

The name of the origin endpoint associated with the harvest job.

+ * @public + */ + OriginEndpointName: string | undefined; + + /** + *

The name of the harvest job to retrieve.

+ * @public + */ + HarvestJobName: string | undefined; +} + +/** + *

The response object containing the details of the requested harvest job.

+ * @public + */ +export interface GetHarvestJobResponse { + /** + *

The name of the channel group containing the channel associated with the harvest job.

+ * @public + */ + ChannelGroupName: string | undefined; + + /** + *

The name of the channel associated with the harvest job.

+ * @public + */ + ChannelName: string | undefined; + + /** + *

The name of the origin endpoint associated with the harvest job.

+ * @public + */ + OriginEndpointName: string | undefined; + + /** + *

The S3 destination where the harvested content is being placed.

+ * @public + */ + Destination: Destination | undefined; + + /** + *

The name of the harvest job.

+ * @public + */ + HarvestJobName: string | undefined; + + /** + *

A list of manifests that are being or have been harvested.

+ * @public + */ + HarvestedManifests: HarvestedManifests | undefined; + + /** + *

The description of the harvest job, if provided.

+ * @public + */ + Description?: string; + + /** + *

The configuration for when the harvest job is scheduled to run, including start and end times.

+ * @public + */ + ScheduleConfiguration: HarvesterScheduleConfiguration | undefined; + + /** + *

The Amazon Resource Name (ARN) of the harvest job.

+ * @public + */ + Arn: string | undefined; + + /** + *

The date and time when the harvest job was created.

+ * @public + */ + CreatedAt: Date | undefined; + + /** + *

The date and time when the harvest job was last modified.

+ * @public + */ + ModifiedAt: Date | undefined; + + /** + *

The current status of the harvest job (e.g., QUEUED, IN_PROGRESS, CANCELLED, COMPLETED, FAILED).

+ * @public + */ + Status: HarvestJobStatus | undefined; + + /** + *

An error message if the harvest job encountered any issues.

+ * @public + */ + ErrorMessage?: string; + + /** + *

The current version of the harvest job. Used for concurrency control.

+ * @public + */ + ETag?: string; + + /** + *

A collection of tags associated with the harvest job.

+ * @public + */ + Tags?: Record; +} + +/** + *

The request object for listing harvest jobs.

+ * @public + */ +export interface ListHarvestJobsRequest { + /** + *

The name of the channel group to filter the harvest jobs by. If specified, only harvest jobs associated with channels in this group will be returned.

+ * @public + */ + ChannelGroupName: string | undefined; + + /** + *

The name of the channel to filter the harvest jobs by. If specified, only harvest jobs associated with this channel will be returned.

+ * @public + */ + ChannelName?: string; + + /** + *

The name of the origin endpoint to filter the harvest jobs by. If specified, only harvest jobs associated with this origin endpoint will be returned.

+ * @public + */ + OriginEndpointName?: string; + + /** + *

The status to filter the harvest jobs by. If specified, only harvest jobs with this status will be returned.

+ * @public + */ + Status?: HarvestJobStatus; + + /** + *

The maximum number of harvest jobs to return in a single request. If not specified, a default value will be used.

+ * @public + */ + MaxResults?: number; + + /** + *

A token used for pagination. Provide this value in subsequent requests to retrieve the next set of results.

+ * @public + */ + NextToken?: string; +} + +/** + *

Represents a harvest job resource in MediaPackage v2, which is used to export content from an origin endpoint to an S3 bucket.

+ * @public + */ +export interface HarvestJob { + /** + *

The name of the channel group containing the channel associated with this harvest job.

+ * @public + */ + ChannelGroupName: string | undefined; + + /** + *

The name of the channel associated with this harvest job.

+ * @public + */ + ChannelName: string | undefined; + + /** + *

The name of the origin endpoint associated with this harvest job.

+ * @public + */ + OriginEndpointName: string | undefined; + + /** + *

The S3 destination where the harvested content will be placed.

+ * @public + */ + Destination: Destination | undefined; + + /** + *

The name of the harvest job.

+ * @public + */ + HarvestJobName: string | undefined; + + /** + *

A list of manifests that are being or have been harvested.

+ * @public + */ + HarvestedManifests: HarvestedManifests | undefined; + + /** + *

An optional description of the harvest job.

+ * @public + */ + Description?: string; + + /** + *

The configuration for when the harvest job is scheduled to run.

+ * @public + */ + ScheduleConfiguration: HarvesterScheduleConfiguration | undefined; + + /** + *

The Amazon Resource Name (ARN) of the harvest job.

+ * @public + */ + Arn: string | undefined; + + /** + *

The date and time when the harvest job was created.

+ * @public + */ + CreatedAt: Date | undefined; + + /** + *

The date and time when the harvest job was last modified.

+ * @public + */ + ModifiedAt: Date | undefined; + + /** + *

The current status of the harvest job (e.g., QUEUED, IN_PROGRESS, CANCELLED, COMPLETED, FAILED).

+ * @public + */ + Status: HarvestJobStatus | undefined; + + /** + *

An error message if the harvest job encountered any issues.

+ * @public + */ + ErrorMessage?: string; + + /** + *

The current version of the harvest job. Used for concurrency control.

+ * @public + */ + ETag?: string; +} + +/** + *

The response object containing the list of harvest jobs that match the specified criteria.

+ * @public + */ +export interface ListHarvestJobsResponse { + /** + *

An array of harvest job objects that match the specified criteria.

+ * @public + */ + Items?: HarvestJob[]; + + /** + *

A token used for pagination. Include this value in subsequent requests to retrieve the next set of results. If null, there are no more results to retrieve.

+ * @public + */ + NextToken?: string; +} + /** * @public */ diff --git a/clients/client-mediapackagev2/src/pagination/ListHarvestJobsPaginator.ts b/clients/client-mediapackagev2/src/pagination/ListHarvestJobsPaginator.ts new file mode 100644 index 0000000000000..945c52ad99ee4 --- /dev/null +++ b/clients/client-mediapackagev2/src/pagination/ListHarvestJobsPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + ListHarvestJobsCommand, + ListHarvestJobsCommandInput, + ListHarvestJobsCommandOutput, +} from "../commands/ListHarvestJobsCommand"; +import { MediaPackageV2Client } from "../MediaPackageV2Client"; +import { MediaPackageV2PaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListHarvestJobs: ( + config: MediaPackageV2PaginationConfiguration, + input: ListHarvestJobsCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + MediaPackageV2PaginationConfiguration, + ListHarvestJobsCommandInput, + ListHarvestJobsCommandOutput +>(MediaPackageV2Client, ListHarvestJobsCommand, "NextToken", "NextToken", "MaxResults"); diff --git a/clients/client-mediapackagev2/src/pagination/index.ts b/clients/client-mediapackagev2/src/pagination/index.ts index a30d0c3f478d9..e40300bedffc0 100644 --- a/clients/client-mediapackagev2/src/pagination/index.ts +++ b/clients/client-mediapackagev2/src/pagination/index.ts @@ -2,4 +2,5 @@ export * from "./Interfaces"; export * from "./ListChannelGroupsPaginator"; export * from "./ListChannelsPaginator"; +export * from "./ListHarvestJobsPaginator"; export * from "./ListOriginEndpointsPaginator"; diff --git a/clients/client-mediapackagev2/src/protocols/Aws_restJson1.ts b/clients/client-mediapackagev2/src/protocols/Aws_restJson1.ts index 34a52b77feb7c..5c5bd895139f3 100644 --- a/clients/client-mediapackagev2/src/protocols/Aws_restJson1.ts +++ b/clients/client-mediapackagev2/src/protocols/Aws_restJson1.ts @@ -29,8 +29,10 @@ import { } from "@smithy/types"; import { v4 as generateIdempotencyToken } from "uuid"; +import { CancelHarvestJobCommandInput, CancelHarvestJobCommandOutput } from "../commands/CancelHarvestJobCommand"; import { CreateChannelCommandInput, CreateChannelCommandOutput } from "../commands/CreateChannelCommand"; import { CreateChannelGroupCommandInput, CreateChannelGroupCommandOutput } from "../commands/CreateChannelGroupCommand"; +import { CreateHarvestJobCommandInput, CreateHarvestJobCommandOutput } from "../commands/CreateHarvestJobCommand"; import { CreateOriginEndpointCommandInput, CreateOriginEndpointCommandOutput, @@ -52,6 +54,7 @@ import { import { GetChannelCommandInput, GetChannelCommandOutput } from "../commands/GetChannelCommand"; import { GetChannelGroupCommandInput, GetChannelGroupCommandOutput } from "../commands/GetChannelGroupCommand"; import { GetChannelPolicyCommandInput, GetChannelPolicyCommandOutput } from "../commands/GetChannelPolicyCommand"; +import { GetHarvestJobCommandInput, GetHarvestJobCommandOutput } from "../commands/GetHarvestJobCommand"; import { GetOriginEndpointCommandInput, GetOriginEndpointCommandOutput } from "../commands/GetOriginEndpointCommand"; import { GetOriginEndpointPolicyCommandInput, @@ -59,6 +62,7 @@ import { } from "../commands/GetOriginEndpointPolicyCommand"; import { ListChannelGroupsCommandInput, ListChannelGroupsCommandOutput } from "../commands/ListChannelGroupsCommand"; import { ListChannelsCommandInput, ListChannelsCommandOutput } from "../commands/ListChannelsCommand"; +import { ListHarvestJobsCommandInput, ListHarvestJobsCommandOutput } from "../commands/ListHarvestJobsCommand"; import { ListOriginEndpointsCommandInput, ListOriginEndpointsCommandOutput, @@ -91,6 +95,7 @@ import { CreateLowLatencyHlsManifestConfiguration, DashPeriodTrigger, DashUtcTiming, + Destination, DrmSystem, Encryption, EncryptionContractConfiguration, @@ -101,9 +106,16 @@ import { GetDashManifestConfiguration, GetHlsManifestConfiguration, GetLowLatencyHlsManifestConfiguration, + HarvestedDashManifest, + HarvestedHlsManifest, + HarvestedLowLatencyHlsManifest, + HarvestedManifests, + HarvesterScheduleConfiguration, + HarvestJob, InternalServerException, OriginEndpointListConfiguration, ResourceNotFoundException, + S3DestinationConfig, Scte, ScteDash, ScteFilter, @@ -116,6 +128,29 @@ import { ValidationException, } from "../models/models_0"; +/** + * serializeAws_restJson1CancelHarvestJobCommand + */ +export const se_CancelHarvestJobCommand = async ( + input: CancelHarvestJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + [_xauim]: input[_ET]!, + }); + b.bp( + "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/harvestJob/{HarvestJobName}" + ); + b.p("ChannelGroupName", () => input.ChannelGroupName!, "{ChannelGroupName}", false); + b.p("ChannelName", () => input.ChannelName!, "{ChannelName}", false); + b.p("OriginEndpointName", () => input.OriginEndpointName!, "{OriginEndpointName}", false); + b.p("HarvestJobName", () => input.HarvestJobName!, "{HarvestJobName}", false); + let body: any; + b.m("PUT").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1CreateChannelCommand */ @@ -168,6 +203,37 @@ export const se_CreateChannelGroupCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1CreateHarvestJobCommand + */ +export const se_CreateHarvestJobCommand = async ( + input: CreateHarvestJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + "content-type": "application/json", + [_xact]: input[_CT] ?? generateIdempotencyToken(), + }); + b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/harvestJob"); + b.p("ChannelGroupName", () => input.ChannelGroupName!, "{ChannelGroupName}", false); + b.p("ChannelName", () => input.ChannelName!, "{ChannelName}", false); + b.p("OriginEndpointName", () => input.OriginEndpointName!, "{OriginEndpointName}", false); + let body: any; + body = JSON.stringify( + take(input, { + Description: [], + Destination: (_) => _json(_), + HarvestJobName: [], + HarvestedManifests: (_) => _json(_), + ScheduleConfiguration: (_) => se_HarvesterScheduleConfiguration(_, context), + Tags: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1CreateOriginEndpointCommand */ @@ -338,6 +404,27 @@ export const se_GetChannelPolicyCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1GetHarvestJobCommand + */ +export const se_GetHarvestJobCommand = async ( + input: GetHarvestJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp( + "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/harvestJob/{HarvestJobName}" + ); + b.p("ChannelGroupName", () => input.ChannelGroupName!, "{ChannelGroupName}", false); + b.p("ChannelName", () => input.ChannelName!, "{ChannelName}", false); + b.p("OriginEndpointName", () => input.OriginEndpointName!, "{OriginEndpointName}", false); + b.p("HarvestJobName", () => input.HarvestJobName!, "{HarvestJobName}", false); + let body: any; + b.m("GET").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1GetOriginEndpointCommand */ @@ -413,6 +500,29 @@ export const se_ListChannelsCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1ListHarvestJobsCommand + */ +export const se_ListHarvestJobsCommand = async ( + input: ListHarvestJobsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/channelGroup/{ChannelGroupName}/harvestJob"); + b.p("ChannelGroupName", () => input.ChannelGroupName!, "{ChannelGroupName}", false); + const query: any = map({ + [_cN]: [, input[_CN]!], + [_oEN]: [, input[_OEN]!], + [_iS]: [, input[_S]!], + [_mR]: [() => input.MaxResults !== void 0, () => input[_MR]!.toString()], + [_nT]: [, input[_NT]!], + }); + let body: any; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; + /** * serializeAws_restJson1ListOriginEndpointsCommand */ @@ -623,6 +733,23 @@ export const se_UpdateOriginEndpointCommand = async ( return b.build(); }; +/** + * deserializeAws_restJson1CancelHarvestJobCommand + */ +export const de_CancelHarvestJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + /** * deserializeAws_restJson1CreateChannelCommand */ @@ -681,6 +808,41 @@ export const de_CreateChannelGroupCommand = async ( return contents; }; +/** + * deserializeAws_restJson1CreateHarvestJobCommand + */ +export const de_CreateHarvestJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + Arn: __expectString, + ChannelGroupName: __expectString, + ChannelName: __expectString, + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Destination: _json, + ETag: __expectString, + ErrorMessage: __expectString, + HarvestJobName: __expectString, + HarvestedManifests: _json, + ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OriginEndpointName: __expectString, + ScheduleConfiguration: (_) => de_HarvesterScheduleConfiguration(_, context), + Status: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1CreateOriginEndpointCommand */ @@ -883,6 +1045,41 @@ export const de_GetChannelPolicyCommand = async ( return contents; }; +/** + * deserializeAws_restJson1GetHarvestJobCommand + */ +export const de_GetHarvestJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + Arn: __expectString, + ChannelGroupName: __expectString, + ChannelName: __expectString, + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Destination: _json, + ETag: __expectString, + ErrorMessage: __expectString, + HarvestJobName: __expectString, + HarvestedManifests: _json, + ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OriginEndpointName: __expectString, + ScheduleConfiguration: (_) => de_HarvesterScheduleConfiguration(_, context), + Status: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1GetOriginEndpointCommand */ @@ -987,6 +1184,28 @@ export const de_ListChannelsCommand = async ( return contents; }; +/** + * deserializeAws_restJson1ListHarvestJobsCommand + */ +export const de_ListHarvestJobsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + Items: (_) => de_HarvestJobsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1ListOriginEndpointsCommand */ @@ -1214,15 +1433,15 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "ResourceNotFoundException": case "com.amazonaws.mediapackagev2#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "ServiceQuotaExceededException": - case "com.amazonaws.mediapackagev2#ServiceQuotaExceededException": - throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.mediapackagev2#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); case "ValidationException": case "com.amazonaws.mediapackagev2#ValidationException": throw await de_ValidationExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.mediapackagev2#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; return throwDefaultError({ @@ -1460,6 +1679,8 @@ const se_CreateLowLatencyHlsManifests = ( // se_DashUtcTiming omitted. +// se_Destination omitted. + // se_DrmSystems omitted. // se_Encryption omitted. @@ -1485,6 +1706,32 @@ const se_FilterConfiguration = (input: FilterConfiguration, context: __SerdeCont // se_ForceEndpointErrorConfiguration omitted. +// se_HarvestedDashManifest omitted. + +// se_HarvestedDashManifestsList omitted. + +// se_HarvestedHlsManifest omitted. + +// se_HarvestedHlsManifestsList omitted. + +// se_HarvestedLowLatencyHlsManifest omitted. + +// se_HarvestedLowLatencyHlsManifestsList omitted. + +// se_HarvestedManifests omitted. + +/** + * serializeAws_restJson1HarvesterScheduleConfiguration + */ +const se_HarvesterScheduleConfiguration = (input: HarvesterScheduleConfiguration, context: __SerdeContext): any => { + return take(input, { + EndTime: (_) => _.getTime() / 1_000, + StartTime: (_) => _.getTime() / 1_000, + }); +}; + +// se_S3DestinationConfig omitted. + // se_Scte omitted. // se_ScteDash omitted. @@ -1565,6 +1812,8 @@ const de_ChannelListConfiguration = (output: any, context: __SerdeContext): Chan // de_DashUtcTiming omitted. +// de_Destination omitted. + // de_DrmSystems omitted. // de_Encryption omitted. @@ -1684,6 +1933,64 @@ const de_GetLowLatencyHlsManifests = ( return retVal; }; +// de_HarvestedDashManifest omitted. + +// de_HarvestedDashManifestsList omitted. + +// de_HarvestedHlsManifest omitted. + +// de_HarvestedHlsManifestsList omitted. + +// de_HarvestedLowLatencyHlsManifest omitted. + +// de_HarvestedLowLatencyHlsManifestsList omitted. + +// de_HarvestedManifests omitted. + +/** + * deserializeAws_restJson1HarvesterScheduleConfiguration + */ +const de_HarvesterScheduleConfiguration = (output: any, context: __SerdeContext): HarvesterScheduleConfiguration => { + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +/** + * deserializeAws_restJson1HarvestJob + */ +const de_HarvestJob = (output: any, context: __SerdeContext): HarvestJob => { + return take(output, { + Arn: __expectString, + ChannelGroupName: __expectString, + ChannelName: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Destination: _json, + ETag: __expectString, + ErrorMessage: __expectString, + HarvestJobName: __expectString, + HarvestedManifests: _json, + ModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OriginEndpointName: __expectString, + ScheduleConfiguration: (_: any) => de_HarvesterScheduleConfiguration(_, context), + Status: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1HarvestJobsList + */ +const de_HarvestJobsList = (output: any, context: __SerdeContext): HarvestJob[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_HarvestJob(entry, context); + }); + return retVal; +}; + // de_IngestEndpoint omitted. // de_IngestEndpointList omitted. @@ -1732,6 +2039,8 @@ const de_OriginEndpointsList = (output: any, context: __SerdeContext): OriginEnd return retVal; }; +// de_S3DestinationConfig omitted. + // de_Scte omitted. // de_ScteDash omitted. @@ -1768,13 +2077,19 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const _CN = "ChannelName"; const _CT = "ClientToken"; const _ET = "ETag"; const _MR = "MaxResults"; const _NT = "NextToken"; +const _OEN = "OriginEndpointName"; +const _S = "Status"; const _TK = "TagKeys"; +const _cN = "channelName"; +const _iS = "includeStatus"; const _mR = "maxResults"; const _nT = "nextToken"; +const _oEN = "originEndpointName"; const _tK = "tagKeys"; const _xact = "x-amzn-client-token"; const _xauim = "x-amzn-update-if-match"; diff --git a/clients/client-mediapackagev2/src/waiters/index.ts b/clients/client-mediapackagev2/src/waiters/index.ts new file mode 100644 index 0000000000000..141cb609ad8d7 --- /dev/null +++ b/clients/client-mediapackagev2/src/waiters/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./waitForHarvestJobFinished"; diff --git a/clients/client-mediapackagev2/src/waiters/waitForHarvestJobFinished.ts b/clients/client-mediapackagev2/src/waiters/waitForHarvestJobFinished.ts new file mode 100644 index 0000000000000..f6cd8d3c0ffc4 --- /dev/null +++ b/clients/client-mediapackagev2/src/waiters/waitForHarvestJobFinished.ts @@ -0,0 +1,80 @@ +// smithy-typescript generated code +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@smithy/util-waiter"; + +import { GetHarvestJobCommand, GetHarvestJobCommandInput } from "../commands/GetHarvestJobCommand"; +import { MediaPackageV2Client } from "../MediaPackageV2Client"; + +const checkState = async (client: MediaPackageV2Client, input: GetHarvestJobCommandInput): Promise => { + let reason; + try { + const result: any = await client.send(new GetHarvestJobCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "COMPLETED") { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "CANCELLED") { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "FAILED") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "QUEUED") { + return { state: WaiterState.RETRY, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "IN_PROGRESS") { + return { state: WaiterState.RETRY, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * + * @deprecated Use waitUntilHarvestJobFinished instead. waitForHarvestJobFinished does not throw error in non-success cases. + */ +export const waitForHarvestJobFinished = async ( + params: WaiterConfiguration, + input: GetHarvestJobCommandInput +): Promise => { + const serviceDefaults = { minDelay: 2, maxDelay: 120 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * + * @param params - Waiter configuration options. + * @param input - The input to GetHarvestJobCommand for polling. + */ +export const waitUntilHarvestJobFinished = async ( + params: WaiterConfiguration, + input: GetHarvestJobCommandInput +): Promise => { + const serviceDefaults = { minDelay: 2, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/codegen/sdk-codegen/aws-models/mediapackagev2.json b/codegen/sdk-codegen/aws-models/mediapackagev2.json index 9cbc3ed8abdec..e11e889d6b956 100644 --- a/codegen/sdk-codegen/aws-models/mediapackagev2.json +++ b/codegen/sdk-codegen/aws-models/mediapackagev2.json @@ -42,6 +42,112 @@ } } }, + "com.amazonaws.mediapackagev2#CancelHarvestJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.mediapackagev2#CancelHarvestJobRequest" + }, + "output": { + "target": "com.amazonaws.mediapackagev2#CancelHarvestJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.mediapackagev2#AccessDeniedException" + }, + { + "target": "com.amazonaws.mediapackagev2#ConflictException" + }, + { + "target": "com.amazonaws.mediapackagev2#InternalServerException" + }, + { + "target": "com.amazonaws.mediapackagev2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.mediapackagev2#ThrottlingException" + }, + { + "target": "com.amazonaws.mediapackagev2#ValidationException" + } + ], + "traits": { + "aws.iam#actionPermissionDescription": "Grants permission to cancel a harvest job on an endpoint", + "smithy.api#documentation": "

Cancels an in-progress harvest job.

", + "smithy.api#examples": [ + { + "title": "Cancel a Harvest Job", + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName", + "HarvestJobName": "HarvestJobName" + }, + "output": {} + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/harvestJob/{HarvestJobName}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.mediapackagev2#CancelHarvestJobRequest": { + "type": "structure", + "members": { + "ChannelGroupName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel group containing the channel from which the harvest job is running.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChannelName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel from which the harvest job is running.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "OriginEndpointName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the origin endpoint that the harvest job is harvesting from. This cannot be changed after the harvest job is submitted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "HarvestJobName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the harvest job to cancel. This name must be unique within the channel and cannot be changed after the harvest job is submitted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ETag": { + "target": "com.amazonaws.mediapackagev2#EntityTag", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The current Entity Tag (ETag) associated with the harvest job. Used for concurrency control.

", + "smithy.api#httpHeader": "x-amzn-update-if-match" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.mediapackagev2#CancelHarvestJobResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.mediapackagev2#ChannelGroupListConfiguration": { "type": "structure", "members": { @@ -109,6 +215,9 @@ "resources": [ { "target": "com.amazonaws.mediapackagev2#ChannelResource" + }, + { + "target": "com.amazonaws.mediapackagev2#HarvestJobResource" } ], "traits": { @@ -811,123 +920,13 @@ "target": "com.amazonaws.mediapackagev2#CreateDashManifestConfiguration" } }, - "com.amazonaws.mediapackagev2#CreateHlsManifestConfiguration": { - "type": "structure", - "members": { - "ManifestName": { - "target": "com.amazonaws.mediapackagev2#ManifestName", - "traits": { - "smithy.api#documentation": "

A short short string that's appended to the endpoint URL. The manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index. MediaPackage automatically inserts the format extension, such as .m3u8. You can't use the same manifest name if you use HLS manifest and low-latency HLS manifest. The manifestName on the HLSManifest object overrides the manifestName you provided on the originEndpoint object.

", - "smithy.api#required": {} - } - }, - "ChildManifestName": { - "target": "com.amazonaws.mediapackagev2#ManifestName", - "traits": { - "smithy.api#documentation": "

A short string that's appended to the endpoint URL. The child manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index, with an added suffix to distinguish it from the manifest name. The manifestName on the HLSManifest object overrides the manifestName you provided on the originEndpoint object.

" - } - }, - "ScteHls": { - "target": "com.amazonaws.mediapackagev2#ScteHls" - }, - "StartTag": { - "target": "com.amazonaws.mediapackagev2#StartTag" - }, - "ManifestWindowSeconds": { - "target": "smithy.api#Integer", - "traits": { - "smithy.api#documentation": "

The total duration (in seconds) of the manifest's content.

", - "smithy.api#range": { - "min": 30 - } - } - }, - "ProgramDateTimeIntervalSeconds": { - "target": "smithy.api#Integer", - "traits": { - "smithy.api#documentation": "

Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,\n EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.\n The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.\n ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.

\n

Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.

", - "smithy.api#range": { - "min": 1, - "max": 1209600 - } - } - }, - "FilterConfiguration": { - "target": "com.amazonaws.mediapackagev2#FilterConfiguration" - } - }, - "traits": { - "smithy.api#documentation": "

Create an HTTP live streaming (HLS) manifest configuration.

" - } - }, - "com.amazonaws.mediapackagev2#CreateHlsManifests": { - "type": "list", - "member": { - "target": "com.amazonaws.mediapackagev2#CreateHlsManifestConfiguration" - } - }, - "com.amazonaws.mediapackagev2#CreateLowLatencyHlsManifestConfiguration": { - "type": "structure", - "members": { - "ManifestName": { - "target": "com.amazonaws.mediapackagev2#ManifestName", - "traits": { - "smithy.api#documentation": "

A short short string that's appended to the endpoint URL. The manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index. MediaPackage automatically inserts the format extension, such as .m3u8. You can't use the same manifest name if you use HLS manifest and low-latency HLS manifest. The manifestName on the HLSManifest object overrides the manifestName you provided on the originEndpoint object.

", - "smithy.api#required": {} - } - }, - "ChildManifestName": { - "target": "com.amazonaws.mediapackagev2#ManifestName", - "traits": { - "smithy.api#documentation": "

A short string that's appended to the endpoint URL. The child manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index, with an added suffix to distinguish it from the manifest name. The manifestName on the HLSManifest object overrides the manifestName you provided on the originEndpoint object.

" - } - }, - "ScteHls": { - "target": "com.amazonaws.mediapackagev2#ScteHls" - }, - "StartTag": { - "target": "com.amazonaws.mediapackagev2#StartTag" - }, - "ManifestWindowSeconds": { - "target": "smithy.api#Integer", - "traits": { - "smithy.api#documentation": "

The total duration (in seconds) of the manifest's content.

", - "smithy.api#range": { - "min": 30 - } - } - }, - "ProgramDateTimeIntervalSeconds": { - "target": "smithy.api#Integer", - "traits": { - "smithy.api#documentation": "

Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,\n EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.\n The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.\n ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.

\n

Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.

", - "smithy.api#range": { - "min": 1, - "max": 1209600 - } - } - }, - "FilterConfiguration": { - "target": "com.amazonaws.mediapackagev2#FilterConfiguration" - } - }, - "traits": { - "smithy.api#documentation": "

Create a low-latency HTTP live streaming (HLS) manifest configuration.

" - } - }, - "com.amazonaws.mediapackagev2#CreateLowLatencyHlsManifests": { - "type": "list", - "member": { - "target": "com.amazonaws.mediapackagev2#CreateLowLatencyHlsManifestConfiguration" - } - }, - "com.amazonaws.mediapackagev2#CreateOriginEndpoint": { + "com.amazonaws.mediapackagev2#CreateHarvestJob": { "type": "operation", "input": { - "target": "com.amazonaws.mediapackagev2#CreateOriginEndpointRequest" + "target": "com.amazonaws.mediapackagev2#CreateHarvestJobRequest" }, "output": { - "target": "com.amazonaws.mediapackagev2#CreateOriginEndpointResponse" + "target": "com.amazonaws.mediapackagev2#CreateHarvestJobResponse" }, "errors": [ { @@ -953,56 +952,482 @@ } ], "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to create an origin endpoint for a channel", - "aws.iam#conditionKeys": ["aws:TagKeys", "aws:RequestTag/${TagKey}"], - "smithy.api#documentation": "

The endpoint is attached to a channel, and represents the output of the live content. You can associate multiple endpoints to a single channel. Each endpoint gives players and downstream CDNs (such as Amazon CloudFront) access to the content for playback. Content can't be served from a channel until it has an endpoint. You can create only one endpoint with each request.

", + "aws.iam#actionPermissionDescription": "Grants permission to create a HarvestJob", + "aws.iam#conditionKeys": ["aws:ResourceTag/${TagKey}"], + "smithy.api#documentation": "

Creates a new harvest job to export content from a MediaPackage v2 channel to an S3 bucket.

", "smithy.api#examples": [ { - "title": "Creating an OriginEndpoint with container type TS, and encryption enabled", + "title": "Creating a Harvest Job", "input": { "ChannelGroupName": "exampleChannelGroup", - "ChannelName": "exampleChannel", - "OriginEndpointName": "exampleOriginEndpointTS", - "ContainerType": "TS", - "Description": "Description for exampleOriginEndpointTS", - "StartoverWindowSeconds": 300, - "ForceEndpointErrorConfiguration": { - "EndpointErrorConditions": ["STALE_MANIFEST", "INCOMPLETE_MANIFEST", "MISSING_DRM_KEY", "SLATE_INPUT"] - }, - "Segment": { - "SegmentDurationSeconds": 6, - "SegmentName": "segmentName", - "TsUseAudioRenditionGroup": true, - "IncludeIframeOnlyStreams": true, - "TsIncludeDvbSubtitles": true, - "Scte": { - "ScteFilter": ["SPLICE_INSERT", "BREAK"] - }, - "Encryption": { - "ConstantInitializationVector": "A382A901F3C1F7718512266CFFBB0B7E", - "EncryptionMethod": { - "TsEncryptionMethod": "AES_128" - }, - "KeyRotationIntervalSeconds": 300, - "SpekeKeyProvider": { - "EncryptionContractConfiguration": { - "PresetSpeke20Audio": "SHARED", - "PresetSpeke20Video": "SHARED" - }, - "ResourceId": "ResourceId", - "DrmSystems": ["CLEAR_KEY_AES_128"], - "RoleArn": "arn:aws:iam::123456789012:role/empRole", - "Url": "https://foo.com" + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName", + "Description": "Example HarvestJob description", + "HarvestedManifests": { + "HlsManifests": [ + { + "ManifestName": "HlsManifest" } + ], + "DashManifests": [ + { + "ManifestName": "DashManifest" + } + ], + "LowLatencyHlsManifests": [ + { + "ManifestName": "LowLatencyHlsManifest" + } + ] + }, + "ScheduleConfiguration": { + "StartTime": "2024-05-28T06:00:00.00Z", + "EndTime": "2024-05-28T12:00:00.00Z" + }, + "Destination": { + "S3Destination": { + "BucketName": "harvestJobS3DestinationBucket", + "DestinationPath": "manifests" + } + } + }, + "output": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName", + "Destination": { + "S3Destination": { + "BucketName": "harvestJobS3DestinationBucket", + "DestinationPath": "manifests" } }, - "HlsManifests": [ - { - "ManifestName": "exampleManifest1", - "ChildManifestName": "exampleChildManifest1", - "ScteHls": { - "AdMarkerHls": "DATERANGE" - }, + "HarvestJobName": "HarvestJobName", + "HarvestedManifests": { + "HlsManifests": [ + { + "ManifestName": "HlsManifest" + } + ], + "DashManifests": [ + { + "ManifestName": "DashManifest" + } + ], + "LowLatencyHlsManifests": [ + { + "ManifestName": "LowLatencyHlsManifest" + } + ] + }, + "Description": "Example HarvestJob description", + "ScheduleConfiguration": { + "StartTime": "2024-05-28T06:00:00.00Z", + "EndTime": "2024-05-28T12:00:00.00Z" + }, + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannelName/originEndpoint/exampleOriginEndpointName/harvestJob/HarvestJobName", + "CreatedAt": "2024-05-28T09:36:00.00Z", + "ModifiedAt": "2024-05-28T09:36:00.00Z", + "Status": "QUEUED", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "Tags": { + "key1": "value1", + "key2": "value2" + } + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/harvestJob" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.mediapackagev2#CreateHarvestJobRequest": { + "type": "structure", + "members": { + "ChannelGroupName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel group containing the channel from which to harvest content.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChannelName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel from which to harvest content.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "OriginEndpointName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the origin endpoint from which to harvest content.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.mediapackagev2#ResourceDescription", + "traits": { + "smithy.api#documentation": "

An optional description for the harvest job.

" + } + }, + "HarvestedManifests": { + "target": "com.amazonaws.mediapackagev2#HarvestedManifests", + "traits": { + "smithy.api#documentation": "

A list of manifests to be harvested.

", + "smithy.api#required": {} + } + }, + "ScheduleConfiguration": { + "target": "com.amazonaws.mediapackagev2#HarvesterScheduleConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration for when the harvest job should run, including start and end times.

", + "smithy.api#required": {} + } + }, + "Destination": { + "target": "com.amazonaws.mediapackagev2#Destination", + "traits": { + "smithy.api#documentation": "

The S3 destination where the harvested content will be placed.

", + "smithy.api#required": {} + } + }, + "ClientToken": { + "target": "com.amazonaws.mediapackagev2#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

", + "smithy.api#httpHeader": "x-amzn-client-token", + "smithy.api#idempotencyToken": {} + } + }, + "HarvestJobName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

A name for the harvest job. This name must be unique within the channel.

" + } + }, + "Tags": { + "target": "com.amazonaws.mediapackagev2#TagMap", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

A collection of tags associated with the harvest job.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The request object for creating a new harvest job.

", + "smithy.api#input": {} + } + }, + "com.amazonaws.mediapackagev2#CreateHarvestJobResponse": { + "type": "structure", + "members": { + "ChannelGroupName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel group containing the channel from which content is being harvested.

", + "smithy.api#required": {} + } + }, + "ChannelName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel from which content is being harvested.

", + "smithy.api#required": {} + } + }, + "OriginEndpointName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the origin endpoint from which content is being harvested.

", + "smithy.api#required": {} + } + }, + "Destination": { + "target": "com.amazonaws.mediapackagev2#Destination", + "traits": { + "smithy.api#documentation": "

The S3 destination where the harvested content will be placed.

", + "smithy.api#required": {} + } + }, + "HarvestJobName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the created harvest job.

", + "smithy.api#required": {} + } + }, + "HarvestedManifests": { + "target": "com.amazonaws.mediapackagev2#HarvestedManifests", + "traits": { + "smithy.api#documentation": "

A list of manifests that will be harvested.

", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.mediapackagev2#ResourceDescription", + "traits": { + "smithy.api#documentation": "

The description of the harvest job, if provided.

" + } + }, + "ScheduleConfiguration": { + "target": "com.amazonaws.mediapackagev2#HarvesterScheduleConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration for when the harvest job will run, including start and end times.

", + "smithy.api#required": {} + } + }, + "Arn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the created harvest job.

", + "smithy.api#required": {} + } + }, + "CreatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the harvest job was created.

", + "smithy.api#required": {} + } + }, + "ModifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the harvest job was last modified.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.mediapackagev2#HarvestJobStatus", + "traits": { + "smithy.api#documentation": "

The current status of the harvest job (e.g., CREATED, IN_PROGRESS, ABORTED, COMPLETED, FAILED).

", + "smithy.api#required": {} + } + }, + "ErrorMessage": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

An error message if the harvest job creation failed.

" + } + }, + "ETag": { + "target": "com.amazonaws.mediapackagev2#EntityTag", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The current version of the harvest job. Used for concurrency control.

" + } + }, + "Tags": { + "target": "com.amazonaws.mediapackagev2#TagMap", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

A collection of tags associated with the harvest job.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The response object returned after creating a harvest job.

", + "smithy.api#output": {} + } + }, + "com.amazonaws.mediapackagev2#CreateHlsManifestConfiguration": { + "type": "structure", + "members": { + "ManifestName": { + "target": "com.amazonaws.mediapackagev2#ManifestName", + "traits": { + "smithy.api#documentation": "

A short short string that's appended to the endpoint URL. The manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index. MediaPackage automatically inserts the format extension, such as .m3u8. You can't use the same manifest name if you use HLS manifest and low-latency HLS manifest. The manifestName on the HLSManifest object overrides the manifestName you provided on the originEndpoint object.

", + "smithy.api#required": {} + } + }, + "ChildManifestName": { + "target": "com.amazonaws.mediapackagev2#ManifestName", + "traits": { + "smithy.api#documentation": "

A short string that's appended to the endpoint URL. The child manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index, with an added suffix to distinguish it from the manifest name. The manifestName on the HLSManifest object overrides the manifestName you provided on the originEndpoint object.

" + } + }, + "ScteHls": { + "target": "com.amazonaws.mediapackagev2#ScteHls" + }, + "StartTag": { + "target": "com.amazonaws.mediapackagev2#StartTag" + }, + "ManifestWindowSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The total duration (in seconds) of the manifest's content.

", + "smithy.api#range": { + "min": 30 + } + } + }, + "ProgramDateTimeIntervalSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,\n EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.\n The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.\n ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.

\n

Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.

", + "smithy.api#range": { + "min": 1, + "max": 1209600 + } + } + }, + "FilterConfiguration": { + "target": "com.amazonaws.mediapackagev2#FilterConfiguration" + } + }, + "traits": { + "smithy.api#documentation": "

Create an HTTP live streaming (HLS) manifest configuration.

" + } + }, + "com.amazonaws.mediapackagev2#CreateHlsManifests": { + "type": "list", + "member": { + "target": "com.amazonaws.mediapackagev2#CreateHlsManifestConfiguration" + } + }, + "com.amazonaws.mediapackagev2#CreateLowLatencyHlsManifestConfiguration": { + "type": "structure", + "members": { + "ManifestName": { + "target": "com.amazonaws.mediapackagev2#ManifestName", + "traits": { + "smithy.api#documentation": "

A short short string that's appended to the endpoint URL. The manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index. MediaPackage automatically inserts the format extension, such as .m3u8. You can't use the same manifest name if you use HLS manifest and low-latency HLS manifest. The manifestName on the HLSManifest object overrides the manifestName you provided on the originEndpoint object.

", + "smithy.api#required": {} + } + }, + "ChildManifestName": { + "target": "com.amazonaws.mediapackagev2#ManifestName", + "traits": { + "smithy.api#documentation": "

A short string that's appended to the endpoint URL. The child manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index, with an added suffix to distinguish it from the manifest name. The manifestName on the HLSManifest object overrides the manifestName you provided on the originEndpoint object.

" + } + }, + "ScteHls": { + "target": "com.amazonaws.mediapackagev2#ScteHls" + }, + "StartTag": { + "target": "com.amazonaws.mediapackagev2#StartTag" + }, + "ManifestWindowSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The total duration (in seconds) of the manifest's content.

", + "smithy.api#range": { + "min": 30 + } + } + }, + "ProgramDateTimeIntervalSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,\n EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.\n The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.\n ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.

\n

Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.

", + "smithy.api#range": { + "min": 1, + "max": 1209600 + } + } + }, + "FilterConfiguration": { + "target": "com.amazonaws.mediapackagev2#FilterConfiguration" + } + }, + "traits": { + "smithy.api#documentation": "

Create a low-latency HTTP live streaming (HLS) manifest configuration.

" + } + }, + "com.amazonaws.mediapackagev2#CreateLowLatencyHlsManifests": { + "type": "list", + "member": { + "target": "com.amazonaws.mediapackagev2#CreateLowLatencyHlsManifestConfiguration" + } + }, + "com.amazonaws.mediapackagev2#CreateOriginEndpoint": { + "type": "operation", + "input": { + "target": "com.amazonaws.mediapackagev2#CreateOriginEndpointRequest" + }, + "output": { + "target": "com.amazonaws.mediapackagev2#CreateOriginEndpointResponse" + }, + "errors": [ + { + "target": "com.amazonaws.mediapackagev2#AccessDeniedException" + }, + { + "target": "com.amazonaws.mediapackagev2#ConflictException" + }, + { + "target": "com.amazonaws.mediapackagev2#InternalServerException" + }, + { + "target": "com.amazonaws.mediapackagev2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.mediapackagev2#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.mediapackagev2#ThrottlingException" + }, + { + "target": "com.amazonaws.mediapackagev2#ValidationException" + } + ], + "traits": { + "aws.iam#actionPermissionDescription": "Grants permission to create an origin endpoint for a channel", + "aws.iam#conditionKeys": ["aws:TagKeys", "aws:RequestTag/${TagKey}"], + "smithy.api#documentation": "

The endpoint is attached to a channel, and represents the output of the live content. You can associate multiple endpoints to a single channel. Each endpoint gives players and downstream CDNs (such as Amazon CloudFront) access to the content for playback. Content can't be served from a channel until it has an endpoint. You can create only one endpoint with each request.

", + "smithy.api#examples": [ + { + "title": "Creating an OriginEndpoint with container type TS, and encryption enabled", + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "OriginEndpointName": "exampleOriginEndpointTS", + "ContainerType": "TS", + "Description": "Description for exampleOriginEndpointTS", + "StartoverWindowSeconds": 300, + "ForceEndpointErrorConfiguration": { + "EndpointErrorConditions": ["STALE_MANIFEST", "INCOMPLETE_MANIFEST", "MISSING_DRM_KEY", "SLATE_INPUT"] + }, + "Segment": { + "SegmentDurationSeconds": 6, + "SegmentName": "segmentName", + "TsUseAudioRenditionGroup": true, + "IncludeIframeOnlyStreams": true, + "TsIncludeDvbSubtitles": true, + "Scte": { + "ScteFilter": ["SPLICE_INSERT", "BREAK"] + }, + "Encryption": { + "ConstantInitializationVector": "A382A901F3C1F7718512266CFFBB0B7E", + "EncryptionMethod": { + "TsEncryptionMethod": "AES_128" + }, + "KeyRotationIntervalSeconds": 300, + "SpekeKeyProvider": { + "EncryptionContractConfiguration": { + "PresetSpeke20Audio": "SHARED", + "PresetSpeke20Video": "SHARED" + }, + "ResourceId": "ResourceId", + "DrmSystems": ["CLEAR_KEY_AES_128"], + "RoleArn": "arn:aws:iam::123456789012:role/empRole", + "Url": "https://foo.com" + } + } + }, + "HlsManifests": [ + { + "ManifestName": "exampleManifest1", + "ChildManifestName": "exampleChildManifest1", + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, "ManifestWindowSeconds": 30, "ProgramDateTimeIntervalSeconds": 60 }, @@ -2102,6 +2527,21 @@ "smithy.api#output": {} } }, + "com.amazonaws.mediapackagev2#Destination": { + "type": "structure", + "members": { + "S3Destination": { + "target": "com.amazonaws.mediapackagev2#S3DestinationConfig", + "traits": { + "smithy.api#documentation": "

The configuration for exporting harvested content to an S3 bucket. This includes details such as the bucket name and destination path within the bucket.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration for the destination where the harvested content will be exported.

" + } + }, "com.amazonaws.mediapackagev2#DrmSystem": { "type": "enum", "members": { @@ -2741,83 +3181,382 @@ "ManifestName": { "target": "com.amazonaws.mediapackagev2#ResourceName", "traits": { - "smithy.api#documentation": "

A short string that's appended to the endpoint URL. The manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index.

", + "smithy.api#documentation": "

A short string that's appended to the endpoint URL. The manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index.

", + "smithy.api#required": {} + } + }, + "Url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The egress domain URL for stream delivery from MediaPackage.

", + "smithy.api#required": {} + } + }, + "ManifestWindowSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The total duration (in seconds) of the manifest's content.

" + } + }, + "FilterConfiguration": { + "target": "com.amazonaws.mediapackagev2#FilterConfiguration" + }, + "MinUpdatePeriodSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Minimum amount of time (in seconds) that the player should wait before requesting updates to the manifest.

" + } + }, + "MinBufferTimeSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Minimum amount of content (in seconds) that a player must keep available in the buffer.

" + } + }, + "SuggestedPresentationDelaySeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The amount of time (in seconds) that the player should be from the end of the manifest.

" + } + }, + "SegmentTemplateFormat": { + "target": "com.amazonaws.mediapackagev2#DashSegmentTemplateFormat", + "traits": { + "smithy.api#documentation": "

Determines the type of variable used in the media URL of the SegmentTemplate tag in the manifest. Also specifies if segment timeline information is included in SegmentTimeline or SegmentTemplate.

\n

Value description:

\n
    \n
  • \n

    \n NUMBER_WITH_TIMELINE - The $Number$ variable is used in the media URL. The value of this variable is the sequential number of the segment. A full SegmentTimeline object is presented in each SegmentTemplate.

    \n
  • \n
" + } + }, + "PeriodTriggers": { + "target": "com.amazonaws.mediapackagev2#DashPeriodTriggers", + "traits": { + "smithy.api#documentation": "

A list of triggers that controls when AWS Elemental MediaPackage separates the MPEG-DASH manifest into multiple periods. Leave this value empty to indicate that the manifest is contained all in one period.\n For more information about periods in the DASH manifest, see Multi-period DASH in AWS Elemental MediaPackage.

" + } + }, + "ScteDash": { + "target": "com.amazonaws.mediapackagev2#ScteDash", + "traits": { + "smithy.api#documentation": "

The SCTE configuration.

" + } + }, + "DrmSignaling": { + "target": "com.amazonaws.mediapackagev2#DashDrmSignaling", + "traits": { + "smithy.api#documentation": "

Determines how the DASH manifest signals the DRM content.

" + } + }, + "UtcTiming": { + "target": "com.amazonaws.mediapackagev2#DashUtcTiming", + "traits": { + "smithy.api#documentation": "

Determines the type of UTC timing included in the DASH Media Presentation Description (MPD).

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Retrieve the DASH manifest configuration.

" + } + }, + "com.amazonaws.mediapackagev2#GetDashManifests": { + "type": "list", + "member": { + "target": "com.amazonaws.mediapackagev2#GetDashManifestConfiguration" + } + }, + "com.amazonaws.mediapackagev2#GetHarvestJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.mediapackagev2#GetHarvestJobRequest" + }, + "output": { + "target": "com.amazonaws.mediapackagev2#GetHarvestJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.mediapackagev2#AccessDeniedException" + }, + { + "target": "com.amazonaws.mediapackagev2#InternalServerException" + }, + { + "target": "com.amazonaws.mediapackagev2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.mediapackagev2#ThrottlingException" + }, + { + "target": "com.amazonaws.mediapackagev2#ValidationException" + } + ], + "traits": { + "aws.iam#actionPermissionDescription": "Grants permission to retrieve a HarvestJob", + "smithy.api#documentation": "

Retrieves the details of a specific harvest job.

", + "smithy.api#examples": [ + { + "title": "Getting a Harvest Job", + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName", + "HarvestJobName": "HarvestJobName" + }, + "output": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName", + "Destination": { + "S3Destination": { + "BucketName": "harvestJobS3DestinationBucket", + "DestinationPath": "manifests" + } + }, + "HarvestJobName": "HarvestJobName", + "HarvestedManifests": { + "HlsManifests": [ + { + "ManifestName": "HlsManifest" + } + ], + "DashManifests": [ + { + "ManifestName": "DashManifest" + } + ], + "LowLatencyHlsManifests": [ + { + "ManifestName": "LowLatencyHlsManifest" + } + ] + }, + "Description": "Example HarvestJob description", + "ScheduleConfiguration": { + "StartTime": "2024-05-28T06:00:00.00Z", + "EndTime": "2024-05-28T12:00:00.00Z" + }, + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannelName/originEndpoint/exampleOriginEndpointName/harvestJob/HarvestJobName", + "CreatedAt": "2024-05-28T09:36:00.00Z", + "ModifiedAt": "2024-05-28T09:36:00.00Z", + "Status": "QUEUED", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "Tags": { + "key1": "value1", + "key2": "value2" + } + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/harvestJob/{HarvestJobName}" + }, + "smithy.api#readonly": {}, + "smithy.waiters#waitable": { + "HarvestJobFinished": { + "description": "Waits for the HarvestJob to conclude to return", + "acceptors": [ + { + "state": "success", + "matcher": { + "output": { + "path": "Status", + "expected": "COMPLETED", + "comparator": "stringEquals" + } + } + }, + { + "state": "success", + "matcher": { + "output": { + "path": "Status", + "expected": "CANCELLED", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "Status", + "expected": "FAILED", + "comparator": "stringEquals" + } + } + }, + { + "state": "retry", + "matcher": { + "output": { + "path": "Status", + "expected": "QUEUED", + "comparator": "stringEquals" + } + } + }, + { + "state": "retry", + "matcher": { + "output": { + "path": "Status", + "expected": "IN_PROGRESS", + "comparator": "stringEquals" + } + } + } + ] + } + } + } + }, + "com.amazonaws.mediapackagev2#GetHarvestJobRequest": { + "type": "structure", + "members": { + "ChannelGroupName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel group containing the channel associated with the harvest job.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ChannelName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel associated with the harvest job.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "OriginEndpointName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the origin endpoint associated with the harvest job.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "HarvestJobName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the harvest job to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request object for retrieving a specific harvest job.

", + "smithy.api#input": {} + } + }, + "com.amazonaws.mediapackagev2#GetHarvestJobResponse": { + "type": "structure", + "members": { + "ChannelGroupName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel group containing the channel associated with the harvest job.

", + "smithy.api#required": {} + } + }, + "ChannelName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel associated with the harvest job.

", + "smithy.api#required": {} + } + }, + "OriginEndpointName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the origin endpoint associated with the harvest job.

", + "smithy.api#required": {} + } + }, + "Destination": { + "target": "com.amazonaws.mediapackagev2#Destination", + "traits": { + "smithy.api#documentation": "

The S3 destination where the harvested content is being placed.

", + "smithy.api#required": {} + } + }, + "HarvestJobName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the harvest job.

", "smithy.api#required": {} } }, - "Url": { - "target": "smithy.api#String", + "HarvestedManifests": { + "target": "com.amazonaws.mediapackagev2#HarvestedManifests", "traits": { - "smithy.api#documentation": "

The egress domain URL for stream delivery from MediaPackage.

", + "smithy.api#documentation": "

A list of manifests that are being or have been harvested.

", "smithy.api#required": {} } }, - "ManifestWindowSeconds": { - "target": "smithy.api#Integer", + "Description": { + "target": "com.amazonaws.mediapackagev2#ResourceDescription", "traits": { - "smithy.api#documentation": "

The total duration (in seconds) of the manifest's content.

" + "smithy.api#documentation": "

The description of the harvest job, if provided.

" } }, - "FilterConfiguration": { - "target": "com.amazonaws.mediapackagev2#FilterConfiguration" - }, - "MinUpdatePeriodSeconds": { - "target": "smithy.api#Integer", + "ScheduleConfiguration": { + "target": "com.amazonaws.mediapackagev2#HarvesterScheduleConfiguration", "traits": { - "smithy.api#documentation": "

Minimum amount of time (in seconds) that the player should wait before requesting updates to the manifest.

" + "smithy.api#documentation": "

The configuration for when the harvest job is scheduled to run, including start and end times.

", + "smithy.api#required": {} } }, - "MinBufferTimeSeconds": { - "target": "smithy.api#Integer", + "Arn": { + "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

Minimum amount of content (in seconds) that a player must keep available in the buffer.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the harvest job.

", + "smithy.api#required": {} } }, - "SuggestedPresentationDelaySeconds": { - "target": "smithy.api#Integer", + "CreatedAt": { + "target": "smithy.api#Timestamp", "traits": { - "smithy.api#documentation": "

The amount of time (in seconds) that the player should be from the end of the manifest.

" + "smithy.api#documentation": "

The date and time when the harvest job was created.

", + "smithy.api#required": {} } }, - "SegmentTemplateFormat": { - "target": "com.amazonaws.mediapackagev2#DashSegmentTemplateFormat", + "ModifiedAt": { + "target": "smithy.api#Timestamp", "traits": { - "smithy.api#documentation": "

Determines the type of variable used in the media URL of the SegmentTemplate tag in the manifest. Also specifies if segment timeline information is included in SegmentTimeline or SegmentTemplate.

\n

Value description:

\n " + "smithy.api#documentation": "

The date and time when the harvest job was last modified.

", + "smithy.api#required": {} } }, - "PeriodTriggers": { - "target": "com.amazonaws.mediapackagev2#DashPeriodTriggers", + "Status": { + "target": "com.amazonaws.mediapackagev2#HarvestJobStatus", "traits": { - "smithy.api#documentation": "

A list of triggers that controls when AWS Elemental MediaPackage separates the MPEG-DASH manifest into multiple periods. Leave this value empty to indicate that the manifest is contained all in one period.\n For more information about periods in the DASH manifest, see Multi-period DASH in AWS Elemental MediaPackage.

" + "smithy.api#documentation": "

The current status of the harvest job (e.g., QUEUED, IN_PROGRESS, CANCELLED, COMPLETED, FAILED).

", + "smithy.api#required": {} } }, - "ScteDash": { - "target": "com.amazonaws.mediapackagev2#ScteDash", + "ErrorMessage": { + "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

The SCTE configuration.

" + "smithy.api#documentation": "

An error message if the harvest job encountered any issues.

" } }, - "DrmSignaling": { - "target": "com.amazonaws.mediapackagev2#DashDrmSignaling", + "ETag": { + "target": "com.amazonaws.mediapackagev2#EntityTag", "traits": { - "smithy.api#documentation": "

Determines how the DASH manifest signals the DRM content.

" + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The current version of the harvest job. Used for concurrency control.

" } }, - "UtcTiming": { - "target": "com.amazonaws.mediapackagev2#DashUtcTiming", + "Tags": { + "target": "com.amazonaws.mediapackagev2#TagMap", "traits": { - "smithy.api#documentation": "

Determines the type of UTC timing included in the DASH Media Presentation Description (MPD).

" + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

A collection of tags associated with the harvest job.

" } } }, "traits": { - "smithy.api#documentation": "

Retrieve the DASH manifest configuration.

" - } - }, - "com.amazonaws.mediapackagev2#GetDashManifests": { - "type": "list", - "member": { - "target": "com.amazonaws.mediapackagev2#GetDashManifestConfiguration" + "smithy.api#documentation": "

The response object containing the details of the requested harvest job.

", + "smithy.api#output": {} } }, "com.amazonaws.mediapackagev2#GetHlsManifestConfiguration": { @@ -3247,86 +3986,379 @@ "smithy.api#required": {} } }, - "ContainerType": { - "target": "com.amazonaws.mediapackagev2#ContainerType", + "ContainerType": { + "target": "com.amazonaws.mediapackagev2#ContainerType", + "traits": { + "smithy.api#documentation": "

The type of container attached to this origin endpoint.

", + "smithy.api#required": {} + } + }, + "Segment": { + "target": "com.amazonaws.mediapackagev2#Segment", + "traits": { + "smithy.api#required": {} + } + }, + "CreatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the origin endpoint was created.

", + "smithy.api#required": {} + } + }, + "ModifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time the origin endpoint was modified.

", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.mediapackagev2#ResourceDescription", + "traits": { + "smithy.api#documentation": "

The description for your origin endpoint.

" + } + }, + "StartoverWindowSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The size of the window (in seconds) to create a window of the live stream that's available for on-demand viewing. Viewers can start-over or catch-up on content that falls within the window.

" + } + }, + "HlsManifests": { + "target": "com.amazonaws.mediapackagev2#GetHlsManifests", + "traits": { + "smithy.api#documentation": "

An HTTP live streaming (HLS) manifest configuration.

" + } + }, + "LowLatencyHlsManifests": { + "target": "com.amazonaws.mediapackagev2#GetLowLatencyHlsManifests", + "traits": { + "smithy.api#documentation": "

A low-latency HLS manifest configuration.

" + } + }, + "DashManifests": { + "target": "com.amazonaws.mediapackagev2#GetDashManifests", + "traits": { + "smithy.api#documentation": "

A DASH manifest configuration.

" + } + }, + "ForceEndpointErrorConfiguration": { + "target": "com.amazonaws.mediapackagev2#ForceEndpointErrorConfiguration", + "traits": { + "smithy.api#documentation": "

The failover settings for the endpoint.

" + } + }, + "ETag": { + "target": "com.amazonaws.mediapackagev2#EntityTag", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource.

" + } + }, + "Tags": { + "target": "com.amazonaws.mediapackagev2#TagMap", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The comma-separated list of tag key:value pairs assigned to the origin endpoint.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.mediapackagev2#HarvestJob": { + "type": "structure", + "members": { + "ChannelGroupName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel group containing the channel associated with this harvest job.

", + "smithy.api#required": {} + } + }, + "ChannelName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel associated with this harvest job.

", + "smithy.api#required": {} + } + }, + "OriginEndpointName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the origin endpoint associated with this harvest job.

", + "smithy.api#required": {} + } + }, + "Destination": { + "target": "com.amazonaws.mediapackagev2#Destination", + "traits": { + "smithy.api#documentation": "

The S3 destination where the harvested content will be placed.

", + "smithy.api#required": {} + } + }, + "HarvestJobName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the harvest job.

", + "smithy.api#required": {} + } + }, + "HarvestedManifests": { + "target": "com.amazonaws.mediapackagev2#HarvestedManifests", + "traits": { + "smithy.api#documentation": "

A list of manifests that are being or have been harvested.

", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.mediapackagev2#ResourceDescription", + "traits": { + "smithy.api#documentation": "

An optional description of the harvest job.

" + } + }, + "ScheduleConfiguration": { + "target": "com.amazonaws.mediapackagev2#HarvesterScheduleConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration for when the harvest job is scheduled to run.

", + "smithy.api#required": {} + } + }, + "Arn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the harvest job.

", + "smithy.api#required": {} + } + }, + "CreatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time when the harvest job was created.

", + "smithy.api#required": {} + } + }, + "ModifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time when the harvest job was last modified.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.mediapackagev2#HarvestJobStatus", + "traits": { + "smithy.api#documentation": "

The current status of the harvest job (e.g., QUEUED, IN_PROGRESS, CANCELLED, COMPLETED, FAILED).

", + "smithy.api#required": {} + } + }, + "ErrorMessage": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

An error message if the harvest job encountered any issues.

" + } + }, + "ETag": { + "target": "com.amazonaws.mediapackagev2#EntityTag", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The current version of the harvest job. Used for concurrency control.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents a harvest job resource in MediaPackage v2, which is used to export content from an origin endpoint to an S3 bucket.

" + } + }, + "com.amazonaws.mediapackagev2#HarvestJobResource": { + "type": "resource", + "identifiers": { + "ChannelGroupName": { + "target": "com.amazonaws.mediapackagev2#ResourceName" + }, + "ChannelName": { + "target": "com.amazonaws.mediapackagev2#ResourceName" + }, + "OriginEndpointName": { + "target": "com.amazonaws.mediapackagev2#ResourceName" + }, + "HarvestJobName": { + "target": "com.amazonaws.mediapackagev2#ResourceName" + } + }, + "create": { + "target": "com.amazonaws.mediapackagev2#CreateHarvestJob" + }, + "read": { + "target": "com.amazonaws.mediapackagev2#GetHarvestJob" + }, + "update": { + "target": "com.amazonaws.mediapackagev2#CancelHarvestJob" + }, + "list": { + "target": "com.amazonaws.mediapackagev2#ListHarvestJobs" + }, + "traits": { + "aws.api#arn": { + "template": "channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/harvestJob/{HarvestJobName}" + }, + "aws.iam#conditionKeys": ["aws:ResourceTag/${TagKey}"], + "aws.iam#disableConditionKeyInference": {}, + "smithy.api#documentation": "

A HarvestJob resource represents a request to export content from a MediaPackage v2 channel to an S3 bucket.

" + } + }, + "com.amazonaws.mediapackagev2#HarvestJobStatus": { + "type": "enum", + "members": { + "QUEUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUEUED" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The type of container attached to this origin endpoint.

", - "smithy.api#required": {} + "smithy.api#enumValue": "IN_PROGRESS" } }, - "Segment": { - "target": "com.amazonaws.mediapackagev2#Segment", + "CANCELLED": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#required": {} + "smithy.api#enumValue": "CANCELLED" } }, - "CreatedAt": { - "target": "smithy.api#Timestamp", + "COMPLETED": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The date and time the origin endpoint was created.

", - "smithy.api#required": {} + "smithy.api#enumValue": "COMPLETED" } }, - "ModifiedAt": { - "target": "smithy.api#Timestamp", + "FAILED": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The date and time the origin endpoint was modified.

", - "smithy.api#required": {} + "smithy.api#enumValue": "FAILED" } - }, - "Description": { - "target": "com.amazonaws.mediapackagev2#ResourceDescription", + } + } + }, + "com.amazonaws.mediapackagev2#HarvestJobsList": { + "type": "list", + "member": { + "target": "com.amazonaws.mediapackagev2#HarvestJob" + } + }, + "com.amazonaws.mediapackagev2#HarvestedDashManifest": { + "type": "structure", + "members": { + "ManifestName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", "traits": { - "smithy.api#documentation": "

The description for your origin endpoint.

" + "smithy.api#documentation": "

The name of the harvested DASH manifest.

", + "smithy.api#required": {} } - }, - "StartoverWindowSeconds": { - "target": "smithy.api#Integer", + } + }, + "traits": { + "smithy.api#documentation": "

Information about a harvested DASH manifest.

" + } + }, + "com.amazonaws.mediapackagev2#HarvestedDashManifestsList": { + "type": "list", + "member": { + "target": "com.amazonaws.mediapackagev2#HarvestedDashManifest" + } + }, + "com.amazonaws.mediapackagev2#HarvestedHlsManifest": { + "type": "structure", + "members": { + "ManifestName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", "traits": { - "smithy.api#documentation": "

The size of the window (in seconds) to create a window of the live stream that's available for on-demand viewing. Viewers can start-over or catch-up on content that falls within the window.

" + "smithy.api#documentation": "

The name of the harvested HLS manifest.

", + "smithy.api#required": {} } - }, - "HlsManifests": { - "target": "com.amazonaws.mediapackagev2#GetHlsManifests", + } + }, + "traits": { + "smithy.api#documentation": "

Information about a harvested HLS manifest.

" + } + }, + "com.amazonaws.mediapackagev2#HarvestedHlsManifestsList": { + "type": "list", + "member": { + "target": "com.amazonaws.mediapackagev2#HarvestedHlsManifest" + } + }, + "com.amazonaws.mediapackagev2#HarvestedLowLatencyHlsManifest": { + "type": "structure", + "members": { + "ManifestName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", "traits": { - "smithy.api#documentation": "

An HTTP live streaming (HLS) manifest configuration.

" + "smithy.api#documentation": "

The name of the harvested Low-Latency HLS manifest.

", + "smithy.api#required": {} } - }, - "LowLatencyHlsManifests": { - "target": "com.amazonaws.mediapackagev2#GetLowLatencyHlsManifests", + } + }, + "traits": { + "smithy.api#documentation": "

Information about a harvested Low-Latency HLS manifest.

" + } + }, + "com.amazonaws.mediapackagev2#HarvestedLowLatencyHlsManifestsList": { + "type": "list", + "member": { + "target": "com.amazonaws.mediapackagev2#HarvestedLowLatencyHlsManifest" + } + }, + "com.amazonaws.mediapackagev2#HarvestedManifests": { + "type": "structure", + "members": { + "HlsManifests": { + "target": "com.amazonaws.mediapackagev2#HarvestedHlsManifestsList", "traits": { - "smithy.api#documentation": "

A low-latency HLS manifest configuration.

" + "smithy.api#documentation": "

A list of harvested HLS manifests.

" } }, "DashManifests": { - "target": "com.amazonaws.mediapackagev2#GetDashManifests", + "target": "com.amazonaws.mediapackagev2#HarvestedDashManifestsList", "traits": { - "smithy.api#documentation": "

A DASH manifest configuration.

" + "smithy.api#documentation": "

A list of harvested DASH manifests.

" } }, - "ForceEndpointErrorConfiguration": { - "target": "com.amazonaws.mediapackagev2#ForceEndpointErrorConfiguration", + "LowLatencyHlsManifests": { + "target": "com.amazonaws.mediapackagev2#HarvestedLowLatencyHlsManifestsList", "traits": { - "smithy.api#documentation": "

The failover settings for the endpoint.

" + "smithy.api#documentation": "

A list of harvested Low-Latency HLS manifests.

" } - }, - "ETag": { - "target": "com.amazonaws.mediapackagev2#EntityTag", + } + }, + "traits": { + "smithy.api#documentation": "

A collection of harvested manifests of different types.

" + } + }, + "com.amazonaws.mediapackagev2#HarvesterScheduleConfiguration": { + "type": "structure", + "members": { + "StartTime": { + "target": "smithy.api#Timestamp", "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "

The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource.

" + "smithy.api#documentation": "

The start time for the harvest job.

", + "smithy.api#required": {} } }, - "Tags": { - "target": "com.amazonaws.mediapackagev2#TagMap", + "EndTime": { + "target": "smithy.api#Timestamp", "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "

The comma-separated list of tag key:value pairs assigned to the origin endpoint.

" + "smithy.api#documentation": "

The end time for the harvest job.

", + "smithy.api#required": {} } } }, "traits": { - "smithy.api#output": {} + "smithy.api#documentation": "

Defines the schedule configuration for a harvest job.

" } }, "com.amazonaws.mediapackagev2#IdempotencyToken": { @@ -3466,50 +4498,197 @@ "MaxResults": { "target": "com.amazonaws.mediapackagev2#ListResourceMaxResults", "traits": { - "smithy.api#default": 10, - "smithy.api#documentation": "

The maximum number of results to return in the response.

", - "smithy.api#httpQuery": "maxResults" + "smithy.api#default": 10, + "smithy.api#documentation": "

The maximum number of results to return in the response.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pagination token from the GET list request. Use the token to fetch the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.mediapackagev2#ListChannelGroupsResponse": { + "type": "structure", + "members": { + "Items": { + "target": "com.amazonaws.mediapackagev2#ChannelGroupsList", + "traits": { + "smithy.api#documentation": "

The objects being returned.

" + } + }, + "NextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pagination token from the GET list request. Use the token to fetch the next page of results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.mediapackagev2#ListChannels": { + "type": "operation", + "input": { + "target": "com.amazonaws.mediapackagev2#ListChannelsRequest" + }, + "output": { + "target": "com.amazonaws.mediapackagev2#ListChannelsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.mediapackagev2#AccessDeniedException" + }, + { + "target": "com.amazonaws.mediapackagev2#InternalServerException" + }, + { + "target": "com.amazonaws.mediapackagev2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.mediapackagev2#ThrottlingException" + }, + { + "target": "com.amazonaws.mediapackagev2#ValidationException" + } + ], + "traits": { + "aws.iam#actionPermissionDescription": "Grants permission to list all channels in a channel group", + "smithy.api#documentation": "

Retrieves all channels in a specific channel group that are configured in AWS Elemental MediaPackage, including the origin endpoints that are associated with it.

", + "smithy.api#examples": [ + { + "title": "Listing all Channels", + "input": { + "ChannelGroupName": "exampleChannelGroup" + }, + "output": { + "Items": [ + { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "Description": "Description for exampleChannel", + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "ModifiedAt": "2022-10-18T09:36:00.00Z" + }, + { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "anotherExampleChannel", + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/anotherExampleChannel", + "CreatedAt": "2022-10-18T10:36:00.00Z", + "ModifiedAt": "2022-10-18T10:36:00.00Z" + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/channelGroup/{ChannelGroupName}/channel", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Items", + "pageSize": "MaxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.mediapackagev2#ListChannelsRequest": { + "type": "structure", + "members": { + "ChannelGroupName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.mediapackagev2#ListResourceMaxResults", + "traits": { + "smithy.api#default": 10, + "smithy.api#documentation": "

The maximum number of results to return in the response.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pagination token from the GET list request. Use the token to fetch the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.mediapackagev2#ListChannelsResponse": { + "type": "structure", + "members": { + "Items": { + "target": "com.amazonaws.mediapackagev2#ChannelList", + "traits": { + "smithy.api#documentation": "

The objects being returned.

" } }, "NextToken": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

The pagination token from the GET list request. Use the token to fetch the next page of results.

", - "smithy.api#httpQuery": "nextToken" + "smithy.api#documentation": "

The pagination token from the GET list request.

" } } }, "traits": { - "smithy.api#input": {} + "smithy.api#output": {} } }, - "com.amazonaws.mediapackagev2#ListChannelGroupsResponse": { + "com.amazonaws.mediapackagev2#ListDashManifestConfiguration": { "type": "structure", "members": { - "Items": { - "target": "com.amazonaws.mediapackagev2#ChannelGroupsList", + "ManifestName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", "traits": { - "smithy.api#documentation": "

The objects being returned.

" + "smithy.api#documentation": "

A short string that's appended to the endpoint URL. The manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index.

", + "smithy.api#required": {} } }, - "NextToken": { + "Url": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

The pagination token from the GET list request. Use the token to fetch the next page of results.

" + "smithy.api#documentation": "

The egress domain URL for stream delivery from MediaPackage.

" } } }, "traits": { - "smithy.api#output": {} + "smithy.api#documentation": "

List the DASH manifest configuration.

" } }, - "com.amazonaws.mediapackagev2#ListChannels": { + "com.amazonaws.mediapackagev2#ListDashManifests": { + "type": "list", + "member": { + "target": "com.amazonaws.mediapackagev2#ListDashManifestConfiguration" + } + }, + "com.amazonaws.mediapackagev2#ListHarvestJobs": { "type": "operation", "input": { - "target": "com.amazonaws.mediapackagev2#ListChannelsRequest" + "target": "com.amazonaws.mediapackagev2#ListHarvestJobsRequest" }, "output": { - "target": "com.amazonaws.mediapackagev2#ListChannelsResponse" + "target": "com.amazonaws.mediapackagev2#ListHarvestJobsResponse" }, "errors": [ { @@ -3529,11 +4708,11 @@ } ], "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list all channels in a channel group", - "smithy.api#documentation": "

Retrieves all channels in a specific channel group that are configured in AWS Elemental MediaPackage, including the origin endpoints that are associated with it.

", + "aws.iam#actionPermissionDescription": "Grants permission to list all harvest jobs of a ChannelGroup, Channel, or OriginEndpoint", + "smithy.api#documentation": "

Retrieves a list of harvest jobs that match the specified criteria.

", "smithy.api#examples": [ { - "title": "Listing all Channels", + "title": "ListHarvestJobs: Specify ChannelGroup only", "input": { "ChannelGroupName": "exampleChannelGroup" }, @@ -3541,26 +4720,309 @@ "Items": [ { "ChannelGroupName": "exampleChannelGroup", - "ChannelName": "exampleChannel", - "Description": "Description for exampleChannel", - "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel", - "CreatedAt": "2022-10-18T09:36:00.00Z", - "ModifiedAt": "2022-10-18T09:36:00.00Z" + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName", + "Destination": { + "S3Destination": { + "BucketName": "harvestJobS3DestinationBucket", + "DestinationPath": "manifests" + } + }, + "HarvestJobName": "HarvestJobName", + "HarvestedManifests": { + "HlsManifests": [ + { + "ManifestName": "HlsManifest" + } + ], + "DashManifests": [ + { + "ManifestName": "DashManifest" + } + ], + "LowLatencyHlsManifests": [ + { + "ManifestName": "LowLatencyHlsManifest" + } + ] + }, + "Description": "Example HarvestJob description", + "ScheduleConfiguration": { + "StartTime": "2024-05-28T06:00:00.00Z", + "EndTime": "2024-05-28T12:00:00.00Z" + }, + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannelName/originEndpoint/exampleOriginEndpointName/harvestJob/HarvestJobName", + "CreatedAt": "2024-05-28T09:36:00.00Z", + "ModifiedAt": "2024-05-28T09:36:00.00Z", + "Status": "QUEUED", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "Tags": { + "key1": "value1", + "key2": "value2" + } }, { "ChannelGroupName": "exampleChannelGroup", - "ChannelName": "anotherExampleChannel", - "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/anotherExampleChannel", - "CreatedAt": "2022-10-18T10:36:00.00Z", - "ModifiedAt": "2022-10-18T10:36:00.00Z" + "ChannelName": "exampleChannelName2", + "OriginEndpointName": "exampleOriginEndpointName2", + "Destination": { + "S3Destination": { + "BucketName": "harvestJobS3DestinationBucket", + "DestinationPath": "manifests" + } + }, + "HarvestJobName": "HarvestJobName2", + "HarvestedManifests": { + "HlsManifests": [ + { + "ManifestName": "HlsManifest" + } + ], + "DashManifests": [ + { + "ManifestName": "DashManifest" + } + ], + "LowLatencyHlsManifests": [ + { + "ManifestName": "LowLatencyHlsManifest" + } + ] + }, + "Description": "Example HarvestJob2 description", + "ScheduleConfiguration": { + "StartTime": "2024-05-28T02:00:00.00Z", + "EndTime": "2024-05-28T12:00:00.00Z" + }, + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannelName2/originEndpoint/exampleOriginEndpointName2/harvestJob/HarvestJobName2", + "CreatedAt": "2024-05-28T15:30:00.00Z", + "ModifiedAt": "2024-05-28T15:30:00.00Z", + "Status": "IN_PROGRESS", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "Tags": { + "key1": "value1", + "key2": "value2" + } } - ] + ], + "NextToken": "someTokenValue" + } + }, + { + "title": "ListHarvestJobs: Specify ChannelGroup, Channel only", + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName" + }, + "output": { + "Items": [ + { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName", + "Destination": { + "S3Destination": { + "BucketName": "harvestJobS3DestinationBucket", + "DestinationPath": "manifests" + } + }, + "HarvestJobName": "HarvestJobName", + "HarvestedManifests": { + "HlsManifests": [ + { + "ManifestName": "HlsManifest" + } + ], + "DashManifests": [ + { + "ManifestName": "DashManifest" + } + ], + "LowLatencyHlsManifests": [ + { + "ManifestName": "LowLatencyHlsManifest" + } + ] + }, + "Description": "Example HarvestJob description", + "ScheduleConfiguration": { + "StartTime": "2024-05-28T06:00:00.00Z", + "EndTime": "2024-05-28T12:00:00.00Z" + }, + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannelName/originEndpoint/exampleOriginEndpointName/harvestJob/HarvestJobName", + "CreatedAt": "2024-05-28T09:36:00.00Z", + "ModifiedAt": "2024-05-28T09:36:00.00Z", + "Status": "QUEUED", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName2", + "Destination": { + "S3Destination": { + "BucketName": "harvestJobS3DestinationBucket", + "DestinationPath": "manifests" + } + }, + "HarvestJobName": "HarvestJobName2", + "HarvestedManifests": { + "HlsManifests": [ + { + "ManifestName": "HlsManifest" + } + ], + "DashManifests": [ + { + "ManifestName": "DashManifest" + } + ], + "LowLatencyHlsManifests": [ + { + "ManifestName": "LowLatencyHlsManifest" + } + ] + }, + "Description": "Example HarvestJob2 description", + "ScheduleConfiguration": { + "StartTime": "2024-05-28T02:00:00.00Z", + "EndTime": "2024-05-28T12:00:00.00Z" + }, + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannelName/originEndpoint/exampleOriginEndpointName2/harvestJob/HarvestJobName2", + "CreatedAt": "2024-05-28T15:30:00.00Z", + "ModifiedAt": "2024-05-28T15:30:00.00Z", + "Status": "IN_PROGRESS", + "Tags": { + "key1": "value1", + "key2": "value2" + } + } + ], + "NextToken": "someTokenValue" + } + }, + { + "title": "ListHarvestJobs: Specify ChannelGroup, Channel, OriginEndpoint", + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName" + }, + "output": { + "Items": [ + { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName", + "Destination": { + "S3Destination": { + "BucketName": "harvestJobS3DestinationBucket", + "DestinationPath": "manifests" + } + }, + "HarvestJobName": "HarvestJobName", + "HarvestedManifests": { + "HlsManifests": [ + { + "ManifestName": "HlsManifest" + } + ], + "DashManifests": [ + { + "ManifestName": "DashManifest" + } + ], + "LowLatencyHlsManifests": [ + { + "ManifestName": "LowLatencyHlsManifest" + } + ] + }, + "Description": "Example HarvestJob description", + "ScheduleConfiguration": { + "StartTime": "2024-05-28T06:00:00.00Z", + "EndTime": "2024-05-28T12:00:00.00Z" + }, + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannelName/originEndpoint/exampleOriginEndpointName/harvestJob/HarvestJobName", + "CreatedAt": "2024-05-28T09:36:00.00Z", + "ModifiedAt": "2024-05-28T09:36:00.00Z", + "Status": "QUEUED", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=" + } + ], + "NextToken": "someTokenValue" + } + }, + { + "title": "ListHarvestJobs: Specify ChannelGroup, Channel, OriginEndpoint + Status filter", + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName", + "Status": "QUEUED" + }, + "output": { + "Items": [ + { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName", + "Destination": { + "S3Destination": { + "BucketName": "harvestJobS3DestinationBucket", + "DestinationPath": "manifests" + } + }, + "HarvestJobName": "HarvestJobName", + "HarvestedManifests": { + "HlsManifests": [ + { + "ManifestName": "HlsManifest" + } + ], + "DashManifests": [ + { + "ManifestName": "DashManifest" + } + ], + "LowLatencyHlsManifests": [ + { + "ManifestName": "LowLatencyHlsManifest" + } + ] + }, + "Description": "Example HarvestJob description", + "ScheduleConfiguration": { + "StartTime": "2024-05-28T06:00:00.00Z", + "EndTime": "2024-05-28T12:00:00.00Z" + }, + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannelName/originEndpoint/exampleOriginEndpointName/harvestJob/HarvestJobName", + "CreatedAt": "2024-05-28T09:36:00.00Z", + "ModifiedAt": "2024-05-28T09:36:00.00Z", + "Status": "QUEUED", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=" + } + ], + "NextToken": "someTokenValue" } + }, + { + "title": "ListHarvestJobs: Empty response", + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannelName", + "OriginEndpointName": "exampleOriginEndpointName" + }, + "output": {} } ], "smithy.api#http": { "method": "GET", - "uri": "/channelGroup/{ChannelGroupName}/channel", + "uri": "/channelGroup/{ChannelGroupName}/harvestJob", "code": 200 }, "smithy.api#paginated": { @@ -3572,84 +5034,94 @@ "smithy.api#readonly": {} } }, - "com.amazonaws.mediapackagev2#ListChannelsRequest": { + "com.amazonaws.mediapackagev2#ListHarvestJobsRequest": { "type": "structure", "members": { "ChannelGroupName": { "target": "com.amazonaws.mediapackagev2#ResourceName", "traits": { - "smithy.api#documentation": "

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

", + "smithy.api#documentation": "

The name of the channel group to filter the harvest jobs by. If specified, only harvest jobs associated with channels in this group will be returned.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, + "ChannelName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the channel to filter the harvest jobs by. If specified, only harvest jobs associated with this channel will be returned.

", + "smithy.api#httpQuery": "channelName", + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" + } + }, + "OriginEndpointName": { + "target": "com.amazonaws.mediapackagev2#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the origin endpoint to filter the harvest jobs by. If specified, only harvest jobs associated with this origin endpoint will be returned.

", + "smithy.api#httpQuery": "originEndpointName", + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" + } + }, + "Status": { + "target": "com.amazonaws.mediapackagev2#HarvestJobStatus", + "traits": { + "smithy.api#documentation": "

The status to filter the harvest jobs by. If specified, only harvest jobs with this status will be returned.

", + "smithy.api#httpQuery": "includeStatus" + } + }, "MaxResults": { "target": "com.amazonaws.mediapackagev2#ListResourceMaxResults", "traits": { "smithy.api#default": 10, - "smithy.api#documentation": "

The maximum number of results to return in the response.

", - "smithy.api#httpQuery": "maxResults" + "smithy.api#documentation": "

The maximum number of harvest jobs to return in a single request. If not specified, a default value will be used.

", + "smithy.api#httpQuery": "maxResults", + "smithy.api#range": { + "min": 1, + "max": 100 + } } }, "NextToken": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

The pagination token from the GET list request. Use the token to fetch the next page of results.

", + "smithy.api#documentation": "

A token used for pagination. Provide this value in subsequent requests to retrieve the next set of results.

", "smithy.api#httpQuery": "nextToken" } } }, "traits": { + "smithy.api#documentation": "

The request object for listing harvest jobs.

", "smithy.api#input": {} } }, - "com.amazonaws.mediapackagev2#ListChannelsResponse": { + "com.amazonaws.mediapackagev2#ListHarvestJobsResponse": { "type": "structure", "members": { "Items": { - "target": "com.amazonaws.mediapackagev2#ChannelList", + "target": "com.amazonaws.mediapackagev2#HarvestJobsList", "traits": { - "smithy.api#documentation": "

The objects being returned.

" + "smithy.api#documentation": "

An array of harvest job objects that match the specified criteria.

" } }, "NextToken": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

The pagination token from the GET list request.

" + "smithy.api#documentation": "

A token used for pagination. Include this value in subsequent requests to retrieve the next set of results. If null, there are no more results to retrieve.

" } } }, "traits": { + "smithy.api#documentation": "

The response object containing the list of harvest jobs that match the specified criteria.

", "smithy.api#output": {} } }, - "com.amazonaws.mediapackagev2#ListDashManifestConfiguration": { - "type": "structure", - "members": { - "ManifestName": { - "target": "com.amazonaws.mediapackagev2#ResourceName", - "traits": { - "smithy.api#documentation": "

A short string that's appended to the endpoint URL. The manifest name creates a unique path to this endpoint. If you don't enter a value, MediaPackage uses the default manifest name, index.

", - "smithy.api#required": {} - } - }, - "Url": { - "target": "smithy.api#String", - "traits": { - "smithy.api#documentation": "

The egress domain URL for stream delivery from MediaPackage.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

List the DASH manifest configuration.

" - } - }, - "com.amazonaws.mediapackagev2#ListDashManifests": { - "type": "list", - "member": { - "target": "com.amazonaws.mediapackagev2#ListDashManifestConfiguration" - } - }, "com.amazonaws.mediapackagev2#ListHlsManifestConfiguration": { "type": "structure", "members": { @@ -4528,7 +6000,54 @@ "traits": { "smithy.api#enumValue": "ORIGIN_ENDPOINT" } + }, + "HARVEST_JOB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HARVEST_JOB" + } + } + } + }, + "com.amazonaws.mediapackagev2#S3BucketName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + } + } + }, + "com.amazonaws.mediapackagev2#S3DestinationConfig": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.mediapackagev2#S3BucketName", + "traits": { + "smithy.api#documentation": "

The name of an S3 bucket within which harvested content will be exported.

", + "smithy.api#required": {} + } + }, + "DestinationPath": { + "target": "com.amazonaws.mediapackagev2#S3DestinationPath", + "traits": { + "smithy.api#documentation": "

The path within the specified S3 bucket where the harvested content will be placed.

", + "smithy.api#required": {} + } } + }, + "traits": { + "smithy.api#documentation": "

Configuration parameters for where in an S3 bucket to place the harvested content.

" + } + }, + "com.amazonaws.mediapackagev2#S3DestinationPath": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^[\\S]+$" } }, "com.amazonaws.mediapackagev2#Scte": { @@ -6036,6 +7555,54 @@ "smithy.api#enumValue": "SOURCE_DISRUPTIONS_ENABLED_INCORRECTLY" } }, + "HARVESTED_MANIFEST_HAS_START_END_FILTER_CONFIGURATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HARVESTED_MANIFEST_HAS_START_END_FILTER_CONFIGURATION" + } + }, + "HARVESTED_MANIFEST_NOT_FOUND_ON_ENDPOINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HARVESTED_MANIFEST_NOT_FOUND_ON_ENDPOINT" + } + }, + "TOO_MANY_IN_PROGRESS_HARVEST_JOBS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TOO_MANY_IN_PROGRESS_HARVEST_JOBS" + } + }, + "HARVEST_JOB_INELIGIBLE_FOR_CANCELLATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HARVEST_JOB_INELIGIBLE_FOR_CANCELLATION" + } + }, + "INVALID_HARVEST_JOB_DURATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_HARVEST_JOB_DURATION" + } + }, + "HARVEST_JOB_S3_DESTINATION_MISSING_OR_INCOMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HARVEST_JOB_S3_DESTINATION_MISSING_OR_INCOMPLETE" + } + }, + "HARVEST_JOB_UNABLE_TO_WRITE_TO_S3_DESTINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HARVEST_JOB_UNABLE_TO_WRITE_TO_S3_DESTINATION" + } + }, + "HARVEST_JOB_CUSTOMER_ENDPOINT_READ_ACCESS_DENIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HARVEST_JOB_CUSTOMER_ENDPOINT_READ_ACCESS_DENIED" + } + }, "CLIP_START_TIME_WITH_START_OR_END": { "target": "smithy.api#Unit", "traits": {