amazonka-apigateway-1.3.5: 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.Types

Contents

Description

 

Synopsis

Service Configuration

aPIGateway :: Service Source

API version '2015-07-09' of the Amazon API Gateway SDK configuration.

Errors

_ConflictException :: AsError a => Getting (First ServiceError) a ServiceError Source

Prism for ConflictException' errors.

_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source

Prism for NotFoundException' errors.

_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError Source

Prism for TooManyRequestsException' errors.

_ServiceUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError Source

Prism for ServiceUnavailableException' errors.

_UnauthorizedException :: AsError a => Getting (First ServiceError) a ServiceError Source

Prism for UnauthorizedException' errors.

_BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError Source

Prism for BadRequestException' errors.

_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source

Prism for LimitExceededException' errors.

CacheClusterSize

CacheClusterStatus

IntegrationType

Op

APIKey

data APIKey Source

A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that stage.

See: apiKey smart constructor.

apiKey :: APIKey Source

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

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

akEnabled :: Lens' APIKey (Maybe Bool) Source

Specifies whether the API Key can be used by callers.

akCreatedDate :: Lens' APIKey (Maybe UTCTime) Source

The date when the API Key was created, in ISO 8601 format.

akName :: Lens' APIKey (Maybe Text) Source

The name of the API Key.

akId :: Lens' APIKey (Maybe Text) Source

The identifier of the API Key.

akStageKeys :: Lens' APIKey [Text] Source

A list of Stage resources that are associated with the ApiKey resource.

akLastUpdatedDate :: Lens' APIKey (Maybe UTCTime) Source

When the API Key was last updated, in ISO 8601 format.

akDescription :: Lens' APIKey (Maybe Text) Source

The description of the API Key.

Account

data Account Source

Represents an AWS account that is associated with Amazon API Gateway.

See: account smart constructor.

account :: Account Source

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

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

aCloudwatchRoleARN :: Lens' Account (Maybe Text) Source

Specifies the Amazon resource name (ARN) of an Amazon CloudWatch role for the current Account resource.

aThrottleSettings :: Lens' Account (Maybe ThrottleSettings) Source

Specifies the application programming interface (API) throttle settings for the current Account resource.

BasePathMapping

data BasePathMapping Source

Represents the base path that callers of the API that must provide as part of the URL after the domain name.

See: basePathMapping smart constructor.

basePathMapping :: BasePathMapping Source

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

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

bpmStage :: Lens' BasePathMapping (Maybe Text) Source

The name of the API's stage.

bpmBasePath :: Lens' BasePathMapping (Maybe Text) Source

The base path name that callers of the API must provide as part of the URL after the domain name.

ClientCertificate

clientCertificate :: ClientCertificate Source

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

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

Deployment

data Deployment Source

An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.

See: deployment smart constructor.

deployment :: Deployment Source

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

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

dApiSummary :: Lens' Deployment (HashMap Text (HashMap Text MethodSnapshot)) Source

Gets a summary of the RestApi at the date and time that the deployment resource was created.

dCreatedDate :: Lens' Deployment (Maybe UTCTime) Source

The date and time that the deployment resource was created.

dId :: Lens' Deployment (Maybe Text) Source

The identifier for the deployment resource.

dDescription :: Lens' Deployment (Maybe Text) Source

The description for the deployment resource.

DomainName

data DomainName Source

Represents a domain name that is contained in a simpler, more intuitive URL that can be called.

See: domainName smart constructor.

domainName :: DomainName Source

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

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

dnCertificateName :: Lens' DomainName (Maybe Text) Source

The name of the certificate.

dnDomainName :: Lens' DomainName (Maybe Text) Source

The name of the DomainName resource.

dnCertificateUploadDate :: Lens' DomainName (Maybe UTCTime) Source

The date when the certificate was uploaded, in ISO 8601 format.

dnDistributionDomainName :: Lens' DomainName (Maybe Text) Source

The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.

Integration

integration :: Integration Source

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

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

iHttpMethod :: Lens' Integration (Maybe Text) Source

Specifies the integration's HTTP method type.

iRequestTemplates :: Lens' Integration (HashMap Text Text) Source

Specifies the integration's request templates.

iCredentials :: Lens' Integration (Maybe Text) Source

Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string 'arn:aws:iam::\\*:user\/\\*'. To use resource-based permissions on supported AWS services, specify null.

iRequestParameters :: Lens' Integration (HashMap Text Text) 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.

