vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood
2018-03-19 15:51:38 +00:00
parent 940df88eb2
commit d64789528d
4309 changed files with 1327278 additions and 1001118 deletions

View File

@ -3,9 +3,13 @@
package serverlessapplicationrepository
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
const opCreateApplication = "CreateApplication"
@ -282,6 +286,104 @@ func (c *ServerlessApplicationRepository) CreateCloudFormationChangeSetWithConte
return out, req.Send()
}
const opDeleteApplication = "DeleteApplication"
// DeleteApplicationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteApplication operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteApplication for more information on using the DeleteApplication
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteApplicationRequest method.
// req, resp := client.DeleteApplicationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/DeleteApplication
func (c *ServerlessApplicationRepository) DeleteApplicationRequest(input *DeleteApplicationInput) (req *request.Request, output *DeleteApplicationOutput) {
op := &request.Operation{
Name: opDeleteApplication,
HTTPMethod: "DELETE",
HTTPPath: "/applications/{applicationId}",
}
if input == nil {
input = &DeleteApplicationInput{}
}
output = &DeleteApplicationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteApplication API operation for AWSServerlessApplicationRepository.
//
// Deletes the specified application.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWSServerlessApplicationRepository's
// API operation DeleteApplication for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// One of the parameters in the request is invalid.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// The AWS Serverless Application Repository service encountered an internal
// error.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The client is not authenticated.
//
// * ErrCodeNotFoundException "NotFoundException"
// The resource (for example, an access policy statement) specified in the request
// does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The client is sending more than the allowed number of requests per unit time.
//
// * ErrCodeConflictException "ConflictException"
// The resource already exists.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/DeleteApplication
func (c *ServerlessApplicationRepository) DeleteApplication(input *DeleteApplicationInput) (*DeleteApplicationOutput, error) {
req, out := c.DeleteApplicationRequest(input)
return out, req.Send()
}
// DeleteApplicationWithContext is the same as DeleteApplication with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteApplication for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServerlessApplicationRepository) DeleteApplicationWithContext(ctx aws.Context, input *DeleteApplicationInput, opts ...request.Option) (*DeleteApplicationOutput, error) {
req, out := c.DeleteApplicationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetApplication = "GetApplication"
// GetApplicationRequest generates a "aws/request.Request" representing the
@ -499,6 +601,12 @@ func (c *ServerlessApplicationRepository) ListApplicationVersionsRequest(input *
Name: opListApplicationVersions,
HTTPMethod: "GET",
HTTPPath: "/applications/{applicationId}/versions",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxItems",
TruncationToken: "",
},
}
if input == nil {
@ -561,6 +669,56 @@ func (c *ServerlessApplicationRepository) ListApplicationVersionsWithContext(ctx
return out, req.Send()
}
// ListApplicationVersionsPages iterates over the pages of a ListApplicationVersions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListApplicationVersions method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListApplicationVersions operation.
// pageNum := 0
// err := client.ListApplicationVersionsPages(params,
// func(page *ListApplicationVersionsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServerlessApplicationRepository) ListApplicationVersionsPages(input *ListApplicationVersionsInput, fn func(*ListApplicationVersionsOutput, bool) bool) error {
return c.ListApplicationVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListApplicationVersionsPagesWithContext same as ListApplicationVersionsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServerlessApplicationRepository) ListApplicationVersionsPagesWithContext(ctx aws.Context, input *ListApplicationVersionsInput, fn func(*ListApplicationVersionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListApplicationVersionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListApplicationVersionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListApplicationVersionsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListApplications = "ListApplications"
// ListApplicationsRequest generates a "aws/request.Request" representing the
@ -592,6 +750,12 @@ func (c *ServerlessApplicationRepository) ListApplicationsRequest(input *ListApp
Name: opListApplications,
HTTPMethod: "GET",
HTTPPath: "/applications",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxItems",
TruncationToken: "",
},
}
if input == nil {
@ -651,6 +815,56 @@ func (c *ServerlessApplicationRepository) ListApplicationsWithContext(ctx aws.Co
return out, req.Send()
}
// ListApplicationsPages iterates over the pages of a ListApplications operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListApplications method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListApplications operation.
// pageNum := 0
// err := client.ListApplicationsPages(params,
// func(page *ListApplicationsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServerlessApplicationRepository) ListApplicationsPages(input *ListApplicationsInput, fn func(*ListApplicationsOutput, bool) bool) error {
return c.ListApplicationsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListApplicationsPagesWithContext same as ListApplicationsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServerlessApplicationRepository) ListApplicationsPagesWithContext(ctx aws.Context, input *ListApplicationsInput, fn func(*ListApplicationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListApplicationsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListApplicationsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage())
}
return p.Err()
}
const opPutApplicationPolicy = "PutApplicationPolicy"
// PutApplicationPolicyRequest generates a "aws/request.Request" representing the
@ -841,17 +1055,28 @@ func (c *ServerlessApplicationRepository) UpdateApplicationWithContext(ctx aws.C
}
// Policy statement applied to the application.
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ApplicationPolicyStatement
type ApplicationPolicyStatement struct {
_ struct{} `type:"structure"`
// A list of supported actions:\n\n GetApplication \n \n\n CreateCloudFormationChangeSet
// \n \n\n ListApplicationVersions \n \n\n SearchApplications \n \n\n Deploy
// (Note: This action enables all other actions above.)
Actions []*string `locationName:"actions" type:"list"`
// A list of supported actions:
//
// GetApplication
//
// CreateCloudFormationChangeSet
//
// ListApplicationVersions
//
// SearchApplications
//
// Deploy (Note: This action enables all other actions above.)
//
// Actions is a required field
Actions []*string `locationName:"actions" type:"list" required:"true"`
// An AWS account ID, or * to make the application public.
Principals []*string `locationName:"principals" type:"list"`
//
// Principals is a required field
Principals []*string `locationName:"principals" type:"list" required:"true"`
// A unique ID for the statement.
StatementId *string `locationName:"statementId" type:"string"`
@ -867,6 +1092,22 @@ func (s ApplicationPolicyStatement) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ApplicationPolicyStatement) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ApplicationPolicyStatement"}
if s.Actions == nil {
invalidParams.Add(request.NewErrParamRequired("Actions"))
}
if s.Principals == nil {
invalidParams.Add(request.NewErrParamRequired("Principals"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetActions sets the Actions field's value.
func (s *ApplicationPolicyStatement) SetActions(v []*string) *ApplicationPolicyStatement {
s.Actions = v
@ -886,31 +1127,54 @@ func (s *ApplicationPolicyStatement) SetStatementId(v string) *ApplicationPolicy
}
// Summary of details about the application.
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ApplicationSummary
type ApplicationSummary struct {
_ struct{} `type:"structure"`
// The application ARN.
ApplicationId *string `locationName:"applicationId" type:"string"`
//
// ApplicationId is a required field
ApplicationId *string `locationName:"applicationId" type:"string" required:"true"`
// The name of the author publishing the app\nMin Length=1. Max Length=127.\nPattern
// "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$";
Author *string `locationName:"author" type:"string"`
// The name of the author publishing the app.
//
// Min Length=1. Max Length=127.
//
// Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$";
//
// Author is a required field
Author *string `locationName:"author" type:"string" required:"true"`
// The date/time this resource was created.
CreationTime *string `locationName:"creationTime" type:"string"`
// The description of the application.\nMin Length=1. Max Length=256
Description *string `locationName:"description" type:"string"`
// The description of the application.
//
// Min Length=1. Max Length=256
//
// Description is a required field
Description *string `locationName:"description" type:"string" required:"true"`
// Labels to improve discovery of apps in search results.\nMin Length=1. Max
// Length=127. Maximum number of labels: 10\nPattern: "^[a-zA-Z0-9+\\-_:\\/@]+$";
// A URL with more information about the application, for example the location
// of your GitHub repository for the application.
HomePageUrl *string `locationName:"homePageUrl" type:"string"`
// Labels to improve discovery of apps in search results.
//
// Min Length=1. Max Length=127. Maximum number of labels: 10
//
// Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$";
Labels []*string `locationName:"labels" type:"list"`
// The name of the application.\nMin Length=1. Max Length=140\nPattern: "[a-zA-Z0-9\\-]+";
Name *string `locationName:"name" type:"string"`
// The name of the application.
//
// Min Length=1. Max Length=140
//
// Pattern: "[a-zA-Z0-9\\-]+";
//
// Name is a required field
Name *string `locationName:"name" type:"string" required:"true"`
// A valid identifier from https://spdx.org/licenses/ .
// A valid identifier from https://spdx.org/licenses/.
SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"`
}
@ -948,6 +1212,12 @@ func (s *ApplicationSummary) SetDescription(v string) *ApplicationSummary {
return s
}
// SetHomePageUrl sets the HomePageUrl field's value.
func (s *ApplicationSummary) SetHomePageUrl(v string) *ApplicationSummary {
s.HomePageUrl = &v
return s
}
// SetLabels sets the Labels field's value.
func (s *ApplicationSummary) SetLabels(v []*string) *ApplicationSummary {
s.Labels = v
@ -966,7 +1236,6 @@ func (s *ApplicationSummary) SetSpdxLicenseId(v string) *ApplicationSummary {
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplicationResponse
type CreateApplicationOutput struct {
_ struct{} `type:"structure"`
@ -978,6 +1247,8 @@ type CreateApplicationOutput struct {
Description *string `locationName:"description" type:"string"`
HomePageUrl *string `locationName:"homePageUrl" type:"string"`
Labels []*string `locationName:"labels" type:"list"`
LicenseUrl *string `locationName:"licenseUrl" type:"string"`
@ -1026,6 +1297,12 @@ func (s *CreateApplicationOutput) SetDescription(v string) *CreateApplicationOut
return s
}
// SetHomePageUrl sets the HomePageUrl field's value.
func (s *CreateApplicationOutput) SetHomePageUrl(v string) *CreateApplicationOutput {
s.HomePageUrl = &v
return s
}
// SetLabels sets the Labels field's value.
func (s *CreateApplicationOutput) SetLabels(v []*string) *CreateApplicationOutput {
s.Labels = v
@ -1062,7 +1339,6 @@ func (s *CreateApplicationOutput) SetVersion(v *Version) *CreateApplicationOutpu
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplicationRequest
type CreateApplicationRequest struct {
_ struct{} `type:"structure"`
@ -1070,6 +1346,8 @@ type CreateApplicationRequest struct {
Description *string `locationName:"description" type:"string"`
HomePageUrl *string `locationName:"homePageUrl" type:"string"`
Labels []*string `locationName:"labels" type:"list"`
LicenseBody *string `locationName:"licenseBody" type:"string"`
@ -1115,6 +1393,12 @@ func (s *CreateApplicationRequest) SetDescription(v string) *CreateApplicationRe
return s
}
// SetHomePageUrl sets the HomePageUrl field's value.
func (s *CreateApplicationRequest) SetHomePageUrl(v string) *CreateApplicationRequest {
s.HomePageUrl = &v
return s
}
// SetLabels sets the Labels field's value.
func (s *CreateApplicationRequest) SetLabels(v []*string) *CreateApplicationRequest {
s.Labels = v
@ -1181,7 +1465,6 @@ func (s *CreateApplicationRequest) SetTemplateUrl(v string) *CreateApplicationRe
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplicationVersionResponse
type CreateApplicationVersionOutput struct {
_ struct{} `type:"structure"`
@ -1244,7 +1527,6 @@ func (s *CreateApplicationVersionOutput) SetTemplateUrl(v string) *CreateApplica
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplicationVersionRequest
type CreateApplicationVersionRequest struct {
_ struct{} `type:"structure"`
@ -1317,7 +1599,6 @@ func (s *CreateApplicationVersionRequest) SetTemplateUrl(v string) *CreateApplic
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateCloudFormationChangeSetResponse
type CreateCloudFormationChangeSetOutput struct {
_ struct{} `type:"structure"`
@ -1364,7 +1645,6 @@ func (s *CreateCloudFormationChangeSetOutput) SetStackId(v string) *CreateCloudF
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateCloudFormationChangeSetRequest
type CreateCloudFormationChangeSetRequest struct {
_ struct{} `type:"structure"`
@ -1394,6 +1674,16 @@ func (s *CreateCloudFormationChangeSetRequest) Validate() error {
if s.ApplicationId == nil {
invalidParams.Add(request.NewErrParamRequired("ApplicationId"))
}
if s.ParameterOverrides != nil {
for i, v := range s.ParameterOverrides {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterOverrides", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
@ -1425,7 +1715,56 @@ func (s *CreateCloudFormationChangeSetRequest) SetStackName(v string) *CreateClo
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplicationRequest
type DeleteApplicationInput struct {
_ struct{} `type:"structure"`
// ApplicationId is a required field
ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteApplicationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteApplicationInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteApplicationInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInput"}
if s.ApplicationId == nil {
invalidParams.Add(request.NewErrParamRequired("ApplicationId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetApplicationId sets the ApplicationId field's value.
func (s *DeleteApplicationInput) SetApplicationId(v string) *DeleteApplicationInput {
s.ApplicationId = &v
return s
}
type DeleteApplicationOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteApplicationOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteApplicationOutput) GoString() string {
return s.String()
}
type GetApplicationInput struct {
_ struct{} `type:"structure"`
@ -1470,7 +1809,6 @@ func (s *GetApplicationInput) SetSemanticVersion(v string) *GetApplicationInput
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplicationResponse
type GetApplicationOutput struct {
_ struct{} `type:"structure"`
@ -1482,6 +1820,8 @@ type GetApplicationOutput struct {
Description *string `locationName:"description" type:"string"`
HomePageUrl *string `locationName:"homePageUrl" type:"string"`
Labels []*string `locationName:"labels" type:"list"`
LicenseUrl *string `locationName:"licenseUrl" type:"string"`
@ -1530,6 +1870,12 @@ func (s *GetApplicationOutput) SetDescription(v string) *GetApplicationOutput {
return s
}
// SetHomePageUrl sets the HomePageUrl field's value.
func (s *GetApplicationOutput) SetHomePageUrl(v string) *GetApplicationOutput {
s.HomePageUrl = &v
return s
}
// SetLabels sets the Labels field's value.
func (s *GetApplicationOutput) SetLabels(v []*string) *GetApplicationOutput {
s.Labels = v
@ -1566,7 +1912,6 @@ func (s *GetApplicationOutput) SetVersion(v *Version) *GetApplicationOutput {
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplicationPolicyRequest
type GetApplicationPolicyInput struct {
_ struct{} `type:"structure"`
@ -1603,7 +1948,6 @@ func (s *GetApplicationPolicyInput) SetApplicationId(v string) *GetApplicationPo
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplicationPolicyResponse
type GetApplicationPolicyOutput struct {
_ struct{} `type:"structure"`
@ -1626,7 +1970,6 @@ func (s *GetApplicationPolicyOutput) SetStatements(v []*ApplicationPolicyStateme
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationVersionsRequest
type ListApplicationVersionsInput struct {
_ struct{} `type:"structure"`
@ -1682,7 +2025,6 @@ func (s *ListApplicationVersionsInput) SetNextToken(v string) *ListApplicationVe
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationVersionsResponse
type ListApplicationVersionsOutput struct {
_ struct{} `type:"structure"`
@ -1713,7 +2055,6 @@ func (s *ListApplicationVersionsOutput) SetVersions(v []*VersionSummary) *ListAp
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationsRequest
type ListApplicationsInput struct {
_ struct{} `type:"structure"`
@ -1757,7 +2098,6 @@ func (s *ListApplicationsInput) SetNextToken(v string) *ListApplicationsInput {
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationsResponse
type ListApplicationsOutput struct {
_ struct{} `type:"structure"`
@ -1789,7 +2129,6 @@ func (s *ListApplicationsOutput) SetNextToken(v string) *ListApplicationsOutput
}
// Parameters supported by the application.
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ParameterDefinition
type ParameterDefinition struct {
_ struct{} `type:"structure"`
@ -1800,17 +2139,22 @@ type ParameterDefinition struct {
AllowedValues []*string `locationName:"allowedValues" type:"list"`
// A string that explains a constraint when the constraint is violated. For
// example, without a constraint description,\n a parameter that has an allowed
// pattern of [A-Za-z0-9]+ displays the following error message when the user\n
// specifies an invalid value:\n\n Malformed input-Parameter MyParameter must
// match pattern [A-Za-z0-9]+ \n \nBy adding a constraint description, such
// as "must contain only uppercase and lowercase letters, and numbers," you
// can display\n the following customized error message:\n\n Malformed input-Parameter
// MyParameter must contain only uppercase and lowercase letters and numbers.
// example, without a constraint description, a parameter that has an allowed
// pattern of [A-Za-z0-9]+ displays the following error message when the user
// specifies an invalid value:
//
// Malformed input-Parameter MyParameter must match pattern [A-Za-z0-9]+
//
// By adding a constraint description, such as "must contain only uppercase
// and lowercase letters, and numbers," you can display the following customized
// error message:
//
// Malformed input-Parameter MyParameter must contain only uppercase and lowercase
// letters and numbers.
ConstraintDescription *string `locationName:"constraintDescription" type:"string"`
// A value of the appropriate type for the template to use if no value is specified
// when a stack is created.\n If you define constraints for the parameter, you
// when a stack is created. If you define constraints for the parameter, you
// must specify a value that adheres to those constraints.
DefaultValue *string `locationName:"defaultValue" type:"string"`
@ -1834,31 +2178,47 @@ type ParameterDefinition struct {
MinValue *int64 `locationName:"minValue" type:"integer"`
// The name of the parameter.
Name *string `locationName:"name" type:"string"`
//
// Name is a required field
Name *string `locationName:"name" type:"string" required:"true"`
// Whether to mask the parameter value whenever anyone makes a call that describes
// the stack. If you set the\n value to true, the parameter value is masked
// with asterisks (*****).
// the stack. If you set the value to true, the parameter value is masked with
// asterisks (*****).
NoEcho *bool `locationName:"noEcho" type:"boolean"`
// A list of SAM resources that use this parameter.
ReferencedByResources []*string `locationName:"referencedByResources" type:"list"`
// A list of AWS SAM resources that use this parameter.
//
// ReferencedByResources is a required field
ReferencedByResources []*string `locationName:"referencedByResources" type:"list" required:"true"`
// The type of the parameter.\nValid values: String | Number | List | CommaDelimitedList
// \n \n\n String : A literal string.\nFor example, users could specify "MyUserName"
// .\n\n Number : An integer or float. AWS CloudFormation validates the parameter
// value as a number; however, when you use the\n parameter elsewhere in your
// template (for example, by using the Ref intrinsic function), the parameter
// value becomes a string.\nFor example, users could specify "8888" .\n\n List
// : An array of integers or floats that are separated by commas. AWS CloudFormation
// validates the parameter value as numbers; however, when\n you use the parameter
// elsewhere in your template (for example, by using the Ref intrinsic function),
// the parameter value becomes a list of strings.\nFor example, users could
// specify "80,20", and a Ref results in ["80","20"] .\n\n CommaDelimitedList
// : An array of literal strings that are separated by commas. The total number
// of strings should be one more than the total number of commas.\n Also, each
// member string is space-trimmed.\nFor example, users could specify "test,dev,prod",
// and a Ref results in ["test","dev","prod"] .
// The type of the parameter.
//
// Valid values: String | Number | List<Number> | CommaDelimitedList
//
// String: A literal string.
//
// For example, users could specify "MyUserName".
//
// Number: An integer or float. AWS CloudFormation validates the parameter value
// as a number; however, when you use the parameter elsewhere in your template
// (for example, by using the Ref intrinsic function), the parameter value becomes
// a string.
//
// For example, users could specify "8888".
//
// List<Number>: An array of integers or floats that are separated by commas.
// AWS CloudFormation validates the parameter value as numbers; however, when
// you use the parameter elsewhere in your template (for example, by using the
// Ref intrinsic function), the parameter value becomes a list of strings.
//
// For example, users could specify "80,20", and a Ref results in ["80","20"].
//
// CommaDelimitedList: An array of literal strings that are separated by commas.
// The total number of strings should be one more than the total number of commas.
// Also, each member string is space-trimmed.
//
// For example, users could specify "test,dev,prod", and a Ref results in ["test","dev","prod"].
Type *string `locationName:"type" type:"string"`
}
@ -1951,17 +2311,20 @@ func (s *ParameterDefinition) SetType(v string) *ParameterDefinition {
}
// Parameter value of the application.
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ParameterValue
type ParameterValue struct {
_ struct{} `type:"structure"`
// The key associated with the parameter. If you don't specify a key and value
// for a particular parameter, AWS CloudFormation\n uses the default value that
// for a particular parameter, AWS CloudFormation uses the default value that
// is specified in your template.
Name *string `locationName:"name" type:"string"`
//
// Name is a required field
Name *string `locationName:"name" type:"string" required:"true"`
// The input value associated with the parameter.
Value *string `locationName:"value" type:"string"`
//
// Value is a required field
Value *string `locationName:"value" type:"string" required:"true"`
}
// String returns the string representation
@ -1974,6 +2337,22 @@ func (s ParameterValue) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ParameterValue) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ParameterValue"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Value == nil {
invalidParams.Add(request.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetName sets the Name field's value.
func (s *ParameterValue) SetName(v string) *ParameterValue {
s.Name = &v
@ -1986,7 +2365,6 @@ func (s *ParameterValue) SetValue(v string) *ParameterValue {
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/PutApplicationPolicyRequest
type PutApplicationPolicyInput struct {
_ struct{} `type:"structure"`
@ -2012,6 +2390,16 @@ func (s *PutApplicationPolicyInput) Validate() error {
if s.ApplicationId == nil {
invalidParams.Add(request.NewErrParamRequired("ApplicationId"))
}
if s.Statements != nil {
for i, v := range s.Statements {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Statements", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
@ -2031,7 +2419,6 @@ func (s *PutApplicationPolicyInput) SetStatements(v []*ApplicationPolicyStatemen
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/PutApplicationPolicyResponse
type PutApplicationPolicyOutput struct {
_ struct{} `type:"structure"`
@ -2054,7 +2441,6 @@ func (s *PutApplicationPolicyOutput) SetStatements(v []*ApplicationPolicyStateme
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/UpdateApplicationResponse
type UpdateApplicationOutput struct {
_ struct{} `type:"structure"`
@ -2066,6 +2452,8 @@ type UpdateApplicationOutput struct {
Description *string `locationName:"description" type:"string"`
HomePageUrl *string `locationName:"homePageUrl" type:"string"`
Labels []*string `locationName:"labels" type:"list"`
LicenseUrl *string `locationName:"licenseUrl" type:"string"`
@ -2114,6 +2502,12 @@ func (s *UpdateApplicationOutput) SetDescription(v string) *UpdateApplicationOut
return s
}
// SetHomePageUrl sets the HomePageUrl field's value.
func (s *UpdateApplicationOutput) SetHomePageUrl(v string) *UpdateApplicationOutput {
s.HomePageUrl = &v
return s
}
// SetLabels sets the Labels field's value.
func (s *UpdateApplicationOutput) SetLabels(v []*string) *UpdateApplicationOutput {
s.Labels = v
@ -2150,7 +2544,6 @@ func (s *UpdateApplicationOutput) SetVersion(v *Version) *UpdateApplicationOutpu
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/UpdateApplicationRequest
type UpdateApplicationRequest struct {
_ struct{} `type:"structure"`
@ -2161,6 +2554,8 @@ type UpdateApplicationRequest struct {
Description *string `locationName:"description" type:"string"`
HomePageUrl *string `locationName:"homePageUrl" type:"string"`
Labels []*string `locationName:"labels" type:"list"`
ReadmeBody *string `locationName:"readmeBody" type:"string"`
@ -2209,6 +2604,12 @@ func (s *UpdateApplicationRequest) SetDescription(v string) *UpdateApplicationRe
return s
}
// SetHomePageUrl sets the HomePageUrl field's value.
func (s *UpdateApplicationRequest) SetHomePageUrl(v string) *UpdateApplicationRequest {
s.HomePageUrl = &v
return s
}
// SetLabels sets the Labels field's value.
func (s *UpdateApplicationRequest) SetLabels(v []*string) *UpdateApplicationRequest {
s.Labels = v
@ -2228,27 +2629,38 @@ func (s *UpdateApplicationRequest) SetReadmeUrl(v string) *UpdateApplicationRequ
}
// Application version details.
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/Version
type Version struct {
_ struct{} `type:"structure"`
// The application Amazon Resource Name (ARN).
ApplicationId *string `locationName:"applicationId" type:"string"`
//
// ApplicationId is a required field
ApplicationId *string `locationName:"applicationId" type:"string" required:"true"`
// The date/time this resource was created.
CreationTime *string `locationName:"creationTime" type:"string"`
//
// CreationTime is a required field
CreationTime *string `locationName:"creationTime" type:"string" required:"true"`
// Array of parameter types supported by the application.
ParameterDefinitions []*ParameterDefinition `locationName:"parameterDefinitions" type:"list"`
//
// ParameterDefinitions is a required field
ParameterDefinitions []*ParameterDefinition `locationName:"parameterDefinitions" type:"list" required:"true"`
// The semantic version of the application:\n\n https://semver.org/
SemanticVersion *string `locationName:"semanticVersion" type:"string"`
// The semantic version of the application:
//
// https://semver.org/
//
// SemanticVersion is a required field
SemanticVersion *string `locationName:"semanticVersion" type:"string" required:"true"`
// A link to a public repository for the source code of your application.
SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"`
// A link to the packaged SAM template of your application.
TemplateUrl *string `locationName:"templateUrl" type:"string"`
// A link to the packaged AWS SAM template of your application.
//
// TemplateUrl is a required field
TemplateUrl *string `locationName:"templateUrl" type:"string" required:"true"`
}
// String returns the string representation
@ -2298,18 +2710,25 @@ func (s *Version) SetTemplateUrl(v string) *Version {
}
// Application version summary.
// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/VersionSummary
type VersionSummary struct {
_ struct{} `type:"structure"`
// The application Amazon Resource Name (ARN).
ApplicationId *string `locationName:"applicationId" type:"string"`
//
// ApplicationId is a required field
ApplicationId *string `locationName:"applicationId" type:"string" required:"true"`
// The date/time this resource was created.
CreationTime *string `locationName:"creationTime" type:"string"`
//
// CreationTime is a required field
CreationTime *string `locationName:"creationTime" type:"string" required:"true"`
// The semantic version of the application:\n\n https://semver.org/
SemanticVersion *string `locationName:"semanticVersion" type:"string"`
// The semantic version of the application:
//
// https://semver.org/
//
// SemanticVersion is a required field
SemanticVersion *string `locationName:"semanticVersion" type:"string" required:"true"`
// A link to a public repository for the source code of your application.
SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"`

View File

@ -3,7 +3,37 @@
// Package serverlessapplicationrepository provides the client and types for making API
// requests to AWSServerlessApplicationRepository.
//
// AWS Serverless Application Repository
// The AWS Serverless Application Repository makes it easy for developers and
// enterprises to quickly find and deploy serverless applications in the AWS
// Cloud. For more information about serverless applications, see Serverless
// Computing and Applications on the AWS website.
//
// The AWS Serverless Application Repository is deeply integrated with the AWS
// Lambda console, so that developers of all levels can get started with serverless
// computing without needing to learn anything new. You can use category keywords
// to browse for applications such as web and mobile backends, data processing
// applications, or chatbots. You can also search for applications by name,
// publisher, or event source. To use an application, you simply choose it,
// configure any required fields, and deploy it with a few clicks.
//
// You can also easily publish applications, sharing them publicly with the
// community at large, or privately within your team or across your organization.
// To publish a serverless application (or app), you can use the AWS Management
// Console, AWS Command Line Interface (AWS CLI), or AWS SDKs to upload the
// code. Along with the code, you upload a simple manifest file, also known
// as the AWS Serverless Application Model (AWS SAM) template. For more information
// about AWS SAM, see AWS Serverless Application Model (AWS SAM) on the AWS
// Labs GitHub repository.
//
// The AWS Serverless Application Repository Developer Guide contains more information
// about the two developer experiences available:
//
// * Consuming Applications Browse for applications and view information
// about them, including source code and readme files. Also install, configure,
// and deploy applications of your choosing.
//
// Publishing Applications Configure and upload applications to make them
// available to other developers, and publish new versions of applications.
//
// See https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08 for more information on this service.
//

View File

@ -72,6 +72,10 @@ type ServerlessApplicationRepositoryAPI interface {
CreateCloudFormationChangeSetWithContext(aws.Context, *serverlessapplicationrepository.CreateCloudFormationChangeSetRequest, ...request.Option) (*serverlessapplicationrepository.CreateCloudFormationChangeSetOutput, error)
CreateCloudFormationChangeSetRequest(*serverlessapplicationrepository.CreateCloudFormationChangeSetRequest) (*request.Request, *serverlessapplicationrepository.CreateCloudFormationChangeSetOutput)
DeleteApplication(*serverlessapplicationrepository.DeleteApplicationInput) (*serverlessapplicationrepository.DeleteApplicationOutput, error)
DeleteApplicationWithContext(aws.Context, *serverlessapplicationrepository.DeleteApplicationInput, ...request.Option) (*serverlessapplicationrepository.DeleteApplicationOutput, error)
DeleteApplicationRequest(*serverlessapplicationrepository.DeleteApplicationInput) (*request.Request, *serverlessapplicationrepository.DeleteApplicationOutput)
GetApplication(*serverlessapplicationrepository.GetApplicationInput) (*serverlessapplicationrepository.GetApplicationOutput, error)
GetApplicationWithContext(aws.Context, *serverlessapplicationrepository.GetApplicationInput, ...request.Option) (*serverlessapplicationrepository.GetApplicationOutput, error)
GetApplicationRequest(*serverlessapplicationrepository.GetApplicationInput) (*request.Request, *serverlessapplicationrepository.GetApplicationOutput)
@ -84,10 +88,16 @@ type ServerlessApplicationRepositoryAPI interface {
ListApplicationVersionsWithContext(aws.Context, *serverlessapplicationrepository.ListApplicationVersionsInput, ...request.Option) (*serverlessapplicationrepository.ListApplicationVersionsOutput, error)
ListApplicationVersionsRequest(*serverlessapplicationrepository.ListApplicationVersionsInput) (*request.Request, *serverlessapplicationrepository.ListApplicationVersionsOutput)
ListApplicationVersionsPages(*serverlessapplicationrepository.ListApplicationVersionsInput, func(*serverlessapplicationrepository.ListApplicationVersionsOutput, bool) bool) error
ListApplicationVersionsPagesWithContext(aws.Context, *serverlessapplicationrepository.ListApplicationVersionsInput, func(*serverlessapplicationrepository.ListApplicationVersionsOutput, bool) bool, ...request.Option) error
ListApplications(*serverlessapplicationrepository.ListApplicationsInput) (*serverlessapplicationrepository.ListApplicationsOutput, error)
ListApplicationsWithContext(aws.Context, *serverlessapplicationrepository.ListApplicationsInput, ...request.Option) (*serverlessapplicationrepository.ListApplicationsOutput, error)
ListApplicationsRequest(*serverlessapplicationrepository.ListApplicationsInput) (*request.Request, *serverlessapplicationrepository.ListApplicationsOutput)
ListApplicationsPages(*serverlessapplicationrepository.ListApplicationsInput, func(*serverlessapplicationrepository.ListApplicationsOutput, bool) bool) error
ListApplicationsPagesWithContext(aws.Context, *serverlessapplicationrepository.ListApplicationsInput, func(*serverlessapplicationrepository.ListApplicationsOutput, bool) bool, ...request.Option) error
PutApplicationPolicy(*serverlessapplicationrepository.PutApplicationPolicyInput) (*serverlessapplicationrepository.PutApplicationPolicyOutput, error)
PutApplicationPolicyWithContext(aws.Context, *serverlessapplicationrepository.PutApplicationPolicyInput, ...request.Option) (*serverlessapplicationrepository.PutApplicationPolicyOutput, error)
PutApplicationPolicyRequest(*serverlessapplicationrepository.PutApplicationPolicyInput) (*request.Request, *serverlessapplicationrepository.PutApplicationPolicyOutput)