1. Packages
  2. Googleworkspace Provider
  3. API Docs
  4. Role
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp

googleworkspace.Role

Explore with Pulumi AI

Example Usage

Create Role Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Role(name: string, args: RoleArgs, opts?: CustomResourceOptions);
@overload
def Role(resource_name: str,
         args: RoleArgs,
         opts: Optional[ResourceOptions] = None)

@overload
def Role(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         privileges: Optional[Sequence[RolePrivilegeArgs]] = None,
         description: Optional[str] = None,
         name: Optional[str] = None)
func NewRole(ctx *Context, name string, args RoleArgs, opts ...ResourceOption) (*Role, error)
public Role(string name, RoleArgs args, CustomResourceOptions? opts = null)
public Role(String name, RoleArgs args)
public Role(String name, RoleArgs args, CustomResourceOptions options)
type: googleworkspace:Role
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. RoleArgs
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. RoleArgs
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. RoleArgs
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. RoleArgs
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. RoleArgs
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 roleResource = new Googleworkspace.Role("roleResource", new()
{
    Privileges = new[]
    {
        new Googleworkspace.Inputs.RolePrivilegeArgs
        {
            PrivilegeName = "string",
            ServiceId = "string",
        },
    },
    Description = "string",
    Name = "string",
});
Copy
example, err := googleworkspace.NewRole(ctx, "roleResource", &googleworkspace.RoleArgs{
Privileges: .RolePrivilegeArray{
&.RolePrivilegeArgs{
PrivilegeName: pulumi.String("string"),
ServiceId: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
Copy
var roleResource = new Role("roleResource", RoleArgs.builder()
    .privileges(RolePrivilegeArgs.builder()
        .privilegeName("string")
        .serviceId("string")
        .build())
    .description("string")
    .name("string")
    .build());
Copy
role_resource = googleworkspace.Role("roleResource",
    privileges=[{
        "privilege_name": "string",
        "service_id": "string",
    }],
    description="string",
    name="string")
Copy
const roleResource = new googleworkspace.Role("roleResource", {
    privileges: [{
        privilegeName: "string",
        serviceId: "string",
    }],
    description: "string",
    name: "string",
});
Copy
type: googleworkspace:Role
properties:
    description: string
    name: string
    privileges:
        - privilegeName: string
          serviceId: string
Copy

Role 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 Role resource accepts the following input properties:

Privileges This property is required. List<RolePrivilege>
The set of privileges that are granted to this role.
Description string
A short description of the role.
Name string
Name of the role.
Privileges This property is required. []RolePrivilegeArgs
The set of privileges that are granted to this role.
Description string
A short description of the role.
Name string
Name of the role.
privileges This property is required. List<RolePrivilege>
The set of privileges that are granted to this role.
description String
A short description of the role.
name String
Name of the role.
privileges This property is required. RolePrivilege[]
The set of privileges that are granted to this role.
description string
A short description of the role.
name string
Name of the role.
privileges This property is required. Sequence[RolePrivilegeArgs]
The set of privileges that are granted to this role.
description str
A short description of the role.
name str
Name of the role.
privileges This property is required. List<Property Map>
The set of privileges that are granted to this role.
description String
A short description of the role.
name String
Name of the role.

Outputs

All input properties are implicitly available as output properties. Additionally, the Role resource produces the following output properties:

Etag string
ETag of the resource.
Id string
The provider-assigned unique ID for this managed resource.
IsSuperAdminRole bool
Returns true if the role is a super admin role.
IsSystemRole bool
Returns true if this is a pre-defined system role.
Etag string
ETag of the resource.
Id string
The provider-assigned unique ID for this managed resource.
IsSuperAdminRole bool
Returns true if the role is a super admin role.
IsSystemRole bool
Returns true if this is a pre-defined system role.
etag String
ETag of the resource.
id String
The provider-assigned unique ID for this managed resource.
isSuperAdminRole Boolean
Returns true if the role is a super admin role.
isSystemRole Boolean
Returns true if this is a pre-defined system role.
etag string
ETag of the resource.
id string
The provider-assigned unique ID for this managed resource.
isSuperAdminRole boolean
Returns true if the role is a super admin role.
isSystemRole boolean
Returns true if this is a pre-defined system role.
etag str
ETag of the resource.
id str
The provider-assigned unique ID for this managed resource.
is_super_admin_role bool
Returns true if the role is a super admin role.
is_system_role bool
Returns true if this is a pre-defined system role.
etag String
ETag of the resource.
id String
The provider-assigned unique ID for this managed resource.
isSuperAdminRole Boolean
Returns true if the role is a super admin role.
isSystemRole Boolean
Returns true if this is a pre-defined system role.

Look up Existing Role Resource

Get an existing Role 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?: RoleState, opts?: CustomResourceOptions): Role
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        etag: Optional[str] = None,
        is_super_admin_role: Optional[bool] = None,
        is_system_role: Optional[bool] = None,
        name: Optional[str] = None,
        privileges: Optional[Sequence[RolePrivilegeArgs]] = None) -> Role
func GetRole(ctx *Context, name string, id IDInput, state *RoleState, opts ...ResourceOption) (*Role, error)
public static Role Get(string name, Input<string> id, RoleState? state, CustomResourceOptions? opts = null)
public static Role get(String name, Output<String> id, RoleState state, CustomResourceOptions options)
resources:  _:    type: googleworkspace:Role    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.
The following state arguments are supported:
Description string
A short description of the role.
Etag string
ETag of the resource.
IsSuperAdminRole bool
Returns true if the role is a super admin role.
IsSystemRole bool
Returns true if this is a pre-defined system role.
Name string
Name of the role.
Privileges List<RolePrivilege>
The set of privileges that are granted to this role.
Description string
A short description of the role.
Etag string
ETag of the resource.
IsSuperAdminRole bool
Returns true if the role is a super admin role.
IsSystemRole bool
Returns true if this is a pre-defined system role.
Name string
Name of the role.
Privileges []RolePrivilegeArgs
The set of privileges that are granted to this role.
description String
A short description of the role.
etag String
ETag of the resource.
isSuperAdminRole Boolean
Returns true if the role is a super admin role.
isSystemRole Boolean
Returns true if this is a pre-defined system role.
name String
Name of the role.
privileges List<RolePrivilege>
The set of privileges that are granted to this role.
description string
A short description of the role.
etag string
ETag of the resource.
isSuperAdminRole boolean
Returns true if the role is a super admin role.
isSystemRole boolean
Returns true if this is a pre-defined system role.
name string
Name of the role.
privileges RolePrivilege[]
The set of privileges that are granted to this role.
description str
A short description of the role.
etag str
ETag of the resource.
is_super_admin_role bool
Returns true if the role is a super admin role.
is_system_role bool
Returns true if this is a pre-defined system role.
name str
Name of the role.
privileges Sequence[RolePrivilegeArgs]
The set of privileges that are granted to this role.
description String
A short description of the role.
etag String
ETag of the resource.
isSuperAdminRole Boolean
Returns true if the role is a super admin role.
isSystemRole Boolean
Returns true if this is a pre-defined system role.
name String
Name of the role.
privileges List<Property Map>
The set of privileges that are granted to this role.

Supporting Types

RolePrivilege
, RolePrivilegeArgs

PrivilegeName This property is required. string
The name of the privilege.
ServiceId This property is required. string
The obfuscated ID of the service this privilege is for.
PrivilegeName This property is required. string
The name of the privilege.
ServiceId This property is required. string
The obfuscated ID of the service this privilege is for.
privilegeName This property is required. String
The name of the privilege.
serviceId This property is required. String
The obfuscated ID of the service this privilege is for.
privilegeName This property is required. string
The name of the privilege.
serviceId This property is required. string
The obfuscated ID of the service this privilege is for.
privilege_name This property is required. str
The name of the privilege.
service_id This property is required. str
The obfuscated ID of the service this privilege is for.
privilegeName This property is required. String
The name of the privilege.
serviceId This property is required. String
The obfuscated ID of the service this privilege is for.

Import

$ pulumi import googleworkspace:index/role:Role admin 12345678901234567
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
googleworkspace hashicorp/terraform-provider-googleworkspace
License
Notes
This Pulumi package is based on the googleworkspace Terraform Provider.