Show / Hide Table of Contents

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",
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
DeployToken
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.GitLab
Assembly: Pulumi.GitLab.dll
Syntax
public class DeployToken : CustomResource

Constructors

View Source

DeployToken(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 Source

ExpiresAt

Declaration
public Output<string> ExpiresAt { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

Name

A name to describe the deploy token with.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

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>>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.