1. Packages
  2. Buildkite
  3. API Docs
  4. Agent
  5. AgentToken
Buildkite v3.1.6 published on Wednesday, Apr 3, 2024 by Pulumiverse

buildkite.Agent.AgentToken

Explore with Pulumi AI

This resource allows you to create and manage non-clustered agent tokens. You can find out more about clusters in the Buildkite documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as buildkite from "@pulumiverse/buildkite";

// create a default token
const _default = new buildkite.agent.AgentToken("default", {description: "Default token"});
Copy
import pulumi
import pulumiverse_buildkite as buildkite

# create a default token
default = buildkite.agent.AgentToken("default", description="Default token")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-buildkite/sdk/v3/go/buildkite/Agent"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// create a default token
		_, err := Agent.NewAgentToken(ctx, "default", &Agent.AgentTokenArgs{
			Description: pulumi.String("Default token"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Buildkite = Pulumiverse.Buildkite;

return await Deployment.RunAsync(() => 
{
    // create a default token
    var @default = new Buildkite.Agent.AgentToken("default", new()
    {
        Description = "Default token",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.buildkite.Agent.AgentToken;
import com.pulumi.buildkite.Agent.AgentTokenArgs;
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 default_ = new AgentToken("default", AgentTokenArgs.builder()        
            .description("Default token")
            .build());

    }
}
Copy
resources:
  # create a default token
  default:
    type: buildkite:Agent:AgentToken
    properties:
      description: Default token
Copy

Create AgentToken Resource

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

Constructor syntax

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

@overload
def AgentToken(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None)
func NewAgentToken(ctx *Context, name string, args *AgentTokenArgs, opts ...ResourceOption) (*AgentToken, error)
public AgentToken(string name, AgentTokenArgs? args = null, CustomResourceOptions? opts = null)
public AgentToken(String name, AgentTokenArgs args)
public AgentToken(String name, AgentTokenArgs args, CustomResourceOptions options)
type: buildkite:Agent:AgentToken
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 AgentTokenArgs
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 AgentTokenArgs
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 AgentTokenArgs
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 AgentTokenArgs
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. AgentTokenArgs
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 agentTokenResource = new Buildkite.Agent.AgentToken("agentTokenResource", new()
{
    Description = "string",
});
Copy
example, err := Agent.NewAgentToken(ctx, "agentTokenResource", &Agent.AgentTokenArgs{
	Description: pulumi.String("string"),
})
Copy
var agentTokenResource = new AgentToken("agentTokenResource", AgentTokenArgs.builder()
    .description("string")
    .build());
Copy
agent_token_resource = buildkite.agent.AgentToken("agentTokenResource", description="string")
Copy
const agentTokenResource = new buildkite.agent.AgentToken("agentTokenResource", {description: "string"});
Copy
type: buildkite:Agent:AgentToken
properties:
    description: string
Copy

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

Description string
The description of the agent token. Used to help identify its use.
Description string
The description of the agent token. Used to help identify its use.
description String
The description of the agent token. Used to help identify its use.
description string
The description of the agent token. Used to help identify its use.
description str
The description of the agent token. Used to help identify its use.
description String
The description of the agent token. Used to help identify its use.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Token string
The token value used by an agent to register with the API.
Uuid string
The UUID of the agent token.
Id string
The provider-assigned unique ID for this managed resource.
Token string
The token value used by an agent to register with the API.
Uuid string
The UUID of the agent token.
id String
The provider-assigned unique ID for this managed resource.
token String
The token value used by an agent to register with the API.
uuid String
The UUID of the agent token.
id string
The provider-assigned unique ID for this managed resource.
token string
The token value used by an agent to register with the API.
uuid string
The UUID of the agent token.
id str
The provider-assigned unique ID for this managed resource.
token str
The token value used by an agent to register with the API.
uuid str
The UUID of the agent token.
id String
The provider-assigned unique ID for this managed resource.
token String
The token value used by an agent to register with the API.
uuid String
The UUID of the agent token.

Look up Existing AgentToken Resource

Get an existing AgentToken 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?: AgentTokenState, opts?: CustomResourceOptions): AgentToken
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        token: Optional[str] = None,
        uuid: Optional[str] = None) -> AgentToken
func GetAgentToken(ctx *Context, name string, id IDInput, state *AgentTokenState, opts ...ResourceOption) (*AgentToken, error)
public static AgentToken Get(string name, Input<string> id, AgentTokenState? state, CustomResourceOptions? opts = null)
public static AgentToken get(String name, Output<String> id, AgentTokenState state, CustomResourceOptions options)
resources:  _:    type: buildkite:Agent:AgentToken    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:
Description string
The description of the agent token. Used to help identify its use.
Token string
The token value used by an agent to register with the API.
Uuid string
The UUID of the agent token.
Description string
The description of the agent token. Used to help identify its use.
Token string
The token value used by an agent to register with the API.
Uuid string
The UUID of the agent token.
description String
The description of the agent token. Used to help identify its use.
token String
The token value used by an agent to register with the API.
uuid String
The UUID of the agent token.
description string
The description of the agent token. Used to help identify its use.
token string
The token value used by an agent to register with the API.
uuid string
The UUID of the agent token.
description str
The description of the agent token. Used to help identify its use.
token str
The token value used by an agent to register with the API.
uuid str
The UUID of the agent token.
description String
The description of the agent token. Used to help identify its use.
token String
The token value used by an agent to register with the API.
uuid String
The UUID of the agent token.

Package Details

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