amazonka-apigateway-1.6.1: Amazon API Gateway SDK.

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

Network.AWS.APIGateway.GetResource

Contents

Description

Lists information about a resource.

Synopsis

Creating a Request

getResource Source #

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

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

  • grEmbed - A query parameter to retrieve the specified resources embedded in the returned Resource representation in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list and contain the "methods" string. For example, GET restapis{restapi_id}resources{resource_id}?embed=methods .
  • grRestAPIId - [Required] The string identifier of the associated RestApi .
  • grResourceId - [Required] The identifier for the Resource resource.

data GetResource Source #

Request to list information about a resource.

See: getResource smart constructor.

Instances
Eq GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

Data GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetResource -> c GetResource #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetResource #

toConstr :: GetResource -> Constr #

dataTypeOf :: GetResource -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GetResource) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetResource) #

gmapT :: (forall b. Data b => b -> b) -> GetResource -> GetResource #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetResource -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetResource -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetResource -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetResource -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetResource -> m GetResource #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetResource -> m GetResource #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetResource -> m GetResource #

Read GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

Show GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

Generic GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

Associated Types

type Rep GetResource :: Type -> Type #

Hashable GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

AWSRequest GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

Associated Types

type Rs GetResource :: Type #

ToHeaders GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

Methods

toHeaders :: GetResource -> [Header] #

ToPath GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

ToQuery GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

NFData GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

Methods

rnf :: GetResource -> () #

type Rep GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

