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=google_native.cloudresourcemanager.v1beta1.ResourceIdArgs(
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
The Project resource accepts the following input properties:
- Create
Time 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. - Lifecycle
State 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 Project
Read-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
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. Read-write. - Project
Id 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-123
Read-only after creation. - Project
Number string - The number uniquely identifying the project. Example:
415104041262
Read-only. - Use
Legacy boolStack - A now unused experiment opt-out option.
- Create
Time 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. - Lifecycle
State 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 Project
Read-write. - Parent
Resource
Id Args - An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. Read-write. - Project
Id 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-123
Read-only after creation. - Project
Number string - The number uniquely identifying the project. Example:
415104041262
Read-only. - Use
Legacy boolStack - A now unused experiment opt-out option.
- create
Time 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. - lifecycle
State 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 Project
Read-write. - parent
Resource
Id - An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. Read-write. - project
Id 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-123
Read-only after creation. - project
Number String - The number uniquely identifying the project. Example:
415104041262
Read-only. - use
Legacy BooleanStack - A now unused experiment opt-out option.
- create
Time 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. - lifecycle
State 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 Project
Read-write. - parent
Resource
Id - An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. Read-write. - project
Id 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-123
Read-only after creation. - project
Number string - The number uniquely identifying the project. Example:
415104041262
Read-only. - use
Legacy 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 Project
Read-write. - parent
Resource
Id Args - An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission 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-123
Read-only after creation. - project_
number str - The number uniquely identifying the project. Example:
415104041262
Read-only. - use_
legacy_ boolstack - A now unused experiment opt-out option.
- create
Time 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. - lifecycle
State "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 Project
Read-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
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. Read-write. - project
Id 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-123
Read-only after creation. - project
Number String - The number uniquely identifying the project. Example:
415104041262
Read-only. - use
Legacy 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
- 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.
- Project
Lifecycle State Lifecycle State Unspecified - LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- Project
Lifecycle State Active - ACTIVEThe normal and active state.
- Project
Lifecycle 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.
- Project
Lifecycle State 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.
- 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.
- "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.