Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.cloudresourcemanager/v1beta1.Project
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Creates a Project resource. Initially, the Project resource is owned by its creator exclusively. The creator can later grant permission to others to read or update the Project. Several APIs are activated automatically for the Project, including Google Cloud Storage. The parent is identified by a specified ResourceId, which must include both an ID and a type, such as project, folder, or organization. This method does not associate the new project with a billing account. You can set or update the billing account associated with a project using the [projects.updateBillingInfo] (/billing/reference/rest/v1/projects/updateBillingInfo) method.
Create Project Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Project(name: string, args?: ProjectArgs, opts?: CustomResourceOptions);@overload
def Project(resource_name: str,
            args: Optional[ProjectArgs] = None,
            opts: Optional[ResourceOptions] = None)
@overload
def Project(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            lifecycle_state: Optional[ProjectLifecycleState] = None,
            name: Optional[str] = None,
            parent: Optional[ResourceIdArgs] = None,
            project_id: Optional[str] = None,
            project_number: Optional[str] = None,
            use_legacy_stack: Optional[bool] = None)func NewProject(ctx *Context, name string, args *ProjectArgs, opts ...ResourceOption) (*Project, error)public Project(string name, ProjectArgs? args = null, CustomResourceOptions? opts = null)
public Project(String name, ProjectArgs args)
public Project(String name, ProjectArgs args, CustomResourceOptions options)
type: google-native:cloudresourcemanager/v1beta1:Project
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 ProjectArgs
- 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 ProjectArgs
- 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 ProjectArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectArgs
- 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 google_nativeProjectResource = new GoogleNative.CloudResourceManager.V1Beta1.Project("google-nativeProjectResource", new()
{
    CreateTime = "string",
    Labels = 
    {
        { "string", "string" },
    },
    LifecycleState = GoogleNative.CloudResourceManager.V1Beta1.ProjectLifecycleState.LifecycleStateUnspecified,
    Name = "string",
    Parent = new GoogleNative.CloudResourceManager.V1Beta1.Inputs.ResourceIdArgs
    {
        Id = "string",
        Type = "string",
    },
    ProjectId = "string",
    ProjectNumber = "string",
    UseLegacyStack = false,
});
example, err := cloudresourcemanagerv1beta1.NewProject(ctx, "google-nativeProjectResource", &cloudresourcemanagerv1beta1.ProjectArgs{
	CreateTime: pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	LifecycleState: cloudresourcemanagerv1beta1.ProjectLifecycleStateLifecycleStateUnspecified,
	Name:           pulumi.String("string"),
	Parent: &cloudresourcemanager.ResourceIdArgs{
		Id:   pulumi.String("string"),
		Type: pulumi.String("string"),
	},
	ProjectId:      pulumi.String("string"),
	ProjectNumber:  pulumi.String("string"),
	UseLegacyStack: pulumi.Bool(false),
})
var google_nativeProjectResource = new Project("google-nativeProjectResource", ProjectArgs.builder()
    .createTime("string")
    .labels(Map.of("string", "string"))
    .lifecycleState("LIFECYCLE_STATE_UNSPECIFIED")
    .name("string")
    .parent(ResourceIdArgs.builder()
        .id("string")
        .type("string")
        .build())
    .projectId("string")
    .projectNumber("string")
    .useLegacyStack(false)
    .build());
google_native_project_resource = google_native.cloudresourcemanager.v1beta1.Project("google-nativeProjectResource",
    create_time="string",
    labels={
        "string": "string",
    },
    lifecycle_state=google_native.cloudresourcemanager.v1beta1.ProjectLifecycleState.LIFECYCLE_STATE_UNSPECIFIED,
    name="string",
    parent={
        "id": "string",
        "type": "string",
    },
    project_id="string",
    project_number="string",
    use_legacy_stack=False)
const google_nativeProjectResource = new google_native.cloudresourcemanager.v1beta1.Project("google-nativeProjectResource", {
    createTime: "string",
    labels: {
        string: "string",
    },
    lifecycleState: google_native.cloudresourcemanager.v1beta1.ProjectLifecycleState.LifecycleStateUnspecified,
    name: "string",
    parent: {
        id: "string",
        type: "string",
    },
    projectId: "string",
    projectNumber: "string",
    useLegacyStack: false,
});
type: google-native:cloudresourcemanager/v1beta1:Project
properties:
    createTime: string
    labels:
        string: string
    lifecycleState: LIFECYCLE_STATE_UNSPECIFIED
    name: string
    parent:
        id: string
        type: string
    projectId: string
    projectNumber: string
    useLegacyStack: false
