AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

PutMethodInput

import "github.com/aws/aws-sdk-go/service/apigateway"

type PutMethodInput struct { ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` AuthorizationType *string `locationName:"authorizationType" type:"string" required:"true"` AuthorizerId *string `locationName:"authorizerId" type:"string"` HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` OperationName *string `locationName:"operationName" type:"string"` RequestModels map[string]*string `locationName:"requestModels" type:"map"` RequestParameters map[string]*bool `locationName:"requestParameters" type:"map"` RequestValidatorId *string `locationName:"requestValidatorId" type:"string"` ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` }

Request to add a method to an existing Resource resource.

ApiKeyRequired

Type: *bool

Specifies whether the method required a valid ApiKey.

AuthorizationScopes

Type: []*string

A list of authorization scopes configured on the method. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.

AuthorizationType

Type: *string

[Required] The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

AuthorizationType is a required field

AuthorizerId

Type: *string

Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS. The authorizer identifier is generated by API Gateway when you created the authorizer.

HttpMethod

Type: *string

[Required] Specifies the method request's HTTP method type.

HttpMethod is a required field

OperationName

Type: *string

A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore (https://petstore-demo-endpoint.execute-api.com/petstore/pets) example.

RequestModels

Type: map[string]*string

Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

RequestParameters

Type: map[string]*bool

A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key defines a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or body-mapping templates.

RequestValidatorId

Type: *string

The identifier of a RequestValidator for validating the method request.

ResourceId

Type: *string

[Required] The Resource identifier for the new Method resource.

ResourceId is a required field

RestApiId

Type: *string

[Required] The string identifier of the associated RestApi.

RestApiId is a required field

Method

GoString

func (s PutMethodInput) GoString() string

GoString returns the string representation

SetApiKeyRequired

func (s *PutMethodInput) SetApiKeyRequired(v bool) *PutMethodInput

SetApiKeyRequired sets the ApiKeyRequired field's value.

SetAuthorizationScopes

func (s *PutMethodInput) SetAuthorizationScopes(v []*string) *PutMethodInput

SetAuthorizationScopes sets the AuthorizationScopes field's value.

SetAuthorizationType

func (s *PutMethodInput) SetAuthorizationType(v string) *PutMethodInput

SetAuthorizationType sets the AuthorizationType field's value.

SetAuthorizerId

func (s *PutMethodInput) SetAuthorizerId(v string) *PutMethodInput

SetAuthorizerId sets the AuthorizerId field's value.

SetHttpMethod

func (s *PutMethodInput) SetHttpMethod(v string) *PutMethodInput

SetHttpMethod sets the HttpMethod field's value.

SetOperationName

func (s *PutMethodInput) SetOperationName(v string) *PutMethodInput

SetOperationName sets the OperationName field's value.

SetRequestModels

func (s *PutMethodInput) SetRequestModels(v map[string]*string) *PutMethodInput

SetRequestModels sets the RequestModels field's value.

SetRequestParameters

func (s *PutMethodInput) SetRequestParameters(v map[string]*bool) *PutMethodInput

SetRequestParameters sets the RequestParameters field's value.

SetRequestValidatorId

func (s *PutMethodInput) SetRequestValidatorId(v string) *PutMethodInput

SetRequestValidatorId sets the RequestValidatorId field's value.

SetResourceId

func (s *PutMethodInput) SetResourceId(v string) *PutMethodInput

SetResourceId sets the ResourceId field's value.

SetRestApiId

func (s *PutMethodInput) SetRestApiId(v string) *PutMethodInput

SetRestApiId sets the RestApiId field's value.

String

func (s PutMethodInput) String() string

String returns the string representation

Validate

func (s *PutMethodInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: