1. Packages
  2. DataRobot
  3. API Docs
  4. ApiTokenCredential
DataRobot v0.9.0 published on Tuesday, Apr 8, 2025 by DataRobot, Inc.

datarobot.ApiTokenCredential

Explore with Pulumi AI

Api Token Credential

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as datarobot from "@datarobot/pulumi-datarobot";

const example = new datarobot.ApiTokenCredential("example", {apiToken: "[the API Key value here]"});
Copy
import pulumi
import pulumi_datarobot as datarobot

example = datarobot.ApiTokenCredential("example", api_token="[the API Key value here]")
Copy
package main

import (
	"github.com/datarobot-community/pulumi-datarobot/sdk/go/datarobot"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datarobot.NewApiTokenCredential(ctx, "example", &datarobot.ApiTokenCredentialArgs{
			ApiToken: pulumi.String("[the API Key value here]"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datarobot = DataRobotPulumi.Datarobot;

return await Deployment.RunAsync(() => 
{
    var example = new Datarobot.ApiTokenCredential("example", new()
    {
        ApiToken = "[the API Key value here]",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datarobot.ApiTokenCredential;
import com.pulumi.datarobot.ApiTokenCredentialArgs;
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) {
        var example = new ApiTokenCredential("example", ApiTokenCredentialArgs.builder()
            .apiToken("[the API Key value here]")
            .build());

    }
}
Copy
resources:
  example:
    type: datarobot:ApiTokenCredential
    properties:
      apiToken: '[the API Key value here]'
Copy

Create ApiTokenCredential Resource

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

Constructor syntax

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

@overload
def ApiTokenCredential(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       api_token: Optional[str] = None,
                       description: Optional[str] = None,
                       name: Optional[str] = None)
func NewApiTokenCredential(ctx *Context, name string, args ApiTokenCredentialArgs, opts ...ResourceOption) (*ApiTokenCredential, error)
public ApiTokenCredential(string name, ApiTokenCredentialArgs args, CustomResourceOptions? opts = null)
public ApiTokenCredential(String name, ApiTokenCredentialArgs args)
public ApiTokenCredential(String name, ApiTokenCredentialArgs args, CustomResourceOptions options)
type: datarobot:ApiTokenCredential
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. ApiTokenCredentialArgs
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. ApiTokenCredentialArgs
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. ApiTokenCredentialArgs
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. ApiTokenCredentialArgs
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. ApiTokenCredentialArgs
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 apiTokenCredentialResource = new Datarobot.ApiTokenCredential("apiTokenCredentialResource", new()
{
    ApiToken = "string",
    Description = "string",
    Name = "string",
});
Copy
example, err := datarobot.NewApiTokenCredential(ctx, "apiTokenCredentialResource", &datarobot.ApiTokenCredentialArgs{
	ApiToken:    pulumi.String("string"),
	Description: pulumi.String("string"),
	Name:        pulumi.String("string"),
})
Copy
var apiTokenCredentialResource = new ApiTokenCredential("apiTokenCredentialResource", ApiTokenCredentialArgs.builder()
    .apiToken("string")
    .description("string")
    .name("string")
    .build());
Copy
api_token_credential_resource = datarobot.ApiTokenCredential("apiTokenCredentialResource",
    api_token="string",
    description="string",
    name="string")
Copy
const apiTokenCredentialResource = new datarobot.ApiTokenCredential("apiTokenCredentialResource", {
    apiToken: "string",
    description: "string",
    name: "string",
});
Copy
type: datarobot:ApiTokenCredential
properties:
    apiToken: string
    description: string
    name: string
Copy

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

ApiToken This property is required. string
The description of the Api Token Credential.
Description string
The description of the Api Token Credential.
Name string
The name of the Api Token Credential.
ApiToken This property is required. string
The description of the Api Token Credential.
Description string
The description of the Api Token Credential.
Name string
The name of the Api Token Credential.
apiToken This property is required. String
The description of the Api Token Credential.
description String
The description of the Api Token Credential.
name String
The name of the Api Token Credential.
apiToken This property is required. string
The description of the Api Token Credential.
description string
The description of the Api Token Credential.
name string
The name of the Api Token Credential.
api_token This property is required. str
The description of the Api Token Credential.
description str
The description of the Api Token Credential.
name str
The name of the Api Token Credential.
apiToken This property is required. String
The description of the Api Token Credential.
description String
The description of the Api Token Credential.
name String
The name of the Api Token Credential.

Outputs

All input properties are implicitly available as output properties. Additionally, the ApiTokenCredential 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 str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ApiTokenCredential Resource

Get an existing ApiTokenCredential 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?: ApiTokenCredentialState, opts?: CustomResourceOptions): ApiTokenCredential
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_token: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None) -> ApiTokenCredential
func GetApiTokenCredential(ctx *Context, name string, id IDInput, state *ApiTokenCredentialState, opts ...ResourceOption) (*ApiTokenCredential, error)
public static ApiTokenCredential Get(string name, Input<string> id, ApiTokenCredentialState? state, CustomResourceOptions? opts = null)
public static ApiTokenCredential get(String name, Output<String> id, ApiTokenCredentialState state, CustomResourceOptions options)
resources:  _:    type: datarobot:ApiTokenCredential    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:
ApiToken string
The description of the Api Token Credential.
Description string
The description of the Api Token Credential.
Name string
The name of the Api Token Credential.
ApiToken string
The description of the Api Token Credential.
Description string
The description of the Api Token Credential.
Name string
The name of the Api Token Credential.
apiToken String
The description of the Api Token Credential.
description String
The description of the Api Token Credential.
name String
The name of the Api Token Credential.
apiToken string
The description of the Api Token Credential.
description string
The description of the Api Token Credential.
name string
The name of the Api Token Credential.
api_token str
The description of the Api Token Credential.
description str
The description of the Api Token Credential.
name str
The name of the Api Token Credential.
apiToken String
The description of the Api Token Credential.
description String
The description of the Api Token Credential.
name String
The name of the Api Token Credential.

Package Details

Repository
datarobot datarobot-community/pulumi-datarobot
License
Apache-2.0
Notes
This Pulumi package is based on the datarobot Terraform Provider.