harness.platform.RoleAssignments
Explore with Pulumi AI
Example Usage
Create RoleAssignments Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoleAssignments(name: string, args: RoleAssignmentsArgs, opts?: CustomResourceOptions);
@overload
def RoleAssignments(resource_name: str,
args: RoleAssignmentsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RoleAssignments(resource_name: str,
opts: Optional[ResourceOptions] = None,
principals: Optional[Sequence[RoleAssignmentsPrincipalArgs]] = None,
resource_group_identifier: Optional[str] = None,
role_identifier: Optional[str] = None,
disabled: Optional[bool] = None,
identifier: Optional[str] = None,
managed: Optional[bool] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None)
func NewRoleAssignments(ctx *Context, name string, args RoleAssignmentsArgs, opts ...ResourceOption) (*RoleAssignments, error)
public RoleAssignments(string name, RoleAssignmentsArgs args, CustomResourceOptions? opts = null)
public RoleAssignments(String name, RoleAssignmentsArgs args)
public RoleAssignments(String name, RoleAssignmentsArgs args, CustomResourceOptions options)
type: harness:platform:RoleAssignments
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. RoleAssignmentsArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. RoleAssignmentsArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. RoleAssignmentsArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. RoleAssignmentsArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. RoleAssignmentsArgs - 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 roleAssignmentsResource = new Harness.Platform.RoleAssignments("roleAssignmentsResource", new()
{
Principals = new[]
{
new Harness.Platform.Inputs.RoleAssignmentsPrincipalArgs
{
Type = "string",
Identifier = "string",
ScopeLevel = "string",
},
},
ResourceGroupIdentifier = "string",
RoleIdentifier = "string",
Disabled = false,
Identifier = "string",
Managed = false,
OrgId = "string",
ProjectId = "string",
});
example, err := platform.NewRoleAssignments(ctx, "roleAssignmentsResource", &platform.RoleAssignmentsArgs{
Principals: platform.RoleAssignmentsPrincipalArray{
&platform.RoleAssignmentsPrincipalArgs{
Type: pulumi.String("string"),
Identifier: pulumi.String("string"),
ScopeLevel: pulumi.String("string"),
},
},
ResourceGroupIdentifier: pulumi.String("string"),
RoleIdentifier: pulumi.String("string"),
Disabled: pulumi.Bool(false),
Identifier: pulumi.String("string"),
Managed: pulumi.Bool(false),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
})
var roleAssignmentsResource = new RoleAssignments("roleAssignmentsResource", RoleAssignmentsArgs.builder()
.principals(RoleAssignmentsPrincipalArgs.builder()
.type("string")
.identifier("string")
.scopeLevel("string")
.build())
.resourceGroupIdentifier("string")
.roleIdentifier("string")
.disabled(false)
.identifier("string")
.managed(false)
.orgId("string")
.projectId("string")
.build());
role_assignments_resource = harness.platform.RoleAssignments("roleAssignmentsResource",
principals=[{
"type": "string",
"identifier": "string",
"scope_level": "string",
}],
resource_group_identifier="string",
role_identifier="string",
disabled=False,
identifier="string",
managed=False,
org_id="string",
project_id="string")
const roleAssignmentsResource = new harness.platform.RoleAssignments("roleAssignmentsResource", {
principals: [{
type: "string",
identifier: "string",
scopeLevel: "string",
}],
resourceGroupIdentifier: "string",
roleIdentifier: "string",
disabled: false,
identifier: "string",
managed: false,
orgId: "string",
projectId: "string",
});
type: harness:platform:RoleAssignments
properties:
disabled: false
identifier: string
managed: false
orgId: string
principals:
- identifier: string
scopeLevel: string
type: string
projectId: string
resourceGroupIdentifier: string
roleIdentifier: string
RoleAssignments 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 RoleAssignments resource accepts the following input properties:
- Principals
This property is required. List<RoleAssignments Principal> - Principal.
- Resource
Group Identifier This property is required. string - Resource group identifier.
- Role
Identifier This property is required. string - Role identifier.
- Disabled bool
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - Identifier string
- Identifier for role assignment.
- Managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - Org
Id string - Org identifier.
- Project
Id string - Project Identifier
- Principals
This property is required. []RoleAssignments Principal Args - Principal.
- Resource
Group Identifier This property is required. string - Resource group identifier.
- Role
Identifier This property is required. string - Role identifier.
- Disabled bool
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - Identifier string
- Identifier for role assignment.
- Managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - Org
Id string - Org identifier.
- Project
Id string - Project Identifier
- principals
This property is required. List<RoleAssignments Principal> - Principal.
- resource
Group Identifier This property is required. String - Resource group identifier.
- role
Identifier This property is required. String - Role identifier.
- disabled Boolean
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - identifier String
- Identifier for role assignment.
- managed Boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - org
Id String - Org identifier.
- project
Id String - Project Identifier
- principals
This property is required. RoleAssignments Principal[] - Principal.
- resource
Group Identifier This property is required. string - Resource group identifier.
- role
Identifier This property is required. string - Role identifier.
- disabled boolean
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - identifier string
- Identifier for role assignment.
- managed boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - org
Id string - Org identifier.
- project
Id string - Project Identifier
- principals
This property is required. Sequence[RoleAssignments Principal Args] - Principal.
- resource_
group_ identifier This property is required. str - Resource group identifier.
- role_
identifier This property is required. str - Role identifier.
- disabled bool
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - identifier str
- Identifier for role assignment.
- managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - org_
id str - Org identifier.
- project_
id str - Project Identifier
- principals
This property is required. List<Property Map> - Principal.
- resource
Group Identifier This property is required. String - Resource group identifier.
- role
Identifier This property is required. String - Role identifier.
- disabled Boolean
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - identifier String
- Identifier for role assignment.
- managed Boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - org
Id String - Org identifier.
- project
Id String - Project Identifier
Outputs
All input properties are implicitly available as output properties. Additionally, the RoleAssignments 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 RoleAssignments Resource
Get an existing RoleAssignments 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?: RoleAssignmentsState, opts?: CustomResourceOptions): RoleAssignments
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
disabled: Optional[bool] = None,
identifier: Optional[str] = None,
managed: Optional[bool] = None,
org_id: Optional[str] = None,
principals: Optional[Sequence[RoleAssignmentsPrincipalArgs]] = None,
project_id: Optional[str] = None,
resource_group_identifier: Optional[str] = None,
role_identifier: Optional[str] = None) -> RoleAssignments
func GetRoleAssignments(ctx *Context, name string, id IDInput, state *RoleAssignmentsState, opts ...ResourceOption) (*RoleAssignments, error)
public static RoleAssignments Get(string name, Input<string> id, RoleAssignmentsState? state, CustomResourceOptions? opts = null)
public static RoleAssignments get(String name, Output<String> id, RoleAssignmentsState state, CustomResourceOptions options)
resources: _: type: harness:platform:RoleAssignments get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - Identifier string
- Identifier for role assignment.
- Managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - Org
Id string - Org identifier.
- Principals
List<Role
Assignments Principal> - Principal.
- Project
Id string - Project Identifier
- Resource
Group stringIdentifier - Resource group identifier.
- Role
Identifier string - Role identifier.
- Disabled bool
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - Identifier string
- Identifier for role assignment.
- Managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - Org
Id string - Org identifier.
- Principals
[]Role
Assignments Principal Args - Principal.
- Project
Id string - Project Identifier
- Resource
Group stringIdentifier - Resource group identifier.
- Role
Identifier string - Role identifier.
- disabled Boolean
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - identifier String
- Identifier for role assignment.
- managed Boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - org
Id String - Org identifier.
- principals
List<Role
Assignments Principal> - Principal.
- project
Id String - Project Identifier
- resource
Group StringIdentifier - Resource group identifier.
- role
Identifier String - Role identifier.
- disabled boolean
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - identifier string
- Identifier for role assignment.
- managed boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - org
Id string - Org identifier.
- principals
Role
Assignments Principal[] - Principal.
- project
Id string - Project Identifier
- resource
Group stringIdentifier - Resource group identifier.
- role
Identifier string - Role identifier.
- disabled bool
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - identifier str
- Identifier for role assignment.
- managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - org_
id str - Org identifier.
- principals
Sequence[Role
Assignments Principal Args] - Principal.
- project_
id str - Project Identifier
- resource_
group_ stridentifier - Resource group identifier.
- role_
identifier str - Role identifier.
- disabled Boolean
- The
disabled
attribute in the role assignment resource controls the status of the role assignment. Settingdisabled
tofalse
activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabled
totrue
deactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse
. - identifier String
- Identifier for role assignment.
- managed Boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to
true
means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalse
indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse
. - org
Id String - Org identifier.
- principals List<Property Map>
- Principal.
- project
Id String - Project Identifier
- resource
Group StringIdentifier - Resource group identifier.
- role
Identifier String - Role identifier.
Supporting Types
RoleAssignmentsPrincipal, RoleAssignmentsPrincipalArgs
- Type
This property is required. string - Type.
- Identifier string
- Identifier.
- Scope
Level string - Scope level.
- Type
This property is required. string - Type.
- Identifier string
- Identifier.
- Scope
Level string - Scope level.
- type
This property is required. String - Type.
- identifier String
- Identifier.
- scope
Level String - Scope level.
- type
This property is required. string - Type.
- identifier string
- Identifier.
- scope
Level string - Scope level.
- type
This property is required. str - Type.
- identifier str
- Identifier.
- scope_
level str - Scope level.
- type
This property is required. String - Type.
- identifier String
- Identifier.
- scope
Level String - Scope level.
Import
Import account level role assignments
$ pulumi import harness:platform/roleAssignments:RoleAssignments example <role_assignments_id>
Import org level role assignments
$ pulumi import harness:platform/roleAssignments:RoleAssignments example <ord_id>/<role_assignments_id>
Import project level role assignments
$ pulumi import harness:platform/roleAssignments:RoleAssignments example <org_id>/<project_id>/<role_assignments_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.