Skip to content

Commit 4ce40b0

Browse files
author
awstools
committed
feat(client-forecast): Introduced a new field in Auto Predictor as Time Alignment Boundary. It helps in aligning the timestamps generated during Forecast exports
1 parent 8c98a71 commit 4ce40b0

File tree

5 files changed

+283
-5
lines changed

5 files changed

+283
-5
lines changed

clients/client-forecast/src/Forecast.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,8 @@ export class Forecast extends ForecastClient {
22472247
/**
22482248
* <p>Returns a list of the monitoring evaluation results and predictor events collected by
22492249
* the monitor resource during different windows of time.</p>
2250-
* <p>For information about monitoring see <a href="https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html">Viewing Monitoring Results</a>. For more information about retrieving monitoring results see <a href="https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html">Viewing Monitoring Results</a>.</p>
2250+
* <p>For information about monitoring see <a>predictor-monitoring</a>. For
2251+
* more information about retrieving monitoring results see <a href="https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html">Viewing Monitoring Results</a>.</p>
22512252
*/
22522253
public listMonitorEvaluations(
22532254
args: ListMonitorEvaluationsCommandInput,

clients/client-forecast/src/commands/ListMonitorEvaluationsCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export interface ListMonitorEvaluationsCommandOutput extends ListMonitorEvaluati
2525
/**
2626
* <p>Returns a list of the monitoring evaluation results and predictor events collected by
2727
* the monitor resource during different windows of time.</p>
28-
* <p>For information about monitoring see <a href="https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html">Viewing Monitoring Results</a>. For more information about retrieving monitoring results see <a href="https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html">Viewing Monitoring Results</a>.</p>
28+
* <p>For information about monitoring see <a>predictor-monitoring</a>. For
29+
* more information about retrieving monitoring results see <a href="https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html">Viewing Monitoring Results</a>.</p>
2930
* @example
3031
* Use a bare-bones client and the command you need to make an API call.
3132
* ```javascript

clients/client-forecast/src/models/models_0.ts

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,74 @@ export namespace Tag {
506506
});
507507
}
508508

509+
export enum DayOfWeek {
510+
FRIDAY = "FRIDAY",
511+
MONDAY = "MONDAY",
512+
SATURDAY = "SATURDAY",
513+
SUNDAY = "SUNDAY",
514+
THURSDAY = "THURSDAY",
515+
TUESDAY = "TUESDAY",
516+
WEDNESDAY = "WEDNESDAY",
517+
}
518+
519+
export enum Month {
520+
APRIL = "APRIL",
521+
AUGUST = "AUGUST",
522+
DECEMBER = "DECEMBER",
523+
FEBRUARY = "FEBRUARY",
524+
JANUARY = "JANUARY",
525+
JULY = "JULY",
526+
JUNE = "JUNE",
527+
MARCH = "MARCH",
528+
MAY = "MAY",
529+
NOVEMBER = "NOVEMBER",
530+
OCTOBER = "OCTOBER",
531+
SEPTEMBER = "SEPTEMBER",
532+
}
533+
534+
/**
535+
* <p>The time boundary Forecast uses to align and aggregate your data to match your forecast frequency. Provide the unit of time and the time boundary as a key value pair. If you
536+
* don't provide a time boundary, Forecast uses a set of <a href="https://docs.aws.amazon.com/forecast/latest/dg/data-aggregation.html#default-time-boundaries">Default Time Boundaries</a>.
537+
* </p>
538+
*
539+
* <p>For more information about aggregation,
540+
* see <a href="https://docs.aws.amazon.com/forecast/latest/dg/data-aggregation.html">Data Aggregation for Different Forecast Frequencies</a>.
541+
* For more information setting a custom time boundary,
542+
* see <a href="https://docs.aws.amazon.com/forecast/latest/dg/data-aggregation.html#specifying-time-boundary">Specifying a Time Boundary</a>.
543+
*
544+
* </p>
545+
*/
546+
export interface TimeAlignmentBoundary {
547+
/**
548+
* <p>The month to use for time alignment during aggregation. The month must be in uppercase.</p>
549+
*/
550+
Month?: Month | string;
551+
552+
/**
553+
* <p>The day of the month to use for time alignment during aggregation.</p>
554+
*/
555+
DayOfMonth?: number;
556+
557+
/**
558+
* <p>The day of week to use for time alignment during aggregation. The day must be in uppercase.</p>
559+
*/
560+
DayOfWeek?: DayOfWeek | string;
561+
562+
/**
563+
* <p>The hour of day to use for time alignment during aggregation.</p>
564+
*/
565+
Hour?: number;
566+
}
567+
568+
export namespace TimeAlignmentBoundary {
569+
/**
570+
* @internal
571+
*/
572+
export const filterSensitiveLog = (obj: TimeAlignmentBoundary): any => ({
573+
...obj,
574+
});
575+
}
576+
509577
export interface CreateAutoPredictorRequest {
510578
/**
511579
* <p>A unique name for the predictor</p>
@@ -627,6 +695,14 @@ export interface CreateAutoPredictorRequest {
627695
* For more information, see <a href="https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring.html">Predictor Monitoring</a>.</p>
628696
*/
629697
MonitorConfig?: MonitorConfig;
698+
699+
/**
700+
* <p>The time boundary Forecast uses to align and aggregate any data that doesn't align with your forecast frequency. Provide the unit of time and the time boundary as a key value pair.
701+
* For more information on specifying a time boundary, see <a href="https://docs.aws.amazon.com/forecast/latest/dg/data-aggregation.html#specifying-time-boundary">Specifying a Time Boundary</a>.
702+
* If you
703+
* don't provide a time boundary, Forecast uses a set of <a href="https://docs.aws.amazon.com/forecast/latest/dg/data-aggregation.html#default-time-boundaries">Default Time Boundaries</a>.</p>
704+
*/
705+
TimeAlignmentBoundary?: TimeAlignmentBoundary;
630706
}
631707

632708
export namespace CreateAutoPredictorRequest {
@@ -3255,6 +3331,11 @@ export interface DescribeAutoPredictorResponse {
32553331
* <p>A object with the Amazon Resource Name (ARN) and status of the monitor resource.</p>
32563332
*/
32573333
MonitorInfo?: MonitorInfo;
3334+
3335+
/**
3336+
* <p>The time boundary Forecast uses when aggregating data.</p>
3337+
*/
3338+
TimeAlignmentBoundary?: TimeAlignmentBoundary;
32583339
}
32593340

32603341
export namespace DescribeAutoPredictorResponse {
@@ -6355,8 +6436,16 @@ export namespace PredictorEvent {
63556436
* <p>Describes the results of a monitor evaluation.</p>
63566437
*/
63576438
export interface PredictorMonitorEvaluation {
6439+
/**
6440+
* <p>The Amazon Resource Name (ARN) of the resource to monitor.</p>
6441+
*/
63586442
ResourceArn?: string;
6443+
6444+
/**
6445+
* <p>The Amazon Resource Name (ARN) of the monitor resource.</p>
6446+
*/
63596447
MonitorArn?: string;
6448+
63606449
/**
63616450
* <p>The timestamp that indicates when the monitor evaluation was started. </p>
63626451
*/

clients/client-forecast/src/protocols/Aws_json1_1.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ import {
289289
TagResourceRequest,
290290
TagResourceResponse,
291291
TestWindowSummary,
292+
TimeAlignmentBoundary,
292293
UntagResourceRequest,
293294
UntagResourceResponse,
294295
UpdateDatasetGroupRequest,
@@ -3637,6 +3638,10 @@ const serializeAws_json1_1CreateAutoPredictorRequest = (
36373638
...(input.ReferencePredictorArn !== undefined &&
36383639
input.ReferencePredictorArn !== null && { ReferencePredictorArn: input.ReferencePredictorArn }),
36393640
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1Tags(input.Tags, context) }),
3641+
...(input.TimeAlignmentBoundary !== undefined &&
3642+
input.TimeAlignmentBoundary !== null && {
3643+
TimeAlignmentBoundary: serializeAws_json1_1TimeAlignmentBoundary(input.TimeAlignmentBoundary, context),
3644+
}),
36403645
};
36413646
};
36423647

@@ -4494,6 +4499,15 @@ const serializeAws_json1_1Tags = (input: Tag[], context: __SerdeContext): any =>
44944499
});
44954500
};
44964501

4502+
const serializeAws_json1_1TimeAlignmentBoundary = (input: TimeAlignmentBoundary, context: __SerdeContext): any => {
4503+
return {
4504+
...(input.DayOfMonth !== undefined && input.DayOfMonth !== null && { DayOfMonth: input.DayOfMonth }),
4505+
...(input.DayOfWeek !== undefined && input.DayOfWeek !== null && { DayOfWeek: input.DayOfWeek }),
4506+
...(input.Hour !== undefined && input.Hour !== null && { Hour: input.Hour }),
4507+
...(input.Month !== undefined && input.Month !== null && { Month: input.Month }),
4508+
};
4509+
};
4510+
44974511
const serializeAws_json1_1TrainingParameters = (input: { [key: string]: string }, context: __SerdeContext): any => {
44984512
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
44994513
if (value === null) {
@@ -4967,6 +4981,10 @@ const deserializeAws_json1_1DescribeAutoPredictorResponse = (
49674981
? deserializeAws_json1_1ReferencePredictorSummary(output.ReferencePredictorSummary, context)
49684982
: undefined,
49694983
Status: __expectString(output.Status),
4984+
TimeAlignmentBoundary:
4985+
output.TimeAlignmentBoundary !== undefined && output.TimeAlignmentBoundary !== null
4986+
? deserializeAws_json1_1TimeAlignmentBoundary(output.TimeAlignmentBoundary, context)
4987+
: undefined,
49704988
} as any;
49714989
};
49724990

@@ -6284,6 +6302,15 @@ const deserializeAws_json1_1TestWindowSummary = (output: any, context: __SerdeCo
62846302
} as any;
62856303
};
62866304

6305+
const deserializeAws_json1_1TimeAlignmentBoundary = (output: any, context: __SerdeContext): TimeAlignmentBoundary => {
6306+
return {
6307+
DayOfMonth: __expectInt32(output.DayOfMonth),
6308+
DayOfWeek: __expectString(output.DayOfWeek),
6309+
Hour: __expectInt32(output.Hour),
6310+
Month: __expectString(output.Month),
6311+
} as any;
6312+
};
6313+
62876314
const deserializeAws_json1_1TrainingParameters = (output: any, context: __SerdeContext): { [key: string]: string } => {
62886315
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
62896316
if (value === null) {

0 commit comments

Comments
 (0)