1. Packages
  2. Packages
  3. Datadog Provider
  4. API Docs
  5. ServiceAccessToken
Viewing docs for Datadog v5.5.1
published on Friday, Jun 5, 2026 by Pulumi
datadog logo
Viewing docs for Datadog v5.5.1
published on Friday, Jun 5, 2026 by Pulumi

    Provides a Datadog serviceAccessToken resource. This can be used to create and manage Datadog service access tokens (SATs). A SAT is an access token scoped to a service account; this resource is intentionally limited to service-account-owned tokens.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    // Source the permissions for scoped tokens
    const ddPerms = datadog.getPermissions({});
    // Create a long-lived Service Access Token (SAT) for monitor management
    const monitorManagementToken = new datadog.ServiceAccessToken("monitor_management_token", {
        serviceAccountId: "00000000-0000-1234-0000-000000000000",
        name: "Monitor Management Service Access Token",
        scopes: [
            ddPerms.then(ddPerms => ddPerms.permissions?.monitorsRead),
            ddPerms.then(ddPerms => ddPerms.permissions?.monitorsWrite),
        ],
    });
    // Create a Service Access Token (SAT) with a fixed expiration date.
    // The Datadog API caps expirations at 365 days from creation. expires_at is
    // immutable after creation; to rotate it, destroy and re-create the resource.
    const expiringToken = new datadog.ServiceAccessToken("expiring_token", {
        serviceAccountId: "00000000-0000-1234-0000-000000000000",
        name: "Short-lived CI Service Access Token",
        scopes: [ddPerms.then(ddPerms => ddPerms.permissions?.dashboardsRead)],
        expiresAt: "2027-01-01T00:00:00Z",
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    # Source the permissions for scoped tokens
    dd_perms = datadog.get_permissions()
    # Create a long-lived Service Access Token (SAT) for monitor management
    monitor_management_token = datadog.ServiceAccessToken("monitor_management_token",
        service_account_id="00000000-0000-1234-0000-000000000000",
        name="Monitor Management Service Access Token",
        scopes=[
            dd_perms.permissions["monitorsRead"],
            dd_perms.permissions["monitorsWrite"],
        ])
    # Create a Service Access Token (SAT) with a fixed expiration date.
    # The Datadog API caps expirations at 365 days from creation. expires_at is
    # immutable after creation; to rotate it, destroy and re-create the resource.
    expiring_token = datadog.ServiceAccessToken("expiring_token",
        service_account_id="00000000-0000-1234-0000-000000000000",
        name="Short-lived CI Service Access Token",
        scopes=[dd_perms.permissions["dashboardsRead"]],
        expires_at="2027-01-01T00:00:00Z")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v5/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Source the permissions for scoped tokens
    		ddPerms, err := datadog.GetPermissions(ctx, &datadog.GetPermissionsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		// Create a long-lived Service Access Token (SAT) for monitor management
    		_, err = datadog.NewServiceAccessToken(ctx, "monitor_management_token", &datadog.ServiceAccessTokenArgs{
    			ServiceAccountId: pulumi.String("00000000-0000-1234-0000-000000000000"),
    			Name:             pulumi.String("Monitor Management Service Access Token"),
    			Scopes: pulumi.StringArray{
    				pulumi.String(pulumi.String(ddPerms.Permissions.MonitorsRead)),
    				pulumi.String(pulumi.String(ddPerms.Permissions.MonitorsWrite)),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Create a Service Access Token (SAT) with a fixed expiration date.
    		// The Datadog API caps expirations at 365 days from creation. expires_at is
    		// immutable after creation; to rotate it, destroy and re-create the resource.
    		_, err = datadog.NewServiceAccessToken(ctx, "expiring_token", &datadog.ServiceAccessTokenArgs{
    			ServiceAccountId: pulumi.String("00000000-0000-1234-0000-000000000000"),
    			Name:             pulumi.String("Short-lived CI Service Access Token"),
    			Scopes: pulumi.StringArray{
    				pulumi.String(pulumi.String(ddPerms.Permissions.DashboardsRead)),
    			},
    			ExpiresAt: pulumi.String("2027-01-01T00:00:00Z"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        // Source the permissions for scoped tokens
        var ddPerms = Datadog.GetPermissions.Invoke();
    
        // Create a long-lived Service Access Token (SAT) for monitor management
        var monitorManagementToken = new Datadog.ServiceAccessToken("monitor_management_token", new()
        {
            ServiceAccountId = "00000000-0000-1234-0000-000000000000",
            Name = "Monitor Management Service Access Token",
            Scopes = new[]
            {
                ddPerms.Apply(getPermissionsResult => getPermissionsResult.Permissions?.MonitorsRead),
                ddPerms.Apply(getPermissionsResult => getPermissionsResult.Permissions?.MonitorsWrite),
            },
        });
    
        // Create a Service Access Token (SAT) with a fixed expiration date.
        // The Datadog API caps expirations at 365 days from creation. expires_at is
        // immutable after creation; to rotate it, destroy and re-create the resource.
        var expiringToken = new Datadog.ServiceAccessToken("expiring_token", new()
        {
            ServiceAccountId = "00000000-0000-1234-0000-000000000000",
            Name = "Short-lived CI Service Access Token",
            Scopes = new[]
            {
                ddPerms.Apply(getPermissionsResult => getPermissionsResult.Permissions?.DashboardsRead),
            },
            ExpiresAt = "2027-01-01T00:00:00Z",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.DatadogFunctions;
    import com.pulumi.datadog.inputs.GetPermissionsArgs;
    import com.pulumi.datadog.ServiceAccessToken;
    import com.pulumi.datadog.ServiceAccessTokenArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // Source the permissions for scoped tokens
            final var ddPerms = DatadogFunctions.getPermissions(GetPermissionsArgs.builder()
                .build());
    
            // Create a long-lived Service Access Token (SAT) for monitor management
            var monitorManagementToken = new ServiceAccessToken("monitorManagementToken", ServiceAccessTokenArgs.builder()
                .serviceAccountId("00000000-0000-1234-0000-000000000000")
                .name("Monitor Management Service Access Token")
                .scopes(            
                    ddPerms.permissions().monitorsRead(),
                    ddPerms.permissions().monitorsWrite())
                .build());
    
            // Create a Service Access Token (SAT) with a fixed expiration date.
            // The Datadog API caps expirations at 365 days from creation. expires_at is
            // immutable after creation; to rotate it, destroy and re-create the resource.
            var expiringToken = new ServiceAccessToken("expiringToken", ServiceAccessTokenArgs.builder()
                .serviceAccountId("00000000-0000-1234-0000-000000000000")
                .name("Short-lived CI Service Access Token")
                .scopes(ddPerms.permissions().dashboardsRead())
                .expiresAt("2027-01-01T00:00:00Z")
                .build());
    
        }
    }
    
    resources:
      # Create a long-lived Service Access Token (SAT) for monitor management
      monitorManagementToken:
        type: datadog:ServiceAccessToken
        name: monitor_management_token
        properties:
          serviceAccountId: 00000000-0000-1234-0000-000000000000
          name: Monitor Management Service Access Token
          scopes:
            - ${ddPerms.permissions.monitorsRead}
            - ${ddPerms.permissions.monitorsWrite}
      # Create a Service Access Token (SAT) with a fixed expiration date.
      # The Datadog API caps expirations at 365 days from creation. expires_at is
      # immutable after creation; to rotate it, destroy and re-create the resource.
      expiringToken:
        type: datadog:ServiceAccessToken
        name: expiring_token
        properties:
          serviceAccountId: 00000000-0000-1234-0000-000000000000
          name: Short-lived CI Service Access Token
          scopes:
            - ${ddPerms.permissions.dashboardsRead}
          expiresAt: 2027-01-01T00:00:00Z
    variables:
      # Source the permissions for scoped tokens
      ddPerms:
        fn::invoke:
          function: datadog:getPermissions
          arguments: {}
    
    pulumi {
      required_providers {
        datadog = {
          source = "pulumi/datadog"
        }
      }
    }
    
    data "datadog_getpermissions" "ddPerms" {
    }
    
    # Create a long-lived Service Access Token (SAT) for monitor management
    resource "datadog_serviceaccesstoken" "monitor_management_token" {
      service_account_id = "00000000-0000-1234-0000-000000000000"
      name               = "Monitor Management Service Access Token"
      scopes             = [data.datadog_getpermissions.ddPerms.permissions.monitorsRead, data.datadog_getpermissions.ddPerms.permissions.monitorsWrite]
    }
    # Create a Service Access Token (SAT) with a fixed expiration date.
    # The Datadog API caps expirations at 365 days from creation. expires_at is
    # immutable after creation; to rotate it, destroy and re-create the resource.
    resource "datadog_serviceaccesstoken" "expiring_token" {
      service_account_id = "00000000-0000-1234-0000-000000000000"
      name               = "Short-lived CI Service Access Token"
      scopes             = [data.datadog_getpermissions.ddPerms.permissions.dashboardsRead]
      expires_at         = "2027-01-01T00:00:00Z"
    }
    # Source the permissions for scoped tokens
    

    Create ServiceAccessToken Resource

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

    Constructor syntax

    new ServiceAccessToken(name: string, args: ServiceAccessTokenArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceAccessToken(resource_name: str,
                           args: ServiceAccessTokenArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceAccessToken(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           name: Optional[str] = None,
                           scopes: Optional[Sequence[str]] = None,
                           service_account_id: Optional[str] = None,
                           expires_at: Optional[str] = None)
    func NewServiceAccessToken(ctx *Context, name string, args ServiceAccessTokenArgs, opts ...ResourceOption) (*ServiceAccessToken, error)
    public ServiceAccessToken(string name, ServiceAccessTokenArgs args, CustomResourceOptions? opts = null)
    public ServiceAccessToken(String name, ServiceAccessTokenArgs args)
    public ServiceAccessToken(String name, ServiceAccessTokenArgs args, CustomResourceOptions options)
    
    type: datadog:ServiceAccessToken
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "datadog_serviceaccesstoken" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ServiceAccessTokenArgs
    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 ServiceAccessTokenArgs
    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 ServiceAccessTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceAccessTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceAccessTokenArgs
    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 serviceAccessTokenResource = new Datadog.ServiceAccessToken("serviceAccessTokenResource", new()
    {
        Name = "string",
        Scopes = new[]
        {
            "string",
        },
        ServiceAccountId = "string",
        ExpiresAt = "string",
    });
    
    example, err := datadog.NewServiceAccessToken(ctx, "serviceAccessTokenResource", &datadog.ServiceAccessTokenArgs{
    	Name: pulumi.String("string"),
    	Scopes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ServiceAccountId: pulumi.String("string"),
    	ExpiresAt:        pulumi.String("string"),
    })
    
    resource "datadog_serviceaccesstoken" "serviceAccessTokenResource" {
      name               = "string"
      scopes             = ["string"]
      service_account_id = "string"
      expires_at         = "string"
    }
    
    var serviceAccessTokenResource = new ServiceAccessToken("serviceAccessTokenResource", ServiceAccessTokenArgs.builder()
        .name("string")
        .scopes("string")
        .serviceAccountId("string")
        .expiresAt("string")
        .build());
    
    service_access_token_resource = datadog.ServiceAccessToken("serviceAccessTokenResource",
        name="string",
        scopes=["string"],
        service_account_id="string",
        expires_at="string")
    
    const serviceAccessTokenResource = new datadog.ServiceAccessToken("serviceAccessTokenResource", {
        name: "string",
        scopes: ["string"],
        serviceAccountId: "string",
        expiresAt: "string",
    });
    
    type: datadog:ServiceAccessToken
    properties:
        expiresAt: string
        name: string
        scopes:
            - string
        serviceAccountId: string
    

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

    Name string
    Name of the service access token. Must be non-empty. String length must be at least 1.
    Scopes List<string>
    Authorization scopes granted to the service access token. At least one scope is required.
    ServiceAccountId string
    ID of the service account that owns this access token.
    ExpiresAt string
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    Name string
    Name of the service access token. Must be non-empty. String length must be at least 1.
    Scopes []string
    Authorization scopes granted to the service access token. At least one scope is required.
    ServiceAccountId string
    ID of the service account that owns this access token.
    ExpiresAt string
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    name string
    Name of the service access token. Must be non-empty. String length must be at least 1.
    scopes list(string)
    Authorization scopes granted to the service access token. At least one scope is required.
    service_account_id string
    ID of the service account that owns this access token.
    expires_at string
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    name String
    Name of the service access token. Must be non-empty. String length must be at least 1.
    scopes List<String>
    Authorization scopes granted to the service access token. At least one scope is required.
    serviceAccountId String
    ID of the service account that owns this access token.
    expiresAt String
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    name string
    Name of the service access token. Must be non-empty. String length must be at least 1.
    scopes string[]
    Authorization scopes granted to the service access token. At least one scope is required.
    serviceAccountId string
    ID of the service account that owns this access token.
    expiresAt string
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    name str
    Name of the service access token. Must be non-empty. String length must be at least 1.
    scopes Sequence[str]
    Authorization scopes granted to the service access token. At least one scope is required.
    service_account_id str
    ID of the service account that owns this access token.
    expires_at str
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    name String
    Name of the service access token. Must be non-empty. String length must be at least 1.
    scopes List<String>
    Authorization scopes granted to the service access token. At least one scope is required.
    serviceAccountId String
    ID of the service account that owns this access token.
    expiresAt String
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.

    Outputs

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

    CreatedAt string
    Creation date of the access token, in RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    The value of the service access token. This value is only available at creation time and cannot be imported.
    LastUsedAt string
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    PublicPortion string
    The public portion of the access token, used for identification.
    CreatedAt string
    Creation date of the access token, in RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    The value of the service access token. This value is only available at creation time and cannot be imported.
    LastUsedAt string
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    PublicPortion string
    The public portion of the access token, used for identification.
    created_at string
    Creation date of the access token, in RFC3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    The value of the service access token. This value is only available at creation time and cannot be imported.
    last_used_at string
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    public_portion string
    The public portion of the access token, used for identification.
    createdAt String
    Creation date of the access token, in RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    The value of the service access token. This value is only available at creation time and cannot be imported.
    lastUsedAt String
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    publicPortion String
    The public portion of the access token, used for identification.
    createdAt string
    Creation date of the access token, in RFC3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    The value of the service access token. This value is only available at creation time and cannot be imported.
    lastUsedAt string
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    publicPortion string
    The public portion of the access token, used for identification.
    created_at str
    Creation date of the access token, in RFC3339 format.
    id str
    The provider-assigned unique ID for this managed resource.
    key str
    The value of the service access token. This value is only available at creation time and cannot be imported.
    last_used_at str
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    public_portion str
    The public portion of the access token, used for identification.
    createdAt String
    Creation date of the access token, in RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    The value of the service access token. This value is only available at creation time and cannot be imported.
    lastUsedAt String
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    publicPortion String
    The public portion of the access token, used for identification.

    Look up Existing ServiceAccessToken Resource

    Get an existing ServiceAccessToken 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?: ServiceAccessTokenState, opts?: CustomResourceOptions): ServiceAccessToken
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            expires_at: Optional[str] = None,
            key: Optional[str] = None,
            last_used_at: Optional[str] = None,
            name: Optional[str] = None,
            public_portion: Optional[str] = None,
            scopes: Optional[Sequence[str]] = None,
            service_account_id: Optional[str] = None) -> ServiceAccessToken
    func GetServiceAccessToken(ctx *Context, name string, id IDInput, state *ServiceAccessTokenState, opts ...ResourceOption) (*ServiceAccessToken, error)
    public static ServiceAccessToken Get(string name, Input<string> id, ServiceAccessTokenState? state, CustomResourceOptions? opts = null)
    public static ServiceAccessToken get(String name, Output<String> id, ServiceAccessTokenState state, CustomResourceOptions options)
    resources:  _:    type: datadog:ServiceAccessToken    get:      id: ${id}
    import {
      to = datadog_serviceaccesstoken.example
      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:
    CreatedAt string
    Creation date of the access token, in RFC3339 format.
    ExpiresAt string
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    Key string
    The value of the service access token. This value is only available at creation time and cannot be imported.
    LastUsedAt string
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    Name string
    Name of the service access token. Must be non-empty. String length must be at least 1.
    PublicPortion string
    The public portion of the access token, used for identification.
    Scopes List<string>
    Authorization scopes granted to the service access token. At least one scope is required.
    ServiceAccountId string
    ID of the service account that owns this access token.
    CreatedAt string
    Creation date of the access token, in RFC3339 format.
    ExpiresAt string
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    Key string
    The value of the service access token. This value is only available at creation time and cannot be imported.
    LastUsedAt string
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    Name string
    Name of the service access token. Must be non-empty. String length must be at least 1.
    PublicPortion string
    The public portion of the access token, used for identification.
    Scopes []string
    Authorization scopes granted to the service access token. At least one scope is required.
    ServiceAccountId string
    ID of the service account that owns this access token.
    created_at string
    Creation date of the access token, in RFC3339 format.
    expires_at string
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    key string
    The value of the service access token. This value is only available at creation time and cannot be imported.
    last_used_at string
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    name string
    Name of the service access token. Must be non-empty. String length must be at least 1.
    public_portion string
    The public portion of the access token, used for identification.
    scopes list(string)
    Authorization scopes granted to the service access token. At least one scope is required.
    service_account_id string
    ID of the service account that owns this access token.
    createdAt String
    Creation date of the access token, in RFC3339 format.
    expiresAt String
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    key String
    The value of the service access token. This value is only available at creation time and cannot be imported.
    lastUsedAt String
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    name String
    Name of the service access token. Must be non-empty. String length must be at least 1.
    publicPortion String
    The public portion of the access token, used for identification.
    scopes List<String>
    Authorization scopes granted to the service access token. At least one scope is required.
    serviceAccountId String
    ID of the service account that owns this access token.
    createdAt string
    Creation date of the access token, in RFC3339 format.
    expiresAt string
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    key string
    The value of the service access token. This value is only available at creation time and cannot be imported.
    lastUsedAt string
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    name string
    Name of the service access token. Must be non-empty. String length must be at least 1.
    publicPortion string
    The public portion of the access token, used for identification.
    scopes string[]
    Authorization scopes granted to the service access token. At least one scope is required.
    serviceAccountId string
    ID of the service account that owns this access token.
    created_at str
    Creation date of the access token, in RFC3339 format.
    expires_at str
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    key str
    The value of the service access token. This value is only available at creation time and cannot be imported.
    last_used_at str
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    name str
    Name of the service access token. Must be non-empty. String length must be at least 1.
    public_portion str
    The public portion of the access token, used for identification.
    scopes Sequence[str]
    Authorization scopes granted to the service access token. At least one scope is required.
    service_account_id str
    ID of the service account that owns this access token.
    createdAt String
    Creation date of the access token, in RFC3339 format.
    expiresAt String
    Expiration date of the service access token, in RFC3339 format. Omit for a non-expiring token. The Datadog API caps expirations to within 365 days from creation. This attribute is immutable: it cannot be added, changed, or removed after creation. To rotate the expiration, destroy and re-create the resource.
    key String
    The value of the service access token. This value is only available at creation time and cannot be imported.
    lastUsedAt String
    Date the access token was last used, in RFC3339 format. Empty if the token has never been used.
    name String
    Name of the service access token. Must be non-empty. String length must be at least 1.
    publicPortion String
    The public portion of the access token, used for identification.
    scopes List<String>
    Authorization scopes granted to the service access token. At least one scope is required.
    serviceAccountId String
    ID of the service account that owns this access token.

    Import

    The pulumi import command can be used, for example:

    Importing a service access token cannot import the value of the key.

    $ pulumi import datadog:index/serviceAccessToken:ServiceAccessToken this "<service_account_id>:<token_id>"
    

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

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Viewing docs for Datadog v5.5.1
    published on Friday, Jun 5, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial