spectrocloud.Role
Explore with Pulumi AI
The role resource allows you to manage roles in Palette.
You can learn more about managing roles in Palette by reviewing the Roles guide.
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,
permissions: Optional[Sequence[str]] = None,
name: Optional[str] = None,
role_id: Optional[str] = None,
timeouts: Optional[RoleTimeoutsArgs] = None,
type: Optional[str] = None)
func NewRole(ctx *Context, name string, args RoleArgs, opts ...ResourceOption) (*Role, error)
public Role(string name, RoleArgs args, CustomResourceOptions? opts = null)
type: spectrocloud:Role
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 RoleArgs
- 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 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 string
- The unique name of the resource.
- args RoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 Spectrocloud.Role("roleResource", new()
{
Permissions = new[]
{
"string",
},
Name = "string",
RoleId = "string",
Timeouts = new Spectrocloud.Inputs.RoleTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
Type = "string",
});
example, err := spectrocloud.NewRole(ctx, "roleResource", &spectrocloud.RoleArgs{
Permissions: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
RoleId: pulumi.String("string"),
Timeouts: &spectrocloud.RoleTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
Type: pulumi.String("string"),
})
var roleResource = new Role("roleResource", RoleArgs.builder()
.permissions("string")
.name("string")
.roleId("string")
.timeouts(RoleTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.type("string")
.build());
role_resource = spectrocloud.Role("roleResource",
permissions=["string"],
name="string",
role_id="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
type="string")
const roleResource = new spectrocloud.Role("roleResource", {
permissions: ["string"],
name: "string",
roleId: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
type: "string",
});
type: spectrocloud:Role
properties:
name: string
permissions:
- string
roleId: string
timeouts:
create: string
delete: string
update: string
type: string
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:
- Permissions List<string>
- The permission's assigned to the role.
- Name string
- The name of the role.
- Role
Id string - The ID of this resource.
- Timeouts
Role
Timeouts - Type string
- The role type. Allowed values are
project
ortenant
orresource
- Permissions []string
- The permission's assigned to the role.
- Name string
- The name of the role.
- Role
Id string - The ID of this resource.
- Timeouts
Role
Timeouts Args - Type string
- The role type. Allowed values are
project
ortenant
orresource
- permissions List<String>
- The permission's assigned to the role.
- name String
- The name of the role.
- role
Id String - The ID of this resource.
- timeouts
Role
Timeouts - type String
- The role type. Allowed values are
project
ortenant
orresource
- permissions string[]
- The permission's assigned to the role.
- name string
- The name of the role.
- role
Id string - The ID of this resource.
- timeouts
Role
Timeouts - type string
- The role type. Allowed values are
project
ortenant
orresource
- permissions Sequence[str]
- The permission's assigned to the role.
- name str
- The name of the role.
- role_
id str - The ID of this resource.
- timeouts
Role
Timeouts Args - type str
- The role type. Allowed values are
project
ortenant
orresource
- permissions List<String>
- The permission's assigned to the role.
- name String
- The name of the role.
- role
Id String - The ID of this resource.
- timeouts Property Map
- type String
- The role type. Allowed values are
project
ortenant
orresource
Outputs
All input properties are implicitly available as output properties. Additionally, the Role 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 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,
name: Optional[str] = None,
permissions: Optional[Sequence[str]] = None,
role_id: Optional[str] = None,
timeouts: Optional[RoleTimeoutsArgs] = None,
type: Optional[str] = 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: spectrocloud:Role 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.
- Name string
- The name of the role.
- Permissions List<string>
- The permission's assigned to the role.
- Role
Id string - The ID of this resource.
- Timeouts
Role
Timeouts - Type string
- The role type. Allowed values are
project
ortenant
orresource
- Name string
- The name of the role.
- Permissions []string
- The permission's assigned to the role.
- Role
Id string - The ID of this resource.
- Timeouts
Role
Timeouts Args - Type string
- The role type. Allowed values are
project
ortenant
orresource
- name String
- The name of the role.
- permissions List<String>
- The permission's assigned to the role.
- role
Id String - The ID of this resource.
- timeouts
Role
Timeouts - type String
- The role type. Allowed values are
project
ortenant
orresource
- name string
- The name of the role.
- permissions string[]
- The permission's assigned to the role.
- role
Id string - The ID of this resource.
- timeouts
Role
Timeouts - type string
- The role type. Allowed values are
project
ortenant
orresource
- name str
- The name of the role.
- permissions Sequence[str]
- The permission's assigned to the role.
- role_
id str - The ID of this resource.
- timeouts
Role
Timeouts Args - type str
- The role type. Allowed values are
project
ortenant
orresource
- name String
- The name of the role.
- permissions List<String>
- The permission's assigned to the role.
- role
Id String - The ID of this resource.
- timeouts Property Map
- type String
- The role type. Allowed values are
project
ortenant
orresource
Supporting Types
RoleTimeouts, RoleTimeoutsArgs
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloud
Terraform Provider.