iUri :: Lens' Integration (Maybe Text) Source

Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form 'arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}'. Region and service are used to determine the right endpoint. For AWS services that use the 'Action=' query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial \/.

iIntegrationResponses :: Lens' Integration (HashMap Text IntegrationResponse) Source

Specifies the integration's responses.

iCacheNamespace :: Lens' Integration (Maybe Text) Source

Specifies the integration's cache namespace.

iType :: Lens' Integration (Maybe IntegrationType) Source

Specifies the integration's type.

iCacheKeyParameters :: Lens' Integration [Text] Source

Specifies the integration's cache key parameters.

IntegrationResponse

data IntegrationResponse Source

Represents an integration response. The status code must map to an existing MethodResponse, and parameters and templates can be used to transform the backend response.

See: integrationResponse smart constructor.

integrationResponse :: IntegrationResponse Source

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

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

iResponseTemplates :: Lens' IntegrationResponse (HashMap Text Text) Source

Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

iSelectionPattern :: Lens' IntegrationResponse (Maybe Text) Source

Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.

iStatusCode :: Lens' IntegrationResponse (Maybe Text) Source

Specifies the status code that is used to map the integration response to an existing MethodResponse.

iResponseParameters :: Lens' IntegrationResponse (HashMap Text Text) Source

Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the Method. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern 'integration.response.header.{name}'.

Method

data Method Source

Represents a method.

See: method smart constructor.

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:

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.

MethodResponse

data MethodResponse Source

Represents a method response. Amazon API Gateway sends back the status code to the caller as the HTTP status code. Parameters and models can be used to transform the response from the method's integration.

See: methodResponse smart constructor.

methodResponse :: MethodResponse Source

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

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

mResponseModels :: Lens' MethodResponse (HashMap Text Text) Source

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.

mStatusCode :: Lens' MethodResponse (Maybe Text) Source

The method response's status code.

mResponseParameters :: Lens' MethodResponse (HashMap Text Bool) Source

Represents response parameters that can be sent back to the caller by Amazon API Gateway. Response parameters are represented as a key/value map, with a destination as the key and a boolean flag as the value, which is used to specify whether the parameter is required. A destination must match the pattern 'method.response.header.{name}', where name is a valid, unique header name. Destinations specified here are available to the integration for mapping from integration response parameters.

MethodSetting

methodSetting :: MethodSetting Source

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

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

msCacheTtlInSeconds :: Lens' MethodSetting (Maybe Int) Source

Specifies the time to live (TTL) in seconds, for cached responses. The higher a the TTL, the longer the response will be cached. The PATCH path for this setting is '/{method_setting_key}/caching/ttlInSeconds', and the value is an integer.

msDataTraceEnabled :: Lens' MethodSetting (Maybe Bool) Source

Specifies the whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is '/{method_setting_key}/logging/dataTrace', and the value is a Boolean.

msThrottlingBurstLimit :: Lens' MethodSetting (Maybe Int) Source

Specifies the throttling burst limit. The PATCH path for this setting is '/{method_setting_key}/throttling/burstLimit', and the value is an integer.

msCacheDataEncrypted :: Lens' MethodSetting (Maybe Bool) Source

Specifies whether the cached responses are encrypted. The PATCH path for this setting is '/{method_setting_key}/caching/dataEncrypted', and the value is a Boolean.

msLoggingLevel :: Lens' MethodSetting (Maybe Text) Source

Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is '/{method_setting_key}/logging/loglevel', and the available levels are OFF, ERROR, and INFO.

msCachingEnabled :: Lens' MethodSetting (Maybe Bool) Source

Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is '/{method_setting_key}/caching/enabled', and the value is a Boolean.

msMetricsEnabled :: Lens' MethodSetting (Maybe Bool) Source

Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is '/{method_setting_key}/metrics/enabled', and the value is a Boolean.

msThrottlingRateLimit :: Lens' MethodSetting (Maybe Double) Source

Specifies the throttling rate limit. The PATCH path for this setting is '/{method_setting_key}/throttling/rateLimit', and the value is a double.

MethodSnapshot

data MethodSnapshot Source

Represents a summary of a Method resource, given a particular date and time.

See: methodSnapshot smart constructor.

methodSnapshot :: MethodSnapshot Source

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

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

msAuthorizationType :: Lens' MethodSnapshot (Maybe Text) Source

Specifies the type of authorization used for the method.

msApiKeyRequired :: Lens' MethodSnapshot (Maybe Bool) Source

Specifies whether the method requires a valid ApiKey.

Model

