github.com/aavshr/aws-sdk-go@v1.41.3/service/kinesisvideoarchivedmedia/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package kinesisvideoarchivedmedia 4 5 import ( 6 "fmt" 7 "io" 8 "time" 9 10 "github.com/aavshr/aws-sdk-go/aws" 11 "github.com/aavshr/aws-sdk-go/aws/awsutil" 12 "github.com/aavshr/aws-sdk-go/aws/request" 13 "github.com/aavshr/aws-sdk-go/private/protocol" 14 ) 15 16 const opGetClip = "GetClip" 17 18 // GetClipRequest generates a "aws/request.Request" representing the 19 // client's request for the GetClip operation. The "output" return 20 // value will be populated with the request's response once the request completes 21 // successfully. 22 // 23 // Use "Send" method on the returned Request to send the API call to the service. 24 // the "output" return value is not valid until after Send returns without error. 25 // 26 // See GetClip for more information on using the GetClip 27 // API call, and error handling. 28 // 29 // This method is useful when you want to inject custom logic or configuration 30 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 31 // 32 // 33 // // Example sending a request using the GetClipRequest method. 34 // req, resp := client.GetClipRequest(params) 35 // 36 // err := req.Send() 37 // if err == nil { // resp is now filled 38 // fmt.Println(resp) 39 // } 40 // 41 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetClip 42 func (c *KinesisVideoArchivedMedia) GetClipRequest(input *GetClipInput) (req *request.Request, output *GetClipOutput) { 43 op := &request.Operation{ 44 Name: opGetClip, 45 HTTPMethod: "POST", 46 HTTPPath: "/getClip", 47 } 48 49 if input == nil { 50 input = &GetClipInput{} 51 } 52 53 output = &GetClipOutput{} 54 req = c.newRequest(op, input, output) 55 return 56 } 57 58 // GetClip API operation for Amazon Kinesis Video Streams Archived Media. 59 // 60 // Downloads an MP4 file (clip) containing the archived, on-demand media from 61 // the specified video stream over the specified time range. 62 // 63 // Both the StreamName and the StreamARN parameters are optional, but you must 64 // specify either the StreamName or the StreamARN when invoking this API operation. 65 // 66 // As a prerequisite to using GetCLip API, you must obtain an endpoint using 67 // GetDataEndpoint, specifying GET_CLIP for the APIName parameter. 68 // 69 // An Amazon Kinesis video stream has the following requirements for providing 70 // data through MP4: 71 // 72 // * The media must contain h.264 or h.265 encoded video and, optionally, 73 // AAC or G.711 encoded audio. Specifically, the codec ID of track 1 should 74 // be V_MPEG/ISO/AVC (for h.264) or V_MPEGH/ISO/HEVC (for H.265). Optionally, 75 // the codec ID of track 2 should be A_AAC (for AAC) or A_MS/ACM (for G.711). 76 // 77 // * Data retention must be greater than 0. 78 // 79 // * The video track of each fragment must contain codec private data in 80 // the Advanced Video Coding (AVC) for H.264 format and HEVC for H.265 format. 81 // For more information, see MPEG-4 specification ISO/IEC 14496-15 (https://www.iso.org/standard/55980.html). 82 // For information about adapting stream data to a given format, see NAL 83 // Adaptation Flags (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-reference-nal.html). 84 // 85 // * The audio track (if present) of each fragment must contain codec private 86 // data in the AAC format (AAC specification ISO/IEC 13818-7 (https://www.iso.org/standard/43345.html)) 87 // or the MS Wave format (http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html). 88 // 89 // You can monitor the amount of outgoing data by monitoring the GetClip.OutgoingBytes 90 // Amazon CloudWatch metric. For information about using CloudWatch to monitor 91 // Kinesis Video Streams, see Monitoring Kinesis Video Streams (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/monitoring.html). 92 // For pricing information, see Amazon Kinesis Video Streams Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) 93 // and AWS Pricing (https://aws.amazon.com/pricing/). Charges for outgoing AWS 94 // data apply. 95 // 96 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 97 // with awserr.Error's Code and Message methods to get detailed information about 98 // the error. 99 // 100 // See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's 101 // API operation GetClip for usage and error information. 102 // 103 // Returned Error Types: 104 // * ResourceNotFoundException 105 // GetMedia throws this error when Kinesis Video Streams can't find the stream 106 // that you specified. 107 // 108 // GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error 109 // if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested 110 // for a stream that has no fragments within the requested time range, or if 111 // a session with a PlaybackMode of LIVE is requested for a stream that has 112 // no fragments within the last 30 seconds. 113 // 114 // * InvalidArgumentException 115 // A specified parameter exceeds its restrictions, is not supported, or can't 116 // be used. 117 // 118 // * ClientLimitExceededException 119 // Kinesis Video Streams has throttled the request because you have exceeded 120 // a limit. Try making the call later. For information about limits, see Kinesis 121 // Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). 122 // 123 // * NotAuthorizedException 124 // Status Code: 403, The caller is not authorized to perform an operation on 125 // the given stream, or the token has expired. 126 // 127 // * UnsupportedStreamMediaTypeException 128 // The type of the media (for example, h.264 or h.265 video or ACC or G.711 129 // audio) could not be determined from the codec IDs of the tracks in the first 130 // fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC 131 // and, optionally, the codec ID for track 2 should be A_AAC. 132 // 133 // * MissingCodecPrivateDataException 134 // No codec private data was found in at least one of tracks of the video stream. 135 // 136 // * InvalidCodecPrivateDataException 137 // The codec private data in at least one of the tracks of the video stream 138 // is not valid for this operation. 139 // 140 // * InvalidMediaFrameException 141 // One or more frames in the requested clip could not be parsed based on the 142 // specified codec. 143 // 144 // * NoDataRetentionException 145 // A streaming session was requested for a stream that does not retain data 146 // (that is, has a DataRetentionInHours of 0). 147 // 148 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetClip 149 func (c *KinesisVideoArchivedMedia) GetClip(input *GetClipInput) (*GetClipOutput, error) { 150 req, out := c.GetClipRequest(input) 151 return out, req.Send() 152 } 153 154 // GetClipWithContext is the same as GetClip with the addition of 155 // the ability to pass a context and additional request options. 156 // 157 // See GetClip for details on how to use this API operation. 158 // 159 // The context must be non-nil and will be used for request cancellation. If 160 // the context is nil a panic will occur. In the future the SDK may create 161 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 162 // for more information on using Contexts. 163 func (c *KinesisVideoArchivedMedia) GetClipWithContext(ctx aws.Context, input *GetClipInput, opts ...request.Option) (*GetClipOutput, error) { 164 req, out := c.GetClipRequest(input) 165 req.SetContext(ctx) 166 req.ApplyOptions(opts...) 167 return out, req.Send() 168 } 169 170 const opGetDASHStreamingSessionURL = "GetDASHStreamingSessionURL" 171 172 // GetDASHStreamingSessionURLRequest generates a "aws/request.Request" representing the 173 // client's request for the GetDASHStreamingSessionURL operation. The "output" return 174 // value will be populated with the request's response once the request completes 175 // successfully. 176 // 177 // Use "Send" method on the returned Request to send the API call to the service. 178 // the "output" return value is not valid until after Send returns without error. 179 // 180 // See GetDASHStreamingSessionURL for more information on using the GetDASHStreamingSessionURL 181 // API call, and error handling. 182 // 183 // This method is useful when you want to inject custom logic or configuration 184 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 185 // 186 // 187 // // Example sending a request using the GetDASHStreamingSessionURLRequest method. 188 // req, resp := client.GetDASHStreamingSessionURLRequest(params) 189 // 190 // err := req.Send() 191 // if err == nil { // resp is now filled 192 // fmt.Println(resp) 193 // } 194 // 195 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetDASHStreamingSessionURL 196 func (c *KinesisVideoArchivedMedia) GetDASHStreamingSessionURLRequest(input *GetDASHStreamingSessionURLInput) (req *request.Request, output *GetDASHStreamingSessionURLOutput) { 197 op := &request.Operation{ 198 Name: opGetDASHStreamingSessionURL, 199 HTTPMethod: "POST", 200 HTTPPath: "/getDASHStreamingSessionURL", 201 } 202 203 if input == nil { 204 input = &GetDASHStreamingSessionURLInput{} 205 } 206 207 output = &GetDASHStreamingSessionURLOutput{} 208 req = c.newRequest(op, input, output) 209 return 210 } 211 212 // GetDASHStreamingSessionURL API operation for Amazon Kinesis Video Streams Archived Media. 213 // 214 // Retrieves an MPEG Dynamic Adaptive Streaming over HTTP (DASH) URL for the 215 // stream. You can then open the URL in a media player to view the stream contents. 216 // 217 // Both the StreamName and the StreamARN parameters are optional, but you must 218 // specify either the StreamName or the StreamARN when invoking this API operation. 219 // 220 // An Amazon Kinesis video stream has the following requirements for providing 221 // data through MPEG-DASH: 222 // 223 // * The media must contain h.264 or h.265 encoded video and, optionally, 224 // AAC or G.711 encoded audio. Specifically, the codec ID of track 1 should 225 // be V_MPEG/ISO/AVC (for h.264) or V_MPEGH/ISO/HEVC (for H.265). Optionally, 226 // the codec ID of track 2 should be A_AAC (for AAC) or A_MS/ACM (for G.711). 227 // 228 // * Data retention must be greater than 0. 229 // 230 // * The video track of each fragment must contain codec private data in 231 // the Advanced Video Coding (AVC) for H.264 format and HEVC for H.265 format. 232 // For more information, see MPEG-4 specification ISO/IEC 14496-15 (https://www.iso.org/standard/55980.html). 233 // For information about adapting stream data to a given format, see NAL 234 // Adaptation Flags (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-reference-nal.html). 235 // 236 // * The audio track (if present) of each fragment must contain codec private 237 // data in the AAC format (AAC specification ISO/IEC 13818-7 (https://www.iso.org/standard/43345.html)) 238 // or the MS Wave format (http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html). 239 // 240 // The following procedure shows how to use MPEG-DASH with Kinesis Video Streams: 241 // 242 // Get an endpoint using GetDataEndpoint (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_GetDataEndpoint.html), 243 // specifying GET_DASH_STREAMING_SESSION_URL for the APIName parameter. 244 // 245 // Retrieve the MPEG-DASH URL using GetDASHStreamingSessionURL. Kinesis Video 246 // Streams creates an MPEG-DASH streaming session to be used for accessing content 247 // in a stream using the MPEG-DASH protocol. GetDASHStreamingSessionURL returns 248 // an authenticated URL (that includes an encrypted session token) for the session's 249 // MPEG-DASH manifest (the root resource needed for streaming with MPEG-DASH). 250 // 251 // Don't share or store this token where an unauthorized entity can access it. 252 // The token provides access to the content of the stream. Safeguard the token 253 // with the same measures that you use with your AWS credentials. 254 // 255 // The media that is made available through the manifest consists only of the 256 // requested stream, time range, and format. No other media data (such as frames 257 // outside the requested window or alternate bitrates) is made available. 258 // 259 // Provide the URL (containing the encrypted session token) for the MPEG-DASH 260 // manifest to a media player that supports the MPEG-DASH protocol. Kinesis 261 // Video Streams makes the initialization fragment and media fragments available 262 // through the manifest URL. The initialization fragment contains the codec 263 // private data for the stream, and other data needed to set up the video or 264 // audio decoder and renderer. The media fragments contain encoded video frames 265 // or encoded audio samples. 266 // 267 // The media player receives the authenticated URL and requests stream metadata 268 // and media data normally. When the media player requests data, it calls the 269 // following actions: 270 // 271 // * GetDASHManifest: Retrieves an MPEG DASH manifest, which contains the 272 // metadata for the media that you want to playback. 273 // 274 // * GetMP4InitFragment: Retrieves the MP4 initialization fragment. The media 275 // player typically loads the initialization fragment before loading any 276 // media fragments. This fragment contains the "fytp" and "moov" MP4 atoms, 277 // and the child atoms that are needed to initialize the media player decoder. 278 // The initialization fragment does not correspond to a fragment in a Kinesis 279 // video stream. It contains only the codec private data for the stream and 280 // respective track, which the media player needs to decode the media frames. 281 // 282 // * GetMP4MediaFragment: Retrieves MP4 media fragments. These fragments 283 // contain the "moof" and "mdat" MP4 atoms and their child atoms, containing 284 // the encoded fragment's media frames and their timestamps. After the first 285 // media fragment is made available in a streaming session, any fragments 286 // that don't contain the same codec private data cause an error to be returned 287 // when those different media fragments are loaded. Therefore, the codec 288 // private data should not change between fragments in a session. This also 289 // means that the session fails if the fragments in a stream change from 290 // having only video to having both audio and video. Data retrieved with 291 // this action is billable. See Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) 292 // for details. 293 // 294 // For restrictions that apply to MPEG-DASH sessions, see Kinesis Video Streams 295 // Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). 296 // 297 // You can monitor the amount of data that the media player consumes by monitoring 298 // the GetMP4MediaFragment.OutgoingBytes Amazon CloudWatch metric. For information 299 // about using CloudWatch to monitor Kinesis Video Streams, see Monitoring Kinesis 300 // Video Streams (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/monitoring.html). 301 // For pricing information, see Amazon Kinesis Video Streams Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) 302 // and AWS Pricing (https://aws.amazon.com/pricing/). Charges for both HLS sessions 303 // and outgoing AWS data apply. 304 // 305 // For more information about HLS, see HTTP Live Streaming (https://developer.apple.com/streaming/) 306 // on the Apple Developer site (https://developer.apple.com). 307 // 308 // If an error is thrown after invoking a Kinesis Video Streams archived media 309 // API, in addition to the HTTP status code and the response body, it includes 310 // the following pieces of information: 311 // 312 // * x-amz-ErrorType HTTP header – contains a more specific error type 313 // in addition to what the HTTP status code provides. 314 // 315 // * x-amz-RequestId HTTP header – if you want to report an issue to AWS, 316 // the support team can better diagnose the problem if given the Request 317 // Id. 318 // 319 // Both the HTTP status code and the ErrorType header can be utilized to make 320 // programmatic decisions about whether errors are retry-able and under what 321 // conditions, as well as provide information on what actions the client programmer 322 // might need to take in order to successfully try again. 323 // 324 // For more information, see the Errors section at the bottom of this topic, 325 // as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html). 326 // 327 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 328 // with awserr.Error's Code and Message methods to get detailed information about 329 // the error. 330 // 331 // See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's 332 // API operation GetDASHStreamingSessionURL for usage and error information. 333 // 334 // Returned Error Types: 335 // * ResourceNotFoundException 336 // GetMedia throws this error when Kinesis Video Streams can't find the stream 337 // that you specified. 338 // 339 // GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error 340 // if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested 341 // for a stream that has no fragments within the requested time range, or if 342 // a session with a PlaybackMode of LIVE is requested for a stream that has 343 // no fragments within the last 30 seconds. 344 // 345 // * InvalidArgumentException 346 // A specified parameter exceeds its restrictions, is not supported, or can't 347 // be used. 348 // 349 // * ClientLimitExceededException 350 // Kinesis Video Streams has throttled the request because you have exceeded 351 // a limit. Try making the call later. For information about limits, see Kinesis 352 // Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). 353 // 354 // * NotAuthorizedException 355 // Status Code: 403, The caller is not authorized to perform an operation on 356 // the given stream, or the token has expired. 357 // 358 // * UnsupportedStreamMediaTypeException 359 // The type of the media (for example, h.264 or h.265 video or ACC or G.711 360 // audio) could not be determined from the codec IDs of the tracks in the first 361 // fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC 362 // and, optionally, the codec ID for track 2 should be A_AAC. 363 // 364 // * NoDataRetentionException 365 // A streaming session was requested for a stream that does not retain data 366 // (that is, has a DataRetentionInHours of 0). 367 // 368 // * MissingCodecPrivateDataException 369 // No codec private data was found in at least one of tracks of the video stream. 370 // 371 // * InvalidCodecPrivateDataException 372 // The codec private data in at least one of the tracks of the video stream 373 // is not valid for this operation. 374 // 375 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetDASHStreamingSessionURL 376 func (c *KinesisVideoArchivedMedia) GetDASHStreamingSessionURL(input *GetDASHStreamingSessionURLInput) (*GetDASHStreamingSessionURLOutput, error) { 377 req, out := c.GetDASHStreamingSessionURLRequest(input) 378 return out, req.Send() 379 } 380 381 // GetDASHStreamingSessionURLWithContext is the same as GetDASHStreamingSessionURL with the addition of 382 // the ability to pass a context and additional request options. 383 // 384 // See GetDASHStreamingSessionURL for details on how to use this API operation. 385 // 386 // The context must be non-nil and will be used for request cancellation. If 387 // the context is nil a panic will occur. In the future the SDK may create 388 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 389 // for more information on using Contexts. 390 func (c *KinesisVideoArchivedMedia) GetDASHStreamingSessionURLWithContext(ctx aws.Context, input *GetDASHStreamingSessionURLInput, opts ...request.Option) (*GetDASHStreamingSessionURLOutput, error) { 391 req, out := c.GetDASHStreamingSessionURLRequest(input) 392 req.SetContext(ctx) 393 req.ApplyOptions(opts...) 394 return out, req.Send() 395 } 396 397 const opGetHLSStreamingSessionURL = "GetHLSStreamingSessionURL" 398 399 // GetHLSStreamingSessionURLRequest generates a "aws/request.Request" representing the 400 // client's request for the GetHLSStreamingSessionURL operation. The "output" return 401 // value will be populated with the request's response once the request completes 402 // successfully. 403 // 404 // Use "Send" method on the returned Request to send the API call to the service. 405 // the "output" return value is not valid until after Send returns without error. 406 // 407 // See GetHLSStreamingSessionURL for more information on using the GetHLSStreamingSessionURL 408 // API call, and error handling. 409 // 410 // This method is useful when you want to inject custom logic or configuration 411 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 412 // 413 // 414 // // Example sending a request using the GetHLSStreamingSessionURLRequest method. 415 // req, resp := client.GetHLSStreamingSessionURLRequest(params) 416 // 417 // err := req.Send() 418 // if err == nil { // resp is now filled 419 // fmt.Println(resp) 420 // } 421 // 422 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetHLSStreamingSessionURL 423 func (c *KinesisVideoArchivedMedia) GetHLSStreamingSessionURLRequest(input *GetHLSStreamingSessionURLInput) (req *request.Request, output *GetHLSStreamingSessionURLOutput) { 424 op := &request.Operation{ 425 Name: opGetHLSStreamingSessionURL, 426 HTTPMethod: "POST", 427 HTTPPath: "/getHLSStreamingSessionURL", 428 } 429 430 if input == nil { 431 input = &GetHLSStreamingSessionURLInput{} 432 } 433 434 output = &GetHLSStreamingSessionURLOutput{} 435 req = c.newRequest(op, input, output) 436 return 437 } 438 439 // GetHLSStreamingSessionURL API operation for Amazon Kinesis Video Streams Archived Media. 440 // 441 // Retrieves an HTTP Live Streaming (HLS) URL for the stream. You can then open 442 // the URL in a browser or media player to view the stream contents. 443 // 444 // Both the StreamName and the StreamARN parameters are optional, but you must 445 // specify either the StreamName or the StreamARN when invoking this API operation. 446 // 447 // An Amazon Kinesis video stream has the following requirements for providing 448 // data through HLS: 449 // 450 // * The media must contain h.264 or h.265 encoded video and, optionally, 451 // AAC encoded audio. Specifically, the codec ID of track 1 should be V_MPEG/ISO/AVC 452 // (for h.264) or V_MPEG/ISO/HEVC (for h.265). Optionally, the codec ID of 453 // track 2 should be A_AAC. 454 // 455 // * Data retention must be greater than 0. 456 // 457 // * The video track of each fragment must contain codec private data in 458 // the Advanced Video Coding (AVC) for H.264 format or HEVC for H.265 format 459 // (MPEG-4 specification ISO/IEC 14496-15 (https://www.iso.org/standard/55980.html)). 460 // For information about adapting stream data to a given format, see NAL 461 // Adaptation Flags (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-reference-nal.html). 462 // 463 // * The audio track (if present) of each fragment must contain codec private 464 // data in the AAC format (AAC specification ISO/IEC 13818-7 (https://www.iso.org/standard/43345.html)). 465 // 466 // Kinesis Video Streams HLS sessions contain fragments in the fragmented MPEG-4 467 // form (also called fMP4 or CMAF) or the MPEG-2 form (also called TS chunks, 468 // which the HLS specification also supports). For more information about HLS 469 // fragment types, see the HLS specification (https://tools.ietf.org/html/draft-pantos-http-live-streaming-23). 470 // 471 // The following procedure shows how to use HLS with Kinesis Video Streams: 472 // 473 // Get an endpoint using GetDataEndpoint (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_GetDataEndpoint.html), 474 // specifying GET_HLS_STREAMING_SESSION_URL for the APIName parameter. 475 // 476 // Retrieve the HLS URL using GetHLSStreamingSessionURL. Kinesis Video Streams 477 // creates an HLS streaming session to be used for accessing content in a stream 478 // using the HLS protocol. GetHLSStreamingSessionURL returns an authenticated 479 // URL (that includes an encrypted session token) for the session's HLS master 480 // playlist (the root resource needed for streaming with HLS). 481 // 482 // Don't share or store this token where an unauthorized entity could access 483 // it. The token provides access to the content of the stream. Safeguard the 484 // token with the same measures that you would use with your AWS credentials. 485 // 486 // The media that is made available through the playlist consists only of the 487 // requested stream, time range, and format. No other media data (such as frames 488 // outside the requested window or alternate bitrates) is made available. 489 // 490 // Provide the URL (containing the encrypted session token) for the HLS master 491 // playlist to a media player that supports the HLS protocol. Kinesis Video 492 // Streams makes the HLS media playlist, initialization fragment, and media 493 // fragments available through the master playlist URL. The initialization fragment 494 // contains the codec private data for the stream, and other data needed to 495 // set up the video or audio decoder and renderer. The media fragments contain 496 // H.264-encoded video frames or AAC-encoded audio samples. 497 // 498 // The media player receives the authenticated URL and requests stream metadata 499 // and media data normally. When the media player requests data, it calls the 500 // following actions: 501 // 502 // * GetHLSMasterPlaylist: Retrieves an HLS master playlist, which contains 503 // a URL for the GetHLSMediaPlaylist action for each track, and additional 504 // metadata for the media player, including estimated bitrate and resolution. 505 // 506 // * GetHLSMediaPlaylist: Retrieves an HLS media playlist, which contains 507 // a URL to access the MP4 initialization fragment with the GetMP4InitFragment 508 // action, and URLs to access the MP4 media fragments with the GetMP4MediaFragment 509 // actions. The HLS media playlist also contains metadata about the stream 510 // that the player needs to play it, such as whether the PlaybackMode is 511 // LIVE or ON_DEMAND. The HLS media playlist is typically static for sessions 512 // with a PlaybackType of ON_DEMAND. The HLS media playlist is continually 513 // updated with new fragments for sessions with a PlaybackType of LIVE. There 514 // is a distinct HLS media playlist for the video track and the audio track 515 // (if applicable) that contains MP4 media URLs for the specific track. 516 // 517 // * GetMP4InitFragment: Retrieves the MP4 initialization fragment. The media 518 // player typically loads the initialization fragment before loading any 519 // media fragments. This fragment contains the "fytp" and "moov" MP4 atoms, 520 // and the child atoms that are needed to initialize the media player decoder. 521 // The initialization fragment does not correspond to a fragment in a Kinesis 522 // video stream. It contains only the codec private data for the stream and 523 // respective track, which the media player needs to decode the media frames. 524 // 525 // * GetMP4MediaFragment: Retrieves MP4 media fragments. These fragments 526 // contain the "moof" and "mdat" MP4 atoms and their child atoms, containing 527 // the encoded fragment's media frames and their timestamps. After the first 528 // media fragment is made available in a streaming session, any fragments 529 // that don't contain the same codec private data cause an error to be returned 530 // when those different media fragments are loaded. Therefore, the codec 531 // private data should not change between fragments in a session. This also 532 // means that the session fails if the fragments in a stream change from 533 // having only video to having both audio and video. Data retrieved with 534 // this action is billable. See Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) 535 // for details. 536 // 537 // * GetTSFragment: Retrieves MPEG TS fragments containing both initialization 538 // and media data for all tracks in the stream. If the ContainerFormat is 539 // MPEG_TS, this API is used instead of GetMP4InitFragment and GetMP4MediaFragment 540 // to retrieve stream media. Data retrieved with this action is billable. 541 // For more information, see Kinesis Video Streams pricing (https://aws.amazon.com/kinesis/video-streams/pricing/). 542 // 543 // A streaming session URL must not be shared between players. The service might 544 // throttle a session if multiple media players are sharing it. For connection 545 // limits, see Kinesis Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). 546 // 547 // You can monitor the amount of data that the media player consumes by monitoring 548 // the GetMP4MediaFragment.OutgoingBytes Amazon CloudWatch metric. For information 549 // about using CloudWatch to monitor Kinesis Video Streams, see Monitoring Kinesis 550 // Video Streams (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/monitoring.html). 551 // For pricing information, see Amazon Kinesis Video Streams Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) 552 // and AWS Pricing (https://aws.amazon.com/pricing/). Charges for both HLS sessions 553 // and outgoing AWS data apply. 554 // 555 // For more information about HLS, see HTTP Live Streaming (https://developer.apple.com/streaming/) 556 // on the Apple Developer site (https://developer.apple.com). 557 // 558 // If an error is thrown after invoking a Kinesis Video Streams archived media 559 // API, in addition to the HTTP status code and the response body, it includes 560 // the following pieces of information: 561 // 562 // * x-amz-ErrorType HTTP header – contains a more specific error type 563 // in addition to what the HTTP status code provides. 564 // 565 // * x-amz-RequestId HTTP header – if you want to report an issue to AWS, 566 // the support team can better diagnose the problem if given the Request 567 // Id. 568 // 569 // Both the HTTP status code and the ErrorType header can be utilized to make 570 // programmatic decisions about whether errors are retry-able and under what 571 // conditions, as well as provide information on what actions the client programmer 572 // might need to take in order to successfully try again. 573 // 574 // For more information, see the Errors section at the bottom of this topic, 575 // as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html). 576 // 577 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 578 // with awserr.Error's Code and Message methods to get detailed information about 579 // the error. 580 // 581 // See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's 582 // API operation GetHLSStreamingSessionURL for usage and error information. 583 // 584 // Returned Error Types: 585 // * ResourceNotFoundException 586 // GetMedia throws this error when Kinesis Video Streams can't find the stream 587 // that you specified. 588 // 589 // GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error 590 // if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested 591 // for a stream that has no fragments within the requested time range, or if 592 // a session with a PlaybackMode of LIVE is requested for a stream that has 593 // no fragments within the last 30 seconds. 594 // 595 // * InvalidArgumentException 596 // A specified parameter exceeds its restrictions, is not supported, or can't 597 // be used. 598 // 599 // * ClientLimitExceededException 600 // Kinesis Video Streams has throttled the request because you have exceeded 601 // a limit. Try making the call later. For information about limits, see Kinesis 602 // Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). 603 // 604 // * NotAuthorizedException 605 // Status Code: 403, The caller is not authorized to perform an operation on 606 // the given stream, or the token has expired. 607 // 608 // * UnsupportedStreamMediaTypeException 609 // The type of the media (for example, h.264 or h.265 video or ACC or G.711 610 // audio) could not be determined from the codec IDs of the tracks in the first 611 // fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC 612 // and, optionally, the codec ID for track 2 should be A_AAC. 613 // 614 // * NoDataRetentionException 615 // A streaming session was requested for a stream that does not retain data 616 // (that is, has a DataRetentionInHours of 0). 617 // 618 // * MissingCodecPrivateDataException 619 // No codec private data was found in at least one of tracks of the video stream. 620 // 621 // * InvalidCodecPrivateDataException 622 // The codec private data in at least one of the tracks of the video stream 623 // is not valid for this operation. 624 // 625 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetHLSStreamingSessionURL 626 func (c *KinesisVideoArchivedMedia) GetHLSStreamingSessionURL(input *GetHLSStreamingSessionURLInput) (*GetHLSStreamingSessionURLOutput, error) { 627 req, out := c.GetHLSStreamingSessionURLRequest(input) 628 return out, req.Send() 629 } 630 631 // GetHLSStreamingSessionURLWithContext is the same as GetHLSStreamingSessionURL with the addition of 632 // the ability to pass a context and additional request options. 633 // 634 // See GetHLSStreamingSessionURL for details on how to use this API operation. 635 // 636 // The context must be non-nil and will be used for request cancellation. If 637 // the context is nil a panic will occur. In the future the SDK may create 638 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 639 // for more information on using Contexts. 640 func (c *KinesisVideoArchivedMedia) GetHLSStreamingSessionURLWithContext(ctx aws.Context, input *GetHLSStreamingSessionURLInput, opts ...request.Option) (*GetHLSStreamingSessionURLOutput, error) { 641 req, out := c.GetHLSStreamingSessionURLRequest(input) 642 req.SetContext(ctx) 643 req.ApplyOptions(opts...) 644 return out, req.Send() 645 } 646 647 const opGetMediaForFragmentList = "GetMediaForFragmentList" 648 649 // GetMediaForFragmentListRequest generates a "aws/request.Request" representing the 650 // client's request for the GetMediaForFragmentList operation. The "output" return 651 // value will be populated with the request's response once the request completes 652 // successfully. 653 // 654 // Use "Send" method on the returned Request to send the API call to the service. 655 // the "output" return value is not valid until after Send returns without error. 656 // 657 // See GetMediaForFragmentList for more information on using the GetMediaForFragmentList 658 // API call, and error handling. 659 // 660 // This method is useful when you want to inject custom logic or configuration 661 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 662 // 663 // 664 // // Example sending a request using the GetMediaForFragmentListRequest method. 665 // req, resp := client.GetMediaForFragmentListRequest(params) 666 // 667 // err := req.Send() 668 // if err == nil { // resp is now filled 669 // fmt.Println(resp) 670 // } 671 // 672 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetMediaForFragmentList 673 func (c *KinesisVideoArchivedMedia) GetMediaForFragmentListRequest(input *GetMediaForFragmentListInput) (req *request.Request, output *GetMediaForFragmentListOutput) { 674 op := &request.Operation{ 675 Name: opGetMediaForFragmentList, 676 HTTPMethod: "POST", 677 HTTPPath: "/getMediaForFragmentList", 678 } 679 680 if input == nil { 681 input = &GetMediaForFragmentListInput{} 682 } 683 684 output = &GetMediaForFragmentListOutput{} 685 req = c.newRequest(op, input, output) 686 return 687 } 688 689 // GetMediaForFragmentList API operation for Amazon Kinesis Video Streams Archived Media. 690 // 691 // Gets media for a list of fragments (specified by fragment number) from the 692 // archived data in an Amazon Kinesis video stream. 693 // 694 // You must first call the GetDataEndpoint API to get an endpoint. Then send 695 // the GetMediaForFragmentList requests to this endpoint using the --endpoint-url 696 // parameter (https://docs.aws.amazon.com/cli/latest/reference/). 697 // 698 // For limits, see Kinesis Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). 699 // 700 // If an error is thrown after invoking a Kinesis Video Streams archived media 701 // API, in addition to the HTTP status code and the response body, it includes 702 // the following pieces of information: 703 // 704 // * x-amz-ErrorType HTTP header – contains a more specific error type 705 // in addition to what the HTTP status code provides. 706 // 707 // * x-amz-RequestId HTTP header – if you want to report an issue to AWS, 708 // the support team can better diagnose the problem if given the Request 709 // Id. 710 // 711 // Both the HTTP status code and the ErrorType header can be utilized to make 712 // programmatic decisions about whether errors are retry-able and under what 713 // conditions, as well as provide information on what actions the client programmer 714 // might need to take in order to successfully try again. 715 // 716 // For more information, see the Errors section at the bottom of this topic, 717 // as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html). 718 // 719 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 720 // with awserr.Error's Code and Message methods to get detailed information about 721 // the error. 722 // 723 // See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's 724 // API operation GetMediaForFragmentList for usage and error information. 725 // 726 // Returned Error Types: 727 // * ResourceNotFoundException 728 // GetMedia throws this error when Kinesis Video Streams can't find the stream 729 // that you specified. 730 // 731 // GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error 732 // if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested 733 // for a stream that has no fragments within the requested time range, or if 734 // a session with a PlaybackMode of LIVE is requested for a stream that has 735 // no fragments within the last 30 seconds. 736 // 737 // * InvalidArgumentException 738 // A specified parameter exceeds its restrictions, is not supported, or can't 739 // be used. 740 // 741 // * ClientLimitExceededException 742 // Kinesis Video Streams has throttled the request because you have exceeded 743 // a limit. Try making the call later. For information about limits, see Kinesis 744 // Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). 745 // 746 // * NotAuthorizedException 747 // Status Code: 403, The caller is not authorized to perform an operation on 748 // the given stream, or the token has expired. 749 // 750 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetMediaForFragmentList 751 func (c *KinesisVideoArchivedMedia) GetMediaForFragmentList(input *GetMediaForFragmentListInput) (*GetMediaForFragmentListOutput, error) { 752 req, out := c.GetMediaForFragmentListRequest(input) 753 return out, req.Send() 754 } 755 756 // GetMediaForFragmentListWithContext is the same as GetMediaForFragmentList with the addition of 757 // the ability to pass a context and additional request options. 758 // 759 // See GetMediaForFragmentList for details on how to use this API operation. 760 // 761 // The context must be non-nil and will be used for request cancellation. If 762 // the context is nil a panic will occur. In the future the SDK may create 763 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 764 // for more information on using Contexts. 765 func (c *KinesisVideoArchivedMedia) GetMediaForFragmentListWithContext(ctx aws.Context, input *GetMediaForFragmentListInput, opts ...request.Option) (*GetMediaForFragmentListOutput, error) { 766 req, out := c.GetMediaForFragmentListRequest(input) 767 req.SetContext(ctx) 768 req.ApplyOptions(opts...) 769 return out, req.Send() 770 } 771 772 const opListFragments = "ListFragments" 773 774 // ListFragmentsRequest generates a "aws/request.Request" representing the 775 // client's request for the ListFragments operation. The "output" return 776 // value will be populated with the request's response once the request completes 777 // successfully. 778 // 779 // Use "Send" method on the returned Request to send the API call to the service. 780 // the "output" return value is not valid until after Send returns without error. 781 // 782 // See ListFragments for more information on using the ListFragments 783 // API call, and error handling. 784 // 785 // This method is useful when you want to inject custom logic or configuration 786 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 787 // 788 // 789 // // Example sending a request using the ListFragmentsRequest method. 790 // req, resp := client.ListFragmentsRequest(params) 791 // 792 // err := req.Send() 793 // if err == nil { // resp is now filled 794 // fmt.Println(resp) 795 // } 796 // 797 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ListFragments 798 func (c *KinesisVideoArchivedMedia) ListFragmentsRequest(input *ListFragmentsInput) (req *request.Request, output *ListFragmentsOutput) { 799 op := &request.Operation{ 800 Name: opListFragments, 801 HTTPMethod: "POST", 802 HTTPPath: "/listFragments", 803 Paginator: &request.Paginator{ 804 InputTokens: []string{"NextToken"}, 805 OutputTokens: []string{"NextToken"}, 806 LimitToken: "MaxResults", 807 TruncationToken: "", 808 }, 809 } 810 811 if input == nil { 812 input = &ListFragmentsInput{} 813 } 814 815 output = &ListFragmentsOutput{} 816 req = c.newRequest(op, input, output) 817 return 818 } 819 820 // ListFragments API operation for Amazon Kinesis Video Streams Archived Media. 821 // 822 // Returns a list of Fragment objects from the specified stream and timestamp 823 // range within the archived data. 824 // 825 // Listing fragments is eventually consistent. This means that even if the producer 826 // receives an acknowledgment that a fragment is persisted, the result might 827 // not be returned immediately from a request to ListFragments. However, results 828 // are typically available in less than one second. 829 // 830 // You must first call the GetDataEndpoint API to get an endpoint. Then send 831 // the ListFragments requests to this endpoint using the --endpoint-url parameter 832 // (https://docs.aws.amazon.com/cli/latest/reference/). 833 // 834 // If an error is thrown after invoking a Kinesis Video Streams archived media 835 // API, in addition to the HTTP status code and the response body, it includes 836 // the following pieces of information: 837 // 838 // * x-amz-ErrorType HTTP header – contains a more specific error type 839 // in addition to what the HTTP status code provides. 840 // 841 // * x-amz-RequestId HTTP header – if you want to report an issue to AWS, 842 // the support team can better diagnose the problem if given the Request 843 // Id. 844 // 845 // Both the HTTP status code and the ErrorType header can be utilized to make 846 // programmatic decisions about whether errors are retry-able and under what 847 // conditions, as well as provide information on what actions the client programmer 848 // might need to take in order to successfully try again. 849 // 850 // For more information, see the Errors section at the bottom of this topic, 851 // as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html). 852 // 853 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 854 // with awserr.Error's Code and Message methods to get detailed information about 855 // the error. 856 // 857 // See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's 858 // API operation ListFragments for usage and error information. 859 // 860 // Returned Error Types: 861 // * ResourceNotFoundException 862 // GetMedia throws this error when Kinesis Video Streams can't find the stream 863 // that you specified. 864 // 865 // GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error 866 // if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested 867 // for a stream that has no fragments within the requested time range, or if 868 // a session with a PlaybackMode of LIVE is requested for a stream that has 869 // no fragments within the last 30 seconds. 870 // 871 // * InvalidArgumentException 872 // A specified parameter exceeds its restrictions, is not supported, or can't 873 // be used. 874 // 875 // * ClientLimitExceededException 876 // Kinesis Video Streams has throttled the request because you have exceeded 877 // a limit. Try making the call later. For information about limits, see Kinesis 878 // Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). 879 // 880 // * NotAuthorizedException 881 // Status Code: 403, The caller is not authorized to perform an operation on 882 // the given stream, or the token has expired. 883 // 884 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ListFragments 885 func (c *KinesisVideoArchivedMedia) ListFragments(input *ListFragmentsInput) (*ListFragmentsOutput, error) { 886 req, out := c.ListFragmentsRequest(input) 887 return out, req.Send() 888 } 889 890 // ListFragmentsWithContext is the same as ListFragments with the addition of 891 // the ability to pass a context and additional request options. 892 // 893 // See ListFragments for details on how to use this API operation. 894 // 895 // The context must be non-nil and will be used for request cancellation. If 896 // the context is nil a panic will occur. In the future the SDK may create 897 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 898 // for more information on using Contexts. 899 func (c *KinesisVideoArchivedMedia) ListFragmentsWithContext(ctx aws.Context, input *ListFragmentsInput, opts ...request.Option) (*ListFragmentsOutput, error) { 900 req, out := c.ListFragmentsRequest(input) 901 req.SetContext(ctx) 902 req.ApplyOptions(opts...) 903 return out, req.Send() 904 } 905 906 // ListFragmentsPages iterates over the pages of a ListFragments operation, 907 // calling the "fn" function with the response data for each page. To stop 908 // iterating, return false from the fn function. 909 // 910 // See ListFragments method for more information on how to use this operation. 911 // 912 // Note: This operation can generate multiple requests to a service. 913 // 914 // // Example iterating over at most 3 pages of a ListFragments operation. 915 // pageNum := 0 916 // err := client.ListFragmentsPages(params, 917 // func(page *kinesisvideoarchivedmedia.ListFragmentsOutput, lastPage bool) bool { 918 // pageNum++ 919 // fmt.Println(page) 920 // return pageNum <= 3 921 // }) 922 // 923 func (c *KinesisVideoArchivedMedia) ListFragmentsPages(input *ListFragmentsInput, fn func(*ListFragmentsOutput, bool) bool) error { 924 return c.ListFragmentsPagesWithContext(aws.BackgroundContext(), input, fn) 925 } 926 927 // ListFragmentsPagesWithContext same as ListFragmentsPages except 928 // it takes a Context and allows setting request options on the pages. 929 // 930 // The context must be non-nil and will be used for request cancellation. If 931 // the context is nil a panic will occur. In the future the SDK may create 932 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 933 // for more information on using Contexts. 934 func (c *KinesisVideoArchivedMedia) ListFragmentsPagesWithContext(ctx aws.Context, input *ListFragmentsInput, fn func(*ListFragmentsOutput, bool) bool, opts ...request.Option) error { 935 p := request.Pagination{ 936 NewRequest: func() (*request.Request, error) { 937 var inCpy *ListFragmentsInput 938 if input != nil { 939 tmp := *input 940 inCpy = &tmp 941 } 942 req, _ := c.ListFragmentsRequest(inCpy) 943 req.SetContext(ctx) 944 req.ApplyOptions(opts...) 945 return req, nil 946 }, 947 } 948 949 for p.Next() { 950 if !fn(p.Page().(*ListFragmentsOutput), !p.HasNextPage()) { 951 break 952 } 953 } 954 955 return p.Err() 956 } 957 958 // Kinesis Video Streams has throttled the request because you have exceeded 959 // a limit. Try making the call later. For information about limits, see Kinesis 960 // Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). 961 type ClientLimitExceededException struct { 962 _ struct{} `type:"structure"` 963 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 964 965 Message_ *string `locationName:"Message" type:"string"` 966 } 967 968 // String returns the string representation. 969 // 970 // API parameter values that are decorated as "sensitive" in the API will not 971 // be included in the string output. The member name will be present, but the 972 // value will be replaced with "sensitive". 973 func (s ClientLimitExceededException) String() string { 974 return awsutil.Prettify(s) 975 } 976 977 // GoString returns the string representation. 978 // 979 // API parameter values that are decorated as "sensitive" in the API will not 980 // be included in the string output. The member name will be present, but the 981 // value will be replaced with "sensitive". 982 func (s ClientLimitExceededException) GoString() string { 983 return s.String() 984 } 985 986 func newErrorClientLimitExceededException(v protocol.ResponseMetadata) error { 987 return &ClientLimitExceededException{ 988 RespMetadata: v, 989 } 990 } 991 992 // Code returns the exception type name. 993 func (s *ClientLimitExceededException) Code() string { 994 return "ClientLimitExceededException" 995 } 996 997 // Message returns the exception's message. 998 func (s *ClientLimitExceededException) Message() string { 999 if s.Message_ != nil { 1000 return *s.Message_ 1001 } 1002 return "" 1003 } 1004 1005 // OrigErr always returns nil, satisfies awserr.Error interface. 1006 func (s *ClientLimitExceededException) OrigErr() error { 1007 return nil 1008 } 1009 1010 func (s *ClientLimitExceededException) Error() string { 1011 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1012 } 1013 1014 // Status code returns the HTTP status code for the request's response error. 1015 func (s *ClientLimitExceededException) StatusCode() int { 1016 return s.RespMetadata.StatusCode 1017 } 1018 1019 // RequestID returns the service's response RequestID for request. 1020 func (s *ClientLimitExceededException) RequestID() string { 1021 return s.RespMetadata.RequestID 1022 } 1023 1024 // Describes the timestamp range and timestamp origin of a range of fragments. 1025 // 1026 // Fragments that have duplicate producer timestamps are deduplicated. This 1027 // means that if producers are producing a stream of fragments with producer 1028 // timestamps that are approximately equal to the true clock time, the clip 1029 // will contain all of the fragments within the requested timestamp range. If 1030 // some fragments are ingested within the same time range and very different 1031 // points in time, only the oldest ingested collection of fragments are returned. 1032 type ClipFragmentSelector struct { 1033 _ struct{} `type:"structure"` 1034 1035 // The origin of the timestamps to use (Server or Producer). 1036 // 1037 // FragmentSelectorType is a required field 1038 FragmentSelectorType *string `type:"string" required:"true" enum:"ClipFragmentSelectorType"` 1039 1040 // The range of timestamps to return. 1041 // 1042 // TimestampRange is a required field 1043 TimestampRange *ClipTimestampRange `type:"structure" required:"true"` 1044 } 1045 1046 // String returns the string representation. 1047 // 1048 // API parameter values that are decorated as "sensitive" in the API will not 1049 // be included in the string output. The member name will be present, but the 1050 // value will be replaced with "sensitive". 1051 func (s ClipFragmentSelector) String() string { 1052 return awsutil.Prettify(s) 1053 } 1054 1055 // GoString returns the string representation. 1056 // 1057 // API parameter values that are decorated as "sensitive" in the API will not 1058 // be included in the string output. The member name will be present, but the 1059 // value will be replaced with "sensitive". 1060 func (s ClipFragmentSelector) GoString() string { 1061 return s.String() 1062 } 1063 1064 // Validate inspects the fields of the type to determine if they are valid. 1065 func (s *ClipFragmentSelector) Validate() error { 1066 invalidParams := request.ErrInvalidParams{Context: "ClipFragmentSelector"} 1067 if s.FragmentSelectorType == nil { 1068 invalidParams.Add(request.NewErrParamRequired("FragmentSelectorType")) 1069 } 1070 if s.TimestampRange == nil { 1071 invalidParams.Add(request.NewErrParamRequired("TimestampRange")) 1072 } 1073 if s.TimestampRange != nil { 1074 if err := s.TimestampRange.Validate(); err != nil { 1075 invalidParams.AddNested("TimestampRange", err.(request.ErrInvalidParams)) 1076 } 1077 } 1078 1079 if invalidParams.Len() > 0 { 1080 return invalidParams 1081 } 1082 return nil 1083 } 1084 1085 // SetFragmentSelectorType sets the FragmentSelectorType field's value. 1086 func (s *ClipFragmentSelector) SetFragmentSelectorType(v string) *ClipFragmentSelector { 1087 s.FragmentSelectorType = &v 1088 return s 1089 } 1090 1091 // SetTimestampRange sets the TimestampRange field's value. 1092 func (s *ClipFragmentSelector) SetTimestampRange(v *ClipTimestampRange) *ClipFragmentSelector { 1093 s.TimestampRange = v 1094 return s 1095 } 1096 1097 // The range of timestamps for which to return fragments. 1098 type ClipTimestampRange struct { 1099 _ struct{} `type:"structure"` 1100 1101 // The end of the timestamp range for the requested media. 1102 // 1103 // This value must be within 24 hours of the specified StartTimestamp, and it 1104 // must be later than the StartTimestamp value. If FragmentSelectorType for 1105 // the request is SERVER_TIMESTAMP, this value must be in the past. 1106 // 1107 // This value is inclusive. The EndTimestamp is compared to the (starting) timestamp 1108 // of the fragment. Fragments that start before the EndTimestamp value and continue 1109 // past it are included in the session. 1110 // 1111 // EndTimestamp is a required field 1112 EndTimestamp *time.Time `type:"timestamp" required:"true"` 1113 1114 // The starting timestamp in the range of timestamps for which to return fragments. 1115 // 1116 // Only fragments that start exactly at or after StartTimestamp are included 1117 // in the session. Fragments that start before StartTimestamp and continue past 1118 // it aren't included in the session. If FragmentSelectorType is SERVER_TIMESTAMP, 1119 // the StartTimestamp must be later than the stream head. 1120 // 1121 // StartTimestamp is a required field 1122 StartTimestamp *time.Time `type:"timestamp" required:"true"` 1123 } 1124 1125 // String returns the string representation. 1126 // 1127 // API parameter values that are decorated as "sensitive" in the API will not 1128 // be included in the string output. The member name will be present, but the 1129 // value will be replaced with "sensitive". 1130 func (s ClipTimestampRange) String() string { 1131 return awsutil.Prettify(s) 1132 } 1133 1134 // GoString returns the string representation. 1135 // 1136 // API parameter values that are decorated as "sensitive" in the API will not 1137 // be included in the string output. The member name will be present, but the 1138 // value will be replaced with "sensitive". 1139 func (s ClipTimestampRange) GoString() string { 1140 return s.String() 1141 } 1142 1143 // Validate inspects the fields of the type to determine if they are valid. 1144 func (s *ClipTimestampRange) Validate() error { 1145 invalidParams := request.ErrInvalidParams{Context: "ClipTimestampRange"} 1146 if s.EndTimestamp == nil { 1147 invalidParams.Add(request.NewErrParamRequired("EndTimestamp")) 1148 } 1149 if s.StartTimestamp == nil { 1150 invalidParams.Add(request.NewErrParamRequired("StartTimestamp")) 1151 } 1152 1153 if invalidParams.Len() > 0 { 1154 return invalidParams 1155 } 1156 return nil 1157 } 1158 1159 // SetEndTimestamp sets the EndTimestamp field's value. 1160 func (s *ClipTimestampRange) SetEndTimestamp(v time.Time) *ClipTimestampRange { 1161 s.EndTimestamp = &v 1162 return s 1163 } 1164 1165 // SetStartTimestamp sets the StartTimestamp field's value. 1166 func (s *ClipTimestampRange) SetStartTimestamp(v time.Time) *ClipTimestampRange { 1167 s.StartTimestamp = &v 1168 return s 1169 } 1170 1171 // Contains the range of timestamps for the requested media, and the source 1172 // of the timestamps. 1173 type DASHFragmentSelector struct { 1174 _ struct{} `type:"structure"` 1175 1176 // The source of the timestamps for the requested media. 1177 // 1178 // When FragmentSelectorType is set to PRODUCER_TIMESTAMP and GetDASHStreamingSessionURLInput$PlaybackMode 1179 // is ON_DEMAND or LIVE_REPLAY, the first fragment ingested with a producer 1180 // timestamp within the specified FragmentSelector$TimestampRange is included 1181 // in the media playlist. In addition, the fragments with producer timestamps 1182 // within the TimestampRange ingested immediately following the first fragment 1183 // (up to the GetDASHStreamingSessionURLInput$MaxManifestFragmentResults value) 1184 // are included. 1185 // 1186 // Fragments that have duplicate producer timestamps are deduplicated. This 1187 // means that if producers are producing a stream of fragments with producer 1188 // timestamps that are approximately equal to the true clock time, the MPEG-DASH 1189 // manifest will contain all of the fragments within the requested timestamp 1190 // range. If some fragments are ingested within the same time range and very 1191 // different points in time, only the oldest ingested collection of fragments 1192 // are returned. 1193 // 1194 // When FragmentSelectorType is set to PRODUCER_TIMESTAMP and GetDASHStreamingSessionURLInput$PlaybackMode 1195 // is LIVE, the producer timestamps are used in the MP4 fragments and for deduplication. 1196 // But the most recently ingested fragments based on server timestamps are included 1197 // in the MPEG-DASH manifest. This means that even if fragments ingested in 1198 // the past have producer timestamps with values now, they are not included 1199 // in the HLS media playlist. 1200 // 1201 // The default is SERVER_TIMESTAMP. 1202 FragmentSelectorType *string `type:"string" enum:"DASHFragmentSelectorType"` 1203 1204 // The start and end of the timestamp range for the requested media. 1205 // 1206 // This value should not be present if PlaybackType is LIVE. 1207 TimestampRange *DASHTimestampRange `type:"structure"` 1208 } 1209 1210 // String returns the string representation. 1211 // 1212 // API parameter values that are decorated as "sensitive" in the API will not 1213 // be included in the string output. The member name will be present, but the 1214 // value will be replaced with "sensitive". 1215 func (s DASHFragmentSelector) String() string { 1216 return awsutil.Prettify(s) 1217 } 1218 1219 // GoString returns the string representation. 1220 // 1221 // API parameter values that are decorated as "sensitive" in the API will not 1222 // be included in the string output. The member name will be present, but the 1223 // value will be replaced with "sensitive". 1224 func (s DASHFragmentSelector) GoString() string { 1225 return s.String() 1226 } 1227 1228 // SetFragmentSelectorType sets the FragmentSelectorType field's value. 1229 func (s *DASHFragmentSelector) SetFragmentSelectorType(v string) *DASHFragmentSelector { 1230 s.FragmentSelectorType = &v 1231 return s 1232 } 1233 1234 // SetTimestampRange sets the TimestampRange field's value. 1235 func (s *DASHFragmentSelector) SetTimestampRange(v *DASHTimestampRange) *DASHFragmentSelector { 1236 s.TimestampRange = v 1237 return s 1238 } 1239 1240 // The start and end of the timestamp range for the requested media. 1241 // 1242 // This value should not be present if PlaybackType is LIVE. 1243 // 1244 // The values in DASHimestampRange are inclusive. Fragments that start exactly 1245 // at or after the start time are included in the session. Fragments that start 1246 // before the start time and continue past it are not included in the session. 1247 type DASHTimestampRange struct { 1248 _ struct{} `type:"structure"` 1249 1250 // The end of the timestamp range for the requested media. This value must be 1251 // within 24 hours of the specified StartTimestamp, and it must be later than 1252 // the StartTimestamp value. 1253 // 1254 // If FragmentSelectorType for the request is SERVER_TIMESTAMP, this value must 1255 // be in the past. 1256 // 1257 // The EndTimestamp value is required for ON_DEMAND mode, but optional for LIVE_REPLAY 1258 // mode. If the EndTimestamp is not set for LIVE_REPLAY mode then the session 1259 // will continue to include newly ingested fragments until the session expires. 1260 // 1261 // This value is inclusive. The EndTimestamp is compared to the (starting) timestamp 1262 // of the fragment. Fragments that start before the EndTimestamp value and continue 1263 // past it are included in the session. 1264 EndTimestamp *time.Time `type:"timestamp"` 1265 1266 // The start of the timestamp range for the requested media. 1267 // 1268 // If the DASHTimestampRange value is specified, the StartTimestamp value is 1269 // required. 1270 // 1271 // Only fragments that start exactly at or after StartTimestamp are included 1272 // in the session. Fragments that start before StartTimestamp and continue past 1273 // it aren't included in the session. If FragmentSelectorType is SERVER_TIMESTAMP, 1274 // the StartTimestamp must be later than the stream head. 1275 StartTimestamp *time.Time `type:"timestamp"` 1276 } 1277 1278 // String returns the string representation. 1279 // 1280 // API parameter values that are decorated as "sensitive" in the API will not 1281 // be included in the string output. The member name will be present, but the 1282 // value will be replaced with "sensitive". 1283 func (s DASHTimestampRange) String() string { 1284 return awsutil.Prettify(s) 1285 } 1286 1287 // GoString returns the string representation. 1288 // 1289 // API parameter values that are decorated as "sensitive" in the API will not 1290 // be included in the string output. The member name will be present, but the 1291 // value will be replaced with "sensitive". 1292 func (s DASHTimestampRange) GoString() string { 1293 return s.String() 1294 } 1295 1296 // SetEndTimestamp sets the EndTimestamp field's value. 1297 func (s *DASHTimestampRange) SetEndTimestamp(v time.Time) *DASHTimestampRange { 1298 s.EndTimestamp = &v 1299 return s 1300 } 1301 1302 // SetStartTimestamp sets the StartTimestamp field's value. 1303 func (s *DASHTimestampRange) SetStartTimestamp(v time.Time) *DASHTimestampRange { 1304 s.StartTimestamp = &v 1305 return s 1306 } 1307 1308 // Represents a segment of video or other time-delimited data. 1309 type Fragment struct { 1310 _ struct{} `type:"structure"` 1311 1312 // The playback duration or other time value associated with the fragment. 1313 FragmentLengthInMilliseconds *int64 `type:"long"` 1314 1315 // The unique identifier of the fragment. This value monotonically increases 1316 // based on the ingestion order. 1317 FragmentNumber *string `min:"1" type:"string"` 1318 1319 // The total fragment size, including information about the fragment and contained 1320 // media data. 1321 FragmentSizeInBytes *int64 `type:"long"` 1322 1323 // The timestamp from the producer corresponding to the fragment. 1324 ProducerTimestamp *time.Time `type:"timestamp"` 1325 1326 // The timestamp from the AWS server corresponding to the fragment. 1327 ServerTimestamp *time.Time `type:"timestamp"` 1328 } 1329 1330 // String returns the string representation. 1331 // 1332 // API parameter values that are decorated as "sensitive" in the API will not 1333 // be included in the string output. The member name will be present, but the 1334 // value will be replaced with "sensitive". 1335 func (s Fragment) String() string { 1336 return awsutil.Prettify(s) 1337 } 1338 1339 // GoString returns the string representation. 1340 // 1341 // API parameter values that are decorated as "sensitive" in the API will not 1342 // be included in the string output. The member name will be present, but the 1343 // value will be replaced with "sensitive". 1344 func (s Fragment) GoString() string { 1345 return s.String() 1346 } 1347 1348 // SetFragmentLengthInMilliseconds sets the FragmentLengthInMilliseconds field's value. 1349 func (s *Fragment) SetFragmentLengthInMilliseconds(v int64) *Fragment { 1350 s.FragmentLengthInMilliseconds = &v 1351 return s 1352 } 1353 1354 // SetFragmentNumber sets the FragmentNumber field's value. 1355 func (s *Fragment) SetFragmentNumber(v string) *Fragment { 1356 s.FragmentNumber = &v 1357 return s 1358 } 1359 1360 // SetFragmentSizeInBytes sets the FragmentSizeInBytes field's value. 1361 func (s *Fragment) SetFragmentSizeInBytes(v int64) *Fragment { 1362 s.FragmentSizeInBytes = &v 1363 return s 1364 } 1365 1366 // SetProducerTimestamp sets the ProducerTimestamp field's value. 1367 func (s *Fragment) SetProducerTimestamp(v time.Time) *Fragment { 1368 s.ProducerTimestamp = &v 1369 return s 1370 } 1371 1372 // SetServerTimestamp sets the ServerTimestamp field's value. 1373 func (s *Fragment) SetServerTimestamp(v time.Time) *Fragment { 1374 s.ServerTimestamp = &v 1375 return s 1376 } 1377 1378 // Describes the timestamp range and timestamp origin of a range of fragments. 1379 // 1380 // Only fragments with a start timestamp greater than or equal to the given 1381 // start time and less than or equal to the end time are returned. For example, 1382 // if a stream contains fragments with the following start timestamps: 1383 // 1384 // * 00:00:00 1385 // 1386 // * 00:00:02 1387 // 1388 // * 00:00:04 1389 // 1390 // * 00:00:06 1391 // 1392 // A fragment selector range with a start time of 00:00:01 and end time of 00:00:04 1393 // would return the fragments with start times of 00:00:02 and 00:00:04. 1394 type FragmentSelector struct { 1395 _ struct{} `type:"structure"` 1396 1397 // The origin of the timestamps to use (Server or Producer). 1398 // 1399 // FragmentSelectorType is a required field 1400 FragmentSelectorType *string `type:"string" required:"true" enum:"FragmentSelectorType"` 1401 1402 // The range of timestamps to return. 1403 // 1404 // TimestampRange is a required field 1405 TimestampRange *TimestampRange `type:"structure" required:"true"` 1406 } 1407 1408 // String returns the string representation. 1409 // 1410 // API parameter values that are decorated as "sensitive" in the API will not 1411 // be included in the string output. The member name will be present, but the 1412 // value will be replaced with "sensitive". 1413 func (s FragmentSelector) String() string { 1414 return awsutil.Prettify(s) 1415 } 1416 1417 // GoString returns the string representation. 1418 // 1419 // API parameter values that are decorated as "sensitive" in the API will not 1420 // be included in the string output. The member name will be present, but the 1421 // value will be replaced with "sensitive". 1422 func (s FragmentSelector) GoString() string { 1423 return s.String() 1424 } 1425 1426 // Validate inspects the fields of the type to determine if they are valid. 1427 func (s *FragmentSelector) Validate() error { 1428 invalidParams := request.ErrInvalidParams{Context: "FragmentSelector"} 1429 if s.FragmentSelectorType == nil { 1430 invalidParams.Add(request.NewErrParamRequired("FragmentSelectorType")) 1431 } 1432 if s.TimestampRange == nil { 1433 invalidParams.Add(request.NewErrParamRequired("TimestampRange")) 1434 } 1435 if s.TimestampRange != nil { 1436 if err := s.TimestampRange.Validate(); err != nil { 1437 invalidParams.AddNested("TimestampRange", err.(request.ErrInvalidParams)) 1438 } 1439 } 1440 1441 if invalidParams.Len() > 0 { 1442 return invalidParams 1443 } 1444 return nil 1445 } 1446 1447 // SetFragmentSelectorType sets the FragmentSelectorType field's value. 1448 func (s *FragmentSelector) SetFragmentSelectorType(v string) *FragmentSelector { 1449 s.FragmentSelectorType = &v 1450 return s 1451 } 1452 1453 // SetTimestampRange sets the TimestampRange field's value. 1454 func (s *FragmentSelector) SetTimestampRange(v *TimestampRange) *FragmentSelector { 1455 s.TimestampRange = v 1456 return s 1457 } 1458 1459 type GetClipInput struct { 1460 _ struct{} `type:"structure"` 1461 1462 // The time range of the requested clip and the source of the timestamps. 1463 // 1464 // ClipFragmentSelector is a required field 1465 ClipFragmentSelector *ClipFragmentSelector `type:"structure" required:"true"` 1466 1467 // The Amazon Resource Name (ARN) of the stream for which to retrieve the media 1468 // clip. 1469 // 1470 // You must specify either the StreamName or the StreamARN. 1471 StreamARN *string `min:"1" type:"string"` 1472 1473 // The name of the stream for which to retrieve the media clip. 1474 // 1475 // You must specify either the StreamName or the StreamARN. 1476 StreamName *string `min:"1" type:"string"` 1477 } 1478 1479 // String returns the string representation. 1480 // 1481 // API parameter values that are decorated as "sensitive" in the API will not 1482 // be included in the string output. The member name will be present, but the 1483 // value will be replaced with "sensitive". 1484 func (s GetClipInput) String() string { 1485 return awsutil.Prettify(s) 1486 } 1487 1488 // GoString returns the string representation. 1489 // 1490 // API parameter values that are decorated as "sensitive" in the API will not 1491 // be included in the string output. The member name will be present, but the 1492 // value will be replaced with "sensitive". 1493 func (s GetClipInput) GoString() string { 1494 return s.String() 1495 } 1496 1497 // Validate inspects the fields of the type to determine if they are valid. 1498 func (s *GetClipInput) Validate() error { 1499 invalidParams := request.ErrInvalidParams{Context: "GetClipInput"} 1500 if s.ClipFragmentSelector == nil { 1501 invalidParams.Add(request.NewErrParamRequired("ClipFragmentSelector")) 1502 } 1503 if s.StreamARN != nil && len(*s.StreamARN) < 1 { 1504 invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) 1505 } 1506 if s.StreamName != nil && len(*s.StreamName) < 1 { 1507 invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) 1508 } 1509 if s.ClipFragmentSelector != nil { 1510 if err := s.ClipFragmentSelector.Validate(); err != nil { 1511 invalidParams.AddNested("ClipFragmentSelector", err.(request.ErrInvalidParams)) 1512 } 1513 } 1514 1515 if invalidParams.Len() > 0 { 1516 return invalidParams 1517 } 1518 return nil 1519 } 1520 1521 // SetClipFragmentSelector sets the ClipFragmentSelector field's value. 1522 func (s *GetClipInput) SetClipFragmentSelector(v *ClipFragmentSelector) *GetClipInput { 1523 s.ClipFragmentSelector = v 1524 return s 1525 } 1526 1527 // SetStreamARN sets the StreamARN field's value. 1528 func (s *GetClipInput) SetStreamARN(v string) *GetClipInput { 1529 s.StreamARN = &v 1530 return s 1531 } 1532 1533 // SetStreamName sets the StreamName field's value. 1534 func (s *GetClipInput) SetStreamName(v string) *GetClipInput { 1535 s.StreamName = &v 1536 return s 1537 } 1538 1539 type GetClipOutput struct { 1540 _ struct{} `type:"structure" payload:"Payload"` 1541 1542 // The content type of the media in the requested clip. 1543 ContentType *string `location:"header" locationName:"Content-Type" min:"1" type:"string"` 1544 1545 // Traditional MP4 file that contains the media clip from the specified video 1546 // stream. The output will contain the first 100 MB or the first 200 fragments 1547 // from the specified start timestamp. For more information, see Kinesis Video 1548 // Streams Limits (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). 1549 Payload io.ReadCloser `type:"blob"` 1550 } 1551 1552 // String returns the string representation. 1553 // 1554 // API parameter values that are decorated as "sensitive" in the API will not 1555 // be included in the string output. The member name will be present, but the 1556 // value will be replaced with "sensitive". 1557 func (s GetClipOutput) String() string { 1558 return awsutil.Prettify(s) 1559 } 1560 1561 // GoString returns the string representation. 1562 // 1563 // API parameter values that are decorated as "sensitive" in the API will not 1564 // be included in the string output. The member name will be present, but the 1565 // value will be replaced with "sensitive". 1566 func (s GetClipOutput) GoString() string { 1567 return s.String() 1568 } 1569 1570 // SetContentType sets the ContentType field's value. 1571 func (s *GetClipOutput) SetContentType(v string) *GetClipOutput { 1572 s.ContentType = &v 1573 return s 1574 } 1575 1576 // SetPayload sets the Payload field's value. 1577 func (s *GetClipOutput) SetPayload(v io.ReadCloser) *GetClipOutput { 1578 s.Payload = v 1579 return s 1580 } 1581 1582 type GetDASHStreamingSessionURLInput struct { 1583 _ struct{} `type:"structure"` 1584 1585 // The time range of the requested fragment and the source of the timestamps. 1586 // 1587 // This parameter is required if PlaybackMode is ON_DEMAND or LIVE_REPLAY. This 1588 // parameter is optional if PlaybackMode is LIVE. If PlaybackMode is LIVE, the 1589 // FragmentSelectorType can be set, but the TimestampRange should not be set. 1590 // If PlaybackMode is ON_DEMAND or LIVE_REPLAY, both FragmentSelectorType and 1591 // TimestampRange must be set. 1592 DASHFragmentSelector *DASHFragmentSelector `type:"structure"` 1593 1594 // Fragments are identified in the manifest file based on their sequence number 1595 // in the session. If DisplayFragmentNumber is set to ALWAYS, the Kinesis Video 1596 // Streams fragment number is added to each S element in the manifest file with 1597 // the attribute name “kvs:fn”. These fragment numbers can be used for logging 1598 // or for use with other APIs (e.g. GetMedia and GetMediaForFragmentList). A 1599 // custom MPEG-DASH media player is necessary to leverage these this custom 1600 // attribute. 1601 // 1602 // The default value is NEVER. 1603 DisplayFragmentNumber *string `type:"string" enum:"DASHDisplayFragmentNumber"` 1604 1605 // Per the MPEG-DASH specification, the wall-clock time of fragments in the 1606 // manifest file can be derived using attributes in the manifest itself. However, 1607 // typically, MPEG-DASH compatible media players do not properly handle gaps 1608 // in the media timeline. Kinesis Video Streams adjusts the media timeline in 1609 // the manifest file to enable playback of media with discontinuities. Therefore, 1610 // the wall-clock time derived from the manifest file may be inaccurate. If 1611 // DisplayFragmentTimestamp is set to ALWAYS, the accurate fragment timestamp 1612 // is added to each S element in the manifest file with the attribute name “kvs:ts”. 1613 // A custom MPEG-DASH media player is necessary to leverage this custom attribute. 1614 // 1615 // The default value is NEVER. When DASHFragmentSelector is SERVER_TIMESTAMP, 1616 // the timestamps will be the server start timestamps. Similarly, when DASHFragmentSelector 1617 // is PRODUCER_TIMESTAMP, the timestamps will be the producer start timestamps. 1618 DisplayFragmentTimestamp *string `type:"string" enum:"DASHDisplayFragmentTimestamp"` 1619 1620 // The time in seconds until the requested session expires. This value can be 1621 // between 300 (5 minutes) and 43200 (12 hours). 1622 // 1623 // When a session expires, no new calls to GetDashManifest, GetMP4InitFragment, 1624 // or GetMP4MediaFragment can be made for that session. 1625 // 1626 // The default is 300 (5 minutes). 1627 Expires *int64 `min:"300" type:"integer"` 1628 1629 // The maximum number of fragments that are returned in the MPEG-DASH manifest. 1630 // 1631 // When the PlaybackMode is LIVE, the most recent fragments are returned up 1632 // to this value. When the PlaybackMode is ON_DEMAND, the oldest fragments are 1633 // returned, up to this maximum number. 1634 // 1635 // When there are a higher number of fragments available in a live MPEG-DASH 1636 // manifest, video players often buffer content before starting playback. Increasing 1637 // the buffer size increases the playback latency, but it decreases the likelihood 1638 // that rebuffering will occur during playback. We recommend that a live MPEG-DASH 1639 // manifest have a minimum of 3 fragments and a maximum of 10 fragments. 1640 // 1641 // The default is 5 fragments if PlaybackMode is LIVE or LIVE_REPLAY, and 1,000 1642 // if PlaybackMode is ON_DEMAND. 1643 // 1644 // The maximum value of 1,000 fragments corresponds to more than 16 minutes 1645 // of video on streams with 1-second fragments, and more than 2 1/2 hours of 1646 // video on streams with 10-second fragments. 1647 MaxManifestFragmentResults *int64 `min:"1" type:"long"` 1648 1649 // Whether to retrieve live, live replay, or archived, on-demand data. 1650 // 1651 // Features of the three types of sessions include the following: 1652 // 1653 // * LIVE : For sessions of this type, the MPEG-DASH manifest is continually 1654 // updated with the latest fragments as they become available. We recommend 1655 // that the media player retrieve a new manifest on a one-second interval. 1656 // When this type of session is played in a media player, the user interface 1657 // typically displays a "live" notification, with no scrubber control for 1658 // choosing the position in the playback window to display. In LIVE mode, 1659 // the newest available fragments are included in an MPEG-DASH manifest, 1660 // even if there is a gap between fragments (that is, if a fragment is missing). 1661 // A gap like this might cause a media player to halt or cause a jump in 1662 // playback. In this mode, fragments are not added to the MPEG-DASH manifest 1663 // if they are older than the newest fragment in the playlist. If the missing 1664 // fragment becomes available after a subsequent fragment is added to the 1665 // manifest, the older fragment is not added, and the gap is not filled. 1666 // 1667 // * LIVE_REPLAY : For sessions of this type, the MPEG-DASH manifest is updated 1668 // similarly to how it is updated for LIVE mode except that it starts by 1669 // including fragments from a given start time. Instead of fragments being 1670 // added as they are ingested, fragments are added as the duration of the 1671 // next fragment elapses. For example, if the fragments in the session are 1672 // two seconds long, then a new fragment is added to the manifest every two 1673 // seconds. This mode is useful to be able to start playback from when an 1674 // event is detected and continue live streaming media that has not yet been 1675 // ingested as of the time of the session creation. This mode is also useful 1676 // to stream previously archived media without being limited by the 1,000 1677 // fragment limit in the ON_DEMAND mode. 1678 // 1679 // * ON_DEMAND : For sessions of this type, the MPEG-DASH manifest contains 1680 // all the fragments for the session, up to the number that is specified 1681 // in MaxManifestFragmentResults. The manifest must be retrieved only once 1682 // for each session. When this type of session is played in a media player, 1683 // the user interface typically displays a scrubber control for choosing 1684 // the position in the playback window to display. 1685 // 1686 // In all playback modes, if FragmentSelectorType is PRODUCER_TIMESTAMP, and 1687 // if there are multiple fragments with the same start timestamp, the fragment 1688 // that has the larger fragment number (that is, the newer fragment) is included 1689 // in the MPEG-DASH manifest. The other fragments are not included. Fragments 1690 // that have different timestamps but have overlapping durations are still included 1691 // in the MPEG-DASH manifest. This can lead to unexpected behavior in the media 1692 // player. 1693 // 1694 // The default is LIVE. 1695 PlaybackMode *string `type:"string" enum:"DASHPlaybackMode"` 1696 1697 // The Amazon Resource Name (ARN) of the stream for which to retrieve the MPEG-DASH 1698 // manifest URL. 1699 // 1700 // You must specify either the StreamName or the StreamARN. 1701 StreamARN *string `min:"1" type:"string"` 1702 1703 // The name of the stream for which to retrieve the MPEG-DASH manifest URL. 1704 // 1705 // You must specify either the StreamName or the StreamARN. 1706 StreamName *string `min:"1" type:"string"` 1707 } 1708 1709 // String returns the string representation. 1710 // 1711 // API parameter values that are decorated as "sensitive" in the API will not 1712 // be included in the string output. The member name will be present, but the 1713 // value will be replaced with "sensitive". 1714 func (s GetDASHStreamingSessionURLInput) String() string { 1715 return awsutil.Prettify(s) 1716 } 1717 1718 // GoString returns the string representation. 1719 // 1720 // API parameter values that are decorated as "sensitive" in the API will not 1721 // be included in the string output. The member name will be present, but the 1722 // value will be replaced with "sensitive". 1723 func (s GetDASHStreamingSessionURLInput) GoString() string { 1724 return s.String() 1725 } 1726 1727 // Validate inspects the fields of the type to determine if they are valid. 1728 func (s *GetDASHStreamingSessionURLInput) Validate() error { 1729 invalidParams := request.ErrInvalidParams{Context: "GetDASHStreamingSessionURLInput"} 1730 if s.Expires != nil && *s.Expires < 300 { 1731 invalidParams.Add(request.NewErrParamMinValue("Expires", 300)) 1732 } 1733 if s.MaxManifestFragmentResults != nil && *s.MaxManifestFragmentResults < 1 { 1734 invalidParams.Add(request.NewErrParamMinValue("MaxManifestFragmentResults", 1)) 1735 } 1736 if s.StreamARN != nil && len(*s.StreamARN) < 1 { 1737 invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) 1738 } 1739 if s.StreamName != nil && len(*s.StreamName) < 1 { 1740 invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) 1741 } 1742 1743 if invalidParams.Len() > 0 { 1744 return invalidParams 1745 } 1746 return nil 1747 } 1748 1749 // SetDASHFragmentSelector sets the DASHFragmentSelector field's value. 1750 func (s *GetDASHStreamingSessionURLInput) SetDASHFragmentSelector(v *DASHFragmentSelector) *GetDASHStreamingSessionURLInput { 1751 s.DASHFragmentSelector = v 1752 return s 1753 } 1754 1755 // SetDisplayFragmentNumber sets the DisplayFragmentNumber field's value. 1756 func (s *GetDASHStreamingSessionURLInput) SetDisplayFragmentNumber(v string) *GetDASHStreamingSessionURLInput { 1757 s.DisplayFragmentNumber = &v 1758 return s 1759 } 1760 1761 // SetDisplayFragmentTimestamp sets the DisplayFragmentTimestamp field's value. 1762 func (s *GetDASHStreamingSessionURLInput) SetDisplayFragmentTimestamp(v string) *GetDASHStreamingSessionURLInput { 1763 s.DisplayFragmentTimestamp = &v 1764 return s 1765 } 1766 1767 // SetExpires sets the Expires field's value. 1768 func (s *GetDASHStreamingSessionURLInput) SetExpires(v int64) *GetDASHStreamingSessionURLInput { 1769 s.Expires = &v 1770 return s 1771 } 1772 1773 // SetMaxManifestFragmentResults sets the MaxManifestFragmentResults field's value. 1774 func (s *GetDASHStreamingSessionURLInput) SetMaxManifestFragmentResults(v int64) *GetDASHStreamingSessionURLInput { 1775 s.MaxManifestFragmentResults = &v 1776 return s 1777 } 1778 1779 // SetPlaybackMode sets the PlaybackMode field's value. 1780 func (s *GetDASHStreamingSessionURLInput) SetPlaybackMode(v string) *GetDASHStreamingSessionURLInput { 1781 s.PlaybackMode = &v 1782 return s 1783 } 1784 1785 // SetStreamARN sets the StreamARN field's value. 1786 func (s *GetDASHStreamingSessionURLInput) SetStreamARN(v string) *GetDASHStreamingSessionURLInput { 1787 s.StreamARN = &v 1788 return s 1789 } 1790 1791 // SetStreamName sets the StreamName field's value. 1792 func (s *GetDASHStreamingSessionURLInput) SetStreamName(v string) *GetDASHStreamingSessionURLInput { 1793 s.StreamName = &v 1794 return s 1795 } 1796 1797 type GetDASHStreamingSessionURLOutput struct { 1798 _ struct{} `type:"structure"` 1799 1800 // The URL (containing the session token) that a media player can use to retrieve 1801 // the MPEG-DASH manifest. 1802 DASHStreamingSessionURL *string `type:"string"` 1803 } 1804 1805 // String returns the string representation. 1806 // 1807 // API parameter values that are decorated as "sensitive" in the API will not 1808 // be included in the string output. The member name will be present, but the 1809 // value will be replaced with "sensitive". 1810 func (s GetDASHStreamingSessionURLOutput) String() string { 1811 return awsutil.Prettify(s) 1812 } 1813 1814 // GoString returns the string representation. 1815 // 1816 // API parameter values that are decorated as "sensitive" in the API will not 1817 // be included in the string output. The member name will be present, but the 1818 // value will be replaced with "sensitive". 1819 func (s GetDASHStreamingSessionURLOutput) GoString() string { 1820 return s.String() 1821 } 1822 1823 // SetDASHStreamingSessionURL sets the DASHStreamingSessionURL field's value. 1824 func (s *GetDASHStreamingSessionURLOutput) SetDASHStreamingSessionURL(v string) *GetDASHStreamingSessionURLOutput { 1825 s.DASHStreamingSessionURL = &v 1826 return s 1827 } 1828 1829 type GetHLSStreamingSessionURLInput struct { 1830 _ struct{} `type:"structure"` 1831 1832 // Specifies which format should be used for packaging the media. Specifying 1833 // the FRAGMENTED_MP4 container format packages the media into MP4 fragments 1834 // (fMP4 or CMAF). This is the recommended packaging because there is minimal 1835 // packaging overhead. The other container format option is MPEG_TS. HLS has 1836 // supported MPEG TS chunks since it was released and is sometimes the only 1837 // supported packaging on older HLS players. MPEG TS typically has a 5-25 percent 1838 // packaging overhead. This means MPEG TS typically requires 5-25 percent more 1839 // bandwidth and cost than fMP4. 1840 // 1841 // The default is FRAGMENTED_MP4. 1842 ContainerFormat *string `type:"string" enum:"ContainerFormat"` 1843 1844 // Specifies when flags marking discontinuities between fragments are added 1845 // to the media playlists. 1846 // 1847 // Media players typically build a timeline of media content to play, based 1848 // on the timestamps of each fragment. This means that if there is any overlap 1849 // or gap between fragments (as is typical if HLSFragmentSelector is set to 1850 // SERVER_TIMESTAMP), the media player timeline will also have small gaps between 1851 // fragments in some places, and will overwrite frames in other places. Gaps 1852 // in the media player timeline can cause playback to stall and overlaps can 1853 // cause playback to be jittery. When there are discontinuity flags between 1854 // fragments, the media player is expected to reset the timeline, resulting 1855 // in the next fragment being played immediately after the previous fragment. 1856 // 1857 // The following modes are supported: 1858 // 1859 // * ALWAYS: a discontinuity marker is placed between every fragment in the 1860 // HLS media playlist. It is recommended to use a value of ALWAYS if the 1861 // fragment timestamps are not accurate. 1862 // 1863 // * NEVER: no discontinuity markers are placed anywhere. It is recommended 1864 // to use a value of NEVER to ensure the media player timeline most accurately 1865 // maps to the producer timestamps. 1866 // 1867 // * ON_DISCONTINUITY: a discontinuity marker is placed between fragments 1868 // that have a gap or overlap of more than 50 milliseconds. For most playback 1869 // scenarios, it is recommended to use a value of ON_DISCONTINUITY so that 1870 // the media player timeline is only reset when there is a significant issue 1871 // with the media timeline (e.g. a missing fragment). 1872 // 1873 // The default is ALWAYS when HLSFragmentSelector is set to SERVER_TIMESTAMP, 1874 // and NEVER when it is set to PRODUCER_TIMESTAMP. 1875 DiscontinuityMode *string `type:"string" enum:"HLSDiscontinuityMode"` 1876 1877 // Specifies when the fragment start timestamps should be included in the HLS 1878 // media playlist. Typically, media players report the playhead position as 1879 // a time relative to the start of the first fragment in the playback session. 1880 // However, when the start timestamps are included in the HLS media playlist, 1881 // some media players might report the current playhead as an absolute time 1882 // based on the fragment timestamps. This can be useful for creating a playback 1883 // experience that shows viewers the wall-clock time of the media. 1884 // 1885 // The default is NEVER. When HLSFragmentSelector is SERVER_TIMESTAMP, the timestamps 1886 // will be the server start timestamps. Similarly, when HLSFragmentSelector 1887 // is PRODUCER_TIMESTAMP, the timestamps will be the producer start timestamps. 1888 DisplayFragmentTimestamp *string `type:"string" enum:"HLSDisplayFragmentTimestamp"` 1889 1890 // The time in seconds until the requested session expires. This value can be 1891 // between 300 (5 minutes) and 43200 (12 hours). 1892 // 1893 // When a session expires, no new calls to GetHLSMasterPlaylist, GetHLSMediaPlaylist, 1894 // GetMP4InitFragment, GetMP4MediaFragment, or GetTSFragment can be made for 1895 // that session. 1896 // 1897 // The default is 300 (5 minutes). 1898 Expires *int64 `min:"300" type:"integer"` 1899 1900 // The time range of the requested fragment and the source of the timestamps. 1901 // 1902 // This parameter is required if PlaybackMode is ON_DEMAND or LIVE_REPLAY. This 1903 // parameter is optional if PlaybackMode is LIVE. If PlaybackMode is LIVE, the 1904 // FragmentSelectorType can be set, but the TimestampRange should not be set. 1905 // If PlaybackMode is ON_DEMAND or LIVE_REPLAY, both FragmentSelectorType and 1906 // TimestampRange must be set. 1907 HLSFragmentSelector *HLSFragmentSelector `type:"structure"` 1908 1909 // The maximum number of fragments that are returned in the HLS media playlists. 1910 // 1911 // When the PlaybackMode is LIVE, the most recent fragments are returned up 1912 // to this value. When the PlaybackMode is ON_DEMAND, the oldest fragments are 1913 // returned, up to this maximum number. 1914 // 1915 // When there are a higher number of fragments available in a live HLS media 1916 // playlist, video players often buffer content before starting playback. Increasing 1917 // the buffer size increases the playback latency, but it decreases the likelihood 1918 // that rebuffering will occur during playback. We recommend that a live HLS 1919 // media playlist have a minimum of 3 fragments and a maximum of 10 fragments. 1920 // 1921 // The default is 5 fragments if PlaybackMode is LIVE or LIVE_REPLAY, and 1,000 1922 // if PlaybackMode is ON_DEMAND. 1923 // 1924 // The maximum value of 5,000 fragments corresponds to more than 80 minutes 1925 // of video on streams with 1-second fragments, and more than 13 hours of video 1926 // on streams with 10-second fragments. 1927 MaxMediaPlaylistFragmentResults *int64 `min:"1" type:"long"` 1928 1929 // Whether to retrieve live, live replay, or archived, on-demand data. 1930 // 1931 // Features of the three types of sessions include the following: 1932 // 1933 // * LIVE : For sessions of this type, the HLS media playlist is continually 1934 // updated with the latest fragments as they become available. We recommend 1935 // that the media player retrieve a new playlist on a one-second interval. 1936 // When this type of session is played in a media player, the user interface 1937 // typically displays a "live" notification, with no scrubber control for 1938 // choosing the position in the playback window to display. In LIVE mode, 1939 // the newest available fragments are included in an HLS media playlist, 1940 // even if there is a gap between fragments (that is, if a fragment is missing). 1941 // A gap like this might cause a media player to halt or cause a jump in 1942 // playback. In this mode, fragments are not added to the HLS media playlist 1943 // if they are older than the newest fragment in the playlist. If the missing 1944 // fragment becomes available after a subsequent fragment is added to the 1945 // playlist, the older fragment is not added, and the gap is not filled. 1946 // 1947 // * LIVE_REPLAY : For sessions of this type, the HLS media playlist is updated 1948 // similarly to how it is updated for LIVE mode except that it starts by 1949 // including fragments from a given start time. Instead of fragments being 1950 // added as they are ingested, fragments are added as the duration of the 1951 // next fragment elapses. For example, if the fragments in the session are 1952 // two seconds long, then a new fragment is added to the media playlist every 1953 // two seconds. This mode is useful to be able to start playback from when 1954 // an event is detected and continue live streaming media that has not yet 1955 // been ingested as of the time of the session creation. This mode is also 1956 // useful to stream previously archived media without being limited by the 1957 // 1,000 fragment limit in the ON_DEMAND mode. 1958 // 1959 // * ON_DEMAND : For sessions of this type, the HLS media playlist contains 1960 // all the fragments for the session, up to the number that is specified 1961 // in MaxMediaPlaylistFragmentResults. The playlist must be retrieved only 1962 // once for each session. When this type of session is played in a media 1963 // player, the user interface typically displays a scrubber control for choosing 1964 // the position in the playback window to display. 1965 // 1966 // In all playback modes, if FragmentSelectorType is PRODUCER_TIMESTAMP, and 1967 // if there are multiple fragments with the same start timestamp, the fragment 1968 // that has the largest fragment number (that is, the newest fragment) is included 1969 // in the HLS media playlist. The other fragments are not included. Fragments 1970 // that have different timestamps but have overlapping durations are still included 1971 // in the HLS media playlist. This can lead to unexpected behavior in the media 1972 // player. 1973 // 1974 // The default is LIVE. 1975 PlaybackMode *string `type:"string" enum:"HLSPlaybackMode"` 1976 1977 // The Amazon Resource Name (ARN) of the stream for which to retrieve the HLS 1978 // master playlist URL. 1979 // 1980 // You must specify either the StreamName or the StreamARN. 1981 StreamARN *string `min:"1" type:"string"` 1982 1983 // The name of the stream for which to retrieve the HLS master playlist URL. 1984 // 1985 // You must specify either the StreamName or the StreamARN. 1986 StreamName *string `min:"1" type:"string"` 1987 } 1988 1989 // String returns the string representation. 1990 // 1991 // API parameter values that are decorated as "sensitive" in the API will not 1992 // be included in the string output. The member name will be present, but the 1993 // value will be replaced with "sensitive". 1994 func (s GetHLSStreamingSessionURLInput) String() string { 1995 return awsutil.Prettify(s) 1996 } 1997 1998 // GoString returns the string representation. 1999 // 2000 // API parameter values that are decorated as "sensitive" in the API will not 2001 // be included in the string output. The member name will be present, but the 2002 // value will be replaced with "sensitive". 2003 func (s GetHLSStreamingSessionURLInput) GoString() string { 2004 return s.String() 2005 } 2006 2007 // Validate inspects the fields of the type to determine if they are valid. 2008 func (s *GetHLSStreamingSessionURLInput) Validate() error { 2009 invalidParams := request.ErrInvalidParams{Context: "GetHLSStreamingSessionURLInput"} 2010 if s.Expires != nil && *s.Expires < 300 { 2011 invalidParams.Add(request.NewErrParamMinValue("Expires", 300)) 2012 } 2013 if s.MaxMediaPlaylistFragmentResults != nil && *s.MaxMediaPlaylistFragmentResults < 1 { 2014 invalidParams.Add(request.NewErrParamMinValue("MaxMediaPlaylistFragmentResults", 1)) 2015 } 2016 if s.StreamARN != nil && len(*s.StreamARN) < 1 { 2017 invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) 2018 } 2019 if s.StreamName != nil && len(*s.StreamName) < 1 { 2020 invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) 2021 } 2022 2023 if invalidParams.Len() > 0 { 2024 return invalidParams 2025 } 2026 return nil 2027 } 2028 2029 // SetContainerFormat sets the ContainerFormat field's value. 2030 func (s *GetHLSStreamingSessionURLInput) SetContainerFormat(v string) *GetHLSStreamingSessionURLInput { 2031 s.ContainerFormat = &v 2032 return s 2033 } 2034 2035 // SetDiscontinuityMode sets the DiscontinuityMode field's value. 2036 func (s *GetHLSStreamingSessionURLInput) SetDiscontinuityMode(v string) *GetHLSStreamingSessionURLInput { 2037 s.DiscontinuityMode = &v 2038 return s 2039 } 2040 2041 // SetDisplayFragmentTimestamp sets the DisplayFragmentTimestamp field's value. 2042 func (s *GetHLSStreamingSessionURLInput) SetDisplayFragmentTimestamp(v string) *GetHLSStreamingSessionURLInput { 2043 s.DisplayFragmentTimestamp = &v 2044 return s 2045 } 2046 2047 // SetExpires sets the Expires field's value. 2048 func (s *GetHLSStreamingSessionURLInput) SetExpires(v int64) *GetHLSStreamingSessionURLInput { 2049 s.Expires = &v 2050 return s 2051 } 2052 2053 // SetHLSFragmentSelector sets the HLSFragmentSelector field's value. 2054 func (s *GetHLSStreamingSessionURLInput) SetHLSFragmentSelector(v *HLSFragmentSelector) *GetHLSStreamingSessionURLInput { 2055 s.HLSFragmentSelector = v 2056 return s 2057 } 2058 2059 // SetMaxMediaPlaylistFragmentResults sets the MaxMediaPlaylistFragmentResults field's value. 2060 func (s *GetHLSStreamingSessionURLInput) SetMaxMediaPlaylistFragmentResults(v int64) *GetHLSStreamingSessionURLInput { 2061 s.MaxMediaPlaylistFragmentResults = &v 2062 return s 2063 } 2064 2065 // SetPlaybackMode sets the PlaybackMode field's value. 2066 func (s *GetHLSStreamingSessionURLInput) SetPlaybackMode(v string) *GetHLSStreamingSessionURLInput { 2067 s.PlaybackMode = &v 2068 return s 2069 } 2070 2071 // SetStreamARN sets the StreamARN field's value. 2072 func (s *GetHLSStreamingSessionURLInput) SetStreamARN(v string) *GetHLSStreamingSessionURLInput { 2073 s.StreamARN = &v 2074 return s 2075 } 2076 2077 // SetStreamName sets the StreamName field's value. 2078 func (s *GetHLSStreamingSessionURLInput) SetStreamName(v string) *GetHLSStreamingSessionURLInput { 2079 s.StreamName = &v 2080 return s 2081 } 2082 2083 type GetHLSStreamingSessionURLOutput struct { 2084 _ struct{} `type:"structure"` 2085 2086 // The URL (containing the session token) that a media player can use to retrieve 2087 // the HLS master playlist. 2088 HLSStreamingSessionURL *string `type:"string"` 2089 } 2090 2091 // String returns the string representation. 2092 // 2093 // API parameter values that are decorated as "sensitive" in the API will not 2094 // be included in the string output. The member name will be present, but the 2095 // value will be replaced with "sensitive". 2096 func (s GetHLSStreamingSessionURLOutput) String() string { 2097 return awsutil.Prettify(s) 2098 } 2099 2100 // GoString returns the string representation. 2101 // 2102 // API parameter values that are decorated as "sensitive" in the API will not 2103 // be included in the string output. The member name will be present, but the 2104 // value will be replaced with "sensitive". 2105 func (s GetHLSStreamingSessionURLOutput) GoString() string { 2106 return s.String() 2107 } 2108 2109 // SetHLSStreamingSessionURL sets the HLSStreamingSessionURL field's value. 2110 func (s *GetHLSStreamingSessionURLOutput) SetHLSStreamingSessionURL(v string) *GetHLSStreamingSessionURLOutput { 2111 s.HLSStreamingSessionURL = &v 2112 return s 2113 } 2114 2115 type GetMediaForFragmentListInput struct { 2116 _ struct{} `type:"structure"` 2117 2118 // A list of the numbers of fragments for which to retrieve media. You retrieve 2119 // these values with ListFragments. 2120 // 2121 // Fragments is a required field 2122 Fragments []*string `min:"1" type:"list" required:"true"` 2123 2124 // The Amazon Resource Name (ARN) of the stream from which to retrieve fragment 2125 // media. Specify either this parameter or the StreamName parameter. 2126 StreamARN *string `min:"1" type:"string"` 2127 2128 // The name of the stream from which to retrieve fragment media. Specify either 2129 // this parameter or the StreamARN parameter. 2130 StreamName *string `min:"1" type:"string"` 2131 } 2132 2133 // String returns the string representation. 2134 // 2135 // API parameter values that are decorated as "sensitive" in the API will not 2136 // be included in the string output. The member name will be present, but the 2137 // value will be replaced with "sensitive". 2138 func (s GetMediaForFragmentListInput) String() string { 2139 return awsutil.Prettify(s) 2140 } 2141 2142 // GoString returns the string representation. 2143 // 2144 // API parameter values that are decorated as "sensitive" in the API will not 2145 // be included in the string output. The member name will be present, but the 2146 // value will be replaced with "sensitive". 2147 func (s GetMediaForFragmentListInput) GoString() string { 2148 return s.String() 2149 } 2150 2151 // Validate inspects the fields of the type to determine if they are valid. 2152 func (s *GetMediaForFragmentListInput) Validate() error { 2153 invalidParams := request.ErrInvalidParams{Context: "GetMediaForFragmentListInput"} 2154 if s.Fragments == nil { 2155 invalidParams.Add(request.NewErrParamRequired("Fragments")) 2156 } 2157 if s.Fragments != nil && len(s.Fragments) < 1 { 2158 invalidParams.Add(request.NewErrParamMinLen("Fragments", 1)) 2159 } 2160 if s.StreamARN != nil && len(*s.StreamARN) < 1 { 2161 invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) 2162 } 2163 if s.StreamName != nil && len(*s.StreamName) < 1 { 2164 invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) 2165 } 2166 2167 if invalidParams.Len() > 0 { 2168 return invalidParams 2169 } 2170 return nil 2171 } 2172 2173 // SetFragments sets the Fragments field's value. 2174 func (s *GetMediaForFragmentListInput) SetFragments(v []*string) *GetMediaForFragmentListInput { 2175 s.Fragments = v 2176 return s 2177 } 2178 2179 // SetStreamARN sets the StreamARN field's value. 2180 func (s *GetMediaForFragmentListInput) SetStreamARN(v string) *GetMediaForFragmentListInput { 2181 s.StreamARN = &v 2182 return s 2183 } 2184 2185 // SetStreamName sets the StreamName field's value. 2186 func (s *GetMediaForFragmentListInput) SetStreamName(v string) *GetMediaForFragmentListInput { 2187 s.StreamName = &v 2188 return s 2189 } 2190 2191 type GetMediaForFragmentListOutput struct { 2192 _ struct{} `type:"structure" payload:"Payload"` 2193 2194 // The content type of the requested media. 2195 ContentType *string `location:"header" locationName:"Content-Type" min:"1" type:"string"` 2196 2197 // The payload that Kinesis Video Streams returns is a sequence of chunks from 2198 // the specified stream. For information about the chunks, see PutMedia (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html). 2199 // The chunks that Kinesis Video Streams returns in the GetMediaForFragmentList 2200 // call also include the following additional Matroska (MKV) tags: 2201 // 2202 // * AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk. 2203 // 2204 // * AWS_KINESISVIDEO_SERVER_SIDE_TIMESTAMP - Server-side timestamp of the 2205 // fragment. 2206 // 2207 // * AWS_KINESISVIDEO_PRODUCER_SIDE_TIMESTAMP - Producer-side timestamp of 2208 // the fragment. 2209 // 2210 // The following tags will be included if an exception occurs: 2211 // 2212 // * AWS_KINESISVIDEO_FRAGMENT_NUMBER - The number of the fragment that threw 2213 // the exception 2214 // 2215 // * AWS_KINESISVIDEO_EXCEPTION_ERROR_CODE - The integer code of the exception 2216 // 2217 // * AWS_KINESISVIDEO_EXCEPTION_MESSAGE - A text description of the exception 2218 Payload io.ReadCloser `type:"blob"` 2219 } 2220 2221 // String returns the string representation. 2222 // 2223 // API parameter values that are decorated as "sensitive" in the API will not 2224 // be included in the string output. The member name will be present, but the 2225 // value will be replaced with "sensitive". 2226 func (s GetMediaForFragmentListOutput) String() string { 2227 return awsutil.Prettify(s) 2228 } 2229 2230 // GoString returns the string representation. 2231 // 2232 // API parameter values that are decorated as "sensitive" in the API will not 2233 // be included in the string output. The member name will be present, but the 2234 // value will be replaced with "sensitive". 2235 func (s GetMediaForFragmentListOutput) GoString() string { 2236 return s.String() 2237 } 2238 2239 // SetContentType sets the ContentType field's value. 2240 func (s *GetMediaForFragmentListOutput) SetContentType(v string) *GetMediaForFragmentListOutput { 2241 s.ContentType = &v 2242 return s 2243 } 2244 2245 // SetPayload sets the Payload field's value. 2246 func (s *GetMediaForFragmentListOutput) SetPayload(v io.ReadCloser) *GetMediaForFragmentListOutput { 2247 s.Payload = v 2248 return s 2249 } 2250 2251 // Contains the range of timestamps for the requested media, and the source 2252 // of the timestamps. 2253 type HLSFragmentSelector struct { 2254 _ struct{} `type:"structure"` 2255 2256 // The source of the timestamps for the requested media. 2257 // 2258 // When FragmentSelectorType is set to PRODUCER_TIMESTAMP and GetHLSStreamingSessionURLInput$PlaybackMode 2259 // is ON_DEMAND or LIVE_REPLAY, the first fragment ingested with a producer 2260 // timestamp within the specified FragmentSelector$TimestampRange is included 2261 // in the media playlist. In addition, the fragments with producer timestamps 2262 // within the TimestampRange ingested immediately following the first fragment 2263 // (up to the GetHLSStreamingSessionURLInput$MaxMediaPlaylistFragmentResults 2264 // value) are included. 2265 // 2266 // Fragments that have duplicate producer timestamps are deduplicated. This 2267 // means that if producers are producing a stream of fragments with producer 2268 // timestamps that are approximately equal to the true clock time, the HLS media 2269 // playlists will contain all of the fragments within the requested timestamp 2270 // range. If some fragments are ingested within the same time range and very 2271 // different points in time, only the oldest ingested collection of fragments 2272 // are returned. 2273 // 2274 // When FragmentSelectorType is set to PRODUCER_TIMESTAMP and GetHLSStreamingSessionURLInput$PlaybackMode 2275 // is LIVE, the producer timestamps are used in the MP4 fragments and for deduplication. 2276 // But the most recently ingested fragments based on server timestamps are included 2277 // in the HLS media playlist. This means that even if fragments ingested in 2278 // the past have producer timestamps with values now, they are not included 2279 // in the HLS media playlist. 2280 // 2281 // The default is SERVER_TIMESTAMP. 2282 FragmentSelectorType *string `type:"string" enum:"HLSFragmentSelectorType"` 2283 2284 // The start and end of the timestamp range for the requested media. 2285 // 2286 // This value should not be present if PlaybackType is LIVE. 2287 TimestampRange *HLSTimestampRange `type:"structure"` 2288 } 2289 2290 // String returns the string representation. 2291 // 2292 // API parameter values that are decorated as "sensitive" in the API will not 2293 // be included in the string output. The member name will be present, but the 2294 // value will be replaced with "sensitive". 2295 func (s HLSFragmentSelector) String() string { 2296 return awsutil.Prettify(s) 2297 } 2298 2299 // GoString returns the string representation. 2300 // 2301 // API parameter values that are decorated as "sensitive" in the API will not 2302 // be included in the string output. The member name will be present, but the 2303 // value will be replaced with "sensitive". 2304 func (s HLSFragmentSelector) GoString() string { 2305 return s.String() 2306 } 2307 2308 // SetFragmentSelectorType sets the FragmentSelectorType field's value. 2309 func (s *HLSFragmentSelector) SetFragmentSelectorType(v string) *HLSFragmentSelector { 2310 s.FragmentSelectorType = &v 2311 return s 2312 } 2313 2314 // SetTimestampRange sets the TimestampRange field's value. 2315 func (s *HLSFragmentSelector) SetTimestampRange(v *HLSTimestampRange) *HLSFragmentSelector { 2316 s.TimestampRange = v 2317 return s 2318 } 2319 2320 // The start and end of the timestamp range for the requested media. 2321 // 2322 // This value should not be present if PlaybackType is LIVE. 2323 type HLSTimestampRange struct { 2324 _ struct{} `type:"structure"` 2325 2326 // The end of the timestamp range for the requested media. This value must be 2327 // within 24 hours of the specified StartTimestamp, and it must be later than 2328 // the StartTimestamp value. 2329 // 2330 // If FragmentSelectorType for the request is SERVER_TIMESTAMP, this value must 2331 // be in the past. 2332 // 2333 // The EndTimestamp value is required for ON_DEMAND mode, but optional for LIVE_REPLAY 2334 // mode. If the EndTimestamp is not set for LIVE_REPLAY mode then the session 2335 // will continue to include newly ingested fragments until the session expires. 2336 // 2337 // This value is inclusive. The EndTimestamp is compared to the (starting) timestamp 2338 // of the fragment. Fragments that start before the EndTimestamp value and continue 2339 // past it are included in the session. 2340 EndTimestamp *time.Time `type:"timestamp"` 2341 2342 // The start of the timestamp range for the requested media. 2343 // 2344 // If the HLSTimestampRange value is specified, the StartTimestamp value is 2345 // required. 2346 // 2347 // Only fragments that start exactly at or after StartTimestamp are included 2348 // in the session. Fragments that start before StartTimestamp and continue past 2349 // it aren't included in the session. If FragmentSelectorType is SERVER_TIMESTAMP, 2350 // the StartTimestamp must be later than the stream head. 2351 StartTimestamp *time.Time `type:"timestamp"` 2352 } 2353 2354 // String returns the string representation. 2355 // 2356 // API parameter values that are decorated as "sensitive" in the API will not 2357 // be included in the string output. The member name will be present, but the 2358 // value will be replaced with "sensitive". 2359 func (s HLSTimestampRange) String() string { 2360 return awsutil.Prettify(s) 2361 } 2362 2363 // GoString returns the string representation. 2364 // 2365 // API parameter values that are decorated as "sensitive" in the API will not 2366 // be included in the string output. The member name will be present, but the 2367 // value will be replaced with "sensitive". 2368 func (s HLSTimestampRange) GoString() string { 2369 return s.String() 2370 } 2371 2372 // SetEndTimestamp sets the EndTimestamp field's value. 2373 func (s *HLSTimestampRange) SetEndTimestamp(v time.Time) *HLSTimestampRange { 2374 s.EndTimestamp = &v 2375 return s 2376 } 2377 2378 // SetStartTimestamp sets the StartTimestamp field's value. 2379 func (s *HLSTimestampRange) SetStartTimestamp(v time.Time) *HLSTimestampRange { 2380 s.StartTimestamp = &v 2381 return s 2382 } 2383 2384 // A specified parameter exceeds its restrictions, is not supported, or can't 2385 // be used. 2386 type InvalidArgumentException struct { 2387 _ struct{} `type:"structure"` 2388 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2389 2390 Message_ *string `locationName:"Message" type:"string"` 2391 } 2392 2393 // String returns the string representation. 2394 // 2395 // API parameter values that are decorated as "sensitive" in the API will not 2396 // be included in the string output. The member name will be present, but the 2397 // value will be replaced with "sensitive". 2398 func (s InvalidArgumentException) String() string { 2399 return awsutil.Prettify(s) 2400 } 2401 2402 // GoString returns the string representation. 2403 // 2404 // API parameter values that are decorated as "sensitive" in the API will not 2405 // be included in the string output. The member name will be present, but the 2406 // value will be replaced with "sensitive". 2407 func (s InvalidArgumentException) GoString() string { 2408 return s.String() 2409 } 2410 2411 func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error { 2412 return &InvalidArgumentException{ 2413 RespMetadata: v, 2414 } 2415 } 2416 2417 // Code returns the exception type name. 2418 func (s *InvalidArgumentException) Code() string { 2419 return "InvalidArgumentException" 2420 } 2421 2422 // Message returns the exception's message. 2423 func (s *InvalidArgumentException) Message() string { 2424 if s.Message_ != nil { 2425 return *s.Message_ 2426 } 2427 return "" 2428 } 2429 2430 // OrigErr always returns nil, satisfies awserr.Error interface. 2431 func (s *InvalidArgumentException) OrigErr() error { 2432 return nil 2433 } 2434 2435 func (s *InvalidArgumentException) Error() string { 2436 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2437 } 2438 2439 // Status code returns the HTTP status code for the request's response error. 2440 func (s *InvalidArgumentException) StatusCode() int { 2441 return s.RespMetadata.StatusCode 2442 } 2443 2444 // RequestID returns the service's response RequestID for request. 2445 func (s *InvalidArgumentException) RequestID() string { 2446 return s.RespMetadata.RequestID 2447 } 2448 2449 // The codec private data in at least one of the tracks of the video stream 2450 // is not valid for this operation. 2451 type InvalidCodecPrivateDataException struct { 2452 _ struct{} `type:"structure"` 2453 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2454 2455 Message_ *string `locationName:"Message" type:"string"` 2456 } 2457 2458 // String returns the string representation. 2459 // 2460 // API parameter values that are decorated as "sensitive" in the API will not 2461 // be included in the string output. The member name will be present, but the 2462 // value will be replaced with "sensitive". 2463 func (s InvalidCodecPrivateDataException) String() string { 2464 return awsutil.Prettify(s) 2465 } 2466 2467 // GoString returns the string representation. 2468 // 2469 // API parameter values that are decorated as "sensitive" in the API will not 2470 // be included in the string output. The member name will be present, but the 2471 // value will be replaced with "sensitive". 2472 func (s InvalidCodecPrivateDataException) GoString() string { 2473 return s.String() 2474 } 2475 2476 func newErrorInvalidCodecPrivateDataException(v protocol.ResponseMetadata) error { 2477 return &InvalidCodecPrivateDataException{ 2478 RespMetadata: v, 2479 } 2480 } 2481 2482 // Code returns the exception type name. 2483 func (s *InvalidCodecPrivateDataException) Code() string { 2484 return "InvalidCodecPrivateDataException" 2485 } 2486 2487 // Message returns the exception's message. 2488 func (s *InvalidCodecPrivateDataException) Message() string { 2489 if s.Message_ != nil { 2490 return *s.Message_ 2491 } 2492 return "" 2493 } 2494 2495 // OrigErr always returns nil, satisfies awserr.Error interface. 2496 func (s *InvalidCodecPrivateDataException) OrigErr() error { 2497 return nil 2498 } 2499 2500 func (s *InvalidCodecPrivateDataException) Error() string { 2501 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2502 } 2503 2504 // Status code returns the HTTP status code for the request's response error. 2505 func (s *InvalidCodecPrivateDataException) StatusCode() int { 2506 return s.RespMetadata.StatusCode 2507 } 2508 2509 // RequestID returns the service's response RequestID for request. 2510 func (s *InvalidCodecPrivateDataException) RequestID() string { 2511 return s.RespMetadata.RequestID 2512 } 2513 2514 // One or more frames in the requested clip could not be parsed based on the 2515 // specified codec. 2516 type InvalidMediaFrameException struct { 2517 _ struct{} `type:"structure"` 2518 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2519 2520 Message_ *string `locationName:"Message" type:"string"` 2521 } 2522 2523 // String returns the string representation. 2524 // 2525 // API parameter values that are decorated as "sensitive" in the API will not 2526 // be included in the string output. The member name will be present, but the 2527 // value will be replaced with "sensitive". 2528 func (s InvalidMediaFrameException) String() string { 2529 return awsutil.Prettify(s) 2530 } 2531 2532 // GoString returns the string representation. 2533 // 2534 // API parameter values that are decorated as "sensitive" in the API will not 2535 // be included in the string output. The member name will be present, but the 2536 // value will be replaced with "sensitive". 2537 func (s InvalidMediaFrameException) GoString() string { 2538 return s.String() 2539 } 2540 2541 func newErrorInvalidMediaFrameException(v protocol.ResponseMetadata) error { 2542 return &InvalidMediaFrameException{ 2543 RespMetadata: v, 2544 } 2545 } 2546 2547 // Code returns the exception type name. 2548 func (s *InvalidMediaFrameException) Code() string { 2549 return "InvalidMediaFrameException" 2550 } 2551 2552 // Message returns the exception's message. 2553 func (s *InvalidMediaFrameException) Message() string { 2554 if s.Message_ != nil { 2555 return *s.Message_ 2556 } 2557 return "" 2558 } 2559 2560 // OrigErr always returns nil, satisfies awserr.Error interface. 2561 func (s *InvalidMediaFrameException) OrigErr() error { 2562 return nil 2563 } 2564 2565 func (s *InvalidMediaFrameException) Error() string { 2566 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2567 } 2568 2569 // Status code returns the HTTP status code for the request's response error. 2570 func (s *InvalidMediaFrameException) StatusCode() int { 2571 return s.RespMetadata.StatusCode 2572 } 2573 2574 // RequestID returns the service's response RequestID for request. 2575 func (s *InvalidMediaFrameException) RequestID() string { 2576 return s.RespMetadata.RequestID 2577 } 2578 2579 type ListFragmentsInput struct { 2580 _ struct{} `type:"structure"` 2581 2582 // Describes the timestamp range and timestamp origin for the range of fragments 2583 // to return. 2584 FragmentSelector *FragmentSelector `type:"structure"` 2585 2586 // The total number of fragments to return. If the total number of fragments 2587 // available is more than the value specified in max-results, then a ListFragmentsOutput$NextToken 2588 // is provided in the output that you can use to resume pagination. 2589 MaxResults *int64 `min:"1" type:"long"` 2590 2591 // A token to specify where to start paginating. This is the ListFragmentsOutput$NextToken 2592 // from a previously truncated response. 2593 NextToken *string `min:"1" type:"string"` 2594 2595 // The Amazon Resource Name (ARN) of the stream from which to retrieve a fragment 2596 // list. Specify either this parameter or the StreamName parameter. 2597 StreamARN *string `min:"1" type:"string"` 2598 2599 // The name of the stream from which to retrieve a fragment list. Specify either 2600 // this parameter or the StreamARN parameter. 2601 StreamName *string `min:"1" type:"string"` 2602 } 2603 2604 // String returns the string representation. 2605 // 2606 // API parameter values that are decorated as "sensitive" in the API will not 2607 // be included in the string output. The member name will be present, but the 2608 // value will be replaced with "sensitive". 2609 func (s ListFragmentsInput) String() string { 2610 return awsutil.Prettify(s) 2611 } 2612 2613 // GoString returns the string representation. 2614 // 2615 // API parameter values that are decorated as "sensitive" in the API will not 2616 // be included in the string output. The member name will be present, but the 2617 // value will be replaced with "sensitive". 2618 func (s ListFragmentsInput) GoString() string { 2619 return s.String() 2620 } 2621 2622 // Validate inspects the fields of the type to determine if they are valid. 2623 func (s *ListFragmentsInput) Validate() error { 2624 invalidParams := request.ErrInvalidParams{Context: "ListFragmentsInput"} 2625 if s.MaxResults != nil && *s.MaxResults < 1 { 2626 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2627 } 2628 if s.NextToken != nil && len(*s.NextToken) < 1 { 2629 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 2630 } 2631 if s.StreamARN != nil && len(*s.StreamARN) < 1 { 2632 invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) 2633 } 2634 if s.StreamName != nil && len(*s.StreamName) < 1 { 2635 invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) 2636 } 2637 if s.FragmentSelector != nil { 2638 if err := s.FragmentSelector.Validate(); err != nil { 2639 invalidParams.AddNested("FragmentSelector", err.(request.ErrInvalidParams)) 2640 } 2641 } 2642 2643 if invalidParams.Len() > 0 { 2644 return invalidParams 2645 } 2646 return nil 2647 } 2648 2649 // SetFragmentSelector sets the FragmentSelector field's value. 2650 func (s *ListFragmentsInput) SetFragmentSelector(v *FragmentSelector) *ListFragmentsInput { 2651 s.FragmentSelector = v 2652 return s 2653 } 2654 2655 // SetMaxResults sets the MaxResults field's value. 2656 func (s *ListFragmentsInput) SetMaxResults(v int64) *ListFragmentsInput { 2657 s.MaxResults = &v 2658 return s 2659 } 2660 2661 // SetNextToken sets the NextToken field's value. 2662 func (s *ListFragmentsInput) SetNextToken(v string) *ListFragmentsInput { 2663 s.NextToken = &v 2664 return s 2665 } 2666 2667 // SetStreamARN sets the StreamARN field's value. 2668 func (s *ListFragmentsInput) SetStreamARN(v string) *ListFragmentsInput { 2669 s.StreamARN = &v 2670 return s 2671 } 2672 2673 // SetStreamName sets the StreamName field's value. 2674 func (s *ListFragmentsInput) SetStreamName(v string) *ListFragmentsInput { 2675 s.StreamName = &v 2676 return s 2677 } 2678 2679 type ListFragmentsOutput struct { 2680 _ struct{} `type:"structure"` 2681 2682 // A list of archived Fragment objects from the stream that meet the selector 2683 // criteria. Results are in no specific order, even across pages. 2684 Fragments []*Fragment `type:"list"` 2685 2686 // If the returned list is truncated, the operation returns this token to use 2687 // to retrieve the next page of results. This value is null when there are no 2688 // more results to return. 2689 NextToken *string `min:"1" type:"string"` 2690 } 2691 2692 // String returns the string representation. 2693 // 2694 // API parameter values that are decorated as "sensitive" in the API will not 2695 // be included in the string output. The member name will be present, but the 2696 // value will be replaced with "sensitive". 2697 func (s ListFragmentsOutput) String() string { 2698 return awsutil.Prettify(s) 2699 } 2700 2701 // GoString returns the string representation. 2702 // 2703 // API parameter values that are decorated as "sensitive" in the API will not 2704 // be included in the string output. The member name will be present, but the 2705 // value will be replaced with "sensitive". 2706 func (s ListFragmentsOutput) GoString() string { 2707 return s.String() 2708 } 2709 2710 // SetFragments sets the Fragments field's value. 2711 func (s *ListFragmentsOutput) SetFragments(v []*Fragment) *ListFragmentsOutput { 2712 s.Fragments = v 2713 return s 2714 } 2715 2716 // SetNextToken sets the NextToken field's value. 2717 func (s *ListFragmentsOutput) SetNextToken(v string) *ListFragmentsOutput { 2718 s.NextToken = &v 2719 return s 2720 } 2721 2722 // No codec private data was found in at least one of tracks of the video stream. 2723 type MissingCodecPrivateDataException struct { 2724 _ struct{} `type:"structure"` 2725 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2726 2727 Message_ *string `locationName:"Message" type:"string"` 2728 } 2729 2730 // String returns the string representation. 2731 // 2732 // API parameter values that are decorated as "sensitive" in the API will not 2733 // be included in the string output. The member name will be present, but the 2734 // value will be replaced with "sensitive". 2735 func (s MissingCodecPrivateDataException) String() string { 2736 return awsutil.Prettify(s) 2737 } 2738 2739 // GoString returns the string representation. 2740 // 2741 // API parameter values that are decorated as "sensitive" in the API will not 2742 // be included in the string output. The member name will be present, but the 2743 // value will be replaced with "sensitive". 2744 func (s MissingCodecPrivateDataException) GoString() string { 2745 return s.String() 2746 } 2747 2748 func newErrorMissingCodecPrivateDataException(v protocol.ResponseMetadata) error { 2749 return &MissingCodecPrivateDataException{ 2750 RespMetadata: v, 2751 } 2752 } 2753 2754 // Code returns the exception type name. 2755 func (s *MissingCodecPrivateDataException) Code() string { 2756 return "MissingCodecPrivateDataException" 2757 } 2758 2759 // Message returns the exception's message. 2760 func (s *MissingCodecPrivateDataException) Message() string { 2761 if s.Message_ != nil { 2762 return *s.Message_ 2763 } 2764 return "" 2765 } 2766 2767 // OrigErr always returns nil, satisfies awserr.Error interface. 2768 func (s *MissingCodecPrivateDataException) OrigErr() error { 2769 return nil 2770 } 2771 2772 func (s *MissingCodecPrivateDataException) Error() string { 2773 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2774 } 2775 2776 // Status code returns the HTTP status code for the request's response error. 2777 func (s *MissingCodecPrivateDataException) StatusCode() int { 2778 return s.RespMetadata.StatusCode 2779 } 2780 2781 // RequestID returns the service's response RequestID for request. 2782 func (s *MissingCodecPrivateDataException) RequestID() string { 2783 return s.RespMetadata.RequestID 2784 } 2785 2786 // A streaming session was requested for a stream that does not retain data 2787 // (that is, has a DataRetentionInHours of 0). 2788 type NoDataRetentionException struct { 2789 _ struct{} `type:"structure"` 2790 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2791 2792 Message_ *string `locationName:"Message" type:"string"` 2793 } 2794 2795 // String returns the string representation. 2796 // 2797 // API parameter values that are decorated as "sensitive" in the API will not 2798 // be included in the string output. The member name will be present, but the 2799 // value will be replaced with "sensitive". 2800 func (s NoDataRetentionException) String() string { 2801 return awsutil.Prettify(s) 2802 } 2803 2804 // GoString returns the string representation. 2805 // 2806 // API parameter values that are decorated as "sensitive" in the API will not 2807 // be included in the string output. The member name will be present, but the 2808 // value will be replaced with "sensitive". 2809 func (s NoDataRetentionException) GoString() string { 2810 return s.String() 2811 } 2812 2813 func newErrorNoDataRetentionException(v protocol.ResponseMetadata) error { 2814 return &NoDataRetentionException{ 2815 RespMetadata: v, 2816 } 2817 } 2818 2819 // Code returns the exception type name. 2820 func (s *NoDataRetentionException) Code() string { 2821 return "NoDataRetentionException" 2822 } 2823 2824 // Message returns the exception's message. 2825 func (s *NoDataRetentionException) Message() string { 2826 if s.Message_ != nil { 2827 return *s.Message_ 2828 } 2829 return "" 2830 } 2831 2832 // OrigErr always returns nil, satisfies awserr.Error interface. 2833 func (s *NoDataRetentionException) OrigErr() error { 2834 return nil 2835 } 2836 2837 func (s *NoDataRetentionException) Error() string { 2838 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2839 } 2840 2841 // Status code returns the HTTP status code for the request's response error. 2842 func (s *NoDataRetentionException) StatusCode() int { 2843 return s.RespMetadata.StatusCode 2844 } 2845 2846 // RequestID returns the service's response RequestID for request. 2847 func (s *NoDataRetentionException) RequestID() string { 2848 return s.RespMetadata.RequestID 2849 } 2850 2851 // Status Code: 403, The caller is not authorized to perform an operation on 2852 // the given stream, or the token has expired. 2853 type NotAuthorizedException struct { 2854 _ struct{} `type:"structure"` 2855 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2856 2857 Message_ *string `locationName:"Message" type:"string"` 2858 } 2859 2860 // String returns the string representation. 2861 // 2862 // API parameter values that are decorated as "sensitive" in the API will not 2863 // be included in the string output. The member name will be present, but the 2864 // value will be replaced with "sensitive". 2865 func (s NotAuthorizedException) String() string { 2866 return awsutil.Prettify(s) 2867 } 2868 2869 // GoString returns the string representation. 2870 // 2871 // API parameter values that are decorated as "sensitive" in the API will not 2872 // be included in the string output. The member name will be present, but the 2873 // value will be replaced with "sensitive". 2874 func (s NotAuthorizedException) GoString() string { 2875 return s.String() 2876 } 2877 2878 func newErrorNotAuthorizedException(v protocol.ResponseMetadata) error { 2879 return &NotAuthorizedException{ 2880 RespMetadata: v, 2881 } 2882 } 2883 2884 // Code returns the exception type name. 2885 func (s *NotAuthorizedException) Code() string { 2886 return "NotAuthorizedException" 2887 } 2888 2889 // Message returns the exception's message. 2890 func (s *NotAuthorizedException) Message() string { 2891 if s.Message_ != nil { 2892 return *s.Message_ 2893 } 2894 return "" 2895 } 2896 2897 // OrigErr always returns nil, satisfies awserr.Error interface. 2898 func (s *NotAuthorizedException) OrigErr() error { 2899 return nil 2900 } 2901 2902 func (s *NotAuthorizedException) Error() string { 2903 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2904 } 2905 2906 // Status code returns the HTTP status code for the request's response error. 2907 func (s *NotAuthorizedException) StatusCode() int { 2908 return s.RespMetadata.StatusCode 2909 } 2910 2911 // RequestID returns the service's response RequestID for request. 2912 func (s *NotAuthorizedException) RequestID() string { 2913 return s.RespMetadata.RequestID 2914 } 2915 2916 // GetMedia throws this error when Kinesis Video Streams can't find the stream 2917 // that you specified. 2918 // 2919 // GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error 2920 // if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested 2921 // for a stream that has no fragments within the requested time range, or if 2922 // a session with a PlaybackMode of LIVE is requested for a stream that has 2923 // no fragments within the last 30 seconds. 2924 type ResourceNotFoundException struct { 2925 _ struct{} `type:"structure"` 2926 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2927 2928 Message_ *string `locationName:"Message" type:"string"` 2929 } 2930 2931 // String returns the string representation. 2932 // 2933 // API parameter values that are decorated as "sensitive" in the API will not 2934 // be included in the string output. The member name will be present, but the 2935 // value will be replaced with "sensitive". 2936 func (s ResourceNotFoundException) String() string { 2937 return awsutil.Prettify(s) 2938 } 2939 2940 // GoString returns the string representation. 2941 // 2942 // API parameter values that are decorated as "sensitive" in the API will not 2943 // be included in the string output. The member name will be present, but the 2944 // value will be replaced with "sensitive". 2945 func (s ResourceNotFoundException) GoString() string { 2946 return s.String() 2947 } 2948 2949 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 2950 return &ResourceNotFoundException{ 2951 RespMetadata: v, 2952 } 2953 } 2954 2955 // Code returns the exception type name. 2956 func (s *ResourceNotFoundException) Code() string { 2957 return "ResourceNotFoundException" 2958 } 2959 2960 // Message returns the exception's message. 2961 func (s *ResourceNotFoundException) Message() string { 2962 if s.Message_ != nil { 2963 return *s.Message_ 2964 } 2965 return "" 2966 } 2967 2968 // OrigErr always returns nil, satisfies awserr.Error interface. 2969 func (s *ResourceNotFoundException) OrigErr() error { 2970 return nil 2971 } 2972 2973 func (s *ResourceNotFoundException) Error() string { 2974 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2975 } 2976 2977 // Status code returns the HTTP status code for the request's response error. 2978 func (s *ResourceNotFoundException) StatusCode() int { 2979 return s.RespMetadata.StatusCode 2980 } 2981 2982 // RequestID returns the service's response RequestID for request. 2983 func (s *ResourceNotFoundException) RequestID() string { 2984 return s.RespMetadata.RequestID 2985 } 2986 2987 // The range of timestamps for which to return fragments. 2988 type TimestampRange struct { 2989 _ struct{} `type:"structure"` 2990 2991 // The ending timestamp in the range of timestamps for which to return fragments. 2992 // 2993 // EndTimestamp is a required field 2994 EndTimestamp *time.Time `type:"timestamp" required:"true"` 2995 2996 // The starting timestamp in the range of timestamps for which to return fragments. 2997 // 2998 // StartTimestamp is a required field 2999 StartTimestamp *time.Time `type:"timestamp" required:"true"` 3000 } 3001 3002 // String returns the string representation. 3003 // 3004 // API parameter values that are decorated as "sensitive" in the API will not 3005 // be included in the string output. The member name will be present, but the 3006 // value will be replaced with "sensitive". 3007 func (s TimestampRange) String() string { 3008 return awsutil.Prettify(s) 3009 } 3010 3011 // GoString returns the string representation. 3012 // 3013 // API parameter values that are decorated as "sensitive" in the API will not 3014 // be included in the string output. The member name will be present, but the 3015 // value will be replaced with "sensitive". 3016 func (s TimestampRange) GoString() string { 3017 return s.String() 3018 } 3019 3020 // Validate inspects the fields of the type to determine if they are valid. 3021 func (s *TimestampRange) Validate() error { 3022 invalidParams := request.ErrInvalidParams{Context: "TimestampRange"} 3023 if s.EndTimestamp == nil { 3024 invalidParams.Add(request.NewErrParamRequired("EndTimestamp")) 3025 } 3026 if s.StartTimestamp == nil { 3027 invalidParams.Add(request.NewErrParamRequired("StartTimestamp")) 3028 } 3029 3030 if invalidParams.Len() > 0 { 3031 return invalidParams 3032 } 3033 return nil 3034 } 3035 3036 // SetEndTimestamp sets the EndTimestamp field's value. 3037 func (s *TimestampRange) SetEndTimestamp(v time.Time) *TimestampRange { 3038 s.EndTimestamp = &v 3039 return s 3040 } 3041 3042 // SetStartTimestamp sets the StartTimestamp field's value. 3043 func (s *TimestampRange) SetStartTimestamp(v time.Time) *TimestampRange { 3044 s.StartTimestamp = &v 3045 return s 3046 } 3047 3048 // The type of the media (for example, h.264 or h.265 video or ACC or G.711 3049 // audio) could not be determined from the codec IDs of the tracks in the first 3050 // fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC 3051 // and, optionally, the codec ID for track 2 should be A_AAC. 3052 type UnsupportedStreamMediaTypeException struct { 3053 _ struct{} `type:"structure"` 3054 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3055 3056 Message_ *string `locationName:"Message" type:"string"` 3057 } 3058 3059 // String returns the string representation. 3060 // 3061 // API parameter values that are decorated as "sensitive" in the API will not 3062 // be included in the string output. The member name will be present, but the 3063 // value will be replaced with "sensitive". 3064 func (s UnsupportedStreamMediaTypeException) String() string { 3065 return awsutil.Prettify(s) 3066 } 3067 3068 // GoString returns the string representation. 3069 // 3070 // API parameter values that are decorated as "sensitive" in the API will not 3071 // be included in the string output. The member name will be present, but the 3072 // value will be replaced with "sensitive". 3073 func (s UnsupportedStreamMediaTypeException) GoString() string { 3074 return s.String() 3075 } 3076 3077 func newErrorUnsupportedStreamMediaTypeException(v protocol.ResponseMetadata) error { 3078 return &UnsupportedStreamMediaTypeException{ 3079 RespMetadata: v, 3080 } 3081 } 3082 3083 // Code returns the exception type name. 3084 func (s *UnsupportedStreamMediaTypeException) Code() string { 3085 return "UnsupportedStreamMediaTypeException" 3086 } 3087 3088 // Message returns the exception's message. 3089 func (s *UnsupportedStreamMediaTypeException) Message() string { 3090 if s.Message_ != nil { 3091 return *s.Message_ 3092 } 3093 return "" 3094 } 3095 3096 // OrigErr always returns nil, satisfies awserr.Error interface. 3097 func (s *UnsupportedStreamMediaTypeException) OrigErr() error { 3098 return nil 3099 } 3100 3101 func (s *UnsupportedStreamMediaTypeException) Error() string { 3102 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3103 } 3104 3105 // Status code returns the HTTP status code for the request's response error. 3106 func (s *UnsupportedStreamMediaTypeException) StatusCode() int { 3107 return s.RespMetadata.StatusCode 3108 } 3109 3110 // RequestID returns the service's response RequestID for request. 3111 func (s *UnsupportedStreamMediaTypeException) RequestID() string { 3112 return s.RespMetadata.RequestID 3113 } 3114 3115 const ( 3116 // ClipFragmentSelectorTypeProducerTimestamp is a ClipFragmentSelectorType enum value 3117 ClipFragmentSelectorTypeProducerTimestamp = "PRODUCER_TIMESTAMP" 3118 3119 // ClipFragmentSelectorTypeServerTimestamp is a ClipFragmentSelectorType enum value 3120 ClipFragmentSelectorTypeServerTimestamp = "SERVER_TIMESTAMP" 3121 ) 3122 3123 // ClipFragmentSelectorType_Values returns all elements of the ClipFragmentSelectorType enum 3124 func ClipFragmentSelectorType_Values() []string { 3125 return []string{ 3126 ClipFragmentSelectorTypeProducerTimestamp, 3127 ClipFragmentSelectorTypeServerTimestamp, 3128 } 3129 } 3130 3131 const ( 3132 // ContainerFormatFragmentedMp4 is a ContainerFormat enum value 3133 ContainerFormatFragmentedMp4 = "FRAGMENTED_MP4" 3134 3135 // ContainerFormatMpegTs is a ContainerFormat enum value 3136 ContainerFormatMpegTs = "MPEG_TS" 3137 ) 3138 3139 // ContainerFormat_Values returns all elements of the ContainerFormat enum 3140 func ContainerFormat_Values() []string { 3141 return []string{ 3142 ContainerFormatFragmentedMp4, 3143 ContainerFormatMpegTs, 3144 } 3145 } 3146 3147 const ( 3148 // DASHDisplayFragmentNumberAlways is a DASHDisplayFragmentNumber enum value 3149 DASHDisplayFragmentNumberAlways = "ALWAYS" 3150 3151 // DASHDisplayFragmentNumberNever is a DASHDisplayFragmentNumber enum value 3152 DASHDisplayFragmentNumberNever = "NEVER" 3153 ) 3154 3155 // DASHDisplayFragmentNumber_Values returns all elements of the DASHDisplayFragmentNumber enum 3156 func DASHDisplayFragmentNumber_Values() []string { 3157 return []string{ 3158 DASHDisplayFragmentNumberAlways, 3159 DASHDisplayFragmentNumberNever, 3160 } 3161 } 3162 3163 const ( 3164 // DASHDisplayFragmentTimestampAlways is a DASHDisplayFragmentTimestamp enum value 3165 DASHDisplayFragmentTimestampAlways = "ALWAYS" 3166 3167 // DASHDisplayFragmentTimestampNever is a DASHDisplayFragmentTimestamp enum value 3168 DASHDisplayFragmentTimestampNever = "NEVER" 3169 ) 3170 3171 // DASHDisplayFragmentTimestamp_Values returns all elements of the DASHDisplayFragmentTimestamp enum 3172 func DASHDisplayFragmentTimestamp_Values() []string { 3173 return []string{ 3174 DASHDisplayFragmentTimestampAlways, 3175 DASHDisplayFragmentTimestampNever, 3176 } 3177 } 3178 3179 const ( 3180 // DASHFragmentSelectorTypeProducerTimestamp is a DASHFragmentSelectorType enum value 3181 DASHFragmentSelectorTypeProducerTimestamp = "PRODUCER_TIMESTAMP" 3182 3183 // DASHFragmentSelectorTypeServerTimestamp is a DASHFragmentSelectorType enum value 3184 DASHFragmentSelectorTypeServerTimestamp = "SERVER_TIMESTAMP" 3185 ) 3186 3187 // DASHFragmentSelectorType_Values returns all elements of the DASHFragmentSelectorType enum 3188 func DASHFragmentSelectorType_Values() []string { 3189 return []string{ 3190 DASHFragmentSelectorTypeProducerTimestamp, 3191 DASHFragmentSelectorTypeServerTimestamp, 3192 } 3193 } 3194 3195 const ( 3196 // DASHPlaybackModeLive is a DASHPlaybackMode enum value 3197 DASHPlaybackModeLive = "LIVE" 3198 3199 // DASHPlaybackModeLiveReplay is a DASHPlaybackMode enum value 3200 DASHPlaybackModeLiveReplay = "LIVE_REPLAY" 3201 3202 // DASHPlaybackModeOnDemand is a DASHPlaybackMode enum value 3203 DASHPlaybackModeOnDemand = "ON_DEMAND" 3204 ) 3205 3206 // DASHPlaybackMode_Values returns all elements of the DASHPlaybackMode enum 3207 func DASHPlaybackMode_Values() []string { 3208 return []string{ 3209 DASHPlaybackModeLive, 3210 DASHPlaybackModeLiveReplay, 3211 DASHPlaybackModeOnDemand, 3212 } 3213 } 3214 3215 const ( 3216 // FragmentSelectorTypeProducerTimestamp is a FragmentSelectorType enum value 3217 FragmentSelectorTypeProducerTimestamp = "PRODUCER_TIMESTAMP" 3218 3219 // FragmentSelectorTypeServerTimestamp is a FragmentSelectorType enum value 3220 FragmentSelectorTypeServerTimestamp = "SERVER_TIMESTAMP" 3221 ) 3222 3223 // FragmentSelectorType_Values returns all elements of the FragmentSelectorType enum 3224 func FragmentSelectorType_Values() []string { 3225 return []string{ 3226 FragmentSelectorTypeProducerTimestamp, 3227 FragmentSelectorTypeServerTimestamp, 3228 } 3229 } 3230 3231 const ( 3232 // HLSDiscontinuityModeAlways is a HLSDiscontinuityMode enum value 3233 HLSDiscontinuityModeAlways = "ALWAYS" 3234 3235 // HLSDiscontinuityModeNever is a HLSDiscontinuityMode enum value 3236 HLSDiscontinuityModeNever = "NEVER" 3237 3238 // HLSDiscontinuityModeOnDiscontinuity is a HLSDiscontinuityMode enum value 3239 HLSDiscontinuityModeOnDiscontinuity = "ON_DISCONTINUITY" 3240 ) 3241 3242 // HLSDiscontinuityMode_Values returns all elements of the HLSDiscontinuityMode enum 3243 func HLSDiscontinuityMode_Values() []string { 3244 return []string{ 3245 HLSDiscontinuityModeAlways, 3246 HLSDiscontinuityModeNever, 3247 HLSDiscontinuityModeOnDiscontinuity, 3248 } 3249 } 3250 3251 const ( 3252 // HLSDisplayFragmentTimestampAlways is a HLSDisplayFragmentTimestamp enum value 3253 HLSDisplayFragmentTimestampAlways = "ALWAYS" 3254 3255 // HLSDisplayFragmentTimestampNever is a HLSDisplayFragmentTimestamp enum value 3256 HLSDisplayFragmentTimestampNever = "NEVER" 3257 ) 3258 3259 // HLSDisplayFragmentTimestamp_Values returns all elements of the HLSDisplayFragmentTimestamp enum 3260 func HLSDisplayFragmentTimestamp_Values() []string { 3261 return []string{ 3262 HLSDisplayFragmentTimestampAlways, 3263 HLSDisplayFragmentTimestampNever, 3264 } 3265 } 3266 3267 const ( 3268 // HLSFragmentSelectorTypeProducerTimestamp is a HLSFragmentSelectorType enum value 3269 HLSFragmentSelectorTypeProducerTimestamp = "PRODUCER_TIMESTAMP" 3270 3271 // HLSFragmentSelectorTypeServerTimestamp is a HLSFragmentSelectorType enum value 3272 HLSFragmentSelectorTypeServerTimestamp = "SERVER_TIMESTAMP" 3273 ) 3274 3275 // HLSFragmentSelectorType_Values returns all elements of the HLSFragmentSelectorType enum 3276 func HLSFragmentSelectorType_Values() []string { 3277 return []string{ 3278 HLSFragmentSelectorTypeProducerTimestamp, 3279 HLSFragmentSelectorTypeServerTimestamp, 3280 } 3281 } 3282 3283 const ( 3284 // HLSPlaybackModeLive is a HLSPlaybackMode enum value 3285 HLSPlaybackModeLive = "LIVE" 3286 3287 // HLSPlaybackModeLiveReplay is a HLSPlaybackMode enum value 3288 HLSPlaybackModeLiveReplay = "LIVE_REPLAY" 3289 3290 // HLSPlaybackModeOnDemand is a HLSPlaybackMode enum value 3291 HLSPlaybackModeOnDemand = "ON_DEMAND" 3292 ) 3293 3294 // HLSPlaybackMode_Values returns all elements of the HLSPlaybackMode enum 3295 func HLSPlaybackMode_Values() []string { 3296 return []string{ 3297 HLSPlaybackModeLive, 3298 HLSPlaybackModeLiveReplay, 3299 HLSPlaybackModeOnDemand, 3300 } 3301 }