amazonka-apigateway-2.0: Amazon API Gateway SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.APIGateway.GetResource

Description

Lists information about a resource.

Synopsis

Creating a Request

data GetResource Source #

Request to list information about a resource.

See: newGetResource smart constructor.

Constructors

GetResource' 

Fields

  • embed :: Maybe [Text]

    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.

  • restApiId :: Text

    The string identifier of the associated RestApi.

  • resourceId :: Text

    The identifier for the Resource resource.

Instances

Instances details
ToHeaders GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

Methods

toHeaders :: GetResource -> [Header] #

ToPath GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

ToQuery GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

AWSRequest GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

Associated Types

type AWSResponse GetResource #

Generic GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

Associated Types

type Rep GetResource :: Type -> Type #

Read GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

Show GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

NFData GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

Methods

rnf :: GetResource -> () #

Eq GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

Hashable GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

type AWSResponse GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

type Rep GetResource Source # 
Instance details

Defined in Amazonka.APIGateway.GetResource

type Rep GetResource = D1 ('MetaData "GetResource" "Amazonka.APIGateway.GetResource" "amazonka-apigateway-2.0-zw0Lbt4rUGxZBjJ4Rpfi" 'False) (C1 ('MetaCons "GetResource'" 'PrefixI 'True) (S1 ('MetaSel ('Just "embed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "restApiId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "resourceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newGetResource Source #

Create a value of GetResource with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:embed:GetResource', getResource_embed - 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.

GetResource, getResource_restApiId - The string identifier of the associated RestApi.

$sel:resourceId:GetResource', getResource_resourceId - The identifier for the Resource resource.

Request Lenses

getResource_embed :: Lens' GetResource (Maybe [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.

getResource_restApiId :: Lens' GetResource Text Source #

The string identifier of the associated RestApi.

getResource_resourceId :: Lens' GetResource Text Source #

The identifier for the Resource resource.

Destructuring the Response

data Resource Source #

Represents an API resource.

See: newResource smart constructor.

Constructors

Resource' 

Fields

Instances

Instances details
FromJSON Resource Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Resource

Generic Resource Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Resource

Associated Types

type Rep Resource :: Type -> Type #

Methods

from :: Resource -> Rep Resource x #

to :: Rep Resource x -> Resource #

Read Resource Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Resource

Show Resource Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Resource

NFData Resource Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Resource

Methods

rnf :: Resource -> () #

Eq Resource Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Resource

Hashable Resource Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Resource

Methods

hashWithSalt :: Int -> Resource -> Int #

hash :: Resource -> Int #

type Rep Resource Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Resource

type Rep Resource = D1 ('MetaData "Resource" "Amazonka.APIGateway.Types.Resource" "amazonka-apigateway-2.0-zw0Lbt4rUGxZBjJ4Rpfi" 'False) (C1 ('MetaCons "Resource'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "parentId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "path") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "pathPart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "resourceMethods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Method)))))))

newResource :: Resource Source #

Create a value of Resource with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:id:Resource', resource_id - The resource's identifier.

$sel:parentId:Resource', resource_parentId - The parent resource's identifier.

$sel:path:Resource', resource_path - The full path for this resource.

$sel:pathPart:Resource', resource_pathPart - The last path segment for this resource.

$sel:resourceMethods:Resource', resource_resourceMethods - Gets an API resource's method of a given HTTP verb.

Response Lenses

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

The resource's identifier.

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

The parent resource's identifier.

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

The full path for this resource.

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

The last path segment for this resource.

resource_resourceMethods :: Lens' Resource (Maybe (HashMap Text Method)) Source #

Gets an API resource's method of a given HTTP verb.