AWS SDK for C++  1.9.132
AWS SDK for C++
Public Member Functions | List of all members
Aws::APIGateway::Model::GatewayResponse Class Reference

#include <GatewayResponse.h>

Public Member Functions

 GatewayResponse ()
 
 GatewayResponse (Aws::Utils::Json::JsonView jsonValue)
 
GatewayResponseoperator= (Aws::Utils::Json::JsonView jsonValue)
 
Aws::Utils::Json::JsonValue Jsonize () const
 
const GatewayResponseTypeGetResponseType () const
 
bool ResponseTypeHasBeenSet () const
 
void SetResponseType (const GatewayResponseType &value)
 
void SetResponseType (GatewayResponseType &&value)
 
GatewayResponseWithResponseType (const GatewayResponseType &value)
 
GatewayResponseWithResponseType (GatewayResponseType &&value)
 
const Aws::StringGetStatusCode () const
 
bool StatusCodeHasBeenSet () const
 
void SetStatusCode (const Aws::String &value)
 
void SetStatusCode (Aws::String &&value)
 
void SetStatusCode (const char *value)
 
GatewayResponseWithStatusCode (const Aws::String &value)
 
GatewayResponseWithStatusCode (Aws::String &&value)
 
GatewayResponseWithStatusCode (const char *value)
 
const Aws::Map< Aws::String, Aws::String > & GetResponseParameters () const
 
bool ResponseParametersHasBeenSet () const
 
void SetResponseParameters (const Aws::Map< Aws::String, Aws::String > &value)
 
void SetResponseParameters (Aws::Map< Aws::String, Aws::String > &&value)
 
GatewayResponseWithResponseParameters (const Aws::Map< Aws::String, Aws::String > &value)
 
GatewayResponseWithResponseParameters (Aws::Map< Aws::String, Aws::String > &&value)
 
GatewayResponseAddResponseParameters (const Aws::String &key, const Aws::String &value)
 
GatewayResponseAddResponseParameters (Aws::String &&key, const Aws::String &value)
 
GatewayResponseAddResponseParameters (const Aws::String &key, Aws::String &&value)
 
GatewayResponseAddResponseParameters (Aws::String &&key, Aws::String &&value)
 
GatewayResponseAddResponseParameters (const char *key, Aws::String &&value)
 
GatewayResponseAddResponseParameters (Aws::String &&key, const char *value)
 
GatewayResponseAddResponseParameters (const char *key, const char *value)
 
const Aws::Map< Aws::String, Aws::String > & GetResponseTemplates () const
 
bool ResponseTemplatesHasBeenSet () const
 
void SetResponseTemplates (const Aws::Map< Aws::String, Aws::String > &value)
 
void SetResponseTemplates (Aws::Map< Aws::String, Aws::String > &&value)
 
GatewayResponseWithResponseTemplates (const Aws::Map< Aws::String, Aws::String > &value)
 
GatewayResponseWithResponseTemplates (Aws::Map< Aws::String, Aws::String > &&value)
 
GatewayResponseAddResponseTemplates (const Aws::String &key, const Aws::String &value)
 
GatewayResponseAddResponseTemplates (Aws::String &&key, const Aws::String &value)
 
GatewayResponseAddResponseTemplates (const Aws::String &key, Aws::String &&value)
 
GatewayResponseAddResponseTemplates (Aws::String &&key, Aws::String &&value)
 
GatewayResponseAddResponseTemplates (const char *key, Aws::String &&value)
 
GatewayResponseAddResponseTemplates (Aws::String &&key, const char *value)
 
GatewayResponseAddResponseTemplates (const char *key, const char *value)
 
bool GetDefaultResponse () const
 
bool DefaultResponseHasBeenSet () const
 
void SetDefaultResponse (bool value)
 
GatewayResponseWithDefaultResponse (bool value)
 

Detailed Description

A gateway response of a given response type and status code, with optional response parameters and mapping templates.

For more information about valid gateway response types, see Gateway Response Types Supported by API Gateway

Example: Get a Gateway Response of a given response type

