1. Packages
  2. Grafana Cloud
  3. API Docs
  4. ServiceAccountToken
Grafana v0.4.2 published on Monday, Apr 15, 2024 by pulumiverse

grafana.ServiceAccountToken

Explore with Pulumi AI

grafana logo
Grafana v0.4.2 published on Monday, Apr 15, 2024 by pulumiverse

    Create ServiceAccountToken Resource

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

    Constructor syntax

    new ServiceAccountToken(name: string, args: ServiceAccountTokenArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceAccountToken(resource_name: str,
                            args: ServiceAccountTokenArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceAccountToken(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            service_account_id: Optional[str] = None,
                            name: Optional[str] = None,
                            seconds_to_live: Optional[int] = None)
    func NewServiceAccountToken(ctx *Context, name string, args ServiceAccountTokenArgs, opts ...ResourceOption) (*ServiceAccountToken, error)
    public ServiceAccountToken(string name, ServiceAccountTokenArgs args, CustomResourceOptions? opts = null)
    public ServiceAccountToken(String name, ServiceAccountTokenArgs args)
    public ServiceAccountToken(String name, ServiceAccountTokenArgs args, CustomResourceOptions options)
    
    type: grafana:ServiceAccountToken
    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 ServiceAccountTokenArgs
    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 ServiceAccountTokenArgs
    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 ServiceAccountTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceAccountTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceAccountTokenArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var serviceAccountTokenResource = new Grafana.ServiceAccountToken("serviceAccountTokenResource", new()
    {
        ServiceAccountId = "string",
        Name = "string",
        SecondsToLive = 0,
    });
    
    example, err := grafana.NewServiceAccountToken(ctx, "serviceAccountTokenResource", &grafana.ServiceAccountTokenArgs{
    	ServiceAccountId: pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	SecondsToLive:    pulumi.Int(0),
    })
    
    var serviceAccountTokenResource = new ServiceAccountToken("serviceAccountTokenResource", ServiceAccountTokenArgs.builder()        
        .serviceAccountId("string")
        .name("string")
        .secondsToLive(0)
        .build());
    
    service_account_token_resource = grafana.ServiceAccountToken("serviceAccountTokenResource",
        service_account_id="string",
        name="string",
        seconds_to_live=0)
    
    const serviceAccountTokenResource = new grafana.ServiceAccountToken("serviceAccountTokenResource", {
        serviceAccountId: "string",
        name: "string",
        secondsToLive: 0,
    });
    
    type: grafana:ServiceAccountToken
    properties:
        name: string
        secondsToLive: 0
        serviceAccountId: string
    

    ServiceAccountToken Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ServiceAccountToken resource accepts the following input properties:

    ServiceAccountId string
    The ID of the service account to which the token belongs.
    Name string
    The name of the service account token.
    SecondsToLive int
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    ServiceAccountId string
    The ID of the service account to which the token belongs.
    Name string
    The name of the service account token.
    SecondsToLive int
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    serviceAccountId String
    The ID of the service account to which the token belongs.
    name String
    The name of the service account token.
    secondsToLive Integer
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    serviceAccountId string
    The ID of the service account to which the token belongs.
    name string
    The name of the service account token.
    secondsToLive number
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    service_account_id str
    The ID of the service account to which the token belongs.
    name str
    The name of the service account token.
    seconds_to_live int
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    serviceAccountId String
    The ID of the service account to which the token belongs.
    name String
    The name of the service account token.
    secondsToLive Number
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.

    Outputs

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

    Expiration string
    The expiration date of the service account token.
    HasExpired bool
    The status of the service account token.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    The key of the service account token.
    Expiration string
    The expiration date of the service account token.
    HasExpired bool
    The status of the service account token.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    The key of the service account token.
    expiration String
    The expiration date of the service account token.
    hasExpired Boolean
    The status of the service account token.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    The key of the service account token.
    expiration string
    The expiration date of the service account token.
    hasExpired boolean
    The status of the service account token.
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    The key of the service account token.
    expiration str
    The expiration date of the service account token.
    has_expired bool
    The status of the service account token.
    id str
    The provider-assigned unique ID for this managed resource.
    key str
    The key of the service account token.
    expiration String
    The expiration date of the service account token.
    hasExpired Boolean
    The status of the service account token.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    The key of the service account token.

    Look up Existing ServiceAccountToken Resource

    Get an existing ServiceAccountToken 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?: ServiceAccountTokenState, opts?: CustomResourceOptions): ServiceAccountToken
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            expiration: Optional[str] = None,
            has_expired: Optional[bool] = None,
            key: Optional[str] = None,
            name: Optional[str] = None,
            seconds_to_live: Optional[int] = None,
            service_account_id: Optional[str] = None) -> ServiceAccountToken
    func GetServiceAccountToken(ctx *Context, name string, id IDInput, state *ServiceAccountTokenState, opts ...ResourceOption) (*ServiceAccountToken, error)
    public static ServiceAccountToken Get(string name, Input<string> id, ServiceAccountTokenState? state, CustomResourceOptions? opts = null)
    public static ServiceAccountToken get(String name, Output<String> id, ServiceAccountTokenState 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:
    Expiration string
    The expiration date of the service account token.
    HasExpired bool
    The status of the service account token.
    Key string
    The key of the service account token.
    Name string
    The name of the service account token.
    SecondsToLive int
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    ServiceAccountId string
    The ID of the service account to which the token belongs.
    Expiration string
    The expiration date of the service account token.
    HasExpired bool
    The status of the service account token.
    Key string
    The key of the service account token.
    Name string
    The name of the service account token.
    SecondsToLive int
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    ServiceAccountId string
    The ID of the service account to which the token belongs.
    expiration String
    The expiration date of the service account token.
    hasExpired Boolean
    The status of the service account token.
    key String
    The key of the service account token.
    name String
    The name of the service account token.
    secondsToLive Integer
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    serviceAccountId String
    The ID of the service account to which the token belongs.
    expiration string
    The expiration date of the service account token.
    hasExpired boolean
    The status of the service account token.
    key string
    The key of the service account token.
    name string
    The name of the service account token.
    secondsToLive number
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    serviceAccountId string
    The ID of the service account to which the token belongs.
    expiration str
    The expiration date of the service account token.
    has_expired bool
    The status of the service account token.
    key str
    The key of the service account token.
    name str
    The name of the service account token.
    seconds_to_live int
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    service_account_id str
    The ID of the service account to which the token belongs.
    expiration String
    The expiration date of the service account token.
    hasExpired Boolean
    The status of the service account token.
    key String
    The key of the service account token.
    name String
    The name of the service account token.
    secondsToLive Number
    The key expiration in seconds. It is optional. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
    serviceAccountId String
    The ID of the service account to which the token belongs.

    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.4.2 published on Monday, Apr 15, 2024 by pulumiverse