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