Datadog

Pulumi Official
Package maintained by Pulumi
v4.8.0 published on Monday, Mar 28, 2022 by Pulumi

getApiKey

Use this data source to retrieve information about an existing api key.

Example Usage

using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(Datadog.GetApiKey.InvokeAsync(new Datadog.GetApiKeyArgs
        {
            Name = "foo-application",
        }));
    }

}
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 {
		_, err := datadog.LookupApiKey(ctx, &GetApiKeyArgs{
			Name: pulumi.StringRef("foo-application"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_datadog as datadog

foo = datadog.get_api_key(name="foo-application")
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

const foo = pulumi.output(datadog.getApiKey({
    name: "foo-application",
}));

Coming soon!

Using getApiKey

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getApiKey(args: GetApiKeyArgs, opts?: InvokeOptions): Promise<GetApiKeyResult>
function getApiKeyOutput(args: GetApiKeyOutputArgs, opts?: InvokeOptions): Output<GetApiKeyResult>
def get_api_key(id: Optional[str] = None,
                name: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetApiKeyResult
def get_api_key_output(id: Optional[pulumi.Input[str]] = None,
                name: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetApiKeyResult]
func LookupApiKey(ctx *Context, args *LookupApiKeyArgs, opts ...InvokeOption) (*LookupApiKeyResult, error)
func LookupApiKeyOutput(ctx *Context, args *LookupApiKeyOutputArgs, opts ...InvokeOption) LookupApiKeyResultOutput

> Note: This function is named LookupApiKey in the Go SDK.

public static class GetApiKey 
{
    public static Task<GetApiKeyResult> InvokeAsync(GetApiKeyArgs args, InvokeOptions? opts = null)
    public static Output<GetApiKeyResult> Invoke(GetApiKeyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: datadog:index/getApiKey:getApiKey
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Id string

Id for API Key.

Name string

Name for API Key.

Id string

Id for API Key.

Name string

Name for API Key.

id String

Id for API Key.

name String

Name for API Key.

id string

Id for API Key.

name string

Name for API Key.

id str

Id for API Key.

name str

Name for API Key.

id String

Id for API Key.

name String

Name for API Key.

getApiKey Result

The following output properties are available:

Key string

The value of the API Key.

Id string

Id for API Key.

Name string

Name for API Key.

Key string

The value of the API Key.

Id string

Id for API Key.

Name string

Name for API Key.

key String

The value of the API Key.

id String

Id for API Key.

name String

Name for API Key.

key string

The value of the API Key.

id string

Id for API Key.

name string

Name for API Key.

key str

The value of the API Key.

id str

Id for API Key.

name str

Name for API Key.

key String

The value of the API Key.

id String

Id for API Key.

name String

Name for API Key.

Package Details

Repository
https://github.com/pulumi/pulumi-datadog
License
Apache-2.0
Notes

This Pulumi package is based on the datadog Terraform Provider.