Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.cloudresourcemanager/v2.Folder
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
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 Folders that share its parent. + The addition of the Folder must not cause the active Folder hierarchy to exceed a height of 10. Note, the full active + deleted Folder hierarchy is allowed to reach a height of 20; 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 300. 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.
Auto-naming is currently not supported for this resource.
Create Folder Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Folder(name: string, args: FolderArgs, opts?: CustomResourceOptions);
@overload
def Folder(resource_name: str,
args: FolderArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Folder(resource_name: str,
opts: Optional[ResourceOptions] = None,
parent: Optional[str] = None,
display_name: Optional[str] = None)
func NewFolder(ctx *Context, name string, args FolderArgs, opts ...ResourceOption) (*Folder, error)
public Folder(string name, FolderArgs args, CustomResourceOptions? opts = null)
public Folder(String name, FolderArgs args)
public Folder(String name, FolderArgs args, CustomResourceOptions options)
type: google-native:cloudresourcemanager/v2:Folder
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FolderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FolderArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FolderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FolderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FolderArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var folderResource = new GoogleNative.CloudResourceManager.V2.Folder("folderResource", new()
{
Parent = "string",
DisplayName = "string",
});
example, err := cloudresourcemanagerv2.NewFolder(ctx, "folderResource", &cloudresourcemanagerv2.FolderArgs{
Parent: pulumi.String("string"),
DisplayName: pulumi.String("string"),
})
var folderResource = new Folder("folderResource", FolderArgs.builder()
.parent("string")
.displayName("string")
.build());
folder_resource = google_native.cloudresourcemanager.v2.Folder("folderResource",
parent="string",
display_name="string")
const folderResource = new google_native.cloudresourcemanager.v2.Folder("folderResource", {
parent: "string",
displayName: "string",
});
type: google-native:cloudresourcemanager/v2:Folder
properties:
displayName: string
parent: string
Folder Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Folder resource accepts the following input properties:
- Parent string
- The Folder's parent's resource name. Updates to the folder's parent must be performed via MoveFolder.
- Display
Name string - The folder's display name. A folder's display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression:
[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?
.
- Parent string
- The Folder's parent's resource name. Updates to the folder's parent must be performed via MoveFolder.
- Display
Name string - The folder's display name. A folder's display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression:
[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?
.
- parent String
- The Folder's parent's resource name. Updates to the folder's parent must be performed via MoveFolder.
- display
Name String - The folder's display name. A folder's display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression:
[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?
.
- parent string
- The Folder's parent's resource name. Updates to the folder's parent must be performed via MoveFolder.
- display
Name string - The folder's display name. A folder's display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression:
[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?
.
- parent str
- The Folder's parent's resource name. Updates to the folder's parent must be performed via MoveFolder.
- display_
name str - The folder's display name. A folder's display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression:
[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?
.
- parent String
- The Folder's parent's resource name. Updates to the folder's parent must be performed via MoveFolder.
- display
Name String - The folder's display name. A folder's display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression:
[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Folder resource produces the following output properties:
- Create
Time string - Timestamp when the Folder was created. Assigned by the server.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
State string - The lifecycle state of the folder. Updates to the lifecycle_state must be performed via DeleteFolder and UndeleteFolder.
- Name string
- The resource name of the Folder. Its format is
folders/{folder_id}
, for example: "folders/1234".
- Create
Time string - Timestamp when the Folder was created. Assigned by the server.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
State string - The lifecycle state of the folder. Updates to the lifecycle_state must be performed via DeleteFolder and UndeleteFolder.
- Name string
- The resource name of the Folder. Its format is
folders/{folder_id}
, for example: "folders/1234".
- create
Time String - Timestamp when the Folder was created. Assigned by the server.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
State String - The lifecycle state of the folder. Updates to the lifecycle_state must be performed via DeleteFolder and UndeleteFolder.
- name String
- The resource name of the Folder. Its format is
folders/{folder_id}
, for example: "folders/1234".
- create
Time string - Timestamp when the Folder was created. Assigned by the server.
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
State string - The lifecycle state of the folder. Updates to the lifecycle_state must be performed via DeleteFolder and UndeleteFolder.
- name string
- The resource name of the Folder. Its format is
folders/{folder_id}
, for example: "folders/1234".
- create_
time str - Timestamp when the Folder was created. Assigned by the server.
- id str
- The provider-assigned unique ID for this managed resource.
- lifecycle_
state str - The lifecycle state of the folder. Updates to the lifecycle_state must be performed via DeleteFolder and UndeleteFolder.
- name str
- The resource name of the Folder. Its format is
folders/{folder_id}
, for example: "folders/1234".
- create
Time String - Timestamp when the Folder was created. Assigned by the server.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
State String - The lifecycle state of the folder. Updates to the lifecycle_state must be performed via DeleteFolder and UndeleteFolder.
- name String
- The resource name of the Folder. Its format is
folders/{folder_id}
, for example: "folders/1234".
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.