1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package ivs 4 5import ( 6 "context" 7 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 8 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 9 "github.com/aws/aws-sdk-go-v2/service/ivs/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Updates a channel's configuration. This does not affect an ongoing stream of 15// this channel. You must stop and restart the stream for the changes to take 16// effect. 17func (c *Client) UpdateChannel(ctx context.Context, params *UpdateChannelInput, optFns ...func(*Options)) (*UpdateChannelOutput, error) { 18 if params == nil { 19 params = &UpdateChannelInput{} 20 } 21 22 result, metadata, err := c.invokeOperation(ctx, "UpdateChannel", params, optFns, addOperationUpdateChannelMiddlewares) 23 if err != nil { 24 return nil, err 25 } 26 27 out := result.(*UpdateChannelOutput) 28 out.ResultMetadata = metadata 29 return out, nil 30} 31 32type UpdateChannelInput struct { 33 34 // ARN of the channel to be updated. 35 // 36 // This member is required. 37 Arn *string 38 39 // Whether the channel is private (enabled for playback authorization). 40 Authorized bool 41 42 // Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full 43 // HD. Use LOW for near-real-time interaction with viewers. (Note: In the Amazon 44 // IVS console, LOW and NORMAL correspond to Ultra-low and Standard, respectively.) 45 LatencyMode types.ChannelLatencyMode 46 47 // Channel name. 48 Name *string 49 50 // Recording-configuration ARN. If this is set to an empty string, recording is 51 // disabled. A value other than an empty string indicates that recording is enabled 52 RecordingConfigurationArn *string 53 54 // Channel type, which determines the allowable resolution and bitrate. If you 55 // exceed the allowable resolution or bitrate, the stream probably will disconnect 56 // immediately. Valid values: 57 // 58 // * STANDARD: Multiple qualities are generated from 59 // the original input, to automatically give viewers the best experience for their 60 // devices and network conditions. Vertical resolution can be up to 1080 and 61 // bitrate can be up to 8.5 Mbps. 62 // 63 // * BASIC: Amazon IVS delivers the original input 64 // to viewers. The viewer’s video-quality choice is limited to the original input. 65 // Vertical resolution can be up to 480 and bitrate can be up to 1.5 Mbps. 66 Type types.ChannelType 67} 68 69type UpdateChannelOutput struct { 70 71 // Object specifying a channel. 72 Channel *types.Channel 73 74 // Metadata pertaining to the operation's result. 75 ResultMetadata middleware.Metadata 76} 77 78func addOperationUpdateChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { 79 err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannel{}, middleware.After) 80 if err != nil { 81 return err 82 } 83 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannel{}, middleware.After) 84 if err != nil { 85 return err 86 } 87 if err = addSetLoggerMiddleware(stack, options); err != nil { 88 return err 89 } 90 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 91 return err 92 } 93 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 94 return err 95 } 96 if err = addResolveEndpointMiddleware(stack, options); err != nil { 97 return err 98 } 99 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 100 return err 101 } 102 if err = addRetryMiddlewares(stack, options); err != nil { 103 return err 104 } 105 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 106 return err 107 } 108 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 109 return err 110 } 111 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 112 return err 113 } 114 if err = addClientUserAgent(stack); err != nil { 115 return err 116 } 117 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 118 return err 119 } 120 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 121 return err 122 } 123 if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { 124 return err 125 } 126 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannel(options.Region), middleware.Before); err != nil { 127 return err 128 } 129 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 130 return err 131 } 132 if err = addResponseErrorMiddleware(stack); err != nil { 133 return err 134 } 135 if err = addRequestResponseLogging(stack, options); err != nil { 136 return err 137 } 138 return nil 139} 140 141func newServiceMetadataMiddleware_opUpdateChannel(region string) *awsmiddleware.RegisterServiceMetadata { 142 return &awsmiddleware.RegisterServiceMetadata{ 143 Region: region, 144 ServiceID: ServiceID, 145 SigningName: "ivs", 146 OperationName: "UpdateChannel", 147 } 148} 149