neon.ProjectPermission
Explore with Pulumi AI
Project’s access permission.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as neon from "@pulumi/neon";
const example = new neon.Project("example", {});
// grant project access to the user with the email foo@bar.qux
const share = new neon.ProjectPermission("share", {
projectId: example.id,
grantee: "foo@bar.qux",
});
import pulumi
import pulumi_neon as neon
example = neon.Project("example")
# grant project access to the user with the email foo@bar.qux
share = neon.ProjectPermission("share",
project_id=example.id,
grantee="foo@bar.qux")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/neon/neon"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := neon.NewProject(ctx, "example", nil)
if err != nil {
return err
}
// grant project access to the user with the email foo@bar.qux
_, err = neon.NewProjectPermission(ctx, "share", &neon.ProjectPermissionArgs{
ProjectId: example.ID(),
Grantee: pulumi.String("foo@bar.qux"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Neon = Pulumi.Neon;
return await Deployment.RunAsync(() =>
{
var example = new Neon.Project("example");
// grant project access to the user with the email foo@bar.qux
var share = new Neon.ProjectPermission("share", new()
{
ProjectId = example.Id,
Grantee = "foo@bar.qux",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.neon.Project;
import com.pulumi.neon.ProjectPermission;
import com.pulumi.neon.ProjectPermissionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Project("example");
// grant project access to the user with the email foo@bar.qux
var share = new ProjectPermission("share", ProjectPermissionArgs.builder()
.projectId(example.id())
.grantee("foo@bar.qux")
.build());
}
}
resources:
example:
type: neon:Project
# grant project access to the user with the email foo@bar.qux
share:
type: neon:ProjectPermission
properties:
projectId: ${example.id}
grantee: foo@bar.qux
Create ProjectPermission Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectPermission(name: string, args: ProjectPermissionArgs, opts?: CustomResourceOptions);
@overload
def ProjectPermission(resource_name: str,
args: ProjectPermissionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectPermission(resource_name: str,
opts: Optional[ResourceOptions] = None,
grantee: Optional[str] = None,
project_id: Optional[str] = None)
func NewProjectPermission(ctx *Context, name string, args ProjectPermissionArgs, opts ...ResourceOption) (*ProjectPermission, error)
public ProjectPermission(string name, ProjectPermissionArgs args, CustomResourceOptions? opts = null)
public ProjectPermission(String name, ProjectPermissionArgs args)
public ProjectPermission(String name, ProjectPermissionArgs args, CustomResourceOptions options)
type: neon:ProjectPermission
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 ProjectPermissionArgs
- 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 ProjectPermissionArgs
- 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 ProjectPermissionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectPermissionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectPermissionArgs
- 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 projectPermissionResource = new Neon.ProjectPermission("projectPermissionResource", new()
{
Grantee = "string",
ProjectId = "string",
});
example, err := neon.NewProjectPermission(ctx, "projectPermissionResource", &neon.ProjectPermissionArgs{
Grantee: pulumi.String("string"),
ProjectId: pulumi.String("string"),
})
var projectPermissionResource = new ProjectPermission("projectPermissionResource", ProjectPermissionArgs.builder()
.grantee("string")
.projectId("string")
.build());
project_permission_resource = neon.ProjectPermission("projectPermissionResource",
grantee="string",
project_id="string")
const projectPermissionResource = new neon.ProjectPermission("projectPermissionResource", {
grantee: "string",
projectId: "string",
});
type: neon:ProjectPermission
properties:
grantee: string
projectId: string
ProjectPermission 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 ProjectPermission resource accepts the following input properties:
- grantee str
- Email of the user whom to grant project permission.
- project_
id str - Project ID.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectPermission 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.
Look up Existing ProjectPermission Resource
Get an existing ProjectPermission resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ProjectPermissionState, opts?: CustomResourceOptions): ProjectPermission
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
grantee: Optional[str] = None,
project_id: Optional[str] = None) -> ProjectPermission
func GetProjectPermission(ctx *Context, name string, id IDInput, state *ProjectPermissionState, opts ...ResourceOption) (*ProjectPermission, error)
public static ProjectPermission Get(string name, Input<string> id, ProjectPermissionState? state, CustomResourceOptions? opts = null)
public static ProjectPermission get(String name, Output<String> id, ProjectPermissionState state, CustomResourceOptions options)
resources: _: type: neon:ProjectPermission get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- grantee str
- Email of the user whom to grant project permission.
- project_
id str - Project ID.
Package Details
- Repository
- neon kislerdm/terraform-provider-neon
- License
- Notes
- This Pulumi package is based on the
neon
Terraform Provider.