Skip to content

Commit 00f4588

Browse files
author
awstools
committedFeb 3, 2025
feat(client-mediatailor): Add support for CloudWatch Vended Logs which allows for delivery of customer logs to CloudWatch Logs, S3, or Firehose.
1 parent 11f3c3c commit 00f4588

File tree

7 files changed

+110
-10
lines changed

7 files changed

+110
-10
lines changed
 

‎clients/client-mediatailor/src/commands/ConfigureLogsForPlaybackConfigurationCommand.ts

+6
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,18 @@ export interface ConfigureLogsForPlaybackConfigurationCommandOutput
4747
* const input = { // ConfigureLogsForPlaybackConfigurationRequest
4848
* PercentEnabled: Number("int"), // required
4949
* PlaybackConfigurationName: "STRING_VALUE", // required
50+
* EnabledLoggingStrategies: [ // __listOfLoggingStrategies
51+
* "VENDED_LOGS" || "LEGACY_CLOUDWATCH",
52+
* ],
5053
* };
5154
* const command = new ConfigureLogsForPlaybackConfigurationCommand(input);
5255
* const response = await client.send(command);
5356
* // { // ConfigureLogsForPlaybackConfigurationResponse
5457
* // PercentEnabled: Number("int"), // required
5558
* // PlaybackConfigurationName: "STRING_VALUE",
59+
* // EnabledLoggingStrategies: [ // __listOfLoggingStrategies
60+
* // "VENDED_LOGS" || "LEGACY_CLOUDWATCH",
61+
* // ],
5662
* // };
5763
*
5864
* ```

‎clients/client-mediatailor/src/commands/GetPlaybackConfigurationCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ export interface GetPlaybackConfigurationCommandOutput extends GetPlaybackConfig
7575
* // },
7676
* // LogConfiguration: { // LogConfiguration
7777
* // PercentEnabled: Number("int"), // required
78+
* // EnabledLoggingStrategies: [ // __listOfLoggingStrategies
79+
* // "VENDED_LOGS" || "LEGACY_CLOUDWATCH",
80+
* // ],
7881
* // },
7982
* // ManifestProcessingRules: { // ManifestProcessingRules
8083
* // AdMarkerPassthrough: { // AdMarkerPassthrough

‎clients/client-mediatailor/src/commands/ListPlaybackConfigurationsCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ export interface ListPlaybackConfigurationsCommandOutput extends ListPlaybackCon
7878
* // },
7979
* // LogConfiguration: { // LogConfiguration
8080
* // PercentEnabled: Number("int"), // required
81+
* // EnabledLoggingStrategies: [ // __listOfLoggingStrategies
82+
* // "VENDED_LOGS" || "LEGACY_CLOUDWATCH",
83+
* // ],
8184
* // },
8285
* // ManifestProcessingRules: { // ManifestProcessingRules
8386
* // AdMarkerPassthrough: { // AdMarkerPassthrough

‎clients/client-mediatailor/src/commands/PutPlaybackConfigurationCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ export interface PutPlaybackConfigurationCommandOutput extends PutPlaybackConfig
118118
* // },
119119
* // LogConfiguration: { // LogConfiguration
120120
* // PercentEnabled: Number("int"), // required
121+
* // EnabledLoggingStrategies: [ // __listOfLoggingStrategies
122+
* // "VENDED_LOGS" || "LEGACY_CLOUDWATCH",
123+
* // ],
121124
* // },
122125
* // ManifestProcessingRules: { // ManifestProcessingRules
123126
* // AdMarkerPassthrough: { // AdMarkerPassthrough

‎clients/client-mediatailor/src/models/models_0.ts

+42-5
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,20 @@ export interface LiveSource {
666666
Tags?: Record<string, string> | undefined;
667667
}
668668

669+
/**
670+
* @public
671+
* @enum
672+
*/
673+
export const LoggingStrategy = {
674+
LEGACY_CLOUDWATCH: "LEGACY_CLOUDWATCH",
675+
VENDED_LOGS: "VENDED_LOGS",
676+
} as const;
677+
678+
/**
679+
* @public
680+
*/
681+
export type LoggingStrategy = (typeof LoggingStrategy)[keyof typeof LoggingStrategy];
682+
669683
/**
670684
* @public
671685
* @enum
@@ -687,7 +701,10 @@ export type StreamingMediaFileConditioning =
687701
*/
688702
export interface AdConditioningConfiguration {
689703
/**
690-
* <p>For ads that have media files with streaming delivery, indicates what transcoding action MediaTailor it first receives these ads from the ADS. <code>TRANSCODE</code> indicates that MediaTailor must transcode the ads. <code>NONE</code> indicates that you have already transcoded the ads outside of MediaTailor and don't need them transcoded as part of the ad insertion workflow. For more information about ad conditioning see <a href="https://docs.aws.amazon.com/precondition-ads.html">https://docs.aws.amazon.com/precondition-ads.html</a>.</p>
704+
* <p>For ads that have media files with streaming delivery and supported file extensions, indicates what transcoding action MediaTailor takes when it first receives these ads from the ADS.
705+
* <code>TRANSCODE</code> indicates that MediaTailor must transcode the ads.
706+
* <code>NONE</code> indicates that you have already transcoded the ads outside of MediaTailor and don't need them transcoded as part of the ad insertion workflow.
707+
* For more information about ad conditioning see <a href="https://docs.aws.amazon.com/precondition-ads.html">https://docs.aws.amazon.com/precondition-ads.html</a>.</p>
691708
* @public
692709
*/
693710
StreamingMediaFileConditioning: StreamingMediaFileConditioning | undefined;
@@ -876,6 +893,12 @@ export interface LogConfiguration {
876893
* @public
877894
*/
878895
PercentEnabled: number | undefined;
896+
897+
/**
898+
* <p>The method used for collecting logs from AWS Elemental MediaTailor. <code>LEGACY_CLOUDWATCH</code> indicates that MediaTailor is sending logs directly to Amazon CloudWatch Logs. <code>VENDED_LOGS</code> indicates that MediaTailor is sending logs to CloudWatch, which then vends the logs to your destination of choice. Supported destinations are CloudWatch Logs log group, Amazon S3 bucket, and Amazon Data Firehose stream. </p>
899+
* @public
900+
*/
901+
EnabledLoggingStrategies?: LoggingStrategy[] | undefined;
879902
}
880903

881904
/**
@@ -1030,7 +1053,7 @@ export interface PlaybackConfiguration {
10301053
VideoContentSourceUrl?: string | undefined;
10311054

10321055
/**
1033-
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns.</p>
1056+
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns, and what priority MediaTailor uses when inserting ads.</p>
10341057
* @public
10351058
*/
10361059
AdConditioningConfiguration?: AdConditioningConfiguration | undefined;
@@ -2669,6 +2692,14 @@ export interface ConfigureLogsForPlaybackConfigurationRequest {
26692692
* @public
26702693
*/
26712694
PlaybackConfigurationName: string | undefined;
2695+
2696+
/**
2697+
* <p>The method used for collecting logs from AWS Elemental MediaTailor. To configure MediaTailor to send logs directly to Amazon CloudWatch Logs, choose <code>LEGACY_CLOUDWATCH</code>. To configure MediaTailor to
2698+
* send logs to CloudWatch, which then vends the logs to your destination of choice, choose <code>VENDED_LOGS</code>. Supported destinations are CloudWatch Logs log group, Amazon S3 bucket, and Amazon Data Firehose stream.</p>
2699+
* <p>To use vended logs, you must configure the delivery destination in Amazon CloudWatch, as described in <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions-V2">Enable logging from AWS services, Logging that requires additional permissions [V2]</a>.</p>
2700+
* @public
2701+
*/
2702+
EnabledLoggingStrategies?: LoggingStrategy[] | undefined;
26722703
}
26732704

26742705
/**
@@ -2686,6 +2717,12 @@ export interface ConfigureLogsForPlaybackConfigurationResponse {
26862717
* @public
26872718
*/
26882719
PlaybackConfigurationName?: string | undefined;
2720+
2721+
/**
2722+
* <p>The method used for collecting logs from AWS Elemental MediaTailor. <code>LEGACY_CLOUDWATCH</code> indicates that MediaTailor is sending logs directly to Amazon CloudWatch Logs. <code>VENDED_LOGS</code> indicates that MediaTailor is sending logs to CloudWatch, which then vends the logs to your destination of choice. Supported destinations are CloudWatch Logs log group, Amazon S3 bucket, and Amazon Data Firehose stream. </p>
2723+
* @public
2724+
*/
2725+
EnabledLoggingStrategies?: LoggingStrategy[] | undefined;
26892726
}
26902727

26912728
/**
@@ -3472,7 +3509,7 @@ export interface GetPlaybackConfigurationResponse {
34723509
VideoContentSourceUrl?: string | undefined;
34733510

34743511
/**
3475-
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns. </p>
3512+
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns, and what priority MediaTailor uses when inserting ads. </p>
34763513
* @public
34773514
*/
34783515
AdConditioningConfiguration?: AdConditioningConfiguration | undefined;
@@ -3960,7 +3997,7 @@ export interface PutPlaybackConfigurationRequest {
39603997
VideoContentSourceUrl?: string | undefined;
39613998

39623999
/**
3963-
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns.</p>
4000+
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns, and what priority MediaTailor uses when inserting ads. </p>
39644001
* @public
39654002
*/
39664003
AdConditioningConfiguration?: AdConditioningConfiguration | undefined;
@@ -4091,7 +4128,7 @@ export interface PutPlaybackConfigurationResponse {
40914128
VideoContentSourceUrl?: string | undefined;
40924129

40934130
/**
4094-
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns.</p>
4131+
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns, and what priority MediaTailor uses when inserting ads. </p>
40954132
* @public
40964133
*/
40974134
AdConditioningConfiguration?: AdConditioningConfiguration | undefined;

‎clients/client-mediatailor/src/protocols/Aws_restJson1.ts

+7
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ import {
146146
KeyValuePair,
147147
LivePreRollConfiguration,
148148
LiveSource,
149+
LoggingStrategy,
149150
LogType,
150151
ManifestProcessingRules,
151152
PlaybackConfiguration,
@@ -208,6 +209,7 @@ export const se_ConfigureLogsForPlaybackConfigurationCommand = async (
208209
let body: any;
209210
body = JSON.stringify(
210211
take(input, {
212+
EnabledLoggingStrategies: (_) => _json(_),
211213
PercentEnabled: [],
212214
PlaybackConfigurationName: [],
213215
})
@@ -1118,6 +1120,7 @@ export const de_ConfigureLogsForPlaybackConfigurationCommand = async (
11181120
});
11191121
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
11201122
const doc = take(data, {
1123+
EnabledLoggingStrategies: _json,
11211124
PercentEnabled: __expectInt32,
11221125
PlaybackConfigurationName: __expectString,
11231126
});
@@ -2190,6 +2193,8 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont
21902193

21912194
// se___listOfAvailMatchingCriteria omitted.
21922195

2196+
// se___listOfLoggingStrategies omitted.
2197+
21932198
// se___listOfSegmentDeliveryConfiguration omitted.
21942199

21952200
// se___mapOf__string omitted.
@@ -2342,6 +2347,8 @@ const de___listOfLiveSource = (output: any, context: __SerdeContext): LiveSource
23422347
return retVal;
23432348
};
23442349

2350+
// de___listOfLoggingStrategies omitted.
2351+
23452352
/**
23462353
* deserializeAws_restJson1__listOfPlaybackConfiguration
23472354
*/

‎codegen/sdk-codegen/aws-models/mediatailor.json

+46-5
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"StreamingMediaFileConditioning": {
128128
"target": "com.amazonaws.mediatailor#StreamingMediaFileConditioning",
129129
"traits": {
130-
"smithy.api#documentation": "<p>For ads that have media files with streaming delivery, indicates what transcoding action MediaTailor it first receives these ads from the ADS. <code>TRANSCODE</code> indicates that MediaTailor must transcode the ads. <code>NONE</code> indicates that you have already transcoded the ads outside of MediaTailor and don't need them transcoded as part of the ad insertion workflow. For more information about ad conditioning see <a href=\"https://docs.aws.amazon.com/precondition-ads.html\">https://docs.aws.amazon.com/precondition-ads.html</a>.</p>",
130+
"smithy.api#documentation": "<p>For ads that have media files with streaming delivery and supported file extensions, indicates what transcoding action MediaTailor takes when it first receives these ads from the ADS. \n <code>TRANSCODE</code> indicates that MediaTailor must transcode the ads. \n <code>NONE</code> indicates that you have already transcoded the ads outside of MediaTailor and don't need them transcoded as part of the ad insertion workflow. \n For more information about ad conditioning see <a href=\"https://docs.aws.amazon.com/precondition-ads.html\">https://docs.aws.amazon.com/precondition-ads.html</a>.</p>",
131131
"smithy.api#required": {}
132132
}
133133
}
@@ -754,6 +754,12 @@
754754
"smithy.api#documentation": "<p>The name of the playback configuration.</p>",
755755
"smithy.api#required": {}
756756
}
757+
},
758+
"EnabledLoggingStrategies": {
759+
"target": "com.amazonaws.mediatailor#__listOfLoggingStrategies",
760+
"traits": {
761+
"smithy.api#documentation": "<p>The method used for collecting logs from AWS Elemental MediaTailor. To configure MediaTailor to send logs directly to Amazon CloudWatch Logs, choose <code>LEGACY_CLOUDWATCH</code>. To configure MediaTailor to \n send logs to CloudWatch, which then vends the logs to your destination of choice, choose <code>VENDED_LOGS</code>. Supported destinations are CloudWatch Logs log group, Amazon S3 bucket, and Amazon Data Firehose stream.</p>\n <p>To use vended logs, you must configure the delivery destination in Amazon CloudWatch, as described in <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions-V2\">Enable logging from AWS services, Logging that requires additional permissions [V2]</a>.</p>"
762+
}
757763
}
758764
},
759765
"traits": {
@@ -776,6 +782,12 @@
776782
"traits": {
777783
"smithy.api#documentation": "<p>The name of the playback configuration.</p>"
778784
}
785+
},
786+
"EnabledLoggingStrategies": {
787+
"target": "com.amazonaws.mediatailor#__listOfLoggingStrategies",
788+
"traits": {
789+
"smithy.api#documentation": "<p>The method used for collecting logs from AWS Elemental MediaTailor. <code>LEGACY_CLOUDWATCH</code> indicates that MediaTailor is sending logs directly to Amazon CloudWatch Logs. <code>VENDED_LOGS</code> indicates that MediaTailor is sending logs to CloudWatch, which then vends the logs to your destination of choice. Supported destinations are CloudWatch Logs log group, Amazon S3 bucket, and Amazon Data Firehose stream. </p>"
790+
}
779791
}
780792
}
781793
},
@@ -2731,7 +2743,7 @@
27312743
"AdConditioningConfiguration": {
27322744
"target": "com.amazonaws.mediatailor#AdConditioningConfiguration",
27332745
"traits": {
2734-
"smithy.api#documentation": "<p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns. </p>"
2746+
"smithy.api#documentation": "<p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns, and what priority MediaTailor uses when inserting ads. </p>"
27352747
}
27362748
}
27372749
}
@@ -3575,6 +3587,12 @@
35753587
"smithy.api#documentation": "<p>The percentage of session logs that MediaTailor sends to your configured log destination. For example, if your playback configuration has 1000 sessions and <code>percentEnabled</code> is set to <code>60</code>, MediaTailor sends logs for 600 of the sessions to CloudWatch Logs. MediaTailor decides at random which of the playback configuration sessions to send logs for. If you want to view logs for a specific session, you can use the <a href=\"https://docs.aws.amazon.com/mediatailor/latest/ug/debug-log-mode.html\">debug log mode</a>.</p>\n <p>Valid values: <code>0</code> - <code>100</code>\n </p>",
35763588
"smithy.api#required": {}
35773589
}
3590+
},
3591+
"EnabledLoggingStrategies": {
3592+
"target": "com.amazonaws.mediatailor#__listOfLoggingStrategies",
3593+
"traits": {
3594+
"smithy.api#documentation": "<p>The method used for collecting logs from AWS Elemental MediaTailor. <code>LEGACY_CLOUDWATCH</code> indicates that MediaTailor is sending logs directly to Amazon CloudWatch Logs. <code>VENDED_LOGS</code> indicates that MediaTailor is sending logs to CloudWatch, which then vends the logs to your destination of choice. Supported destinations are CloudWatch Logs log group, Amazon S3 bucket, and Amazon Data Firehose stream. </p>"
3595+
}
35783596
}
35793597
},
35803598
"traits": {
@@ -3612,6 +3630,23 @@
36123630
"target": "com.amazonaws.mediatailor#LogType"
36133631
}
36143632
},
3633+
"com.amazonaws.mediatailor#LoggingStrategy": {
3634+
"type": "enum",
3635+
"members": {
3636+
"VENDED_LOGS": {
3637+
"target": "smithy.api#Unit",
3638+
"traits": {
3639+
"smithy.api#enumValue": "VENDED_LOGS"
3640+
}
3641+
},
3642+
"LEGACY_CLOUDWATCH": {
3643+
"target": "smithy.api#Unit",
3644+
"traits": {
3645+
"smithy.api#enumValue": "LEGACY_CLOUDWATCH"
3646+
}
3647+
}
3648+
}
3649+
},
36153650
"com.amazonaws.mediatailor#ManifestProcessingRules": {
36163651
"type": "structure",
36173652
"members": {
@@ -4617,7 +4652,7 @@
46174652
"AdConditioningConfiguration": {
46184653
"target": "com.amazonaws.mediatailor#AdConditioningConfiguration",
46194654
"traits": {
4620-
"smithy.api#documentation": "<p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns.</p>"
4655+
"smithy.api#documentation": "<p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns, and what priority MediaTailor uses when inserting ads.</p>"
46214656
}
46224657
}
46234658
},
@@ -4997,7 +5032,7 @@
49975032
"AdConditioningConfiguration": {
49985033
"target": "com.amazonaws.mediatailor#AdConditioningConfiguration",
49995034
"traits": {
5000-
"smithy.api#documentation": "<p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns.</p>"
5035+
"smithy.api#documentation": "<p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns, and what priority MediaTailor uses when inserting ads. </p>"
50015036
}
50025037
}
50035038
}
@@ -5130,7 +5165,7 @@
51305165
"AdConditioningConfiguration": {
51315166
"target": "com.amazonaws.mediatailor#AdConditioningConfiguration",
51325167
"traits": {
5133-
"smithy.api#documentation": "<p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns.</p>"
5168+
"smithy.api#documentation": "<p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns, and what priority MediaTailor uses when inserting ads. </p>"
51345169
}
51355170
}
51365171
}
@@ -6717,6 +6752,12 @@
67176752
"target": "com.amazonaws.mediatailor#LiveSource"
67186753
}
67196754
},
6755+
"com.amazonaws.mediatailor#__listOfLoggingStrategies": {
6756+
"type": "list",
6757+
"member": {
6758+
"target": "com.amazonaws.mediatailor#LoggingStrategy"
6759+
}
6760+
},
67206761
"com.amazonaws.mediatailor#__listOfPlaybackConfiguration": {
67216762
"type": "list",
67226763
"member": {

0 commit comments

Comments
 (0)