1. Packages
  2. Grafana Cloud
  3. API Docs
  4. ServiceAccount
Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse

grafana.ServiceAccount

Explore with Pulumi AI

grafana logo
Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse
    Deprecated: grafana.index/serviceaccount.ServiceAccount has been deprecated in favor of grafana.oss/serviceaccount.ServiceAccount

    Note: This resource is available only with Grafana 9.1+.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const admin = new grafana.oss.ServiceAccount("admin", {
        name: "admin sa",
        role: "Admin",
        isDisabled: false,
    });
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    admin = grafana.oss.ServiceAccount("admin",
        name="admin sa",
        role="Admin",
        is_disabled=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/oss"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := oss.NewServiceAccount(ctx, "admin", &oss.ServiceAccountArgs{
    			Name:       pulumi.String("admin sa"),
    			Role:       pulumi.String("Admin"),
    			IsDisabled: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Pulumiverse.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var admin = new Grafana.Oss.ServiceAccount("admin", new()
        {
            Name = "admin sa",
            Role = "Admin",
            IsDisabled = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.oss.ServiceAccount;
    import com.pulumi.grafana.oss.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 admin = new ServiceAccount("admin", ServiceAccountArgs.builder()
                .name("admin sa")
                .role("Admin")
                .isDisabled(false)
                .build());
    
        }
    }
    
    resources:
      admin:
        type: grafana:oss:ServiceAccount
        properties:
          name: admin sa
          role: Admin
          isDisabled: false
    

    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,
                       is_disabled: Optional[bool] = None,
                       name: Optional[str] = None,
                       org_id: Optional[str] = None,
                       role: 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: grafana: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.

    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:

    Role string
    The basic role of the service account in the organization.
    IsDisabled bool
    The disabled status for the service account. Defaults to false.
    Name string
    The name of the service account.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Role string
    The basic role of the service account in the organization.
    IsDisabled bool
    The disabled status for the service account. Defaults to false.
    Name string
    The name of the service account.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role String
    The basic role of the service account in the organization.
    isDisabled Boolean
    The disabled status for the service account. Defaults to false.
    name String
    The name of the service account.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role string
    The basic role of the service account in the organization.
    isDisabled boolean
    The disabled status for the service account. Defaults to false.
    name string
    The name of the service account.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role str
    The basic role of the service account in the organization.
    is_disabled bool
    The disabled status for the service account. Defaults to false.
    name str
    The name of the service account.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role String
    The basic role of the service account in the organization.
    isDisabled Boolean
    The disabled status for the service account. Defaults to false.
    name String
    The name of the service account.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServiceAccount 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 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,
            is_disabled: Optional[bool] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            role: 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)
    Resource lookup is not supported in YAML
    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:
    IsDisabled bool
    The disabled status for the service account. Defaults to false.
    Name string
    The name of the service account.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Role string
    The basic role of the service account in the organization.
    IsDisabled bool
    The disabled status for the service account. Defaults to false.
    Name string
    The name of the service account.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Role string
    The basic role of the service account in the organization.
    isDisabled Boolean
    The disabled status for the service account. Defaults to false.
    name String
    The name of the service account.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role String
    The basic role of the service account in the organization.
    isDisabled boolean
    The disabled status for the service account. Defaults to false.
    name string
    The name of the service account.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role string
    The basic role of the service account in the organization.
    is_disabled bool
    The disabled status for the service account. Defaults to false.
    name str
    The name of the service account.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role str
    The basic role of the service account in the organization.
    isDisabled Boolean
    The disabled status for the service account. Defaults to false.
    name String
    The name of the service account.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    role String
    The basic role of the service account in the organization.

    Import

    $ pulumi import grafana:index/serviceAccount:ServiceAccount name "{{ id }}"
    
    $ pulumi import grafana:index/serviceAccount:ServiceAccount name "{{ orgID }}:{{ id }}"
    

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

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse