spectrocloud.Team
Explore with Pulumi AI
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.spectrocloud.SpectrocloudFunctions;
import com.pulumi.spectrocloud.inputs.GetUserArgs;
import com.pulumi.spectrocloud.inputs.GetRoleArgs;
import com.pulumi.spectrocloud.inputs.GetProjectArgs;
import com.pulumi.spectrocloud.Team;
import com.pulumi.spectrocloud.TeamArgs;
import com.pulumi.spectrocloud.inputs.TeamProjectRoleMappingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var user1 = SpectrocloudFunctions.getUser(GetUserArgs.builder()
.name("Foo Bar")
.build());
final var role1 = SpectrocloudFunctions.getRole(GetRoleArgs.builder()
.name("Project Editor")
.build());
final var role2 = SpectrocloudFunctions.getRole(GetRoleArgs.builder()
.name("Cluster Admin")
.build());
final var role3 = SpectrocloudFunctions.getRole(GetRoleArgs.builder()
.name("Project Admin")
.build());
final var project1 = SpectrocloudFunctions.getProject(GetProjectArgs.builder()
.name("Default")
.build());
final var project2 = SpectrocloudFunctions.getProject(GetProjectArgs.builder()
.name("Prod")
.build());
var t1 = new Team("t1", TeamArgs.builder()
.users(user1.applyValue(getUserResult -> getUserResult.id()))
.projectRoleMappings(
TeamProjectRoleMappingArgs.builder()
.id(project1.applyValue(getProjectResult -> getProjectResult.id()))
.roles(
role1.applyValue(getRoleResult -> getRoleResult.id()),
role2.applyValue(getRoleResult -> getRoleResult.id()))
.build(),
TeamProjectRoleMappingArgs.builder()
.id(project2.applyValue(getProjectResult -> getProjectResult.id()))
.roles(role3.applyValue(getRoleResult -> getRoleResult.id()))
.build())
.build());
}
}
resources:
t1:
type: spectrocloud:Team
properties:
users:
- ${user1.id}
projectRoleMappings:
- id: ${project1.id}
roles:
- ${role1.id}
- ${role2.id}
- id: ${project2.id}
roles:
- ${role3.id}
variables:
user1:
fn::invoke:
function: spectrocloud:getUser
arguments:
name: Foo Bar
role1:
fn::invoke:
function: spectrocloud:getRole
arguments:
name: Project Editor
role2:
fn::invoke:
function: spectrocloud:getRole
arguments:
name: Cluster Admin
role3:
fn::invoke:
function: spectrocloud:getRole
arguments:
name: Project Admin
project1:
fn::invoke:
function: spectrocloud:getProject
arguments:
name: Default
project2:
fn::invoke:
function: spectrocloud:getProject
arguments:
name: Prod
Create Team Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Team(name: string, args?: TeamArgs, opts?: CustomResourceOptions);
@overload
def Team(resource_name: str,
args: Optional[TeamArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Team(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
project_role_mappings: Optional[Sequence[TeamProjectRoleMappingArgs]] = None,
team_id: Optional[str] = None,
tenant_role_mappings: Optional[Sequence[str]] = None,
timeouts: Optional[TeamTimeoutsArgs] = None,
users: Optional[Sequence[str]] = None,
workspace_role_mappings: Optional[Sequence[TeamWorkspaceRoleMappingArgs]] = None)
func NewTeam(ctx *Context, name string, args *TeamArgs, opts ...ResourceOption) (*Team, error)
public Team(string name, TeamArgs? args = null, CustomResourceOptions? opts = null)
type: spectrocloud:Team
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 TeamArgs
- 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 TeamArgs
- 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 TeamArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeamArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TeamArgs
- 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 teamResource = new Spectrocloud.Team("teamResource", new()
{
Name = "string",
ProjectRoleMappings = new[]
{
new Spectrocloud.Inputs.TeamProjectRoleMappingArgs
{
Id = "string",
Roles = new[]
{
"string",
},
},
},
TeamId = "string",
TenantRoleMappings = new[]
{
"string",
},
Timeouts = new Spectrocloud.Inputs.TeamTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
Users = new[]
{
"string",
},
WorkspaceRoleMappings = new[]
{
new Spectrocloud.Inputs.TeamWorkspaceRoleMappingArgs
{
Id = "string",
Workspaces = new[]
{
new Spectrocloud.Inputs.TeamWorkspaceRoleMappingWorkspaceArgs
{
Id = "string",
Roles = new[]
{
"string",
},
},
},
},
},
});
example, err := spectrocloud.NewTeam(ctx, "teamResource", &spectrocloud.TeamArgs{
Name: pulumi.String("string"),
ProjectRoleMappings: spectrocloud.TeamProjectRoleMappingArray{
&spectrocloud.TeamProjectRoleMappingArgs{
Id: pulumi.String("string"),
Roles: pulumi.StringArray{
pulumi.String("string"),
},
},
},
TeamId: pulumi.String("string"),
TenantRoleMappings: pulumi.StringArray{
pulumi.String("string"),
},
Timeouts: &spectrocloud.TeamTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
Users: pulumi.StringArray{
pulumi.String("string"),
},
WorkspaceRoleMappings: spectrocloud.TeamWorkspaceRoleMappingArray{
&spectrocloud.TeamWorkspaceRoleMappingArgs{
Id: pulumi.String("string"),
Workspaces: spectrocloud.TeamWorkspaceRoleMappingWorkspaceArray{
&spectrocloud.TeamWorkspaceRoleMappingWorkspaceArgs{
Id: pulumi.String("string"),
Roles: pulumi.StringArray{
pulumi.String("string"),
},
},
},
},
},
})
var teamResource = new Team("teamResource", TeamArgs.builder()
.name("string")
.projectRoleMappings(TeamProjectRoleMappingArgs.builder()
.id("string")
.roles("string")
.build())
.teamId("string")
.tenantRoleMappings("string")
.timeouts(TeamTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.users("string")
.workspaceRoleMappings(TeamWorkspaceRoleMappingArgs.builder()
.id("string")
.workspaces(TeamWorkspaceRoleMappingWorkspaceArgs.builder()
.id("string")
.roles("string")
.build())
.build())
.build());
team_resource = spectrocloud.Team("teamResource",
name="string",
project_role_mappings=[{
"id": "string",
"roles": ["string"],
}],
team_id="string",
tenant_role_mappings=["string"],
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
users=["string"],
workspace_role_mappings=[{
"id": "string",
"workspaces": [{
"id": "string",
"roles": ["string"],
}],
}])
const teamResource = new spectrocloud.Team("teamResource", {
name: "string",
projectRoleMappings: [{
id: "string",
roles: ["string"],
}],
teamId: "string",
tenantRoleMappings: ["string"],
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
users: ["string"],
workspaceRoleMappings: [{
id: "string",
workspaces: [{
id: "string",
roles: ["string"],
}],
}],
});
type: spectrocloud:Team
properties:
name: string
projectRoleMappings:
- id: string
roles:
- string
teamId: string
tenantRoleMappings:
- string
timeouts:
create: string
delete: string
update: string
users:
- string
workspaceRoleMappings:
- id: string
workspaces:
- id: string
roles:
- string
Team 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 Team resource accepts the following input properties:
- Name string
- Name of the team.
- Project
Role List<TeamMappings Project Role Mapping> - List of project roles to be associated with the team.
- Team
Id string - The ID of this resource.
- Tenant
Role List<string>Mappings - List of tenant role ids to be associated with the team.
- Timeouts
Team
Timeouts - Users List<string>
- List of user ids to be associated with the team.
- Workspace
Role List<TeamMappings Workspace Role Mapping> - List of workspace roles to be associated with the team.
- Name string
- Name of the team.
- Project
Role []TeamMappings Project Role Mapping Args - List of project roles to be associated with the team.
- Team
Id string - The ID of this resource.
- Tenant
Role []stringMappings - List of tenant role ids to be associated with the team.
- Timeouts
Team
Timeouts Args - Users []string
- List of user ids to be associated with the team.
- Workspace
Role []TeamMappings Workspace Role Mapping Args - List of workspace roles to be associated with the team.
- name String
- Name of the team.
- project
Role List<TeamMappings Project Role Mapping> - List of project roles to be associated with the team.
- team
Id String - The ID of this resource.
- tenant
Role List<String>Mappings - List of tenant role ids to be associated with the team.
- timeouts
Team
Timeouts - users List<String>
- List of user ids to be associated with the team.
- workspace
Role List<TeamMappings Workspace Role Mapping> - List of workspace roles to be associated with the team.
- name string
- Name of the team.
- project
Role TeamMappings Project Role Mapping[] - List of project roles to be associated with the team.
- team
Id string - The ID of this resource.
- tenant
Role string[]Mappings - List of tenant role ids to be associated with the team.
- timeouts
Team
Timeouts - users string[]
- List of user ids to be associated with the team.
- workspace
Role TeamMappings Workspace Role Mapping[] - List of workspace roles to be associated with the team.
- name str
- Name of the team.
- project_
role_ Sequence[Teammappings Project Role Mapping Args] - List of project roles to be associated with the team.
- team_
id str - The ID of this resource.
- tenant_
role_ Sequence[str]mappings - List of tenant role ids to be associated with the team.
- timeouts
Team
Timeouts Args - users Sequence[str]
- List of user ids to be associated with the team.
- workspace_
role_ Sequence[Teammappings Workspace Role Mapping Args] - List of workspace roles to be associated with the team.
- name String
- Name of the team.
- project
Role List<Property Map>Mappings - List of project roles to be associated with the team.
- team
Id String - The ID of this resource.
- tenant
Role List<String>Mappings - List of tenant role ids to be associated with the team.
- timeouts Property Map
- users List<String>
- List of user ids to be associated with the team.
- workspace
Role List<Property Map>Mappings - List of workspace roles to be associated with the team.
Outputs
All input properties are implicitly available as output properties. Additionally, the Team 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 Team Resource
Get an existing Team 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?: TeamState, opts?: CustomResourceOptions): Team
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
project_role_mappings: Optional[Sequence[TeamProjectRoleMappingArgs]] = None,
team_id: Optional[str] = None,
tenant_role_mappings: Optional[Sequence[str]] = None,
timeouts: Optional[TeamTimeoutsArgs] = None,
users: Optional[Sequence[str]] = None,
workspace_role_mappings: Optional[Sequence[TeamWorkspaceRoleMappingArgs]] = None) -> Team
func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
public static Team get(String name, Output<String> id, TeamState state, CustomResourceOptions options)
resources: _: type: spectrocloud:Team 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
- Name of the team.
- Project
Role List<TeamMappings Project Role Mapping> - List of project roles to be associated with the team.
- Team
Id string - The ID of this resource.
- Tenant
Role List<string>Mappings - List of tenant role ids to be associated with the team.
- Timeouts
Team
Timeouts - Users List<string>
- List of user ids to be associated with the team.
- Workspace
Role List<TeamMappings Workspace Role Mapping> - List of workspace roles to be associated with the team.
- Name string
- Name of the team.
- Project
Role []TeamMappings Project Role Mapping Args - List of project roles to be associated with the team.
- Team
Id string - The ID of this resource.
- Tenant
Role []stringMappings - List of tenant role ids to be associated with the team.
- Timeouts
Team
Timeouts Args - Users []string
- List of user ids to be associated with the team.
- Workspace
Role []TeamMappings Workspace Role Mapping Args - List of workspace roles to be associated with the team.
- name String
- Name of the team.
- project
Role List<TeamMappings Project Role Mapping> - List of project roles to be associated with the team.
- team
Id String - The ID of this resource.
- tenant
Role List<String>Mappings - List of tenant role ids to be associated with the team.
- timeouts
Team
Timeouts - users List<String>
- List of user ids to be associated with the team.
- workspace
Role List<TeamMappings Workspace Role Mapping> - List of workspace roles to be associated with the team.
- name string
- Name of the team.
- project
Role TeamMappings Project Role Mapping[] - List of project roles to be associated with the team.
- team
Id string - The ID of this resource.
- tenant
Role string[]Mappings - List of tenant role ids to be associated with the team.
- timeouts
Team
Timeouts - users string[]
- List of user ids to be associated with the team.
- workspace
Role TeamMappings Workspace Role Mapping[] - List of workspace roles to be associated with the team.
- name str
- Name of the team.
- project_
role_ Sequence[Teammappings Project Role Mapping Args] - List of project roles to be associated with the team.
- team_
id str - The ID of this resource.
- tenant_
role_ Sequence[str]mappings - List of tenant role ids to be associated with the team.
- timeouts
Team
Timeouts Args - users Sequence[str]
- List of user ids to be associated with the team.
- workspace_
role_ Sequence[Teammappings Workspace Role Mapping Args] - List of workspace roles to be associated with the team.
- name String
- Name of the team.
- project
Role List<Property Map>Mappings - List of project roles to be associated with the team.
- team
Id String - The ID of this resource.
- tenant
Role List<String>Mappings - List of tenant role ids to be associated with the team.
- timeouts Property Map
- users List<String>
- List of user ids to be associated with the team.
- workspace
Role List<Property Map>Mappings - List of workspace roles to be associated with the team.
Supporting Types
TeamProjectRoleMapping, TeamProjectRoleMappingArgs
TeamTimeouts, TeamTimeoutsArgs
TeamWorkspaceRoleMapping, TeamWorkspaceRoleMappingArgs
- Id string
- Project id to be associated with the team.
- Workspaces
List<Team
Workspace Role Mapping Workspace> - List of workspace roles to be associated with the team.
- Id string
- Project id to be associated with the team.
- Workspaces
[]Team
Workspace Role Mapping Workspace - List of workspace roles to be associated with the team.
- id String
- Project id to be associated with the team.
- workspaces
List<Team
Workspace Role Mapping Workspace> - List of workspace roles to be associated with the team.
- id string
- Project id to be associated with the team.
- workspaces
Team
Workspace Role Mapping Workspace[] - List of workspace roles to be associated with the team.
- id str
- Project id to be associated with the team.
- workspaces
Sequence[Team
Workspace Role Mapping Workspace] - List of workspace roles to be associated with the team.
- id String
- Project id to be associated with the team.
- workspaces List<Property Map>
- List of workspace roles to be associated with the team.
TeamWorkspaceRoleMappingWorkspace, TeamWorkspaceRoleMappingWorkspaceArgs
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloud
Terraform Provider.