Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a Folder in the resource hierarchy. Returns an Operation which can be used to track the progress of the folder creation workflow. Upon success the Operation.response field will be populated with the created Folder. In order to succeed, the addition of this new Folder must not violate the Folder naming, height or fanout constraints. + The Folder's display_name must be distinct from all other Folder's that share its parent. + The addition of the Folder must not cause the active Folder hierarchy to exceed a height of 4. Note, the full active + deleted Folder hierarchy is allowed to reach a height of 8; this provides additional headroom when moving folders that contain deleted folders. + The addition of the Folder must not cause the total number of Folders under its parent to exceed 100. If the operation fails due to a folder constraint violation, some errors may be returned by the CreateFolder request, with status code FAILED_PRECONDITION and an error description. Other folder constraint violations will be communicated in the Operation, with the specific PreconditionFailure returned via the details list in the Operation.error field. The caller must have `resourcemanager.folders.create` permission on the identified parent.
See: Cloud Resource Manager API Reference for cloudresourcemanager.folders.create
.
Synopsis
- type FoldersCreateResource = "v2" :> ("folders" :> (QueryParam "parent" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Folder :> Post '[JSON] Operation)))))))))
- foldersCreate :: Folder -> FoldersCreate
- data FoldersCreate
- fcParent :: Lens' FoldersCreate (Maybe Text)
- fcXgafv :: Lens' FoldersCreate (Maybe Xgafv)
- fcUploadProtocol :: Lens' FoldersCreate (Maybe Text)
- fcAccessToken :: Lens' FoldersCreate (Maybe Text)
- fcUploadType :: Lens' FoldersCreate (Maybe Text)
- fcPayload :: Lens' FoldersCreate Folder
- fcCallback :: Lens' FoldersCreate (Maybe Text)
REST Resource
type FoldersCreateResource = "v2" :> ("folders" :> (QueryParam "parent" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Folder :> Post '[JSON] Operation))))))))) Source #
A resource alias for cloudresourcemanager.folders.create
method which the
FoldersCreate
request conforms to.
Creating a Request
Creates a value of FoldersCreate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data FoldersCreate Source #
Creates a Folder in the resource hierarchy. Returns an Operation which can be used to track the progress of the folder creation workflow. Upon success the Operation.response field will be populated with the created Folder. In order to succeed, the addition of this new Folder must not violate the Folder naming, height or fanout constraints. + The Folder's display_name must be distinct from all other Folder's that share its parent. + The addition of the Folder must not cause the active Folder hierarchy to exceed a height of 4. Note, the full active + deleted Folder hierarchy is allowed to reach a height of 8; this provides additional headroom when moving folders that contain deleted folders. + The addition of the Folder must not cause the total number of Folders under its parent to exceed 100. If the operation fails due to a folder constraint violation, some errors may be returned by the CreateFolder request, with status code FAILED_PRECONDITION and an error description. Other folder constraint violations will be communicated in the Operation, with the specific PreconditionFailure returned via the details list in the Operation.error field. The caller must have `resourcemanager.folders.create` permission on the identified parent.
See: foldersCreate
smart constructor.
Instances
Request Lenses
fcParent :: Lens' FoldersCreate (Maybe Text) Source #
The resource name of the new Folder's parent. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
fcUploadProtocol :: Lens' FoldersCreate (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
fcAccessToken :: Lens' FoldersCreate (Maybe Text) Source #
OAuth access token.
fcUploadType :: Lens' FoldersCreate (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
fcCallback :: Lens' FoldersCreate (Maybe Text) Source #
JSONP