harness.platform.User
Explore with Pulumi AI
Example Usage
Create User Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
args: UserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
opts: Optional[ResourceOptions] = None,
email: Optional[str] = None,
user_groups: Optional[Sequence[str]] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
role_bindings: Optional[Sequence[UserRoleBindingArgs]] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
type: harness:platform:User
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 UserArgs
- 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 UserArgs
- 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 UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserArgs
- 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 harnessUserResource = new Harness.Platform.User("harnessUserResource", new()
{
Email = "string",
UserGroups = new[]
{
"string",
},
OrgId = "string",
ProjectId = "string",
RoleBindings = new[]
{
new Harness.Platform.Inputs.UserRoleBindingArgs
{
ManagedRole = false,
ResourceGroupIdentifier = "string",
ResourceGroupName = "string",
RoleIdentifier = "string",
RoleName = "string",
},
},
});
example, err := platform.NewUser(ctx, "harnessUserResource", &platform.UserArgs{
Email: pulumi.String("string"),
UserGroups: pulumi.StringArray{
pulumi.String("string"),
},
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
RoleBindings: platform.UserRoleBindingArray{
&platform.UserRoleBindingArgs{
ManagedRole: pulumi.Bool(false),
ResourceGroupIdentifier: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
RoleIdentifier: pulumi.String("string"),
RoleName: pulumi.String("string"),
},
},
})
var harnessUserResource = new User("harnessUserResource", UserArgs.builder()
.email("string")
.userGroups("string")
.orgId("string")
.projectId("string")
.roleBindings(UserRoleBindingArgs.builder()
.managedRole(false)
.resourceGroupIdentifier("string")
.resourceGroupName("string")
.roleIdentifier("string")
.roleName("string")
.build())
.build());
harness_user_resource = harness.platform.User("harnessUserResource",
email="string",
user_groups=["string"],
org_id="string",
project_id="string",
role_bindings=[{
"managed_role": False,
"resource_group_identifier": "string",
"resource_group_name": "string",
"role_identifier": "string",
"role_name": "string",
}])
const harnessUserResource = new harness.platform.User("harnessUserResource", {
email: "string",
userGroups: ["string"],
orgId: "string",
projectId: "string",
roleBindings: [{
managedRole: false,
resourceGroupIdentifier: "string",
resourceGroupName: "string",
roleIdentifier: "string",
roleName: "string",
}],
});
type: harness:platform:User
properties:
email: string
orgId: string
projectId: string
roleBindings:
- managedRole: false
resourceGroupIdentifier: string
resourceGroupName: string
roleIdentifier: string
roleName: string
userGroups:
- string
User 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 User resource accepts the following input properties:
- Email string
- The email of the user.
- User
Groups List<string> - The user group of the user.
- Org
Id string - Organization identifier of the user.
- Project
Id string - Project identifier of the user.
- Role
Bindings List<UserRole Binding> - Role Bindings of the user. Cannot be updated.
- Email string
- The email of the user.
- User
Groups []string - The user group of the user.
- Org
Id string - Organization identifier of the user.
- Project
Id string - Project identifier of the user.
- Role
Bindings []UserRole Binding Args - Role Bindings of the user. Cannot be updated.
- email String
- The email of the user.
- user
Groups List<String> - The user group of the user.
- org
Id String - Organization identifier of the user.
- project
Id String - Project identifier of the user.
- role
Bindings List<UserRole Binding> - Role Bindings of the user. Cannot be updated.
- email string
- The email of the user.
- user
Groups string[] - The user group of the user.
- org
Id string - Organization identifier of the user.
- project
Id string - Project identifier of the user.
- role
Bindings UserRole Binding[] - Role Bindings of the user. Cannot be updated.
- email str
- The email of the user.
- user_
groups Sequence[str] - The user group of the user.
- org_
id str - Organization identifier of the user.
- project_
id str - Project identifier of the user.
- role_
bindings Sequence[UserRole Binding Args] - Role Bindings of the user. Cannot be updated.
- email String
- The email of the user.
- user
Groups List<String> - The user group of the user.
- org
Id String - Organization identifier of the user.
- project
Id String - Project identifier of the user.
- role
Bindings List<Property Map> - Role Bindings of the user. Cannot be updated.
Outputs
All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:
- Disabled bool
- Whether or not the user account is disabled.
- Externally
Managed bool - Whether or not the user account is externally managed.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifier string
- Unique identifier of the user.
- Locked bool
- Whether or not the user account is locked.
- Name string
- Name of the user.
- Disabled bool
- Whether or not the user account is disabled.
- Externally
Managed bool - Whether or not the user account is externally managed.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifier string
- Unique identifier of the user.
- Locked bool
- Whether or not the user account is locked.
- Name string
- Name of the user.
- disabled Boolean
- Whether or not the user account is disabled.
- externally
Managed Boolean - Whether or not the user account is externally managed.
- id String
- The provider-assigned unique ID for this managed resource.
- identifier String
- Unique identifier of the user.
- locked Boolean
- Whether or not the user account is locked.
- name String
- Name of the user.
- disabled boolean
- Whether or not the user account is disabled.
- externally
Managed boolean - Whether or not the user account is externally managed.
- id string
- The provider-assigned unique ID for this managed resource.
- identifier string
- Unique identifier of the user.
- locked boolean
- Whether or not the user account is locked.
- name string
- Name of the user.
- disabled bool
- Whether or not the user account is disabled.
- externally_
managed bool - Whether or not the user account is externally managed.
- id str
- The provider-assigned unique ID for this managed resource.
- identifier str
- Unique identifier of the user.
- locked bool
- Whether or not the user account is locked.
- name str
- Name of the user.
- disabled Boolean
- Whether or not the user account is disabled.
- externally
Managed Boolean - Whether or not the user account is externally managed.
- id String
- The provider-assigned unique ID for this managed resource.
- identifier String
- Unique identifier of the user.
- locked Boolean
- Whether or not the user account is locked.
- name String
- Name of the user.
Look up Existing User Resource
Get an existing User 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?: UserState, opts?: CustomResourceOptions): User
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
disabled: Optional[bool] = None,
email: Optional[str] = None,
externally_managed: Optional[bool] = None,
identifier: Optional[str] = None,
locked: Optional[bool] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
role_bindings: Optional[Sequence[UserRoleBindingArgs]] = None,
user_groups: Optional[Sequence[str]] = None) -> User
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Disabled bool
- Whether or not the user account is disabled.
- Email string
- The email of the user.
- Externally
Managed bool - Whether or not the user account is externally managed.
- Identifier string
- Unique identifier of the user.
- Locked bool
- Whether or not the user account is locked.
- Name string
- Name of the user.
- Org
Id string - Organization identifier of the user.
- Project
Id string - Project identifier of the user.
- Role
Bindings List<UserRole Binding> - Role Bindings of the user. Cannot be updated.
- User
Groups List<string> - The user group of the user.
- Disabled bool
- Whether or not the user account is disabled.
- Email string
- The email of the user.
- Externally
Managed bool - Whether or not the user account is externally managed.
- Identifier string
- Unique identifier of the user.
- Locked bool
- Whether or not the user account is locked.
- Name string
- Name of the user.
- Org
Id string - Organization identifier of the user.
- Project
Id string - Project identifier of the user.
- Role
Bindings []UserRole Binding Args - Role Bindings of the user. Cannot be updated.
- User
Groups []string - The user group of the user.
- disabled Boolean
- Whether or not the user account is disabled.
- email String
- The email of the user.
- externally
Managed Boolean - Whether or not the user account is externally managed.
- identifier String
- Unique identifier of the user.
- locked Boolean
- Whether or not the user account is locked.
- name String
- Name of the user.
- org
Id String - Organization identifier of the user.
- project
Id String - Project identifier of the user.
- role
Bindings List<UserRole Binding> - Role Bindings of the user. Cannot be updated.
- user
Groups List<String> - The user group of the user.
- disabled boolean
- Whether or not the user account is disabled.
- email string
- The email of the user.
- externally
Managed boolean - Whether or not the user account is externally managed.
- identifier string
- Unique identifier of the user.
- locked boolean
- Whether or not the user account is locked.
- name string
- Name of the user.
- org
Id string - Organization identifier of the user.
- project
Id string - Project identifier of the user.
- role
Bindings UserRole Binding[] - Role Bindings of the user. Cannot be updated.
- user
Groups string[] - The user group of the user.
- disabled bool
- Whether or not the user account is disabled.
- email str
- The email of the user.
- externally_
managed bool - Whether or not the user account is externally managed.
- identifier str
- Unique identifier of the user.
- locked bool
- Whether or not the user account is locked.
- name str
- Name of the user.
- org_
id str - Organization identifier of the user.
- project_
id str - Project identifier of the user.
- role_
bindings Sequence[UserRole Binding Args] - Role Bindings of the user. Cannot be updated.
- user_
groups Sequence[str] - The user group of the user.
- disabled Boolean
- Whether or not the user account is disabled.
- email String
- The email of the user.
- externally
Managed Boolean - Whether or not the user account is externally managed.
- identifier String
- Unique identifier of the user.
- locked Boolean
- Whether or not the user account is locked.
- name String
- Name of the user.
- org
Id String - Organization identifier of the user.
- project
Id String - Project identifier of the user.
- role
Bindings List<Property Map> - Role Bindings of the user. Cannot be updated.
- user
Groups List<String> - The user group of the user.
Supporting Types
UserRoleBinding, UserRoleBindingArgs
- Managed
Role bool - Managed Role of the user.
- Resource
Group stringIdentifier - Resource Group Identifier of the user.
- Resource
Group stringName - Resource Group Name of the user.
- Role
Identifier string - Role Identifier of the user.
- Role
Name string - Role Name Identifier of the user.
- Managed
Role bool - Managed Role of the user.
- Resource
Group stringIdentifier - Resource Group Identifier of the user.
- Resource
Group stringName - Resource Group Name of the user.
- Role
Identifier string - Role Identifier of the user.
- Role
Name string - Role Name Identifier of the user.
- managed
Role Boolean - Managed Role of the user.
- resource
Group StringIdentifier - Resource Group Identifier of the user.
- resource
Group StringName - Resource Group Name of the user.
- role
Identifier String - Role Identifier of the user.
- role
Name String - Role Name Identifier of the user.
- managed
Role boolean - Managed Role of the user.
- resource
Group stringIdentifier - Resource Group Identifier of the user.
- resource
Group stringName - Resource Group Name of the user.
- role
Identifier string - Role Identifier of the user.
- role
Name string - Role Name Identifier of the user.
- managed_
role bool - Managed Role of the user.
- resource_
group_ stridentifier - Resource Group Identifier of the user.
- resource_
group_ strname - Resource Group Name of the user.
- role_
identifier str - Role Identifier of the user.
- role_
name str - Role Name Identifier of the user.
- managed
Role Boolean - Managed Role of the user.
- resource
Group StringIdentifier - Resource Group Identifier of the user.
- resource
Group StringName - Resource Group Name of the user.
- role
Identifier String - Role Identifier of the user.
- role
Name String - Role Name Identifier of the user.
Import
Import account level
$ pulumi import harness:platform/user:User john_doe <email_id>
Import org level
$ pulumi import harness:platform/user:User john_doe <email_id>/<org_id>
Import project level
$ pulumi import harness:platform/user:User john_doe <email_id>/<org_id>/<project_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.