SourceCredentialArgs

data class SourceCredentialArgs(val authType: Output<String>? = null, val serverType: Output<String>? = null, val token: Output<String>? = null, val userName: Output<String>? = null) : ConvertibleToJava<SourceCredentialArgs>

Provides a CodeBuild Source Credentials Resource.

NOTE: Codebuild only allows a single credential per given server type in a given region. Therefore, when you define aws.codebuild.SourceCredential, aws.codebuild.Project resource defined in the same module will use it.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.codebuild.SourceCredential;
import com.pulumi.aws.codebuild.SourceCredentialArgs;
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 SourceCredential("example", SourceCredentialArgs.builder()
.authType("PERSONAL_ACCESS_TOKEN")
.serverType("GITHUB")
.token("example")
.build());
}
}

Bitbucket Server Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.codebuild.SourceCredential;
import com.pulumi.aws.codebuild.SourceCredentialArgs;
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 SourceCredential("example", SourceCredentialArgs.builder()
.authType("BASIC_AUTH")
.serverType("BITBUCKET")
.token("example")
.userName("test-user")
.build());
}
}

Import

CodeBuild Source Credential can be imported using the CodeBuild Source Credential arn, e.g.,

$ pulumi import aws:codebuild/sourceCredential:SourceCredential example arn:aws:codebuild:us-west-2:123456789:token:github

Constructors

Link copied to clipboard
constructor(authType: Output<String>? = null, serverType: Output<String>? = null, token: Output<String>? = null, userName: Output<String>? = null)

Properties

Link copied to clipboard
val authType: Output<String>? = null

The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.

Link copied to clipboard
val serverType: Output<String>? = null

The source provider used for this project.

Link copied to clipboard
val token: Output<String>? = null

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

Link copied to clipboard
val userName: Output<String>? = null

The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

Functions

Link copied to clipboard
open override fun toJava(): SourceCredentialArgs