Class DeployToken
This resource allows you to create and manage deploy token for your GitLab projects and groups.
Example Usage - Project
using Pulumi;
using GitLab = Pulumi.GitLab;
class MyStack : Stack
{
public MyStack()
{
var example = new GitLab.DeployToken("example", new GitLab.DeployTokenArgs
{
ExpiresAt = "2020-03-14T00:00:00.000Z",
Project = "example/deploying",
Scopes =
{
"read_repository",
"read_registry",
},
Username = "example-username",
});
}
}
Example Usage - Group
using Pulumi;
using GitLab = Pulumi.GitLab;
class MyStack : Stack
{
public MyStack()
{
var example = new GitLab.DeployToken("example", new GitLab.DeployTokenArgs
{
Group = "example/deploying",
Scopes =
{
"read_repository",
},
});
}
}
Inherited Members
Namespace: Pulumi.GitLab
Assembly: Pulumi.GitLab.dll
Syntax
public class DeployToken : CustomResource
Constructors
View SourceDeployToken(String, DeployTokenArgs, CustomResourceOptions)
Create a DeployToken resource with the given unique name, arguments, and options.
Declaration
public DeployToken(string name, DeployTokenArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DeployTokenArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceExpiresAt
Declaration
public Output<string> ExpiresAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Group
The name or id of the group to add the deploy token to.
Either project or group must be set.
Declaration
public Output<string> Group { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
A name to describe the deploy token with.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Project
The name or id of the project to add the deploy token to.
Either project or group must be set.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Scopes
Valid values: read_repository, read_registry.
Declaration
public Output<ImmutableArray<string>> Scopes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Token
The secret token. This is only populated when creating a new deploy token.
Declaration
public Output<string> Token { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Username
A username for the deploy token. Default is gitlab+deploy-token-{n}.
Declaration
public Output<string> Username { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, DeployTokenState, CustomResourceOptions)
Get an existing DeployToken resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DeployToken Get(string name, Input<string> id, DeployTokenState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DeployTokenState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DeployToken |