1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package servicecatalog
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/servicecatalog/types"
10	"github.com/aws/smithy-go/middleware"
11	smithyhttp "github.com/aws/smithy-go/transport/http"
12)
13
14// Gets information about the specified product. This operation is run with
15// administrator access.
16func (c *Client) DescribeProductAsAdmin(ctx context.Context, params *DescribeProductAsAdminInput, optFns ...func(*Options)) (*DescribeProductAsAdminOutput, error) {
17	if params == nil {
18		params = &DescribeProductAsAdminInput{}
19	}
20
21	result, metadata, err := c.invokeOperation(ctx, "DescribeProductAsAdmin", params, optFns, addOperationDescribeProductAsAdminMiddlewares)
22	if err != nil {
23		return nil, err
24	}
25
26	out := result.(*DescribeProductAsAdminOutput)
27	out.ResultMetadata = metadata
28	return out, nil
29}
30
31type DescribeProductAsAdminInput struct {
32
33	// The language code.
34	//
35	// * en - English (default)
36	//
37	// * jp - Japanese
38	//
39	// * zh - Chinese
40	AcceptLanguage *string
41
42	// The product identifier.
43	Id *string
44
45	// The product name.
46	Name *string
47
48	// The unique identifier of the shared portfolio that the specified product is
49	// associated with. You can provide this parameter to retrieve the shared
50	// TagOptions associated with the product. If this parameter is provided and if
51	// TagOptions sharing is enabled in the portfolio share, the API returns both local
52	// and shared TagOptions associated with the product. Otherwise only local
53	// TagOptions will be returned.
54	SourcePortfolioId *string
55}
56
57type DescribeProductAsAdminOutput struct {
58
59	// Information about the associated budgets.
60	Budgets []types.BudgetDetail
61
62	// Information about the product view.
63	ProductViewDetail *types.ProductViewDetail
64
65	// Information about the provisioning artifacts (also known as versions) for the
66	// specified product.
67	ProvisioningArtifactSummaries []types.ProvisioningArtifactSummary
68
69	// Information about the TagOptions associated with the product.
70	TagOptions []types.TagOptionDetail
71
72	// Information about the tags associated with the product.
73	Tags []types.Tag
74
75	// Metadata pertaining to the operation's result.
76	ResultMetadata middleware.Metadata
77}
78
79func addOperationDescribeProductAsAdminMiddlewares(stack *middleware.Stack, options Options) (err error) {
80	err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeProductAsAdmin{}, middleware.After)
81	if err != nil {
82		return err
83	}
84	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeProductAsAdmin{}, middleware.After)
85	if err != nil {
86		return err
87	}
88	if err = addSetLoggerMiddleware(stack, options); err != nil {
89		return err
90	}
91	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
92		return err
93	}
94	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
95		return err
96	}
97	if err = addResolveEndpointMiddleware(stack, options); err != nil {
98		return err
99	}
100	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
101		return err
102	}
103	if err = addRetryMiddlewares(stack, options); err != nil {
104		return err
105	}
106	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
107		return err
108	}
109	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
110		return err
111	}
112	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
113		return err
114	}
115	if err = addClientUserAgent(stack); err != nil {
116		return err
117	}
118	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
119		return err
120	}
121	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
122		return err
123	}
124	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProductAsAdmin(options.Region), middleware.Before); err != nil {
125		return err
126	}
127	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
128		return err
129	}
130	if err = addResponseErrorMiddleware(stack); err != nil {
131		return err
132	}
133	if err = addRequestResponseLogging(stack, options); err != nil {
134		return err
135	}
136	return nil
137}
138
139func newServiceMetadataMiddleware_opDescribeProductAsAdmin(region string) *awsmiddleware.RegisterServiceMetadata {
140	return &awsmiddleware.RegisterServiceMetadata{
141		Region:        region,
142		ServiceID:     ServiceID,
143		SigningName:   "servicecatalog",
144		OperationName: "DescribeProductAsAdmin",
145	}
146}
147