// Code generated by smithy-go-codegen DO NOT EDIT. package connect 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/connect/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Starts recording the contact: // - If the API is called before the agent joins the call, recording starts when // the agent joins the call. // - If the API is called after the agent joins the call, recording starts at // the time of the API call. // // StartContactRecording is a one-time action. For example, if you use // StopContactRecording to stop recording an ongoing call, you can't use // StartContactRecording to restart it. For scenarios where the recording has // started and you want to suspend and resume it, such as when collecting sensitive // information (for example, a credit card number), use SuspendContactRecording and // ResumeContactRecording. You can use this API to override the recording behavior // configured in the Set recording behavior (https://docs.aws.amazon.com/connect/latest/adminguide/set-recording-behavior.html) // block. Only voice recordings are supported at this time. func (c *Client) StartContactRecording(ctx context.Context, params *StartContactRecordingInput, optFns ...func(*Options)) (*StartContactRecordingOutput, error) { if params == nil { params = &StartContactRecordingInput{} } result, metadata, err := c.invokeOperation(ctx, "StartContactRecording", params, optFns, c.addOperationStartContactRecordingMiddlewares) if err != nil { return nil, err } out := result.(*StartContactRecordingOutput) out.ResultMetadata = metadata return out, nil } type StartContactRecordingInput struct { // The identifier of the contact. // // This member is required. ContactId *string // The identifier of the contact. This is the identifier of the contact associated // with the first interaction with the contact center. // // This member is required. InitialContactId *string // The identifier of the Amazon Connect instance. You can find the instance ID (https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html) // in the Amazon Resource Name (ARN) of the instance. // // This member is required. InstanceId *string // The person being recorded. // // This member is required. VoiceRecordingConfiguration *types.VoiceRecordingConfiguration noSmithyDocumentSerde } type StartContactRecordingOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStartContactRecordingMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpStartContactRecording{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartContactRecording{}, 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, options); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpStartContactRecordingValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartContactRecording(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); 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_opStartContactRecording(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "connect", OperationName: "StartContactRecording", } }