bitbucket.RepositoryUserPermission
Explore with Pulumi AI
Provides a Bitbucket Repository User Permission Resource.
This allows you set explicit user permission for a repository.
OAuth2 Scopes: repository:admin
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bitbucket from "@pulumi/bitbucket";
const example = new bitbucket.RepositoryUserPermission("example", {
workspace: "example",
repoSlug: bitbucket_repository.example.name,
userId: "user-id",
permission: "read",
});
import pulumi
import pulumi_bitbucket as bitbucket
example = bitbucket.RepositoryUserPermission("example",
workspace="example",
repo_slug=bitbucket_repository["example"]["name"],
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.NewRepositoryUserPermission(ctx, "example", &bitbucket.RepositoryUserPermissionArgs{
Workspace: pulumi.String("example"),
RepoSlug: pulumi.Any(bitbucket_repository.Example.Name),
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.RepositoryUserPermission("example", new()
{
Workspace = "example",
RepoSlug = bitbucket_repository.Example.Name,
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.RepositoryUserPermission;
import com.pulumi.bitbucket.RepositoryUserPermissionArgs;
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 RepositoryUserPermission("example", RepositoryUserPermissionArgs.builder()
.workspace("example")
.repoSlug(bitbucket_repository.example().name())
.userId("user-id")
.permission("read")
.build());
}
}
resources:
example:
type: bitbucket:RepositoryUserPermission
properties:
workspace: example
repoSlug: ${bitbucket_repository.example.name}
userId: user-id
permission: read
Create RepositoryUserPermission Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RepositoryUserPermission(name: string, args: RepositoryUserPermissionArgs, opts?: CustomResourceOptions);
@overload
def RepositoryUserPermission(resource_name: str,
args: RepositoryUserPermissionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RepositoryUserPermission(resource_name: str,
opts: Optional[ResourceOptions] = None,
permission: Optional[str] = None,
repo_slug: Optional[str] = None,
user_id: Optional[str] = None,
workspace: Optional[str] = None,
repository_user_permission_id: Optional[str] = None)
func NewRepositoryUserPermission(ctx *Context, name string, args RepositoryUserPermissionArgs, opts ...ResourceOption) (*RepositoryUserPermission, error)
public RepositoryUserPermission(string name, RepositoryUserPermissionArgs args, CustomResourceOptions? opts = null)
public RepositoryUserPermission(String name, RepositoryUserPermissionArgs args)
public RepositoryUserPermission(String name, RepositoryUserPermissionArgs args, CustomResourceOptions options)
type: bitbucket:RepositoryUserPermission
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 RepositoryUserPermissionArgs
- 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 RepositoryUserPermissionArgs
- 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 RepositoryUserPermissionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryUserPermissionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryUserPermissionArgs
- 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 repositoryUserPermissionResource = new Bitbucket.RepositoryUserPermission("repositoryUserPermissionResource", new()
{
Permission = "string",
RepoSlug = "string",
UserId = "string",
Workspace = "string",
RepositoryUserPermissionId = "string",
});
example, err := bitbucket.NewRepositoryUserPermission(ctx, "repositoryUserPermissionResource", &bitbucket.RepositoryUserPermissionArgs{
Permission: pulumi.String("string"),
RepoSlug: pulumi.String("string"),
UserId: pulumi.String("string"),
Workspace: pulumi.String("string"),
RepositoryUserPermissionId: pulumi.String("string"),
})
var repositoryUserPermissionResource = new RepositoryUserPermission("repositoryUserPermissionResource", RepositoryUserPermissionArgs.builder()
.permission("string")
.repoSlug("string")
.userId("string")
.workspace("string")
.repositoryUserPermissionId("string")
.build());
repository_user_permission_resource = bitbucket.RepositoryUserPermission("repositoryUserPermissionResource",
permission="string",
repo_slug="string",
user_id="string",
workspace="string",
repository_user_permission_id="string")
const repositoryUserPermissionResource = new bitbucket.RepositoryUserPermission("repositoryUserPermissionResource", {
permission: "string",
repoSlug: "string",
userId: "string",
workspace: "string",
repositoryUserPermissionId: "string",
});
type: bitbucket:RepositoryUserPermission
properties:
permission: string
repoSlug: string
repositoryUserPermissionId: string
userId: string
workspace: string
RepositoryUserPermission 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 RepositoryUserPermission resource accepts the following input properties:
- Permission string
- Permissions can be one of
read
,write
,none
, andadmin
. - Repo
Slug string - The repository slug.
- User
Id string - The UUID of the user.
- Workspace string
- The workspace id.
- Repository
User stringPermission Id
- Permission string
- Permissions can be one of
read
,write
,none
, andadmin
. - Repo
Slug string - The repository slug.
- User
Id string - The UUID of the user.
- Workspace string
- The workspace id.
- Repository
User stringPermission Id
- permission String
- Permissions can be one of
read
,write
,none
, andadmin
. - repo
Slug String - The repository slug.
- user
Id String - The UUID of the user.
- workspace String
- The workspace id.
- repository
User StringPermission Id
- permission string
- Permissions can be one of
read
,write
,none
, andadmin
. - repo
Slug string - The repository slug.
- user
Id string - The UUID of the user.
- workspace string
- The workspace id.
- repository
User stringPermission Id
- permission str
- Permissions can be one of
read
,write
,none
, andadmin
. - repo_
slug str - The repository slug.
- user_
id str - The UUID of the user.
- workspace str
- The workspace id.
- repository_
user_ strpermission_ id
- permission String
- Permissions can be one of
read
,write
,none
, andadmin
. - repo
Slug String - The repository slug.
- user
Id String - The UUID of the user.
- workspace String
- The workspace id.
- repository
User StringPermission Id
Outputs
All input properties are implicitly available as output properties. Additionally, the RepositoryUserPermission 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 RepositoryUserPermission Resource
Get an existing RepositoryUserPermission 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?: RepositoryUserPermissionState, opts?: CustomResourceOptions): RepositoryUserPermission
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
permission: Optional[str] = None,
repo_slug: Optional[str] = None,
repository_user_permission_id: Optional[str] = None,
user_id: Optional[str] = None,
workspace: Optional[str] = None) -> RepositoryUserPermission
func GetRepositoryUserPermission(ctx *Context, name string, id IDInput, state *RepositoryUserPermissionState, opts ...ResourceOption) (*RepositoryUserPermission, error)
public static RepositoryUserPermission Get(string name, Input<string> id, RepositoryUserPermissionState? state, CustomResourceOptions? opts = null)
public static RepositoryUserPermission get(String name, Output<String> id, RepositoryUserPermissionState state, CustomResourceOptions options)
resources: _: type: bitbucket:RepositoryUserPermission 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
,none
, andadmin
. - Repo
Slug string - The repository slug.
- Repository
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
,none
, andadmin
. - Repo
Slug string - The repository slug.
- Repository
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
,none
, andadmin
. - repo
Slug String - The repository slug.
- repository
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
,none
, andadmin
. - repo
Slug string - The repository slug.
- repository
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
,none
, andadmin
. - repo_
slug str - The repository slug.
- repository_
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
,none
, andadmin
. - repo
Slug String - The repository slug.
- repository
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:repo-slug:user-id
ID, e.g.
$ pulumi import bitbucket:index/repositoryUserPermission:RepositoryUserPermission example workspace:repo-slug: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.