1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package medialive 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/medialive/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Starts an existing channel 15func (c *Client) StartChannel(ctx context.Context, params *StartChannelInput, optFns ...func(*Options)) (*StartChannelOutput, error) { 16 if params == nil { 17 params = &StartChannelInput{} 18 } 19 20 result, metadata, err := c.invokeOperation(ctx, "StartChannel", params, optFns, addOperationStartChannelMiddlewares) 21 if err != nil { 22 return nil, err 23 } 24 25 out := result.(*StartChannelOutput) 26 out.ResultMetadata = metadata 27 return out, nil 28} 29 30// Placeholder documentation for StartChannelRequest 31type StartChannelInput struct { 32 33 // A request to start a channel 34 // 35 // This member is required. 36 ChannelId *string 37} 38 39// Placeholder documentation for StartChannelResponse 40type StartChannelOutput struct { 41 42 // The unique arn of the channel. 43 Arn *string 44 45 // Specification of CDI inputs for this channel 46 CdiInputSpecification *types.CdiInputSpecification 47 48 // The class for this channel. STANDARD for a channel with two pipelines or 49 // SINGLE_PIPELINE for a channel with one pipeline. 50 ChannelClass types.ChannelClass 51 52 // A list of destinations of the channel. For UDP outputs, there is one destination 53 // per output. For other types (HLS, for example), there is one destination per 54 // packager. 55 Destinations []types.OutputDestination 56 57 // The endpoints where outgoing connections initiate from 58 EgressEndpoints []types.ChannelEgressEndpoint 59 60 // Encoder Settings 61 EncoderSettings *types.EncoderSettings 62 63 // The unique id of the channel. 64 Id *string 65 66 // List of input attachments for channel. 67 InputAttachments []types.InputAttachment 68 69 // Specification of network and file inputs for this channel 70 InputSpecification *types.InputSpecification 71 72 // The log level being written to CloudWatch Logs. 73 LogLevel types.LogLevel 74 75 // The name of the channel. (user-mutable) 76 Name *string 77 78 // Runtime details for the pipelines of a running channel. 79 PipelineDetails []types.PipelineDetail 80 81 // The number of currently healthy pipelines. 82 PipelinesRunningCount int32 83 84 // The Amazon Resource Name (ARN) of the role assumed when running the Channel. 85 RoleArn *string 86 87 // Placeholder documentation for ChannelState 88 State types.ChannelState 89 90 // A collection of key-value pairs. 91 Tags map[string]string 92 93 // Settings for VPC output 94 Vpc *types.VpcOutputSettingsDescription 95 96 // Metadata pertaining to the operation's result. 97 ResultMetadata middleware.Metadata 98} 99 100func addOperationStartChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { 101 err = stack.Serialize.Add(&awsRestjson1_serializeOpStartChannel{}, middleware.After) 102 if err != nil { 103 return err 104 } 105 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartChannel{}, middleware.After) 106 if err != nil { 107 return err 108 } 109 if err = addSetLoggerMiddleware(stack, options); err != nil { 110 return err 111 } 112 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 113 return err 114 } 115 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 116 return err 117 } 118 if err = addResolveEndpointMiddleware(stack, options); err != nil { 119 return err 120 } 121 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 122 return err 123 } 124 if err = addRetryMiddlewares(stack, options); err != nil { 125 return err 126 } 127 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 128 return err 129 } 130 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 131 return err 132 } 133 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 134 return err 135 } 136 if err = addClientUserAgent(stack); err != nil { 137 return err 138 } 139 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 140 return err 141 } 142 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 143 return err 144 } 145 if err = addOpStartChannelValidationMiddleware(stack); err != nil { 146 return err 147 } 148 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartChannel(options.Region), middleware.Before); err != nil { 149 return err 150 } 151 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 152 return err 153 } 154 if err = addResponseErrorMiddleware(stack); err != nil { 155 return err 156 } 157 if err = addRequestResponseLogging(stack, options); err != nil { 158 return err 159 } 160 return nil 161} 162 163func newServiceMetadataMiddleware_opStartChannel(region string) *awsmiddleware.RegisterServiceMetadata { 164 return &awsmiddleware.RegisterServiceMetadata{ 165 Region: region, 166 ServiceID: ServiceID, 167 SigningName: "medialive", 168 OperationName: "StartChannel", 169 } 170} 171