Grafana v0.4.2 published on Monday, Apr 15, 2024 by pulumiverse
grafana.RoleAssignment
Explore with Pulumi AI
Create RoleAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoleAssignment(name: string, args: RoleAssignmentArgs, opts?: CustomResourceOptions);
@overload
def RoleAssignment(resource_name: str,
args: RoleAssignmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RoleAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
role_uid: Optional[str] = None,
org_id: Optional[str] = None,
service_accounts: Optional[Sequence[str]] = None,
teams: Optional[Sequence[str]] = None,
users: Optional[Sequence[int]] = None)
func NewRoleAssignment(ctx *Context, name string, args RoleAssignmentArgs, opts ...ResourceOption) (*RoleAssignment, error)
public RoleAssignment(string name, RoleAssignmentArgs args, CustomResourceOptions? opts = null)
public RoleAssignment(String name, RoleAssignmentArgs args)
public RoleAssignment(String name, RoleAssignmentArgs args, CustomResourceOptions options)
type: grafana:RoleAssignment
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 RoleAssignmentArgs
- 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 RoleAssignmentArgs
- 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 RoleAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoleAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoleAssignmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Example
The following reference example uses placeholder values for all input properties.
var roleAssignmentResource = new Grafana.RoleAssignment("roleAssignmentResource", new()
{
RoleUid = "string",
OrgId = "string",
ServiceAccounts = new[]
{
"string",
},
Teams = new[]
{
"string",
},
Users = new[]
{
0,
},
});
example, err := grafana.NewRoleAssignment(ctx, "roleAssignmentResource", &grafana.RoleAssignmentArgs{
RoleUid: pulumi.String("string"),
OrgId: pulumi.String("string"),
ServiceAccounts: pulumi.StringArray{
pulumi.String("string"),
},
Teams: pulumi.StringArray{
pulumi.String("string"),
},
Users: pulumi.IntArray{
pulumi.Int(0),
},
})
var roleAssignmentResource = new RoleAssignment("roleAssignmentResource", RoleAssignmentArgs.builder()
.roleUid("string")
.orgId("string")
.serviceAccounts("string")
.teams("string")
.users(0)
.build());
role_assignment_resource = grafana.RoleAssignment("roleAssignmentResource",
role_uid="string",
org_id="string",
service_accounts=["string"],
teams=["string"],
users=[0])
const roleAssignmentResource = new grafana.RoleAssignment("roleAssignmentResource", {
roleUid: "string",
orgId: "string",
serviceAccounts: ["string"],
teams: ["string"],
users: [0],
});
type: grafana:RoleAssignment
properties:
orgId: string
roleUid: string
serviceAccounts:
- string
teams:
- string
users:
- 0
RoleAssignment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The RoleAssignment resource accepts the following input properties:
- Role
Uid string - Grafana RBAC role UID.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Service
Accounts List<string> - IDs of service accounts that the role should be assigned to.
- Teams List<string>
- IDs of teams that the role should be assigned to.
- Users List<int>
- IDs of users that the role should be assigned to.
- Role
Uid string - Grafana RBAC role UID.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Service
Accounts []string - IDs of service accounts that the role should be assigned to.
- Teams []string
- IDs of teams that the role should be assigned to.
- Users []int
- IDs of users that the role should be assigned to.
- role
Uid String - Grafana RBAC role UID.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- service
Accounts List<String> - IDs of service accounts that the role should be assigned to.
- teams List<String>
- IDs of teams that the role should be assigned to.
- users List<Integer>
- IDs of users that the role should be assigned to.
- role
Uid string - Grafana RBAC role UID.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- service
Accounts string[] - IDs of service accounts that the role should be assigned to.
- teams string[]
- IDs of teams that the role should be assigned to.
- users number[]
- IDs of users that the role should be assigned to.
- role_
uid str - Grafana RBAC role UID.
- org_
id str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- service_
accounts Sequence[str] - IDs of service accounts that the role should be assigned to.
- teams Sequence[str]
- IDs of teams that the role should be assigned to.
- users Sequence[int]
- IDs of users that the role should be assigned to.
- role
Uid String - Grafana RBAC role UID.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- service
Accounts List<String> - IDs of service accounts that the role should be assigned to.
- teams List<String>
- IDs of teams that the role should be assigned to.
- users List<Number>
- IDs of users that the role should be assigned to.
Outputs
All input properties are implicitly available as output properties. Additionally, the RoleAssignment 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 RoleAssignment Resource
Get an existing RoleAssignment 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?: RoleAssignmentState, opts?: CustomResourceOptions): RoleAssignment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
org_id: Optional[str] = None,
role_uid: Optional[str] = None,
service_accounts: Optional[Sequence[str]] = None,
teams: Optional[Sequence[str]] = None,
users: Optional[Sequence[int]] = None) -> RoleAssignment
func GetRoleAssignment(ctx *Context, name string, id IDInput, state *RoleAssignmentState, opts ...ResourceOption) (*RoleAssignment, error)
public static RoleAssignment Get(string name, Input<string> id, RoleAssignmentState? state, CustomResourceOptions? opts = null)
public static RoleAssignment get(String name, Output<String> id, RoleAssignmentState 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.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Role
Uid string - Grafana RBAC role UID.
- Service
Accounts List<string> - IDs of service accounts that the role should be assigned to.
- Teams List<string>
- IDs of teams that the role should be assigned to.
- Users List<int>
- IDs of users that the role should be assigned to.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Role
Uid string - Grafana RBAC role UID.
- Service
Accounts []string - IDs of service accounts that the role should be assigned to.
- Teams []string
- IDs of teams that the role should be assigned to.
- Users []int
- IDs of users that the role should be assigned to.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- role
Uid String - Grafana RBAC role UID.
- service
Accounts List<String> - IDs of service accounts that the role should be assigned to.
- teams List<String>
- IDs of teams that the role should be assigned to.
- users List<Integer>
- IDs of users that the role should be assigned to.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- role
Uid string - Grafana RBAC role UID.
- service
Accounts string[] - IDs of service accounts that the role should be assigned to.
- teams string[]
- IDs of teams that the role should be assigned to.
- users number[]
- IDs of users that the role should be assigned to.
- org_
id str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- role_
uid str - Grafana RBAC role UID.
- service_
accounts Sequence[str] - IDs of service accounts that the role should be assigned to.
- teams Sequence[str]
- IDs of teams that the role should be assigned to.
- users Sequence[int]
- IDs of users that the role should be assigned to.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- role
Uid String - Grafana RBAC role UID.
- service
Accounts List<String> - IDs of service accounts that the role should be assigned to.
- teams List<String>
- IDs of teams that the role should be assigned to.
- users List<Number>
- IDs of users that the role should be assigned to.
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
grafana
Terraform Provider.