1. Registry
  2. Packages
  3. Datadog Provider
  4. API Docs
  5. WebhookOauth2ClientCredentials
Viewing docs for Datadog v5.11.0
published on Tuesday, Sep 15, 2026 by Pulumi
datadog logo
Viewing docs for Datadog v5.11.0
published on Tuesday, Sep 15, 2026 by Pulumi

    Provides a Datadog webhook OAuth2 client credentials auth method resource. This can be used to create and manage the auth methods available under Integrations > Webhooks > Auth Methods.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    // Create a new Datadog webhook OAuth2 client credentials auth method.
    const foo = new datadog.WebhookOauth2ClientCredentials("foo", {
        name: "example-auth-method",
        accessTokenUrl: "https://example.com/oauth2/token",
        clientId: "example-client-id",
        clientSecret: "example-client-secret",
        audience: "https://example.com/api",
        scope: "read write",
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    # Create a new Datadog webhook OAuth2 client credentials auth method.
    foo = datadog.WebhookOauth2ClientCredentials("foo",
        name="example-auth-method",
        access_token_url="https://example.com/oauth2/token",
        client_id="example-client-id",
        client_secret="example-client-secret",
        audience="https://example.com/api",
        scope="read write")
    
    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 {
    		// Create a new Datadog webhook OAuth2 client credentials auth method.
    		_, err := datadog.NewWebhookOauth2ClientCredentials(ctx, "foo", &datadog.WebhookOauth2ClientCredentialsArgs{
    			Name:           pulumi.String("example-auth-method"),
    			AccessTokenUrl: pulumi.String("https://example.com/oauth2/token"),
    			ClientId:       pulumi.String("example-client-id"),
    			ClientSecret:   pulumi.String("example-client-secret"),
    			Audience:       pulumi.String("https://example.com/api"),
    			Scope:          pulumi.String("read write"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a new Datadog webhook OAuth2 client credentials auth method.
        var foo = new Datadog.WebhookOauth2ClientCredentials("foo", new()
        {
            Name = "example-auth-method",
            AccessTokenUrl = "https://example.com/oauth2/token",
            ClientId = "example-client-id",
            ClientSecret = "example-client-secret",
            Audience = "https://example.com/api",
            Scope = "read write",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.WebhookOauth2ClientCredentials;
    import com.pulumi.datadog.WebhookOauth2ClientCredentialsArgs;
    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) {
            // Create a new Datadog webhook OAuth2 client credentials auth method.
            var foo = new WebhookOauth2ClientCredentials("foo", WebhookOauth2ClientCredentialsArgs.builder()
                .name("example-auth-method")
                .accessTokenUrl("https://example.com/oauth2/token")
                .clientId("example-client-id")
                .clientSecret("example-client-secret")
                .audience("https://example.com/api")
                .scope("read write")
                .build());
    
        }
    }
    
    resources:
      # Create a new Datadog webhook OAuth2 client credentials auth method.
      foo:
        type: datadog:WebhookOauth2ClientCredentials
        properties:
          name: example-auth-method
          accessTokenUrl: https://example.com/oauth2/token
          clientId: example-client-id
          clientSecret: example-client-secret
          audience: https://example.com/api
          scope: read write
    
    pulumi {
      required_providers {
        datadog = {
          source = "pulumi/datadog"
        }
      }
    }
    
    # Create a new Datadog webhook OAuth2 client credentials auth method.
    resource "datadog_webhookoauth2clientcredentials" "foo" {
      name             = "example-auth-method"
      access_token_url = "https://example.com/oauth2/token"
      client_id        = "example-client-id"
      client_secret    = "example-client-secret"
      audience         = "https://example.com/api"
      scope            = "read write"
    }
    

    Create WebhookOauth2ClientCredentials Resource

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

    Constructor syntax

    new WebhookOauth2ClientCredentials(name: string, args: WebhookOauth2ClientCredentialsArgs, opts?: CustomResourceOptions);
    @overload
    def WebhookOauth2ClientCredentials(resource_name: str,
                                       args: WebhookOauth2ClientCredentialsArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def WebhookOauth2ClientCredentials(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       access_token_url: Optional[str] = None,
                                       client_id: Optional[str] = None,
                                       client_secret: Optional[str] = None,
                                       name: Optional[str] = None,
                                       audience: Optional[str] = None,
                                       scope: Optional[str] = None)
    func NewWebhookOauth2ClientCredentials(ctx *Context, name string, args WebhookOauth2ClientCredentialsArgs, opts ...ResourceOption) (*WebhookOauth2ClientCredentials, error)
    public WebhookOauth2ClientCredentials(string name, WebhookOauth2ClientCredentialsArgs args, CustomResourceOptions? opts = null)
    public WebhookOauth2ClientCredentials(String name, WebhookOauth2ClientCredentialsArgs args)
    public WebhookOauth2ClientCredentials(String name, WebhookOauth2ClientCredentialsArgs args, CustomResourceOptions options)
    
    type: datadog:WebhookOauth2ClientCredentials
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "datadog_webhook_oauth2_client_credentials" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args WebhookOauth2ClientCredentialsArgs
    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 WebhookOauth2ClientCredentialsArgs
    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 WebhookOauth2ClientCredentialsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WebhookOauth2ClientCredentialsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WebhookOauth2ClientCredentialsArgs
    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 webhookOauth2ClientCredentialsResource = new Datadog.WebhookOauth2ClientCredentials("webhookOauth2ClientCredentialsResource", new()
    {
        AccessTokenUrl = "string",
        ClientId = "string",
        ClientSecret = "string",
        Name = "string",
        Audience = "string",
        Scope = "string",
    });
    
    example, err := datadog.NewWebhookOauth2ClientCredentials(ctx, "webhookOauth2ClientCredentialsResource", &datadog.WebhookOauth2ClientCredentialsArgs{
    	AccessTokenUrl: pulumi.String("string"),
    	ClientId:       pulumi.String("string"),
    	ClientSecret:   pulumi.String("string"),
    	Name:           pulumi.String("string"),
    	Audience:       pulumi.String("string"),
    	Scope:          pulumi.String("string"),
    })
    
    resource "datadog_webhook_oauth2_client_credentials" "webhookOauth2ClientCredentialsResource" {
      lifecycle {
        create_before_destroy = true
      }
      access_token_url = "string"
      client_id        = "string"
      client_secret    = "string"
      name             = "string"
      audience         = "string"
      scope            = "string"
    }
    
    var webhookOauth2ClientCredentialsResource = new WebhookOauth2ClientCredentials("webhookOauth2ClientCredentialsResource", WebhookOauth2ClientCredentialsArgs.builder()
        .accessTokenUrl("string")
        .clientId("string")
        .clientSecret("string")
        .name("string")
        .audience("string")
        .scope("string")
        .build());
    
    webhook_oauth2_client_credentials_resource = datadog.WebhookOauth2ClientCredentials("webhookOauth2ClientCredentialsResource",
        access_token_url="string",
        client_id="string",
        client_secret="string",
        name="string",
        audience="string",
        scope="string")
    
    const webhookOauth2ClientCredentialsResource = new datadog.WebhookOauth2ClientCredentials("webhookOauth2ClientCredentialsResource", {
        accessTokenUrl: "string",
        clientId: "string",
        clientSecret: "string",
        name: "string",
        audience: "string",
        scope: "string",
    });
    
    type: datadog:WebhookOauth2ClientCredentials
    properties:
        accessTokenUrl: string
        audience: string
        clientId: string
        clientSecret: string
        name: string
        scope: string
    

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

    AccessTokenUrl string
    The URL used to fetch the access token.
    ClientId string
    The OAuth2 client ID.
    ClientSecret string
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    Name string
    The name of the auth method.
    Audience string
    The audience requested when fetching the access token.
    Scope string
    The scope requested when fetching the access token.
    AccessTokenUrl string
    The URL used to fetch the access token.
    ClientId string
    The OAuth2 client ID.
    ClientSecret string
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    Name string
    The name of the auth method.
    Audience string
    The audience requested when fetching the access token.
    Scope string
    The scope requested when fetching the access token.
    access_token_url string
    The URL used to fetch the access token.
    client_id string
    The OAuth2 client ID.
    client_secret string
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    name string
    The name of the auth method.
    audience string
    The audience requested when fetching the access token.
    scope string
    The scope requested when fetching the access token.
    accessTokenUrl String
    The URL used to fetch the access token.
    clientId String
    The OAuth2 client ID.
    clientSecret String
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    name String
    The name of the auth method.
    audience String
    The audience requested when fetching the access token.
    scope String
    The scope requested when fetching the access token.
    accessTokenUrl string
    The URL used to fetch the access token.
    clientId string
    The OAuth2 client ID.
    clientSecret string
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    name string
    The name of the auth method.
    audience string
    The audience requested when fetching the access token.
    scope string
    The scope requested when fetching the access token.
    access_token_url str
    The URL used to fetch the access token.
    client_id str
    The OAuth2 client ID.
    client_secret str
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    name str
    The name of the auth method.
    audience str
    The audience requested when fetching the access token.
    scope str
    The scope requested when fetching the access token.
    accessTokenUrl String
    The URL used to fetch the access token.
    clientId String
    The OAuth2 client ID.
    clientSecret String
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    name String
    The name of the auth method.
    audience String
    The audience requested when fetching the access token.
    scope String
    The scope requested when fetching the access token.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WebhookOauth2ClientCredentials 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 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 WebhookOauth2ClientCredentials Resource

    Get an existing WebhookOauth2ClientCredentials 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?: WebhookOauth2ClientCredentialsState, opts?: CustomResourceOptions): WebhookOauth2ClientCredentials
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_token_url: Optional[str] = None,
            audience: Optional[str] = None,
            client_id: Optional[str] = None,
            client_secret: Optional[str] = None,
            name: Optional[str] = None,
            scope: Optional[str] = None) -> WebhookOauth2ClientCredentials
    func GetWebhookOauth2ClientCredentials(ctx *Context, name string, id IDInput, state *WebhookOauth2ClientCredentialsState, opts ...ResourceOption) (*WebhookOauth2ClientCredentials, error)
    public static WebhookOauth2ClientCredentials Get(string name, Input<string> id, WebhookOauth2ClientCredentialsState? state, CustomResourceOptions? opts = null)
    public static WebhookOauth2ClientCredentials get(String name, Output<String> id, WebhookOauth2ClientCredentialsState state, CustomResourceOptions options)
    resources:  _:    type: datadog:WebhookOauth2ClientCredentials    get:      id: ${id}
    import {
      to = datadog_webhook_oauth2_client_credentials.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:
    AccessTokenUrl string
    The URL used to fetch the access token.
    Audience string
    The audience requested when fetching the access token.
    ClientId string
    The OAuth2 client ID.
    ClientSecret string
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    Name string
    The name of the auth method.
    Scope string
    The scope requested when fetching the access token.
    AccessTokenUrl string
    The URL used to fetch the access token.
    Audience string
    The audience requested when fetching the access token.
    ClientId string
    The OAuth2 client ID.
    ClientSecret string
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    Name string
    The name of the auth method.
    Scope string
    The scope requested when fetching the access token.
    access_token_url string
    The URL used to fetch the access token.
    audience string
    The audience requested when fetching the access token.
    client_id string
    The OAuth2 client ID.
    client_secret string
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    name string
    The name of the auth method.
    scope string
    The scope requested when fetching the access token.
    accessTokenUrl String
    The URL used to fetch the access token.
    audience String
    The audience requested when fetching the access token.
    clientId String
    The OAuth2 client ID.
    clientSecret String
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    name String
    The name of the auth method.
    scope String
    The scope requested when fetching the access token.
    accessTokenUrl string
    The URL used to fetch the access token.
    audience string
    The audience requested when fetching the access token.
    clientId string
    The OAuth2 client ID.
    clientSecret string
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    name string
    The name of the auth method.
    scope string
    The scope requested when fetching the access token.
    access_token_url str
    The URL used to fetch the access token.
    audience str
    The audience requested when fetching the access token.
    client_id str
    The OAuth2 client ID.
    client_secret str
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    name str
    The name of the auth method.
    scope str
    The scope requested when fetching the access token.
    accessTokenUrl String
    The URL used to fetch the access token.
    audience String
    The audience requested when fetching the access token.
    clientId String
    The OAuth2 client ID.
    clientSecret String
    The OAuth2 client secret. This value is not returned by the API, so it cannot be detected as drifted or filled in on import.
    name String
    The name of the auth method.
    scope String
    The scope requested when fetching the access token.

    Import

    The pulumi import command can be used, for example:

    $ pulumi import datadog:index/webhookOauth2ClientCredentials:WebhookOauth2ClientCredentials foo 11111111-2222-3333-4444-555555555555
    

    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.11.0
    published on Tuesday, Sep 15, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial