sysdig.TeamServiceAccount
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sysdig from "@pulumi/sysdig";
import * as time from "@pulumi/time";
const example = new time.index.Time_static("example", {rfc3339: "2025-01-01T00:00:00Z"});
const devops = new sysdig.MonitorTeam("devops", {entrypoints: [{
type: "Explore",
}]});
const service_account = new sysdig.TeamServiceAccount("service-account", {
role: "ROLE_TEAM_READ",
expirationDate: example.unix,
teamId: devops.monitorTeamId,
});
import pulumi
import pulumi_sysdig as sysdig
import pulumi_time as time
example = time.index.Time_static("example", rfc3339=2025-01-01T00:00:00Z)
devops = sysdig.MonitorTeam("devops", entrypoints=[{
"type": "Explore",
}])
service_account = sysdig.TeamServiceAccount("service-account",
role="ROLE_TEAM_READ",
expiration_date=example["unix"],
team_id=devops.monitor_team_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sysdig/sysdig"
"github.com/pulumi/pulumi-time/sdk/go/time"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := time.NewTime_static(ctx, "example", &time.Time_staticArgs{
Rfc3339: "2025-01-01T00:00:00Z",
})
if err != nil {
return err
}
devops, err := sysdig.NewMonitorTeam(ctx, "devops", &sysdig.MonitorTeamArgs{
Entrypoints: sysdig.MonitorTeamEntrypointArray{
&sysdig.MonitorTeamEntrypointArgs{
Type: pulumi.String("Explore"),
},
},
})
if err != nil {
return err
}
_, err = sysdig.NewTeamServiceAccount(ctx, "service-account", &sysdig.TeamServiceAccountArgs{
Role: pulumi.String("ROLE_TEAM_READ"),
ExpirationDate: example.Unix,
TeamId: devops.MonitorTeamId,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sysdig = Pulumi.Sysdig;
using Time = Pulumi.Time;
return await Deployment.RunAsync(() =>
{
var example = new Time.Index.Time_static("example", new()
{
Rfc3339 = "2025-01-01T00:00:00Z",
});
var devops = new Sysdig.MonitorTeam("devops", new()
{
Entrypoints = new[]
{
new Sysdig.Inputs.MonitorTeamEntrypointArgs
{
Type = "Explore",
},
},
});
var service_account = new Sysdig.TeamServiceAccount("service-account", new()
{
Role = "ROLE_TEAM_READ",
ExpirationDate = example.Unix,
TeamId = devops.MonitorTeamId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.time.time_static;
import com.pulumi.time.Time_staticArgs;
import com.pulumi.sysdig.MonitorTeam;
import com.pulumi.sysdig.MonitorTeamArgs;
import com.pulumi.sysdig.inputs.MonitorTeamEntrypointArgs;
import com.pulumi.sysdig.TeamServiceAccount;
import com.pulumi.sysdig.TeamServiceAccountArgs;
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) {
var example = new Time_static("example", Time_staticArgs.builder()
.rfc3339("2025-01-01T00:00:00Z")
.build());
var devops = new MonitorTeam("devops", MonitorTeamArgs.builder()
.entrypoints(MonitorTeamEntrypointArgs.builder()
.type("Explore")
.build())
.build());
var service_account = new TeamServiceAccount("service-account", TeamServiceAccountArgs.builder()
.role("ROLE_TEAM_READ")
.expirationDate(example.unix())
.teamId(devops.monitorTeamId())
.build());
}
}
resources:
example:
type: time:time_static
properties:
rfc3339: 2025-01-01T00:00:00Z
devops:
type: sysdig:MonitorTeam
properties:
entrypoints:
- type: Explore
service-account:
type: sysdig:TeamServiceAccount
properties:
role: ROLE_TEAM_READ
expirationDate: ${example.unix}
teamId: ${devops.monitorTeamId}
Create TeamServiceAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TeamServiceAccount(name: string, args: TeamServiceAccountArgs, opts?: CustomResourceOptions);
@overload
def TeamServiceAccount(resource_name: str,
args: TeamServiceAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TeamServiceAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
expiration_date: Optional[float] = None,
team_id: Optional[float] = None,
name: Optional[str] = None,
role: Optional[str] = None,
system_role: Optional[str] = None,
team_service_account_id: Optional[str] = None,
timeouts: Optional[TeamServiceAccountTimeoutsArgs] = None)
func NewTeamServiceAccount(ctx *Context, name string, args TeamServiceAccountArgs, opts ...ResourceOption) (*TeamServiceAccount, error)
public TeamServiceAccount(string name, TeamServiceAccountArgs args, CustomResourceOptions? opts = null)
public TeamServiceAccount(String name, TeamServiceAccountArgs args)
public TeamServiceAccount(String name, TeamServiceAccountArgs args, CustomResourceOptions options)
type: sysdig:TeamServiceAccount
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 TeamServiceAccountArgs
- 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 TeamServiceAccountArgs
- 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 TeamServiceAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeamServiceAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TeamServiceAccountArgs
- 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 teamServiceAccountResource = new Sysdig.TeamServiceAccount("teamServiceAccountResource", new()
{
ExpirationDate = 0,
TeamId = 0,
Name = "string",
Role = "string",
SystemRole = "string",
TeamServiceAccountId = "string",
Timeouts = new Sysdig.Inputs.TeamServiceAccountTimeoutsArgs
{
Create = "string",
Delete = "string",
Read = "string",
Update = "string",
},
});
example, err := sysdig.NewTeamServiceAccount(ctx, "teamServiceAccountResource", &sysdig.TeamServiceAccountArgs{
ExpirationDate: pulumi.Float64(0),
TeamId: pulumi.Float64(0),
Name: pulumi.String("string"),
Role: pulumi.String("string"),
SystemRole: pulumi.String("string"),
TeamServiceAccountId: pulumi.String("string"),
Timeouts: &sysdig.TeamServiceAccountTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var teamServiceAccountResource = new TeamServiceAccount("teamServiceAccountResource", TeamServiceAccountArgs.builder()
.expirationDate(0)
.teamId(0)
.name("string")
.role("string")
.systemRole("string")
.teamServiceAccountId("string")
.timeouts(TeamServiceAccountTimeoutsArgs.builder()
.create("string")
.delete("string")
.read("string")
.update("string")
.build())
.build());
team_service_account_resource = sysdig.TeamServiceAccount("teamServiceAccountResource",
expiration_date=0,
team_id=0,
name="string",
role="string",
system_role="string",
team_service_account_id="string",
timeouts={
"create": "string",
"delete": "string",
"read": "string",
"update": "string",
})
const teamServiceAccountResource = new sysdig.TeamServiceAccount("teamServiceAccountResource", {
expirationDate: 0,
teamId: 0,
name: "string",
role: "string",
systemRole: "string",
teamServiceAccountId: "string",
timeouts: {
create: "string",
"delete": "string",
read: "string",
update: "string",
},
});
type: sysdig:TeamServiceAccount
properties:
expirationDate: 0
name: string
role: string
systemRole: string
teamId: 0
teamServiceAccountId: string
timeouts:
create: string
delete: string
read: string
update: string
TeamServiceAccount 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 TeamServiceAccount resource accepts the following input properties:
- Expiration
Date double - The service account expiration date.
- Team
Id double - The team where the service account belongs to.
- Name string
- The team service account name.
- Role string
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- System
Role string - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- Team
Service stringAccount Id - Timeouts
Team
Service Account Timeouts
- Expiration
Date float64 - The service account expiration date.
- Team
Id float64 - The team where the service account belongs to.
- Name string
- The team service account name.
- Role string
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- System
Role string - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- Team
Service stringAccount Id - Timeouts
Team
Service Account Timeouts Args
- expiration
Date Double - The service account expiration date.
- team
Id Double - The team where the service account belongs to.
- name String
- The team service account name.
- role String
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- system
Role String - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- team
Service StringAccount Id - timeouts
Team
Service Account Timeouts
- expiration
Date number - The service account expiration date.
- team
Id number - The team where the service account belongs to.
- name string
- The team service account name.
- role string
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- system
Role string - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- team
Service stringAccount Id - timeouts
Team
Service Account Timeouts
- expiration_
date float - The service account expiration date.
- team_
id float - The team where the service account belongs to.
- name str
- The team service account name.
- role str
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- system_
role str - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- team_
service_ straccount_ id - timeouts
Team
Service Account Timeouts Args
- expiration
Date Number - The service account expiration date.
- team
Id Number - The team where the service account belongs to.
- name String
- The team service account name.
- role String
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- system
Role String - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- team
Service StringAccount Id - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the TeamServiceAccount resource produces the following output properties:
- Api
Key string - The api key to be using in API calls
- Date
Created double - The team service account creation date
- Id string
- The provider-assigned unique ID for this managed resource.
- Api
Key string - The api key to be using in API calls
- Date
Created float64 - The team service account creation date
- Id string
- The provider-assigned unique ID for this managed resource.
- api
Key String - The api key to be using in API calls
- date
Created Double - The team service account creation date
- id String
- The provider-assigned unique ID for this managed resource.
- api
Key string - The api key to be using in API calls
- date
Created number - The team service account creation date
- id string
- The provider-assigned unique ID for this managed resource.
- api_
key str - The api key to be using in API calls
- date_
created float - The team service account creation date
- id str
- The provider-assigned unique ID for this managed resource.
- api
Key String - The api key to be using in API calls
- date
Created Number - The team service account creation date
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TeamServiceAccount Resource
Get an existing TeamServiceAccount 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?: TeamServiceAccountState, opts?: CustomResourceOptions): TeamServiceAccount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_key: Optional[str] = None,
date_created: Optional[float] = None,
expiration_date: Optional[float] = None,
name: Optional[str] = None,
role: Optional[str] = None,
system_role: Optional[str] = None,
team_id: Optional[float] = None,
team_service_account_id: Optional[str] = None,
timeouts: Optional[TeamServiceAccountTimeoutsArgs] = None) -> TeamServiceAccount
func GetTeamServiceAccount(ctx *Context, name string, id IDInput, state *TeamServiceAccountState, opts ...ResourceOption) (*TeamServiceAccount, error)
public static TeamServiceAccount Get(string name, Input<string> id, TeamServiceAccountState? state, CustomResourceOptions? opts = null)
public static TeamServiceAccount get(String name, Output<String> id, TeamServiceAccountState state, CustomResourceOptions options)
resources: _: type: sysdig:TeamServiceAccount 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.
- Api
Key string - The api key to be using in API calls
- Date
Created double - The team service account creation date
- Expiration
Date double - The service account expiration date.
- Name string
- The team service account name.
- Role string
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- System
Role string - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- Team
Id double - The team where the service account belongs to.
- Team
Service stringAccount Id - Timeouts
Team
Service Account Timeouts
- Api
Key string - The api key to be using in API calls
- Date
Created float64 - The team service account creation date
- Expiration
Date float64 - The service account expiration date.
- Name string
- The team service account name.
- Role string
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- System
Role string - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- Team
Id float64 - The team where the service account belongs to.
- Team
Service stringAccount Id - Timeouts
Team
Service Account Timeouts Args
- api
Key String - The api key to be using in API calls
- date
Created Double - The team service account creation date
- expiration
Date Double - The service account expiration date.
- name String
- The team service account name.
- role String
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- system
Role String - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- team
Id Double - The team where the service account belongs to.
- team
Service StringAccount Id - timeouts
Team
Service Account Timeouts
- api
Key string - The api key to be using in API calls
- date
Created number - The team service account creation date
- expiration
Date number - The service account expiration date.
- name string
- The team service account name.
- role string
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- system
Role string - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- team
Id number - The team where the service account belongs to.
- team
Service stringAccount Id - timeouts
Team
Service Account Timeouts
- api_
key str - The api key to be using in API calls
- date_
created float - The team service account creation date
- expiration_
date float - The service account expiration date.
- name str
- The team service account name.
- role str
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- system_
role str - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- team_
id float - The team where the service account belongs to.
- team_
service_ straccount_ id - timeouts
Team
Service Account Timeouts Args
- api
Key String - The api key to be using in API calls
- date
Created Number - The team service account creation date
- expiration
Date Number - The service account expiration date.
- name String
- The team service account name.
- role String
- The role that is assigned to the service account. It can be a standard role or a custom team role ID.
- system
Role String - The service account system role. The only value supported is
ROLE_SERVICE_ACCOUNT
- team
Id Number - The team where the service account belongs to.
- team
Service StringAccount Id - timeouts Property Map
Supporting Types
TeamServiceAccountTimeouts, TeamServiceAccountTimeoutsArgs
Import
Sysdig team service account can be imported using the ID, e.g.
$ pulumi import sysdig:index/teamServiceAccount:TeamServiceAccount my_team_service_account 10
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- sysdig sysdiglabs/terraform-provider-sysdig
- License
- Notes
- This Pulumi package is based on the
sysdig
Terraform Provider.