1. Packages
  2. Dome9 Provider
  3. API Docs
  4. ServiceAccount
dome9 1.40.3 published on Monday, Apr 14, 2025 by dome9

dome9.ServiceAccount

Explore with Pulumi AI

dome9 logo
dome9 1.40.3 published on Monday, Apr 14, 2025 by dome9

    This resource is used to create and manage Dome9 Service Account. Service Account is an account created explicitly to provide credentials and security context for a service.

    Example Usage

    Basic usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as dome9 from "@pulumi/dome9";
    
    const serviceAccount = new dome9.ServiceAccount("serviceAccount", {roleIds: []});
    
    import pulumi
    import pulumi_dome9 as dome9
    
    service_account = dome9.ServiceAccount("serviceAccount", role_ids=[])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/dome9/dome9"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dome9.NewServiceAccount(ctx, "serviceAccount", &dome9.ServiceAccountArgs{
    			RoleIds: pulumi.Float64Array{},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dome9 = Pulumi.Dome9;
    
    return await Deployment.RunAsync(() => 
    {
        var serviceAccount = new Dome9.ServiceAccount("serviceAccount", new()
        {
            RoleIds = new[] {},
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dome9.ServiceAccount;
    import com.pulumi.dome9.ServiceAccountArgs;
    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 serviceAccount = new ServiceAccount("serviceAccount", ServiceAccountArgs.builder()
                .roleIds()
                .build());
    
        }
    }
    
    resources:
      serviceAccount:
        type: dome9:ServiceAccount
        properties:
          roleIds: []
    

    Create ServiceAccount Resource

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

    Constructor syntax

    new ServiceAccount(name: string, args: ServiceAccountArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceAccount(resource_name: str,
                       args: ServiceAccountArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceAccount(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       role_ids: Optional[Sequence[float]] = None,
                       name: Optional[str] = None,
                       service_account_id: Optional[str] = None)
    func NewServiceAccount(ctx *Context, name string, args ServiceAccountArgs, opts ...ResourceOption) (*ServiceAccount, error)
    public ServiceAccount(string name, ServiceAccountArgs args, CustomResourceOptions? opts = null)
    public ServiceAccount(String name, ServiceAccountArgs args)
    public ServiceAccount(String name, ServiceAccountArgs args, CustomResourceOptions options)
    
    type: dome9:ServiceAccount
    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 ServiceAccountArgs
    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 ServiceAccountArgs
    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 ServiceAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceAccountArgs
    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 serviceAccountResource = new Dome9.ServiceAccount("serviceAccountResource", new()
    {
        RoleIds = new[]
        {
            0,
        },
        Name = "string",
        ServiceAccountId = "string",
    });
    
    example, err := dome9.NewServiceAccount(ctx, "serviceAccountResource", &dome9.ServiceAccountArgs{
    	RoleIds: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	Name:             pulumi.String("string"),
    	ServiceAccountId: pulumi.String("string"),
    })
    
    var serviceAccountResource = new ServiceAccount("serviceAccountResource", ServiceAccountArgs.builder()
        .roleIds(0)
        .name("string")
        .serviceAccountId("string")
        .build());
    
    service_account_resource = dome9.ServiceAccount("serviceAccountResource",
        role_ids=[0],
        name="string",
        service_account_id="string")
    
    const serviceAccountResource = new dome9.ServiceAccount("serviceAccountResource", {
        roleIds: [0],
        name: "string",
        serviceAccountId: "string",
    });
    
    type: dome9:ServiceAccount
    properties:
        name: string
        roleIds:
            - 0
        serviceAccountId: string
    

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

    RoleIds List<double>
    Dome9 role ids for the service account.
    Name string
    Dome9 service account name.
    ServiceAccountId string
    service account id.
    RoleIds []float64
    Dome9 role ids for the service account.
    Name string
    Dome9 service account name.
    ServiceAccountId string
    service account id.
    roleIds List<Double>
    Dome9 role ids for the service account.
    name String
    Dome9 service account name.
    serviceAccountId String
    service account id.
    roleIds number[]
    Dome9 role ids for the service account.
    name string
    Dome9 service account name.
    serviceAccountId string
    service account id.
    role_ids Sequence[float]
    Dome9 role ids for the service account.
    name str
    Dome9 service account name.
    service_account_id str
    service account id.
    roleIds List<Number>
    Dome9 role ids for the service account.
    name String
    Dome9 service account name.
    serviceAccountId String
    service account id.

    Outputs

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

    ApiKeyId string
    api key.
    ApiKeySecret string
    secret.
    Id string
    The provider-assigned unique ID for this managed resource.
    ApiKeyId string
    api key.
    ApiKeySecret string
    secret.
    Id string
    The provider-assigned unique ID for this managed resource.
    apiKeyId String
    api key.
    apiKeySecret String
    secret.
    id String
    The provider-assigned unique ID for this managed resource.
    apiKeyId string
    api key.
    apiKeySecret string
    secret.
    id string
    The provider-assigned unique ID for this managed resource.
    api_key_id str
    api key.
    api_key_secret str
    secret.
    id str
    The provider-assigned unique ID for this managed resource.
    apiKeyId String
    api key.
    apiKeySecret String
    secret.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ServiceAccount Resource

    Get an existing ServiceAccount 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?: ServiceAccountState, opts?: CustomResourceOptions): ServiceAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_key_id: Optional[str] = None,
            api_key_secret: Optional[str] = None,
            name: Optional[str] = None,
            role_ids: Optional[Sequence[float]] = None,
            service_account_id: Optional[str] = None) -> ServiceAccount
    func GetServiceAccount(ctx *Context, name string, id IDInput, state *ServiceAccountState, opts ...ResourceOption) (*ServiceAccount, error)
    public static ServiceAccount Get(string name, Input<string> id, ServiceAccountState? state, CustomResourceOptions? opts = null)
    public static ServiceAccount get(String name, Output<String> id, ServiceAccountState state, CustomResourceOptions options)
    resources:  _:    type: dome9:ServiceAccount    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.
    The following state arguments are supported:
    ApiKeyId string
    api key.
    ApiKeySecret string
    secret.
    Name string
    Dome9 service account name.
    RoleIds List<double>
    Dome9 role ids for the service account.
    ServiceAccountId string
    service account id.
    ApiKeyId string
    api key.
    ApiKeySecret string
    secret.
    Name string
    Dome9 service account name.
    RoleIds []float64
    Dome9 role ids for the service account.
    ServiceAccountId string
    service account id.
    apiKeyId String
    api key.
    apiKeySecret String
    secret.
    name String
    Dome9 service account name.
    roleIds List<Double>
    Dome9 role ids for the service account.
    serviceAccountId String
    service account id.
    apiKeyId string
    api key.
    apiKeySecret string
    secret.
    name string
    Dome9 service account name.
    roleIds number[]
    Dome9 role ids for the service account.
    serviceAccountId string
    service account id.
    api_key_id str
    api key.
    api_key_secret str
    secret.
    name str
    Dome9 service account name.
    role_ids Sequence[float]
    Dome9 role ids for the service account.
    service_account_id str
    service account id.
    apiKeyId String
    api key.
    apiKeySecret String
    secret.
    name String
    Dome9 service account name.
    roleIds List<Number>
    Dome9 role ids for the service account.
    serviceAccountId String
    service account id.

    Import

    The service account can be imported; use <SERVICE ACCOUNT ID> as the import ID.

    For example:

    $ pulumi import dome9:index/serviceAccount:ServiceAccount service_account 00000
    

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

    Package Details

    Repository
    dome9 dome9/terraform-provider-dome9
    License
    Notes
    This Pulumi package is based on the dome9 Terraform Provider.
    dome9 logo
    dome9 1.40.3 published on Monday, Apr 14, 2025 by dome9