gogol-cloudfunctions-0.5.0: Google Cloud Functions SDK.

Copyright(c) 2015-2016 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.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateUploadURL

Contents

Description

Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * Source file size should not exceed 100MB limit. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` * `x-goog-content-length-range: 0,104857600` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`

See: Cloud Functions API Reference for cloudfunctions.projects.locations.functions.generateUploadUrl.

Synopsis

REST Resource

type ProjectsLocationsFunctionsGenerateUploadURLResource = "v1" :> (Capture "parent" Text :> ("functions:generateUploadUrl" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] GenerateUploadURLRequest :> Post '[JSON] GenerateUploadURLResponse))))))))) Source #

A resource alias for cloudfunctions.projects.locations.functions.generateUploadUrl method which the ProjectsLocationsFunctionsGenerateUploadURL request conforms to.

Creating a Request

data ProjectsLocationsFunctionsGenerateUploadURL Source #

Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * Source file size should not exceed 100MB limit. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` * `x-goog-content-length-range: 0,104857600` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`

See: projectsLocationsFunctionsGenerateUploadURL smart constructor.

Instances
Eq ProjectsLocationsFunctionsGenerateUploadURL Source # 
Instance details

Defined in Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateUploadURL

Data ProjectsLocationsFunctionsGenerateUploadURL Source # 
Instance details

Defined in Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateUploadURL

Methods

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

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

toConstr :: ProjectsLocationsFunctionsGenerateUploadURL -> Constr #

dataTypeOf :: ProjectsLocationsFunctionsGenerateUploadURL -> DataType #

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

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

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

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

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

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

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

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

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

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

Show ProjectsLocationsFunctionsGenerateUploadURL Source # 
Instance details

Defined in Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateUploadURL

Generic ProjectsLocationsFunctionsGenerateUploadURL Source # 
Instance details

Defined in Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateUploadURL

GoogleRequest ProjectsLocationsFunctionsGenerateUploadURL Source # 
Instance details

Defined in Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateUploadURL

type Rep ProjectsLocationsFunctionsGenerateUploadURL Source # 
Instance details

Defined in Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateUploadURL

type Rep ProjectsLocationsFunctionsGenerateUploadURL = D1 (MetaData "ProjectsLocationsFunctionsGenerateUploadURL" "Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateUploadURL" "gogol-cloudfunctions-0.5.0-EjLZVvsFyKoBiXsWQ9Hdf9" False) (C1 (MetaCons "ProjectsLocationsFunctionsGenerateUploadURL'" PrefixI True) ((S1 (MetaSel (Just "_plfguuParent") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: (S1 (MetaSel (Just "_plfguuXgafv") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Xgafv)) :*: S1 (MetaSel (Just "_plfguuUploadProtocol") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 (MetaSel (Just "_plfguuAccessToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_plfguuUploadType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_plfguuPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 GenerateUploadURLRequest) :*: S1 (MetaSel (Just "_plfguuCallback") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))
type Scopes ProjectsLocationsFunctionsGenerateUploadURL Source # 
Instance details

Defined in Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateUploadURL

type Scopes ProjectsLocationsFunctionsGenerateUploadURL = "https://www.googleapis.com/auth/cloud-platform" ': ([] :: [Symbol])
type Rs ProjectsLocationsFunctionsGenerateUploadURL Source # 
Instance details

Defined in Network.Google.Resource.CloudFunctions.Projects.Locations.Functions.GenerateUploadURL

Request Lenses

plfguuParent :: Lens' ProjectsLocationsFunctionsGenerateUploadURL Text Source #

The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`.

plfguuUploadProtocol :: Lens' ProjectsLocationsFunctionsGenerateUploadURL (Maybe Text) Source #

Upload protocol for media (e.g. "raw", "multipart").

plfguuUploadType :: Lens' ProjectsLocationsFunctionsGenerateUploadURL (Maybe Text) Source #

Legacy upload protocol for media (e.g. "media", "multipart").