data Model Source

Represents the structure of a request or response payload for a method.

See: model smart constructor.

model :: Model Source

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

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

mSchema :: Lens' Model (Maybe Text) Source

The schema for the model. For 'application\/json' models, this should be JSON-schema draft v4 model.

mName :: Lens' Model (Maybe Text) Source

The name of the model.

mId :: Lens' Model (Maybe Text) Source

The identifier for the model resource.

mDescription :: Lens' Model (Maybe Text) Source

The description of the model.

mContentType :: Lens' Model (Maybe Text) Source

The content-type for the model.

PatchOperation

data PatchOperation Source

A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.

See: patchOperation smart constructor.

patchOperation :: PatchOperation Source

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

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

poOp :: Lens' PatchOperation (Maybe Op) Source

A patch operation whose value indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors.

poPath :: Lens' PatchOperation (Maybe Text) Source

Operation objects MUST have exactly one "path" member. That member's value is a string containing a `JSON-Pointer` value that references a location within the target document (the "target location") where the operation is performed.

poValue :: Lens' PatchOperation (Maybe Text) Source

The actual value content.

poFrom :: Lens' PatchOperation (Maybe Text) Source

The "move" and "copy" operation object MUST contain a "from" member, which is a string containing a 'JSON Pointer' value that references the location in the target document to move the value from.

Resource

resource :: Resource Source

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

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

rPathPart :: Lens' Resource (Maybe Text) Source

The last path segment for this resource.

rPath :: Lens' Resource (Maybe Text) Source

The full path for this resource.

rId :: Lens' Resource (Maybe Text) Source

The resource's identifier.

rResourceMethods :: Lens' Resource (HashMap Text Method) Source

Map of methods for this resource, which is included only if requested using the embed option.

rParentId :: Lens' Resource (Maybe Text) Source

The parent resource's identifier.

RestAPI

restAPI :: RestAPI Source

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

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

raCreatedDate :: Lens' RestAPI (Maybe UTCTime) Source

The date when the API was created, in ISO 8601 format.

raName :: Lens' RestAPI (Maybe Text) Source

The API's name.

raId :: Lens' RestAPI (Maybe Text) Source

The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

raDescription :: Lens' RestAPI (Maybe Text) Source

The API's description.

Stage

data Stage Source

Represents a unique identifier for a version of a deployed RestApi that is callable by users.

See: stage smart constructor.

stage :: Stage Source

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

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

sDeploymentId :: Lens' Stage (Maybe Text) Source

The identifier of the Deployment that the stage points to.

sClientCertificateId :: Lens' Stage (Maybe Text) Source

Undocumented member.

sCreatedDate :: Lens' Stage (Maybe UTCTime) Source

The date and time that the stage was created, in ISO 8601 format.

sCacheClusterStatus :: Lens' Stage (Maybe CacheClusterStatus) Source

The status of the cache cluster for the stage, if enabled.

sMethodSettings :: Lens' Stage (HashMap Text MethodSetting) Source

A map that defines the method settings for a Stage resource. Keys are defined as '{resource_path}/{http_method}' for an individual method override, or \\*\/\\* for the settings applied to all methods in the stage.

sLastUpdatedDate :: Lens' Stage (Maybe UTCTime) Source

The date and time that information about the stage was last updated, in ISO 8601 format.

sCacheClusterSize :: Lens' Stage (Maybe CacheClusterSize) Source

The size of the cache cluster for the stage, if enabled.

sCacheClusterEnabled :: Lens' Stage (Maybe Bool) Source

Specifies whether a cache cluster is enabled for the stage.

sStageName :: Lens' Stage (Maybe Text) Source

The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

sDescription :: Lens' Stage (Maybe Text) Source

The stage's description.

StageKey

data StageKey Source

A reference to a unique stage identified in the format '{restApiId}/{stage}'.

See: stageKey smart constructor.

stageKey :: StageKey Source

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

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

skRestAPIId :: Lens' StageKey (Maybe Text) Source

A list of Stage resources that are associated with the ApiKey resource.

skStageName :: Lens' StageKey (Maybe Text) Source

The stage name in the RestApi that the stage key references.

ThrottleSettings

throttleSettings :: ThrottleSettings Source

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

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

tsBurstLimit :: Lens' ThrottleSettings (Maybe Int) Source

Returns the burstLimit when ThrottleSettings is called.

tsRateLimit :: Lens' ThrottleSettings (Maybe Double) Source

Returns the rateLimit when ThrottleSettings is called.