![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.appservice.kotlin.SourceControlTokenArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.appservice.kotlin
import com.pulumi.azure.appservice.SourceControlTokenArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.appservice.SourceControlToken("example", {
* type: "GitHub",
* token: "ghp_sometokenvaluesecretsauce",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.appservice.SourceControlToken("example",
* type="GitHub",
* token="ghp_sometokenvaluesecretsauce")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.AppService.SourceControlToken("example", new()
* {
* Type = "GitHub",
* Token = "ghp_sometokenvaluesecretsauce",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := appservice.NewSourceControlToken(ctx, "example", &appservice.SourceControlTokenArgs{
* Type: pulumi.String("GitHub"),
* Token: pulumi.String("ghp_sometokenvaluesecretsauce"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.appservice.SourceControlToken;
* import com.pulumi.azure.appservice.SourceControlTokenArgs;
* 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 SourceControlToken("example", SourceControlTokenArgs.builder()
* .type("GitHub")
* .token("ghp_sometokenvaluesecretsauce")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:appservice:SourceControlToken
* properties:
* type: GitHub
* token: ghp_sometokenvaluesecretsauce
* ```
*
* ## Import
* App Service Source GitHub Tokens can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:appservice/sourceControlToken:SourceControlToken example /providers/Microsoft.Web/sourceControls/GitHub
* ```
* @property token The Access Token.
* @property tokenSecret The Access Token Secret.
* > **NOTE:** The token used for deploying App Service needs the following permissions: `repo` and `workflow`.
* @property type The Token type. Possible values include `Bitbucket`, `Dropbox`, `Github`, and `OneDrive`.
*/
public data class SourceControlTokenArgs(
public val token: Output? = null,
public val tokenSecret: Output? = null,
public val type: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.appservice.SourceControlTokenArgs =
com.pulumi.azure.appservice.SourceControlTokenArgs.builder()
.token(token?.applyValue({ args0 -> args0 }))
.tokenSecret(tokenSecret?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SourceControlTokenArgs].
*/
@PulumiTagMarker
public class SourceControlTokenArgsBuilder internal constructor() {
private var token: Output? = null
private var tokenSecret: Output? = null
private var type: Output? = null
/**
* @param value The Access Token.
*/
@JvmName("qwwbdnokaveydwqk")
public suspend fun token(`value`: Output) {
this.token = value
}
/**
* @param value The Access Token Secret.
* > **NOTE:** The token used for deploying App Service needs the following permissions: `repo` and `workflow`.
*/
@JvmName("ipyraaigjlokbxtj")
public suspend fun tokenSecret(`value`: Output) {
this.tokenSecret = value
}
/**
* @param value The Token type. Possible values include `Bitbucket`, `Dropbox`, `Github`, and `OneDrive`.
*/
@JvmName("edekidwkcyfisjtm")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value The Access Token.
*/
@JvmName("qwtvjdkeuonlrsky")
public suspend fun token(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.token = mapped
}
/**
* @param value The Access Token Secret.
* > **NOTE:** The token used for deploying App Service needs the following permissions: `repo` and `workflow`.
*/
@JvmName("iijwjfmefbsrmeyy")
public suspend fun tokenSecret(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tokenSecret = mapped
}
/**
* @param value The Token type. Possible values include `Bitbucket`, `Dropbox`, `Github`, and `OneDrive`.
*/
@JvmName("gptfbjamosmkhkic")
public suspend fun type(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): SourceControlTokenArgs = SourceControlTokenArgs(
token = token,
tokenSecret = tokenSecret,
type = type,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy