1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package configservice
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/configservice/types"
10	"github.com/aws/smithy-go/middleware"
11	smithyhttp "github.com/aws/smithy-go/transport/http"
12)
13
14// Returns status information for sources within an aggregator. The status includes
15// information about the last time AWS Config verified authorization between the
16// source account and an aggregator account. In case of a failure, the status
17// contains the related error code or message.
18func (c *Client) DescribeConfigurationAggregatorSourcesStatus(ctx context.Context, params *DescribeConfigurationAggregatorSourcesStatusInput, optFns ...func(*Options)) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) {
19	if params == nil {
20		params = &DescribeConfigurationAggregatorSourcesStatusInput{}
21	}
22
23	result, metadata, err := c.invokeOperation(ctx, "DescribeConfigurationAggregatorSourcesStatus", params, optFns, addOperationDescribeConfigurationAggregatorSourcesStatusMiddlewares)
24	if err != nil {
25		return nil, err
26	}
27
28	out := result.(*DescribeConfigurationAggregatorSourcesStatusOutput)
29	out.ResultMetadata = metadata
30	return out, nil
31}
32
33type DescribeConfigurationAggregatorSourcesStatusInput struct {
34
35	// The name of the configuration aggregator.
36	//
37	// This member is required.
38	ConfigurationAggregatorName *string
39
40	// The maximum number of AggregatorSourceStatus returned on each page. The default
41	// is maximum. If you specify 0, AWS Config uses the default.
42	Limit int32
43
44	// The nextToken string returned on a previous page that you use to get the next
45	// page of results in a paginated response.
46	NextToken *string
47
48	// Filters the status type.
49	//
50	// * Valid value FAILED indicates errors while moving
51	// data.
52	//
53	// * Valid value SUCCEEDED indicates the data was successfully moved.
54	//
55	// *
56	// Valid value OUTDATED indicates the data is not the most recent.
57	UpdateStatus []types.AggregatedSourceStatusType
58}
59
60type DescribeConfigurationAggregatorSourcesStatusOutput struct {
61
62	// Returns an AggregatedSourceStatus object.
63	AggregatedSourceStatusList []types.AggregatedSourceStatus
64
65	// The nextToken string returned on a previous page that you use to get the next
66	// page of results in a paginated response.
67	NextToken *string
68
69	// Metadata pertaining to the operation's result.
70	ResultMetadata middleware.Metadata
71}
72
73func addOperationDescribeConfigurationAggregatorSourcesStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
74	err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeConfigurationAggregatorSourcesStatus{}, middleware.After)
75	if err != nil {
76		return err
77	}
78	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeConfigurationAggregatorSourcesStatus{}, middleware.After)
79	if err != nil {
80		return err
81	}
82	if err = addSetLoggerMiddleware(stack, options); err != nil {
83		return err
84	}
85	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
86		return err
87	}
88	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
89		return err
90	}
91	if err = addResolveEndpointMiddleware(stack, options); err != nil {
92		return err
93	}
94	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
95		return err
96	}
97	if err = addRetryMiddlewares(stack, options); err != nil {
98		return err
99	}
100	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
101		return err
102	}
103	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
104		return err
105	}
106	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
107		return err
108	}
109	if err = addClientUserAgent(stack); err != nil {
110		return err
111	}
112	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
113		return err
114	}
115	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
116		return err
117	}
118	if err = addOpDescribeConfigurationAggregatorSourcesStatusValidationMiddleware(stack); err != nil {
119		return err
120	}
121	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConfigurationAggregatorSourcesStatus(options.Region), middleware.Before); err != nil {
122		return err
123	}
124	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
125		return err
126	}
127	if err = addResponseErrorMiddleware(stack); err != nil {
128		return err
129	}
130	if err = addRequestResponseLogging(stack, options); err != nil {
131		return err
132	}
133	return nil
134}
135
136func newServiceMetadataMiddleware_opDescribeConfigurationAggregatorSourcesStatus(region string) *awsmiddleware.RegisterServiceMetadata {
137	return &awsmiddleware.RegisterServiceMetadata{
138		Region:        region,
139		ServiceID:     ServiceID,
140		SigningName:   "config",
141		OperationName: "DescribeConfigurationAggregatorSourcesStatus",
142	}
143}
144