1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package rekognition
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/rekognition/types"
10	"github.com/aws/smithy-go/middleware"
11	smithyhttp "github.com/aws/smithy-go/transport/http"
12	"time"
13)
14
15// Provides information about a stream processor created by CreateStreamProcessor.
16// You can get information about the input and output streams, the input parameters
17// for the face recognition being performed, and the current status of the stream
18// processor.
19func (c *Client) DescribeStreamProcessor(ctx context.Context, params *DescribeStreamProcessorInput, optFns ...func(*Options)) (*DescribeStreamProcessorOutput, error) {
20	if params == nil {
21		params = &DescribeStreamProcessorInput{}
22	}
23
24	result, metadata, err := c.invokeOperation(ctx, "DescribeStreamProcessor", params, optFns, addOperationDescribeStreamProcessorMiddlewares)
25	if err != nil {
26		return nil, err
27	}
28
29	out := result.(*DescribeStreamProcessorOutput)
30	out.ResultMetadata = metadata
31	return out, nil
32}
33
34type DescribeStreamProcessorInput struct {
35
36	// Name of the stream processor for which you want information.
37	//
38	// This member is required.
39	Name *string
40}
41
42type DescribeStreamProcessorOutput struct {
43
44	// Date and time the stream processor was created
45	CreationTimestamp *time.Time
46
47	// Kinesis video stream that provides the source streaming video.
48	Input *types.StreamProcessorInput
49
50	// The time, in Unix format, the stream processor was last updated. For example,
51	// when the stream processor moves from a running state to a failed state, or when
52	// the user starts or stops the stream processor.
53	LastUpdateTimestamp *time.Time
54
55	// Name of the stream processor.
56	Name *string
57
58	// Kinesis data stream to which Amazon Rekognition Video puts the analysis results.
59	Output *types.StreamProcessorOutput
60
61	// ARN of the IAM role that allows access to the stream processor.
62	RoleArn *string
63
64	// Face recognition input parameters that are being used by the stream processor.
65	// Includes the collection to use for face recognition and the face attributes to
66	// detect.
67	Settings *types.StreamProcessorSettings
68
69	// Current status of the stream processor.
70	Status types.StreamProcessorStatus
71
72	// Detailed status message about the stream processor.
73	StatusMessage *string
74
75	// ARN of the stream processor.
76	StreamProcessorArn *string
77
78	// Metadata pertaining to the operation's result.
79	ResultMetadata middleware.Metadata
80}
81
82func addOperationDescribeStreamProcessorMiddlewares(stack *middleware.Stack, options Options) (err error) {
83	err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeStreamProcessor{}, middleware.After)
84	if err != nil {
85		return err
86	}
87	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeStreamProcessor{}, middleware.After)
88	if err != nil {
89		return err
90	}
91	if err = addSetLoggerMiddleware(stack, options); err != nil {
92		return err
93	}
94	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
95		return err
96	}
97	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
98		return err
99	}
100	if err = addResolveEndpointMiddleware(stack, options); err != nil {
101		return err
102	}
103	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
104		return err
105	}
106	if err = addRetryMiddlewares(stack, options); err != nil {
107		return err
108	}
109	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
110		return err
111	}
112	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
113		return err
114	}
115	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
116		return err
117	}
118	if err = addClientUserAgent(stack); err != nil {
119		return err
120	}
121	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
122		return err
123	}
124	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
125		return err
126	}
127	if err = addOpDescribeStreamProcessorValidationMiddleware(stack); err != nil {
128		return err
129	}
130	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStreamProcessor(options.Region), middleware.Before); err != nil {
131		return err
132	}
133	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
134		return err
135	}
136	if err = addResponseErrorMiddleware(stack); err != nil {
137		return err
138	}
139	if err = addRequestResponseLogging(stack, options); err != nil {
140		return err
141	}
142	return nil
143}
144
145func newServiceMetadataMiddleware_opDescribeStreamProcessor(region string) *awsmiddleware.RegisterServiceMetadata {
146	return &awsmiddleware.RegisterServiceMetadata{
147		Region:        region,
148		ServiceID:     ServiceID,
149		SigningName:   "rekognition",
150		OperationName: "DescribeStreamProcessor",
151	}
152}
153