Project Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Project resource accepts the following input properties:
- CreateTime string
- Creation time. Read-only.
- Labels Dictionary<string, string>
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev"Read-write.
- LifecycleState Pulumi.Google Native. Cloud Resource Manager. V1Beta1. Project Lifecycle State 
- The Project lifecycle state. Read-only.
- Name string
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My ProjectRead-write.
- Parent
Pulumi.Google Native. Cloud Resource Manager. V1Beta1. Inputs. Resource Id 
- An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The parentcan be set on creation or using theUpdateProjectmethod; the end user must have theresourcemanager.projects.createpermission on the parent. Read-write.
- ProjectId string
- The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123Read-only after creation.
- ProjectNumber string
- The number uniquely identifying the project. Example: 415104041262Read-only.
- UseLegacy boolStack 
- A now unused experiment opt-out option.
- CreateTime string
- Creation time. Read-only.
- Labels map[string]string
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev"Read-write.
- LifecycleState ProjectLifecycle State 
- The Project lifecycle state. Read-only.
- Name string
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My ProjectRead-write.
- Parent
ResourceId Args 
- An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The parentcan be set on creation or using theUpdateProjectmethod; the end user must have theresourcemanager.projects.createpermission on the parent. Read-write.
- ProjectId string
- The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123Read-only after creation.
- ProjectNumber string
- The number uniquely identifying the project. Example: 415104041262Read-only.
- UseLegacy boolStack 
- A now unused experiment opt-out option.
- createTime String
- Creation time. Read-only.
- labels Map<String,String>
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev"Read-write.
- lifecycleState ProjectLifecycle State 
- The Project lifecycle state. Read-only.
- name String
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My ProjectRead-write.
- parent
ResourceId 
- An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The parentcan be set on creation or using theUpdateProjectmethod; the end user must have theresourcemanager.projects.createpermission on the parent. Read-write.
- projectId String
- The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123Read-only after creation.
- projectNumber String
- The number uniquely identifying the project. Example: 415104041262Read-only.
- useLegacy BooleanStack 
- A now unused experiment opt-out option.
- createTime string
- Creation time. Read-only.
- labels {[key: string]: string}
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev"Read-write.
- lifecycleState ProjectLifecycle State 
- The Project lifecycle state. Read-only.
- name string
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My ProjectRead-write.
- parent
ResourceId 
- An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The parentcan be set on creation or using theUpdateProjectmethod; the end user must have theresourcemanager.projects.createpermission on the parent. Read-write.
- projectId string
- The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123Read-only after creation.
- projectNumber string
- The number uniquely identifying the project. Example: 415104041262Read-only.
- useLegacy booleanStack 
- A now unused experiment opt-out option.
- create_time str
- Creation time. Read-only.
- labels Mapping[str, str]
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev"Read-write.
- lifecycle_state ProjectLifecycle State 
- The Project lifecycle state. Read-only.
- name str
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My ProjectRead-write.
- parent
ResourceId Args 
- An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The parentcan be set on creation or using theUpdateProjectmethod; the end user must have theresourcemanager.projects.createpermission on the parent. Read-write.
- project_id str
- The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123Read-only after creation.
- project_number str
- The number uniquely identifying the project. Example: 415104041262Read-only.
- use_legacy_ boolstack 
- A now unused experiment opt-out option.
- createTime String
- Creation time. Read-only.
- labels Map<String>
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev"Read-write.
- lifecycleState "LIFECYCLE_STATE_UNSPECIFIED" | "ACTIVE" | "DELETE_REQUESTED" | "DELETE_IN_PROGRESS"
- The Project lifecycle state. Read-only.
- name String
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My ProjectRead-write.
- parent Property Map
- An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The parentcan be set on creation or using theUpdateProjectmethod; the end user must have theresourcemanager.projects.createpermission on the parent. Read-write.
- projectId String
- The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123Read-only after creation.
- projectNumber String
- The number uniquely identifying the project. Example: 415104041262Read-only.
- useLegacy BooleanStack 
- A now unused experiment opt-out option.
Outputs
All input properties are implicitly available as output properties. Additionally, the Project resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Supporting Types
ProjectLifecycleState, ProjectLifecycleStateArgs      
- LifecycleState Unspecified 
- LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- Active
- ACTIVEThe normal and active state.
- DeleteRequested 
- DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- DeleteIn Progress 
- DELETE_IN_PROGRESSThis lifecycle state is no longer used and is not returned by the API.
- ProjectLifecycle State Lifecycle State Unspecified 
- LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- ProjectLifecycle State Active 
- ACTIVEThe normal and active state.
- ProjectLifecycle State Delete Requested 
- DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- ProjectLifecycle State Delete In Progress 
- DELETE_IN_PROGRESSThis lifecycle state is no longer used and is not returned by the API.
- LifecycleState Unspecified 
- LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- Active
- ACTIVEThe normal and active state.
- DeleteRequested 
- DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- DeleteIn Progress 
- DELETE_IN_PROGRESSThis lifecycle state is no longer used and is not returned by the API.
- LifecycleState Unspecified 
- LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- Active
- ACTIVEThe normal and active state.
- DeleteRequested 
- DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- DeleteIn Progress 
- DELETE_IN_PROGRESSThis lifecycle state is no longer used and is not returned by the API.
- LIFECYCLE_STATE_UNSPECIFIED
- LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- ACTIVE
- ACTIVEThe normal and active state.
- DELETE_REQUESTED
- DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- DELETE_IN_PROGRESS
- DELETE_IN_PROGRESSThis lifecycle state is no longer used and is not returned by the API.
- "LIFECYCLE_STATE_UNSPECIFIED"
- LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- "ACTIVE"
- ACTIVEThe normal and active state.
- "DELETE_REQUESTED"
- DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- "DELETE_IN_PROGRESS"
- DELETE_IN_PROGRESSThis lifecycle state is no longer used and is not returned by the API.
ResourceId, ResourceIdArgs    
ResourceIdResponse, ResourceIdResponseArgs      
- Type string
- Required field representing the resource type this id is for. At present, the valid types are "project", "folder", and "organization".
- Type string
- Required field representing the resource type this id is for. At present, the valid types are "project", "folder", and "organization".
- type String
- Required field representing the resource type this id is for. At present, the valid types are "project", "folder", and "organization".
- type string
- Required field representing the resource type this id is for. At present, the valid types are "project", "folder", and "organization".
- type str
- Required field representing the resource type this id is for. At present, the valid types are "project", "folder", and "organization".
- type String
- Required field representing the resource type this id is for. At present, the valid types are "project", "folder", and "organization".
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.