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// Provides organization config rule deployment status for an organization. The
15// status is not considered successful until organization config rule is
16// successfully deployed in all the member accounts with an exception of excluded
17// accounts. When you specify the limit and the next token, you receive a paginated
18// response. Limit and next token are not applicable if you specify organization
19// config rule names. It is only applicable, when you request all the organization
20// config rules.
21func (c *Client) DescribeOrganizationConfigRuleStatuses(ctx context.Context, params *DescribeOrganizationConfigRuleStatusesInput, optFns ...func(*Options)) (*DescribeOrganizationConfigRuleStatusesOutput, error) {
22	if params == nil {
23		params = &DescribeOrganizationConfigRuleStatusesInput{}
24	}
25
26	result, metadata, err := c.invokeOperation(ctx, "DescribeOrganizationConfigRuleStatuses", params, optFns, addOperationDescribeOrganizationConfigRuleStatusesMiddlewares)
27	if err != nil {
28		return nil, err
29	}
30
31	out := result.(*DescribeOrganizationConfigRuleStatusesOutput)
32	out.ResultMetadata = metadata
33	return out, nil
34}
35
36type DescribeOrganizationConfigRuleStatusesInput struct {
37
38	// The maximum number of OrganizationConfigRuleStatuses returned on each page. If
39	// you do no specify a number, AWS Config uses the default. The default is 100.
40	Limit int32
41
42	// The nextToken string returned on a previous page that you use to get the next
43	// page of results in a paginated response.
44	NextToken *string
45
46	// The names of organization config rules for which you want status details. If you
47	// do not specify any names, AWS Config returns details for all your organization
48	// AWS Confg rules.
49	OrganizationConfigRuleNames []string
50}
51
52type DescribeOrganizationConfigRuleStatusesOutput struct {
53
54	// The nextToken string returned on a previous page that you use to get the next
55	// page of results in a paginated response.
56	NextToken *string
57
58	// A list of OrganizationConfigRuleStatus objects.
59	OrganizationConfigRuleStatuses []types.OrganizationConfigRuleStatus
60
61	// Metadata pertaining to the operation's result.
62	ResultMetadata middleware.Metadata
63}
64
65func addOperationDescribeOrganizationConfigRuleStatusesMiddlewares(stack *middleware.Stack, options Options) (err error) {
66	err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeOrganizationConfigRuleStatuses{}, middleware.After)
67	if err != nil {
68		return err
69	}
70	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeOrganizationConfigRuleStatuses{}, middleware.After)
71	if err != nil {
72		return err
73	}
74	if err = addSetLoggerMiddleware(stack, options); err != nil {
75		return err
76	}
77	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
78		return err
79	}
80	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
81		return err
82	}
83	if err = addResolveEndpointMiddleware(stack, options); err != nil {
84		return err
85	}
86	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
87		return err
88	}
89	if err = addRetryMiddlewares(stack, options); err != nil {
90		return err
91	}
92	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
93		return err
94	}
95	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
96		return err
97	}
98	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
99		return err
100	}
101	if err = addClientUserAgent(stack); err != nil {
102		return err
103	}
104	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
105		return err
106	}
107	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
108		return err
109	}
110	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationConfigRuleStatuses(options.Region), middleware.Before); err != nil {
111		return err
112	}
113	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
114		return err
115	}
116	if err = addResponseErrorMiddleware(stack); err != nil {
117		return err
118	}
119	if err = addRequestResponseLogging(stack, options); err != nil {
120		return err
121	}
122	return nil
123}
124
125func newServiceMetadataMiddleware_opDescribeOrganizationConfigRuleStatuses(region string) *awsmiddleware.RegisterServiceMetadata {
126	return &awsmiddleware.RegisterServiceMetadata{
127		Region:        region,
128		ServiceID:     ServiceID,
129		SigningName:   "config",
130		OperationName: "DescribeOrganizationConfigRuleStatuses",
131	}
132}
133