123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- package elastictranscoder_test
- import (
- "bytes"
- "fmt"
- "time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/elastictranscoder"
- )
- var _ time.Duration
- var _ bytes.Buffer
- func ExampleElasticTranscoder_CancelJob() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.CancelJobInput{
- Id: aws.String("Id"), // Required
- }
- resp, err := svc.CancelJob(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_CreateJob() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.CreateJobInput{
- Input: &elastictranscoder.JobInput{ // Required
- AspectRatio: aws.String("AspectRatio"),
- Container: aws.String("JobContainer"),
- DetectedProperties: &elastictranscoder.DetectedProperties{
- DurationMillis: aws.Int64(1),
- FileSize: aws.Int64(1),
- FrameRate: aws.String("FloatString"),
- Height: aws.Int64(1),
- Width: aws.Int64(1),
- },
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- FrameRate: aws.String("FrameRate"),
- Interlaced: aws.String("Interlaced"),
- Key: aws.String("LongKey"),
- Resolution: aws.String("Resolution"),
- },
- PipelineId: aws.String("Id"), // Required
- Output: &elastictranscoder.CreateJobOutput{
- AlbumArt: &elastictranscoder.JobAlbumArt{
- Artwork: []*elastictranscoder.Artwork{
- { // Required
- AlbumArtFormat: aws.String("JpgOrPng"),
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- InputKey: aws.String("WatermarkKey"),
- MaxHeight: aws.String("DigitsOrAuto"),
- MaxWidth: aws.String("DigitsOrAuto"),
- PaddingPolicy: aws.String("PaddingPolicy"),
- SizingPolicy: aws.String("SizingPolicy"),
- },
- // More values...
- },
- MergePolicy: aws.String("MergePolicy"),
- },
- Captions: &elastictranscoder.Captions{
- CaptionFormats: []*elastictranscoder.CaptionFormat{
- { // Required
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- Format: aws.String("CaptionFormatFormat"),
- Pattern: aws.String("CaptionFormatPattern"),
- },
- // More values...
- },
- CaptionSources: []*elastictranscoder.CaptionSource{
- { // Required
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- Key: aws.String("LongKey"),
- Label: aws.String("Name"),
- Language: aws.String("Key"),
- TimeOffset: aws.String("TimeOffset"),
- },
- // More values...
- },
- MergePolicy: aws.String("CaptionMergePolicy"),
- },
- Composition: []*elastictranscoder.Clip{
- { // Required
- TimeSpan: &elastictranscoder.TimeSpan{
- Duration: aws.String("Time"),
- StartTime: aws.String("Time"),
- },
- },
- // More values...
- },
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- Key: aws.String("Key"),
- PresetId: aws.String("Id"),
- Rotate: aws.String("Rotate"),
- SegmentDuration: aws.String("FloatString"),
- ThumbnailEncryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- ThumbnailPattern: aws.String("ThumbnailPattern"),
- Watermarks: []*elastictranscoder.JobWatermark{
- { // Required
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- InputKey: aws.String("WatermarkKey"),
- PresetWatermarkId: aws.String("PresetWatermarkId"),
- },
- // More values...
- },
- },
- OutputKeyPrefix: aws.String("Key"),
- Outputs: []*elastictranscoder.CreateJobOutput{
- { // Required
- AlbumArt: &elastictranscoder.JobAlbumArt{
- Artwork: []*elastictranscoder.Artwork{
- { // Required
- AlbumArtFormat: aws.String("JpgOrPng"),
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- InputKey: aws.String("WatermarkKey"),
- MaxHeight: aws.String("DigitsOrAuto"),
- MaxWidth: aws.String("DigitsOrAuto"),
- PaddingPolicy: aws.String("PaddingPolicy"),
- SizingPolicy: aws.String("SizingPolicy"),
- },
- // More values...
- },
- MergePolicy: aws.String("MergePolicy"),
- },
- Captions: &elastictranscoder.Captions{
- CaptionFormats: []*elastictranscoder.CaptionFormat{
- { // Required
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- Format: aws.String("CaptionFormatFormat"),
- Pattern: aws.String("CaptionFormatPattern"),
- },
- // More values...
- },
- CaptionSources: []*elastictranscoder.CaptionSource{
- { // Required
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- Key: aws.String("LongKey"),
- Label: aws.String("Name"),
- Language: aws.String("Key"),
- TimeOffset: aws.String("TimeOffset"),
- },
- // More values...
- },
- MergePolicy: aws.String("CaptionMergePolicy"),
- },
- Composition: []*elastictranscoder.Clip{
- { // Required
- TimeSpan: &elastictranscoder.TimeSpan{
- Duration: aws.String("Time"),
- StartTime: aws.String("Time"),
- },
- },
- // More values...
- },
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- Key: aws.String("Key"),
- PresetId: aws.String("Id"),
- Rotate: aws.String("Rotate"),
- SegmentDuration: aws.String("FloatString"),
- ThumbnailEncryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- ThumbnailPattern: aws.String("ThumbnailPattern"),
- Watermarks: []*elastictranscoder.JobWatermark{
- { // Required
- Encryption: &elastictranscoder.Encryption{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- Mode: aws.String("EncryptionMode"),
- },
- InputKey: aws.String("WatermarkKey"),
- PresetWatermarkId: aws.String("PresetWatermarkId"),
- },
- // More values...
- },
- },
- // More values...
- },
- Playlists: []*elastictranscoder.CreateJobPlaylist{
- { // Required
- Format: aws.String("PlaylistFormat"),
- HlsContentProtection: &elastictranscoder.HlsContentProtection{
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("Base64EncodedString"),
- KeyMd5: aws.String("Base64EncodedString"),
- KeyStoragePolicy: aws.String("KeyStoragePolicy"),
- LicenseAcquisitionUrl: aws.String("ZeroTo512String"),
- Method: aws.String("HlsContentProtectionMethod"),
- },
- Name: aws.String("Filename"),
- OutputKeys: []*string{
- aws.String("Key"), // Required
- // More values...
- },
- PlayReadyDrm: &elastictranscoder.PlayReadyDrm{
- Format: aws.String("PlayReadyDrmFormatString"),
- InitializationVector: aws.String("ZeroTo255String"),
- Key: aws.String("NonEmptyBase64EncodedString"),
- KeyId: aws.String("KeyIdGuid"),
- KeyMd5: aws.String("NonEmptyBase64EncodedString"),
- LicenseAcquisitionUrl: aws.String("OneTo512String"),
- },
- },
- // More values...
- },
- UserMetadata: map[string]*string{
- "Key": aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.CreateJob(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_CreatePipeline() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.CreatePipelineInput{
- InputBucket: aws.String("BucketName"), // Required
- Name: aws.String("Name"), // Required
- Role: aws.String("Role"), // Required
- AwsKmsKeyArn: aws.String("KeyArn"),
- ContentConfig: &elastictranscoder.PipelineOutputConfig{
- Bucket: aws.String("BucketName"),
- Permissions: []*elastictranscoder.Permission{
- { // Required
- Access: []*string{
- aws.String("AccessControl"), // Required
- // More values...
- },
- Grantee: aws.String("Grantee"),
- GranteeType: aws.String("GranteeType"),
- },
- // More values...
- },
- StorageClass: aws.String("StorageClass"),
- },
- Notifications: &elastictranscoder.Notifications{
- Completed: aws.String("SnsTopic"),
- Error: aws.String("SnsTopic"),
- Progressing: aws.String("SnsTopic"),
- Warning: aws.String("SnsTopic"),
- },
- OutputBucket: aws.String("BucketName"),
- ThumbnailConfig: &elastictranscoder.PipelineOutputConfig{
- Bucket: aws.String("BucketName"),
- Permissions: []*elastictranscoder.Permission{
- { // Required
- Access: []*string{
- aws.String("AccessControl"), // Required
- // More values...
- },
- Grantee: aws.String("Grantee"),
- GranteeType: aws.String("GranteeType"),
- },
- // More values...
- },
- StorageClass: aws.String("StorageClass"),
- },
- }
- resp, err := svc.CreatePipeline(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_CreatePreset() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.CreatePresetInput{
- Container: aws.String("PresetContainer"), // Required
- Name: aws.String("Name"), // Required
- Audio: &elastictranscoder.AudioParameters{
- AudioPackingMode: aws.String("AudioPackingMode"),
- BitRate: aws.String("AudioBitRate"),
- Channels: aws.String("AudioChannels"),
- Codec: aws.String("AudioCodec"),
- CodecOptions: &elastictranscoder.AudioCodecOptions{
- BitDepth: aws.String("AudioBitDepth"),
- BitOrder: aws.String("AudioBitOrder"),
- Profile: aws.String("AudioCodecProfile"),
- Signed: aws.String("AudioSigned"),
- },
- SampleRate: aws.String("AudioSampleRate"),
- },
- Description: aws.String("Description"),
- Thumbnails: &elastictranscoder.Thumbnails{
- AspectRatio: aws.String("AspectRatio"),
- Format: aws.String("JpgOrPng"),
- Interval: aws.String("Digits"),
- MaxHeight: aws.String("DigitsOrAuto"),
- MaxWidth: aws.String("DigitsOrAuto"),
- PaddingPolicy: aws.String("PaddingPolicy"),
- Resolution: aws.String("ThumbnailResolution"),
- SizingPolicy: aws.String("SizingPolicy"),
- },
- Video: &elastictranscoder.VideoParameters{
- AspectRatio: aws.String("AspectRatio"),
- BitRate: aws.String("VideoBitRate"),
- Codec: aws.String("VideoCodec"),
- CodecOptions: map[string]*string{
- "Key": aws.String("CodecOption"), // Required
- // More values...
- },
- DisplayAspectRatio: aws.String("AspectRatio"),
- FixedGOP: aws.String("FixedGOP"),
- FrameRate: aws.String("FrameRate"),
- KeyframesMaxDist: aws.String("KeyframesMaxDist"),
- MaxFrameRate: aws.String("MaxFrameRate"),
- MaxHeight: aws.String("DigitsOrAuto"),
- MaxWidth: aws.String("DigitsOrAuto"),
- PaddingPolicy: aws.String("PaddingPolicy"),
- Resolution: aws.String("Resolution"),
- SizingPolicy: aws.String("SizingPolicy"),
- Watermarks: []*elastictranscoder.PresetWatermark{
- { // Required
- HorizontalAlign: aws.String("HorizontalAlign"),
- HorizontalOffset: aws.String("PixelsOrPercent"),
- Id: aws.String("PresetWatermarkId"),
- MaxHeight: aws.String("PixelsOrPercent"),
- MaxWidth: aws.String("PixelsOrPercent"),
- Opacity: aws.String("Opacity"),
- SizingPolicy: aws.String("WatermarkSizingPolicy"),
- Target: aws.String("Target"),
- VerticalAlign: aws.String("VerticalAlign"),
- VerticalOffset: aws.String("PixelsOrPercent"),
- },
- // More values...
- },
- },
- }
- resp, err := svc.CreatePreset(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_DeletePipeline() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.DeletePipelineInput{
- Id: aws.String("Id"), // Required
- }
- resp, err := svc.DeletePipeline(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_DeletePreset() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.DeletePresetInput{
- Id: aws.String("Id"), // Required
- }
- resp, err := svc.DeletePreset(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_ListJobsByPipeline() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.ListJobsByPipelineInput{
- PipelineId: aws.String("Id"), // Required
- Ascending: aws.String("Ascending"),
- PageToken: aws.String("Id"),
- }
- resp, err := svc.ListJobsByPipeline(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_ListJobsByStatus() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.ListJobsByStatusInput{
- Status: aws.String("JobStatus"), // Required
- Ascending: aws.String("Ascending"),
- PageToken: aws.String("Id"),
- }
- resp, err := svc.ListJobsByStatus(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_ListPipelines() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.ListPipelinesInput{
- Ascending: aws.String("Ascending"),
- PageToken: aws.String("Id"),
- }
- resp, err := svc.ListPipelines(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_ListPresets() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.ListPresetsInput{
- Ascending: aws.String("Ascending"),
- PageToken: aws.String("Id"),
- }
- resp, err := svc.ListPresets(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_ReadJob() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.ReadJobInput{
- Id: aws.String("Id"), // Required
- }
- resp, err := svc.ReadJob(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_ReadPipeline() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.ReadPipelineInput{
- Id: aws.String("Id"), // Required
- }
- resp, err := svc.ReadPipeline(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_ReadPreset() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.ReadPresetInput{
- Id: aws.String("Id"), // Required
- }
- resp, err := svc.ReadPreset(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_TestRole() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.TestRoleInput{
- InputBucket: aws.String("BucketName"), // Required
- OutputBucket: aws.String("BucketName"), // Required
- Role: aws.String("Role"), // Required
- Topics: []*string{ // Required
- aws.String("SnsTopic"), // Required
- // More values...
- },
- }
- resp, err := svc.TestRole(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_UpdatePipeline() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.UpdatePipelineInput{
- Id: aws.String("Id"), // Required
- AwsKmsKeyArn: aws.String("KeyArn"),
- ContentConfig: &elastictranscoder.PipelineOutputConfig{
- Bucket: aws.String("BucketName"),
- Permissions: []*elastictranscoder.Permission{
- { // Required
- Access: []*string{
- aws.String("AccessControl"), // Required
- // More values...
- },
- Grantee: aws.String("Grantee"),
- GranteeType: aws.String("GranteeType"),
- },
- // More values...
- },
- StorageClass: aws.String("StorageClass"),
- },
- InputBucket: aws.String("BucketName"),
- Name: aws.String("Name"),
- Notifications: &elastictranscoder.Notifications{
- Completed: aws.String("SnsTopic"),
- Error: aws.String("SnsTopic"),
- Progressing: aws.String("SnsTopic"),
- Warning: aws.String("SnsTopic"),
- },
- Role: aws.String("Role"),
- ThumbnailConfig: &elastictranscoder.PipelineOutputConfig{
- Bucket: aws.String("BucketName"),
- Permissions: []*elastictranscoder.Permission{
- { // Required
- Access: []*string{
- aws.String("AccessControl"), // Required
- // More values...
- },
- Grantee: aws.String("Grantee"),
- GranteeType: aws.String("GranteeType"),
- },
- // More values...
- },
- StorageClass: aws.String("StorageClass"),
- },
- }
- resp, err := svc.UpdatePipeline(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_UpdatePipelineNotifications() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.UpdatePipelineNotificationsInput{
- Id: aws.String("Id"), // Required
- Notifications: &elastictranscoder.Notifications{ // Required
- Completed: aws.String("SnsTopic"),
- Error: aws.String("SnsTopic"),
- Progressing: aws.String("SnsTopic"),
- Warning: aws.String("SnsTopic"),
- },
- }
- resp, err := svc.UpdatePipelineNotifications(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleElasticTranscoder_UpdatePipelineStatus() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := elastictranscoder.New(sess)
- params := &elastictranscoder.UpdatePipelineStatusInput{
- Id: aws.String("Id"), // Required
- Status: aws.String("PipelineStatus"), // Required
- }
- resp, err := svc.UpdatePipelineStatus(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
|