amazonka-apigateway-1.3.6: Amazon API Gateway SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.APIGateway.PutMethod

Contents

Description

Add a method to an existing Resource resource.

See: AWS API Reference for PutMethod.

Synopsis

Creating a Request

putMethod Source

Creates a value of PutMethod with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

putRequestModels :: Lens' PutMethod (HashMap Text Text) Source

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.

putRequestParameters :: Lens' PutMethod (HashMap Text Bool) Source

Represents requests parameters that are sent with the backend request. Request parameters are represented as a key/value map, with a destination as the key and a source as the value. A source must match an existing method request parameter, or a static value. Static values must be enclosed with single quotes, and be pre-encoded based on their destination in the request. The destination must match the pattern 'integration.request.{location}.{name}', where location is either querystring, path, or header. name must be a valid, unique parameter name.

putApiKeyRequired :: Lens' PutMethod (Maybe Bool) Source

Specifies whether the method required a valid ApiKey.

putRestAPIId :: Lens' PutMethod Text Source

The RestApi identifier for the new Method resource.

putResourceId :: Lens' PutMethod Text Source

The Resource identifier for the new Method resource.

putHttpMethod :: Lens' PutMethod Text Source

Specifies the put method request's HTTP method type.

putAuthorizationType :: Lens' PutMethod Text Source

Specifies the type of authorization used for the method.

Destructuring the Response

method :: Method Source

Creates a value of Method with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data Method Source

Represents a method.

See: method smart constructor.

Response Lenses

mMethodResponses :: Lens' Method (HashMap Text MethodResponse) Source

Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.

mHttpMethod :: Lens' Method (Maybe Text) Source

The HTTP method.

mRequestModels :: Lens' Method (HashMap Text Text) Source

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.

mRequestParameters :: Lens' Method (HashMap Text Bool) Source

Represents request parameters that can be accepted by Amazon API Gateway. Request parameters are represented as a key/value map, with a source as the key and a Boolean flag as the value. The Boolean flag is used to specify whether the parameter is required. A source must match the pattern 'method.request.{location}.{name}', where location is either querystring, path, or header. name is a valid, unique parameter name. Sources specified here are available to the integration for mapping to integration request parameters or templates.

mAuthorizationType :: Lens' Method (Maybe Text) Source

The method's authorization type.

mApiKeyRequired :: Lens' Method (Maybe Bool) Source

Specifies whether the method requires a valid ApiKey.

mMethodIntegration :: Lens' Method (Maybe Integration) Source

The method's integration.