1. Packages
  2. Datadog Provider
  3. API Docs
  4. ServiceAccountApplicationKey
Datadog v4.49.0 published on Thursday, Apr 17, 2025 by Pulumi

datadog.ServiceAccountApplicationKey

Explore with Pulumi AI

Provides a Datadog service_account_application_key resource. This can be used to create and manage Datadog service account application keys.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

// Create new service_account_application_key resource
const foo = new datadog.ServiceAccountApplicationKey("foo", {
    serviceAccountId: "00000000-0000-1234-0000-000000000000",
    name: "Application key for managing dashboards",
});
Copy
import pulumi
import pulumi_datadog as datadog

# Create new service_account_application_key resource
foo = datadog.ServiceAccountApplicationKey("foo",
    service_account_id="00000000-0000-1234-0000-000000000000",
    name="Application key for managing dashboards")
Copy
package main

import (
	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create new service_account_application_key resource
		_, err := datadog.NewServiceAccountApplicationKey(ctx, "foo", &datadog.ServiceAccountApplicationKeyArgs{
			ServiceAccountId: pulumi.String("00000000-0000-1234-0000-000000000000"),
			Name:             pulumi.String("Application key for managing dashboards"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;

return await Deployment.RunAsync(() => 
{
    // Create new service_account_application_key resource
    var foo = new Datadog.ServiceAccountApplicationKey("foo", new()
    {
        ServiceAccountId = "00000000-0000-1234-0000-000000000000",
        Name = "Application key for managing dashboards",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.ServiceAccountApplicationKey;
import com.pulumi.datadog.ServiceAccountApplicationKeyArgs;
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) {
        // Create new service_account_application_key resource
        var foo = new ServiceAccountApplicationKey("foo", ServiceAccountApplicationKeyArgs.builder()
            .serviceAccountId("00000000-0000-1234-0000-000000000000")
            .name("Application key for managing dashboards")
            .build());

    }
}
Copy
resources:
  # Create new service_account_application_key resource
  foo:
    type: datadog:ServiceAccountApplicationKey
    properties:
      serviceAccountId: 00000000-0000-1234-0000-000000000000
      name: Application key for managing dashboards
Copy

Create ServiceAccountApplicationKey Resource

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

Constructor syntax

new ServiceAccountApplicationKey(name: string, args: ServiceAccountApplicationKeyArgs, opts?: CustomResourceOptions);
@overload
def ServiceAccountApplicationKey(resource_name: str,
                                 args: ServiceAccountApplicationKeyArgs,
                                 opts: Optional[ResourceOptions] = None)

@overload
def ServiceAccountApplicationKey(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 name: Optional[str] = None,
                                 service_account_id: Optional[str] = None,
                                 scopes: Optional[Sequence[str]] = None)
func NewServiceAccountApplicationKey(ctx *Context, name string, args ServiceAccountApplicationKeyArgs, opts ...ResourceOption) (*ServiceAccountApplicationKey, error)
public ServiceAccountApplicationKey(string name, ServiceAccountApplicationKeyArgs args, CustomResourceOptions? opts = null)
public ServiceAccountApplicationKey(String name, ServiceAccountApplicationKeyArgs args)
public ServiceAccountApplicationKey(String name, ServiceAccountApplicationKeyArgs args, CustomResourceOptions options)
type: datadog:ServiceAccountApplicationKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServiceAccountApplicationKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServiceAccountApplicationKeyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceAccountApplicationKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceAccountApplicationKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServiceAccountApplicationKeyArgs
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 serviceAccountApplicationKeyResource = new Datadog.ServiceAccountApplicationKey("serviceAccountApplicationKeyResource", new()
{
    Name = "string",
    ServiceAccountId = "string",
    Scopes = new[]
    {
        "string",
    },
});
Copy
example, err := datadog.NewServiceAccountApplicationKey(ctx, "serviceAccountApplicationKeyResource", &datadog.ServiceAccountApplicationKeyArgs{
	Name:             pulumi.String("string"),
	ServiceAccountId: pulumi.String("string"),
	Scopes: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var serviceAccountApplicationKeyResource = new ServiceAccountApplicationKey("serviceAccountApplicationKeyResource", ServiceAccountApplicationKeyArgs.builder()
    .name("string")
    .serviceAccountId("string")
    .scopes("string")
    .build());
Copy
service_account_application_key_resource = datadog.ServiceAccountApplicationKey("serviceAccountApplicationKeyResource",
    name="string",
    service_account_id="string",
    scopes=["string"])
Copy
const serviceAccountApplicationKeyResource = new datadog.ServiceAccountApplicationKey("serviceAccountApplicationKeyResource", {
    name: "string",
    serviceAccountId: "string",
    scopes: ["string"],
});
Copy
type: datadog:ServiceAccountApplicationKey
properties:
    name: string
    scopes:
        - string
    serviceAccountId: string
Copy

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

Name This property is required. string
Name of the application key.
ServiceAccountId This property is required. string
ID of the service account that owns this key.
Scopes List<string>
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
Name This property is required. string
Name of the application key.
ServiceAccountId This property is required. string
ID of the service account that owns this key.
Scopes []string
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
name This property is required. String
Name of the application key.
serviceAccountId This property is required. String
ID of the service account that owns this key.
scopes List<String>
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
name This property is required. string
Name of the application key.
serviceAccountId This property is required. string
ID of the service account that owns this key.
scopes string[]
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
name This property is required. str
Name of the application key.
service_account_id This property is required. str
ID of the service account that owns this key.
scopes Sequence[str]
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
name This property is required. String
Name of the application key.
serviceAccountId This property is required. String
ID of the service account that owns this key.
scopes List<String>
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.

Outputs

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

CreatedAt string
Creation date of the application key.
Id string
The provider-assigned unique ID for this managed resource.
Key string
The value of the service account application key. This value cannot be imported.
Last4 string
The last four characters of the application key.
CreatedAt string
Creation date of the application key.
Id string
The provider-assigned unique ID for this managed resource.
Key string
The value of the service account application key. This value cannot be imported.
Last4 string
The last four characters of the application key.
createdAt String
Creation date of the application key.
id String
The provider-assigned unique ID for this managed resource.
key String
The value of the service account application key. This value cannot be imported.
last4 String
The last four characters of the application key.
createdAt string
Creation date of the application key.
id string
The provider-assigned unique ID for this managed resource.
key string
The value of the service account application key. This value cannot be imported.
last4 string
The last four characters of the application key.
created_at str
Creation date of the application key.
id str
The provider-assigned unique ID for this managed resource.
key str
The value of the service account application key. This value cannot be imported.
last4 str
The last four characters of the application key.
createdAt String
Creation date of the application key.
id String
The provider-assigned unique ID for this managed resource.
key String
The value of the service account application key. This value cannot be imported.
last4 String
The last four characters of the application key.

Look up Existing ServiceAccountApplicationKey Resource

Get an existing ServiceAccountApplicationKey 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?: ServiceAccountApplicationKeyState, opts?: CustomResourceOptions): ServiceAccountApplicationKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        key: Optional[str] = None,
        last4: Optional[str] = None,
        name: Optional[str] = None,
        scopes: Optional[Sequence[str]] = None,
        service_account_id: Optional[str] = None) -> ServiceAccountApplicationKey
func GetServiceAccountApplicationKey(ctx *Context, name string, id IDInput, state *ServiceAccountApplicationKeyState, opts ...ResourceOption) (*ServiceAccountApplicationKey, error)
public static ServiceAccountApplicationKey Get(string name, Input<string> id, ServiceAccountApplicationKeyState? state, CustomResourceOptions? opts = null)
public static ServiceAccountApplicationKey get(String name, Output<String> id, ServiceAccountApplicationKeyState state, CustomResourceOptions options)
resources:  _:    type: datadog:ServiceAccountApplicationKey    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 application key.
Key string
The value of the service account application key. This value cannot be imported.
Last4 string
The last four characters of the application key.
Name string
Name of the application key.
Scopes List<string>
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
ServiceAccountId string
ID of the service account that owns this key.
CreatedAt string
Creation date of the application key.
Key string
The value of the service account application key. This value cannot be imported.
Last4 string
The last four characters of the application key.
Name string
Name of the application key.
Scopes []string
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
ServiceAccountId string
ID of the service account that owns this key.
createdAt String
Creation date of the application key.
key String
The value of the service account application key. This value cannot be imported.
last4 String
The last four characters of the application key.
name String
Name of the application key.
scopes List<String>
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
serviceAccountId String
ID of the service account that owns this key.
createdAt string
Creation date of the application key.
key string
The value of the service account application key. This value cannot be imported.
last4 string
The last four characters of the application key.
name string
Name of the application key.
scopes string[]
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
serviceAccountId string
ID of the service account that owns this key.
created_at str
Creation date of the application key.
key str
The value of the service account application key. This value cannot be imported.
last4 str
The last four characters of the application key.
name str
Name of the application key.
scopes Sequence[str]
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
service_account_id str
ID of the service account that owns this key.
createdAt String
Creation date of the application key.
key String
The value of the service account application key. This value cannot be imported.
last4 String
The last four characters of the application key.
name String
Name of the application key.
scopes List<String>
Authorization scopes for the Application Key. Application Keys configured with no scopes have full access.
serviceAccountId String
ID of the service account that owns this key.

Import

Importing a service account’s application key cannot import the value of the key.

$ pulumi import datadog:index/serviceAccountApplicationKey:ServiceAccountApplicationKey this "<service_account_id>:<application_key_id>"
Copy

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.