Request
This example shows how to get a gateway response of the MISSING_AUTHENTICATION_TOKEN type.
GET
/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN HTTP/1.1
Host: beta-apigateway.us-east-1.amazonaws.com Content-Type: application/json
X-Amz-Date: 20170503T202516Z Authorization: AWS4-HMAC-SHA256
Credential={access-key-id}/20170503/us-east-1/apigateway/aws4_request,
SignedHeaders=content-type;host;x-amz-date,
Signature=1b52460e3159c1a26cff29093855d50ea141c1c5b937528fecaf60f51129697a
Cache-Control: no-cache Postman-Token: 3b2a1ce9-c848-2e26-2e2f-9c2caefbed45
The response type is specified as a URL path.
Response
The successful operation returns the 200 OK status code and a payload similar to the following:
{ "_links": {
"curies": { "href":
"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html",
"name": "gatewayresponse", "templated": true }, "self": { "href":
"/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN" },
"gatewayresponse:delete": { "href":
"/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN" },
"gatewayresponse:put": { "href":
"/restapis/o81lxisefl/gatewayresponses/{response_type}", "templated": true },
"gatewayresponse:update": { "href":
"/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN" } },
"defaultResponse": false, "responseParameters": {
"gatewayresponse.header.x-request-path": "method.request.path.petId",
"gatewayresponse.header.Access-Control-Allow-Origin": "&apos;a.b.c&apos;",
"gatewayresponse.header.x-request-query": "method.request.querystring.q",
"gatewayresponse.header.x-request-header": "method.request.header.Accept" },
"responseTemplates": { "application/json": "{\n \"message":
$context.error.messageString,
"type": "$context.error.responseType",
"stage": "$context.stage",
"resourcePath": "$context.resourcePath",
"stageVariables.a": "$stageVariables.a",
"statusCode": "'404'"
}" }, "responseType": "MISSING_AUTHENTICATION_TOKEN", "statusCode": "404" }</code></pre> <p/> </div> </div> <div class="seeAlso"> <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html">Customize Gateway Responses

See Also:


Definition at line 73 of file GatewayResponse.h.

Constructor & Destructor Documentation

◆ GatewayResponse() [1/2]

Aws::APIGateway::Model::GatewayResponse::GatewayResponse ( )

◆ GatewayResponse() [2/2]

Aws::APIGateway::Model::GatewayResponse::GatewayResponse ( Aws::Utils::Json::JsonView  jsonValue)

Member Function Documentation

◆ AddResponseParameters() [1/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseParameters ( Aws::String &&  key,
Aws::String &&  value 
)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 212 of file GatewayResponse.h.

◆ AddResponseParameters() [2/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseParameters ( Aws::String &&  key,
const Aws::String value 
)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 200 of file GatewayResponse.h.

◆ AddResponseParameters() [3/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseParameters ( Aws::String &&  key,
const char *  value 
)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 224 of file GatewayResponse.h.

◆ AddResponseParameters() [4/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseParameters ( const Aws::String key,
Aws::String &&  value 
)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 206 of file GatewayResponse.h.

◆ AddResponseParameters() [5/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseParameters ( const Aws::String key,
const Aws::String value 
)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 194 of file GatewayResponse.h.

◆ AddResponseParameters() [6/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseParameters ( const char *  key,
Aws::String &&  value 
)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 218 of file GatewayResponse.h.

◆ AddResponseParameters() [7/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseParameters ( const char *  key,
const char *  value 
)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 230 of file GatewayResponse.h.

◆ AddResponseTemplates() [1/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseTemplates ( Aws::String &&  key,
Aws::String &&  value 
)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 291 of file GatewayResponse.h.

◆ AddResponseTemplates() [2/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseTemplates ( Aws::String &&  key,
const Aws::String value 
)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 279 of file GatewayResponse.h.

◆ AddResponseTemplates() [3/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseTemplates ( Aws::String &&  key,
const char *  value 
)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 303 of file GatewayResponse.h.

◆ AddResponseTemplates() [4/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseTemplates ( const Aws::String key,
Aws::String &&  value 
)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 285 of file GatewayResponse.h.

◆ AddResponseTemplates() [5/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseTemplates ( const Aws::String key,
const Aws::String value 
)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 273 of file GatewayResponse.h.

◆ AddResponseTemplates() [6/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseTemplates ( const char *  key,
Aws::String &&  value 
)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 297 of file GatewayResponse.h.

◆ AddResponseTemplates() [7/7]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::AddResponseTemplates ( const char *  key,
const char *  value 
)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 309 of file GatewayResponse.h.

◆ DefaultResponseHasBeenSet()

bool Aws::APIGateway::Model::GatewayResponse::DefaultResponseHasBeenSet ( ) const
inline

A Boolean flag to indicate whether this GatewayResponse is the default gateway response (true) or not (false). A default gateway response is one generated by API Gateway without any customization by an API developer.

Definition at line 326 of file GatewayResponse.h.

◆ GetDefaultResponse()

bool Aws::APIGateway::Model::GatewayResponse::GetDefaultResponse ( ) const
inline

A Boolean flag to indicate whether this GatewayResponse is the default gateway response (true) or not (false). A default gateway response is one generated by API Gateway without any customization by an API developer.

Definition at line 318 of file GatewayResponse.h.

◆ GetResponseParameters()

const Aws::Map<Aws::String, Aws::String>& Aws::APIGateway::Model::GatewayResponse::GetResponseParameters ( ) const
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 158 of file GatewayResponse.h.

◆ GetResponseTemplates()

const Aws::Map<Aws::String, Aws::String>& Aws::APIGateway::Model::GatewayResponse::GetResponseTemplates ( ) const
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 237 of file GatewayResponse.h.

◆ GetResponseType()

const GatewayResponseType& Aws::APIGateway::Model::GatewayResponse::GetResponseType ( ) const
inline

The response type of the associated GatewayResponse.

Definition at line 85 of file GatewayResponse.h.

◆ GetStatusCode()

const Aws::String& Aws::APIGateway::Model::GatewayResponse::GetStatusCode ( ) const
inline

The HTTP status code for this GatewayResponse.

Definition at line 116 of file GatewayResponse.h.

◆ Jsonize()

Aws::Utils::Json::JsonValue Aws::APIGateway::Model::GatewayResponse::Jsonize ( ) const

◆ operator=()

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::operator= ( Aws::Utils::Json::JsonView  jsonValue)

◆ ResponseParametersHasBeenSet()

bool Aws::APIGateway::Model::GatewayResponse::ResponseParametersHasBeenSet ( ) const
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 164 of file GatewayResponse.h.

◆ ResponseTemplatesHasBeenSet()

bool Aws::APIGateway::Model::GatewayResponse::ResponseTemplatesHasBeenSet ( ) const
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 243 of file GatewayResponse.h.

◆ ResponseTypeHasBeenSet()

bool Aws::APIGateway::Model::GatewayResponse::ResponseTypeHasBeenSet ( ) const
inline

The response type of the associated GatewayResponse.

Definition at line 90 of file GatewayResponse.h.

◆ SetDefaultResponse()

void Aws::APIGateway::Model::GatewayResponse::SetDefaultResponse ( bool  value)
inline

A Boolean flag to indicate whether this GatewayResponse is the default gateway response (true) or not (false). A default gateway response is one generated by API Gateway without any customization by an API developer.

Definition at line 334 of file GatewayResponse.h.

◆ SetResponseParameters() [1/2]

void Aws::APIGateway::Model::GatewayResponse::SetResponseParameters ( Aws::Map< Aws::String, Aws::String > &&  value)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 176 of file GatewayResponse.h.

◆ SetResponseParameters() [2/2]

void Aws::APIGateway::Model::GatewayResponse::SetResponseParameters ( const Aws::Map< Aws::String, Aws::String > &  value)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 170 of file GatewayResponse.h.

◆ SetResponseTemplates() [1/2]

void Aws::APIGateway::Model::GatewayResponse::SetResponseTemplates ( Aws::Map< Aws::String, Aws::String > &&  value)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 255 of file GatewayResponse.h.

◆ SetResponseTemplates() [2/2]

void Aws::APIGateway::Model::GatewayResponse::SetResponseTemplates ( const Aws::Map< Aws::String, Aws::String > &  value)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 249 of file GatewayResponse.h.

◆ SetResponseType() [1/2]

void Aws::APIGateway::Model::GatewayResponse::SetResponseType ( const GatewayResponseType value)
inline

The response type of the associated GatewayResponse.

Definition at line 95 of file GatewayResponse.h.

◆ SetResponseType() [2/2]

void Aws::APIGateway::Model::GatewayResponse::SetResponseType ( GatewayResponseType &&  value)
inline

The response type of the associated GatewayResponse.

Definition at line 100 of file GatewayResponse.h.

◆ SetStatusCode() [1/3]

void Aws::APIGateway::Model::GatewayResponse::SetStatusCode ( Aws::String &&  value)
inline

The HTTP status code for this GatewayResponse.

Definition at line 131 of file GatewayResponse.h.

◆ SetStatusCode() [2/3]

void Aws::APIGateway::Model::GatewayResponse::SetStatusCode ( const Aws::String value)
inline

The HTTP status code for this GatewayResponse.

Definition at line 126 of file GatewayResponse.h.

◆ SetStatusCode() [3/3]

void Aws::APIGateway::Model::GatewayResponse::SetStatusCode ( const char *  value)
inline

The HTTP status code for this GatewayResponse.

Definition at line 136 of file GatewayResponse.h.

◆ StatusCodeHasBeenSet()

bool Aws::APIGateway::Model::GatewayResponse::StatusCodeHasBeenSet ( ) const
inline

The HTTP status code for this GatewayResponse.

Definition at line 121 of file GatewayResponse.h.

◆ WithDefaultResponse()

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::WithDefaultResponse ( bool  value)
inline

A Boolean flag to indicate whether this GatewayResponse is the default gateway response (true) or not (false). A default gateway response is one generated by API Gateway without any customization by an API developer.

Definition at line 342 of file GatewayResponse.h.

◆ WithResponseParameters() [1/2]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::WithResponseParameters ( Aws::Map< Aws::String, Aws::String > &&  value)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 188 of file GatewayResponse.h.

◆ WithResponseParameters() [2/2]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::WithResponseParameters ( const Aws::Map< Aws::String, Aws::String > &  value)
inline

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 182 of file GatewayResponse.h.

◆ WithResponseTemplates() [1/2]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::WithResponseTemplates ( Aws::Map< Aws::String, Aws::String > &&  value)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 267 of file GatewayResponse.h.

◆ WithResponseTemplates() [2/2]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::WithResponseTemplates ( const Aws::Map< Aws::String, Aws::String > &  value)
inline

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

Definition at line 261 of file GatewayResponse.h.

◆ WithResponseType() [1/2]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::WithResponseType ( const GatewayResponseType value)
inline

The response type of the associated GatewayResponse.

Definition at line 105 of file GatewayResponse.h.

◆ WithResponseType() [2/2]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::WithResponseType ( GatewayResponseType &&  value)
inline

The response type of the associated GatewayResponse.

Definition at line 110 of file GatewayResponse.h.

◆ WithStatusCode() [1/3]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::WithStatusCode ( Aws::String &&  value)
inline

The HTTP status code for this GatewayResponse.

Definition at line 146 of file GatewayResponse.h.

◆ WithStatusCode() [2/3]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::WithStatusCode ( const Aws::String value)
inline

The HTTP status code for this GatewayResponse.

Definition at line 141 of file GatewayResponse.h.

◆ WithStatusCode() [3/3]

GatewayResponse& Aws::APIGateway::Model::GatewayResponse::WithStatusCode ( const char *  value)
inline

The HTTP status code for this GatewayResponse.

Definition at line 151 of file GatewayResponse.h.


The documentation for this class was generated from the following file: