1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package serverlessapplicationrepository 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/serverlessapplicationrepository/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Updates the specified application. 15func (c *Client) UpdateApplication(ctx context.Context, params *UpdateApplicationInput, optFns ...func(*Options)) (*UpdateApplicationOutput, error) { 16 if params == nil { 17 params = &UpdateApplicationInput{} 18 } 19 20 result, metadata, err := c.invokeOperation(ctx, "UpdateApplication", params, optFns, addOperationUpdateApplicationMiddlewares) 21 if err != nil { 22 return nil, err 23 } 24 25 out := result.(*UpdateApplicationOutput) 26 out.ResultMetadata = metadata 27 return out, nil 28} 29 30type UpdateApplicationInput struct { 31 32 // The Amazon Resource Name (ARN) of the application. 33 // 34 // This member is required. 35 ApplicationId *string 36 37 // The name of the author publishing the app.Minimum length=1. Maximum 38 // length=127.Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$"; 39 Author *string 40 41 // The description of the application.Minimum length=1. Maximum length=256 42 Description *string 43 44 // A URL with more information about the application, for example the location of 45 // your GitHub repository for the application. 46 HomePageUrl *string 47 48 // Labels to improve discovery of apps in search results.Minimum length=1. Maximum 49 // length=127. Maximum number of labels: 10Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$"; 50 Labels []string 51 52 // A text readme file in Markdown language that contains a more detailed 53 // description of the application and how it works.Maximum size 5 MB 54 ReadmeBody *string 55 56 // A link to the readme file in Markdown language that contains a more detailed 57 // description of the application and how it works.Maximum size 5 MB 58 ReadmeUrl *string 59} 60 61type UpdateApplicationOutput struct { 62 63 // The application Amazon Resource Name (ARN). 64 ApplicationId *string 65 66 // The name of the author publishing the app.Minimum length=1. Maximum 67 // length=127.Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$"; 68 Author *string 69 70 // The date and time this resource was created. 71 CreationTime *string 72 73 // The description of the application.Minimum length=1. Maximum length=256 74 Description *string 75 76 // A URL with more information about the application, for example the location of 77 // your GitHub repository for the application. 78 HomePageUrl *string 79 80 // Whether the author of this application has been verified. This means means that 81 // AWS has made a good faith review, as a reasonable and prudent service provider, 82 // of the information provided by the requester and has confirmed that the 83 // requester's identity is as claimed. 84 IsVerifiedAuthor bool 85 86 // Labels to improve discovery of apps in search results.Minimum length=1. Maximum 87 // length=127. Maximum number of labels: 10Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$"; 88 Labels []string 89 90 // A link to a license file of the app that matches the spdxLicenseID value of your 91 // application.Maximum size 5 MB 92 LicenseUrl *string 93 94 // The name of the application.Minimum length=1. Maximum length=140Pattern: 95 // "[a-zA-Z0-9\\-]+"; 96 Name *string 97 98 // A link to the readme file in Markdown language that contains a more detailed 99 // description of the application and how it works.Maximum size 5 MB 100 ReadmeUrl *string 101 102 // A valid identifier from https://spdx.org/licenses/. 103 SpdxLicenseId *string 104 105 // The URL to the public profile of a verified author. This URL is submitted by the 106 // author. 107 VerifiedAuthorUrl *string 108 109 // Version information about the application. 110 Version *types.Version 111 112 // Metadata pertaining to the operation's result. 113 ResultMetadata middleware.Metadata 114} 115 116func addOperationUpdateApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { 117 err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateApplication{}, middleware.After) 118 if err != nil { 119 return err 120 } 121 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateApplication{}, middleware.After) 122 if err != nil { 123 return err 124 } 125 if err = addSetLoggerMiddleware(stack, options); err != nil { 126 return err 127 } 128 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 129 return err 130 } 131 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 132 return err 133 } 134 if err = addResolveEndpointMiddleware(stack, options); err != nil { 135 return err 136 } 137 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 138 return err 139 } 140 if err = addRetryMiddlewares(stack, options); err != nil { 141 return err 142 } 143 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 144 return err 145 } 146 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 147 return err 148 } 149 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 150 return err 151 } 152 if err = addClientUserAgent(stack); err != nil { 153 return err 154 } 155 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 156 return err 157 } 158 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 159 return err 160 } 161 if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { 162 return err 163 } 164 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateApplication(options.Region), middleware.Before); err != nil { 165 return err 166 } 167 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 168 return err 169 } 170 if err = addResponseErrorMiddleware(stack); err != nil { 171 return err 172 } 173 if err = addRequestResponseLogging(stack, options); err != nil { 174 return err 175 } 176 return nil 177} 178 179func newServiceMetadataMiddleware_opUpdateApplication(region string) *awsmiddleware.RegisterServiceMetadata { 180 return &awsmiddleware.RegisterServiceMetadata{ 181 Region: region, 182 ServiceID: ServiceID, 183 SigningName: "serverlessrepo", 184 OperationName: "UpdateApplication", 185 } 186} 187