type Rep GetResource = D1 (MetaData "GetResource" "Network.AWS.APIGateway.GetResource" "amazonka-apigateway-1.6.1-BCCM2RP3l9Q2ENgHvKrj59" False) (C1 (MetaCons "GetResource'" PrefixI True) (S1 (MetaSel (Just "_grEmbed") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 (MetaSel (Just "_grRestAPIId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_grResourceId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs GetResource Source # 
Instance details

Defined in Network.AWS.APIGateway.GetResource

Request Lenses

grEmbed :: Lens' GetResource [Text] Source #

A query parameter to retrieve the specified resources embedded in the returned Resource representation in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list and contain the "methods" string. For example, GET restapis{restapi_id}resources{resource_id}?embed=methods .

grRestAPIId :: Lens' GetResource Text Source #

Required
The string identifier of the associated RestApi .

grResourceId :: Lens' GetResource Text Source #

Required
The identifier for the Resource resource.

Destructuring the Response

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 - The last path segment for this resource.
  • rPath - The full path for this resource.
  • rId - The resource's identifier.
  • rResourceMethods - Gets an API resource's method of a given HTTP verb. The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map is included in the 200 OK response of the GET restapis{restapi_id}resources{resource_id} or GET restapis{restapi_id}resources{resource_id}?embed=methods request. Example: Get the GET method of an API resource Request @GET restapisfugvjdxtriresources3kzxbg5sa2methodsGET HTTP1.1 Content-Type: applicationjson Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20170223T031827Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}20170223us-east-1apigatewayaws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} Response { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true } ], "self": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGET", "name": GET, "title": GET }, "integration:put": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegration" }, "method:delete": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGET" }, "method:integration": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegration" }, "method:responses": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETresponses200", "name": "200", "title": "200" }, "method:update": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGET" }, "methodresponse:put": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETresponses{status_code}", "templated": true } }, "apiKeyRequired": false, "authorizationType": NONE, "httpMethod": GET, "_embedded": { "method:integration": { "_links": { "self": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegration" }, "integration:delete": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegration" }, "integration:responses": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegrationresponses200", "name": "200", "title": "200" }, "integration:update": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegration" }, "integrationresponse:put": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegrationresponses{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:roleapigAwsProxyRole", "httpMethod": POST, "passthroughBehavior": WHEN_NO_MATCH, "requestParameters": { "integration.request.header.Content-Type": "'application/x-amz-json-1.1'" }, "requestTemplates": { "applicationjson": "{n}" }, "type": AWS, "uri": "arn:aws:apigateway:us-east-1:kinesis:actionListStreams", "_embedded": { "integration:responses": { "_links": { "self": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegrationresponses200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegrationresponses200" }, "integrationresponse:update": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegrationresponses200" } }, "responseParameters": { "method.response.header.Content-Type": "'applicationxml'" }, "responseTemplates": { "applicationjson": "$util.urlDecode("%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3Cname%3E%3Cstream%3E#end%3CkinesisStreams%3E")n" }, "statusCode": "200" } } }, "method:responses": { "_links": { "self": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETresponses200", "name": "200", "title": "200" }, "methodresponse:delete": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETresponses200" }, "methodresponse:update": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETresponses200" } }, "responseModels": { "application/json": Empty }, "responseParameters": { "method.response.header.Content-Type": false }, "statusCode": "200" } } } If the OPTIONS is enabled on the resource, you can follow the example here to get that method. Just replace the GET of the last path segment in the request URL with OPTIONS@ .
  • rParentId - The parent resource's identifier.

data Resource Source #

Represents an API resource.

Create an API

See: resource smart constructor.

Instances
Eq Resource Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Data Resource Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Resource -> c Resource #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Resource #

toConstr :: Resource -> Constr #

dataTypeOf :: Resource -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Resource) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Resource) #

gmapT :: (forall b. Data b => b -> b) -> Resource -> Resource #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Resource -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Resource -> r #

gmapQ :: (forall d. Data d => d -> u) -> Resource -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Resource -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Resource -> m Resource #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Resource -> m Resource #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Resource -> m Resource #

Read Resource Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Show Resource Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Generic Resource Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Associated Types

type Rep Resource :: Type -> Type #

Methods

from :: Resource -> Rep Resource x #

to :: Rep Resource x -> Resource #

Hashable Resource Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Methods

hashWithSalt :: Int -> Resource -> Int #

hash :: Resource -> Int #

FromJSON Resource Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

NFData Resource Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Methods

rnf :: Resource -> () #

type Rep Resource Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

type Rep Resource = D1 (MetaData "Resource" "Network.AWS.APIGateway.Types.Product" "amazonka-apigateway-1.6.1-BCCM2RP3l9Q2ENgHvKrj59" False) (C1 (MetaCons "Resource'" PrefixI True) ((S1 (MetaSel (Just "_rPathPart") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_rPath") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_rId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_rResourceMethods") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text Method))) :*: S1 (MetaSel (Just "_rParentId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))

Response Lenses

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 #

Gets an API resource's method of a given HTTP verb. The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map is included in the 200 OK response of the GET restapis{restapi_id}resources{resource_id} or GET restapis{restapi_id}resources{resource_id}?embed=methods request. Example: Get the GET method of an API resource Request @GET restapisfugvjdxtriresources3kzxbg5sa2methodsGET HTTP1.1 Content-Type: applicationjson Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20170223T031827Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}20170223us-east-1apigatewayaws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} Response { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true } ], "self": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGET", "name": GET, "title": GET }, "integration:put": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegration" }, "method:delete": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGET" }, "method:integration": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegration" }, "method:responses": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETresponses200", "name": "200", "title": "200" }, "method:update": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGET" }, "methodresponse:put": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETresponses{status_code}", "templated": true } }, "apiKeyRequired": false, "authorizationType": NONE, "httpMethod": GET, "_embedded": { "method:integration": { "_links": { "self": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegration" }, "integration:delete": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegration" }, "integration:responses": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegrationresponses200", "name": "200", "title": "200" }, "integration:update": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegration" }, "integrationresponse:put": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegrationresponses{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:roleapigAwsProxyRole", "httpMethod": POST, "passthroughBehavior": WHEN_NO_MATCH, "requestParameters": { "integration.request.header.Content-Type": "'application/x-amz-json-1.1'" }, "requestTemplates": { "applicationjson": "{n}" }, "type": AWS, "uri": "arn:aws:apigateway:us-east-1:kinesis:actionListStreams", "_embedded": { "integration:responses": { "_links": { "self": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegrationresponses200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegrationresponses200" }, "integrationresponse:update": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETintegrationresponses200" } }, "responseParameters": { "method.response.header.Content-Type": "'applicationxml'" }, "responseTemplates": { "applicationjson": "$util.urlDecode("%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3Cname%3E%3Cstream%3E#end%3CkinesisStreams%3E")n" }, "statusCode": "200" } } }, "method:responses": { "_links": { "self": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETresponses200", "name": "200", "title": "200" }, "methodresponse:delete": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETresponses200" }, "methodresponse:update": { "href": "restapisfugvjdxtriresources3kzxbg5sa2methodsGETresponses200" } }, "responseModels": { "application/json": Empty }, "responseParameters": { "method.response.header.Content-Type": false }, "statusCode": "200" } } } If the OPTIONS is enabled on the resource, you can follow the example here to get that method. Just replace the GET of the last path segment in the request URL with OPTIONS@ .

rParentId :: Lens' Resource (Maybe Text) Source #

The parent resource's identifier.