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.

PutMethodResponseInput

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

type PutMethodResponseInput struct { HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` ResponseModels map[string]*string `locationName:"responseModels" type:"map"` ResponseParameters map[string]*bool `locationName:"responseParameters" type:"map"` RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` }

Request to add a MethodResponse to an existing Method resource.

HttpMethod

Type: *string

[Required] The HTTP verb of the Method resource.

HttpMethod is a required field

ResourceId

Type: *string

[Required] The Resource identifier for the Method resource.

ResourceId is a required field

ResponseModels

Type: map[string]*string

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

ResponseParameters

Type: map[string]*bool

A key-value map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header name and the associated value is a Boolean flag indicating whether the method response parameter is required or not. The method response header names must match the pattern of method.response.header.{name}, where name is a valid and unique header name. The response parameter names defined here are available in the integration response to be mapped from an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

RestApiId

Type: *string

[Required] The string identifier of the associated RestApi.

RestApiId is a required field

StatusCode

Type: *string

[Required] The method response's status code.

StatusCode is a required field

Method

GoString

func (s PutMethodResponseInput) GoString() string

GoString returns the string representation

SetHttpMethod

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

SetHttpMethod sets the HttpMethod field's value.

SetResourceId

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

SetResourceId sets the ResourceId field's value.

SetResponseModels

func (s *PutMethodResponseInput) SetResponseModels(v map[string]*string) *PutMethodResponseInput

SetResponseModels sets the ResponseModels field's value.

SetResponseParameters

func (s *PutMethodResponseInput) SetResponseParameters(v map[string]*bool) *PutMethodResponseInput

SetResponseParameters sets the ResponseParameters field's value.

SetRestApiId

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

SetRestApiId sets the RestApiId field's value.

SetStatusCode

func (s *PutMethodResponseInput) SetStatusCode(v string) *PutMethodResponseInput

SetStatusCode sets the StatusCode field's value.

String

func (s PutMethodResponseInput) String() string

String returns the string representation

Validate

func (s *PutMethodResponseInput) Validate() error

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

On this page: