bitbucket.ProjectUserPermission
Explore with Pulumi AI
Provides a Bitbucket Repository User Permission Resource.
This allows you set explicit user permission for a project.
OAuth2 Scopes: project:admin
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bitbucket from "@pulumi/bitbucket";
const example = new bitbucket.ProjectUserPermission("example", {
workspace: "example",
projectKey: bitbucket_project.example.key,
userId: "user-id",
permission: "read",
});
import pulumi
import pulumi_bitbucket as bitbucket
example = bitbucket.ProjectUserPermission("example",
workspace="example",
project_key=bitbucket_project["example"]["key"],
user_id="user-id",
permission="read")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/bitbucket/v2/bitbucket"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bitbucket.NewProjectUserPermission(ctx, "example", &bitbucket.ProjectUserPermissionArgs{
Workspace: pulumi.String("example"),
ProjectKey: pulumi.Any(bitbucket_project.Example.Key),
UserId: pulumi.String("user-id"),
Permission: pulumi.String("read"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bitbucket = Pulumi.Bitbucket;
return await Deployment.RunAsync(() =>
{
var example = new Bitbucket.ProjectUserPermission("example", new()
{
Workspace = "example",
ProjectKey = bitbucket_project.Example.Key,
UserId = "user-id",
Permission = "read",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.bitbucket.ProjectUserPermission;
import com.pulumi.bitbucket.ProjectUserPermissionArgs;
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 ProjectUserPermission("example", ProjectUserPermissionArgs.builder()
.workspace("example")
.projectKey(bitbucket_project.example().key())
.userId("user-id")
.permission("read")
.build());
}
}
resources:
example:
type: bitbucket:ProjectUserPermission
properties:
workspace: example
projectKey: ${bitbucket_project.example.key}
userId: user-id
permission: read
Create ProjectUserPermission Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectUserPermission(name: string, args: ProjectUserPermissionArgs, opts?: CustomResourceOptions);
@overload
def ProjectUserPermission(resource_name: str,
args: ProjectUserPermissionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectUserPermission(resource_name: str,
opts: Optional[ResourceOptions] = None,
permission: Optional[str] = None,
project_key: Optional[str] = None,
user_id: Optional[str] = None,
workspace: Optional[str] = None,
project_user_permission_id: Optional[str] = None)
func NewProjectUserPermission(ctx *Context, name string, args ProjectUserPermissionArgs, opts ...ResourceOption) (*ProjectUserPermission, error)
public ProjectUserPermission(string name, ProjectUserPermissionArgs args, CustomResourceOptions? opts = null)
public ProjectUserPermission(String name, ProjectUserPermissionArgs args)
public ProjectUserPermission(String name, ProjectUserPermissionArgs args, CustomResourceOptions options)
type: bitbucket:ProjectUserPermission
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 ProjectUserPermissionArgs
- 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 ProjectUserPermissionArgs
- 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 ProjectUserPermissionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectUserPermissionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectUserPermissionArgs
- 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 projectUserPermissionResource = new Bitbucket.ProjectUserPermission("projectUserPermissionResource", new()
{
Permission = "string",
ProjectKey = "string",
UserId = "string",
Workspace = "string",
ProjectUserPermissionId = "string",
});
example, err := bitbucket.NewProjectUserPermission(ctx, "projectUserPermissionResource", &bitbucket.ProjectUserPermissionArgs{
Permission: pulumi.String("string"),
ProjectKey: pulumi.String("string"),
UserId: pulumi.String("string"),
Workspace: pulumi.String("string"),
ProjectUserPermissionId: pulumi.String("string"),
})
var projectUserPermissionResource = new ProjectUserPermission("projectUserPermissionResource", ProjectUserPermissionArgs.builder()
.permission("string")
.projectKey("string")
.userId("string")
.workspace("string")
.projectUserPermissionId("string")
.build());
project_user_permission_resource = bitbucket.ProjectUserPermission("projectUserPermissionResource",
permission="string",
project_key="string",
user_id="string",
workspace="string",
project_user_permission_id="string")
const projectUserPermissionResource = new bitbucket.ProjectUserPermission("projectUserPermissionResource", {
permission: "string",
projectKey: "string",
userId: "string",
workspace: "string",
projectUserPermissionId: "string",
});
type: bitbucket:ProjectUserPermission
properties:
permission: string
projectKey: string
projectUserPermissionId: string
userId: string
workspace: string
ProjectUserPermission 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 ProjectUserPermission resource accepts the following input properties:
- Permission string
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - Project
Key string - The project key.
- User
Id string - The UUID of the user.
- Workspace string
- The workspace id.
- Project
User stringPermission Id
- Permission string
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - Project
Key string - The project key.
- User
Id string - The UUID of the user.
- Workspace string
- The workspace id.
- Project
User stringPermission Id
- permission String
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - project
Key String - The project key.
- user
Id String - The UUID of the user.
- workspace String
- The workspace id.
- project
User StringPermission Id
- permission string
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - project
Key string - The project key.
- user
Id string - The UUID of the user.
- workspace string
- The workspace id.
- project
User stringPermission Id
- permission str
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - project_
key str - The project key.
- user_
id str - The UUID of the user.
- workspace str
- The workspace id.
- project_
user_ strpermission_ id
- permission String
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - project
Key String - The project key.
- user
Id String - The UUID of the user.
- workspace String
- The workspace id.
- project
User StringPermission Id
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectUserPermission 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 ProjectUserPermission Resource
Get an existing ProjectUserPermission 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?: ProjectUserPermissionState, opts?: CustomResourceOptions): ProjectUserPermission
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
permission: Optional[str] = None,
project_key: Optional[str] = None,
project_user_permission_id: Optional[str] = None,
user_id: Optional[str] = None,
workspace: Optional[str] = None) -> ProjectUserPermission
func GetProjectUserPermission(ctx *Context, name string, id IDInput, state *ProjectUserPermissionState, opts ...ResourceOption) (*ProjectUserPermission, error)
public static ProjectUserPermission Get(string name, Input<string> id, ProjectUserPermissionState? state, CustomResourceOptions? opts = null)
public static ProjectUserPermission get(String name, Output<String> id, ProjectUserPermissionState state, CustomResourceOptions options)
resources: _: type: bitbucket:ProjectUserPermission 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.
- Permission string
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - Project
Key string - The project key.
- Project
User stringPermission Id - User
Id string - The UUID of the user.
- Workspace string
- The workspace id.
- Permission string
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - Project
Key string - The project key.
- Project
User stringPermission Id - User
Id string - The UUID of the user.
- Workspace string
- The workspace id.
- permission String
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - project
Key String - The project key.
- project
User StringPermission Id - user
Id String - The UUID of the user.
- workspace String
- The workspace id.
- permission string
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - project
Key string - The project key.
- project
User stringPermission Id - user
Id string - The UUID of the user.
- workspace string
- The workspace id.
- permission str
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - project_
key str - The project key.
- project_
user_ strpermission_ id - user_
id str - The UUID of the user.
- workspace str
- The workspace id.
- permission String
- Permissions can be one of
read
,write
,create-repo
, andadmin
. - project
Key String - The project key.
- project
User StringPermission Id - user
Id String - The UUID of the user.
- workspace String
- The workspace id.
Import
Repository User Permissions can be imported using their workspace:project-key:user-id
ID, e.g.
$ pulumi import bitbucket:index/projectUserPermission:ProjectUserPermission example workspace:project-key:user-id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bitbucket drfaust92/terraform-provider-bitbucket
- License
- Notes
- This Pulumi package is based on the
bitbucket
Terraform Provider.