/
api_op_ActivateType.go
178 lines (155 loc) · 6.1 KB
/
api_op_ActivateType.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Code generated by smithy-go-codegen DO NOT EDIT.
package cloudformation
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/cloudformation/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Activates a public third-party extension, making it available for use in stack
// templates. For more information, see Using public extensions
// (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html)
// in the CloudFormation User Guide. Once you have activated a public third-party
// extension in your account and region, use SetTypeConfiguration to specify
// configuration properties for the extension. For more information, see
// Configuring extensions at the account level
// (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-register.html#registry-set-configuration)
// in the CloudFormation User Guide.
func (c *Client) ActivateType(ctx context.Context, params *ActivateTypeInput, optFns ...func(*Options)) (*ActivateTypeOutput, error) {
if params == nil {
params = &ActivateTypeInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ActivateType", params, optFns, c.addOperationActivateTypeMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ActivateTypeOutput)
out.ResultMetadata = metadata
return out, nil
}
type ActivateTypeInput struct {
// Whether to automatically update the extension in this account and region when a
// new minor version is published by the extension publisher. Major versions
// released by the publisher must be manually updated. The default is true.
AutoUpdate *bool
// The name of the IAM execution role to use to activate the extension.
ExecutionRoleArn *string
// Contains logging configuration information for an extension.
LoggingConfig *types.LoggingConfig
// The major version of this extension you want to activate, if multiple major
// versions are available. The default is the latest major version. CloudFormation
// uses the latest available minor version of the major version selected. You can
// specify MajorVersion or VersionBump, but not both.
MajorVersion *int64
// The Amazon Resource Number (ARN) of the public extension. Conditional: You must
// specify PublicTypeArn, or TypeName, Type, and PublisherId.
PublicTypeArn *string
// The ID of the extension publisher. Conditional: You must specify PublicTypeArn,
// or TypeName, Type, and PublisherId.
PublisherId *string
// The extension type. Conditional: You must specify PublicTypeArn, or TypeName,
// Type, and PublisherId.
Type types.ThirdPartyType
// The name of the extension. Conditional: You must specify PublicTypeArn, or
// TypeName, Type, and PublisherId.
TypeName *string
// An alias to assign to the public extension, in this account and region. If you
// specify an alias for the extension, CloudFormation treats the alias as the
// extension type name within this account and region. You must use the alias to
// refer to the extension in your templates, API calls, and CloudFormation console.
// An extension alias must be unique within a given account and region. You can
// activate the same public resource multiple times in the same account and region,
// using different type name aliases.
TypeNameAlias *string
// Manually updates a previously-activated type to a new major or minor version, if
// available. You can also use this parameter to update the value of AutoUpdate.
//
// *
// MAJOR: CloudFormation updates the extension to the newest major version, if one
// is available.
//
// * MINOR: CloudFormation updates the extension to the newest minor
// version, if one is available.
VersionBump types.VersionBump
noSmithyDocumentSerde
}
type ActivateTypeOutput struct {
// The Amazon Resource Number (ARN) of the activated extension, in this account and
// region.
Arn *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationActivateTypeMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpActivateType{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpActivateType{}, 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); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpActivateTypeValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opActivateType(options.Region), middleware.Before); 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_opActivateType(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "cloudformation",
OperationName: "ActivateType",
}
}