1. Packages
  2. Azure Classic
  3. API Docs
  4. appservice
  5. getSourceControlToken

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.appservice.getSourceControlToken

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.appservice.getSourceControlToken({
    type: "GitHub",
});
export const id = exampleAzurermAppServiceGithubToken.id;
Copy
import pulumi
import pulumi_azure as azure

example = azure.appservice.get_source_control_token(type="GitHub")
pulumi.export("id", example_azurerm_app_service_github_token["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := appservice.LookupSourceControlToken(ctx, &appservice.LookupSourceControlTokenArgs{
			Type: "GitHub",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", exampleAzurermAppServiceGithubToken.Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.AppService.GetSourceControlToken.Invoke(new()
    {
        Type = "GitHub",
    });

    return new Dictionary<string, object?>
    {
        ["id"] = exampleAzurermAppServiceGithubToken.Id,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.appservice.AppserviceFunctions;
import com.pulumi.azure.appservice.inputs.GetSourceControlTokenArgs;
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) {
        final var example = AppserviceFunctions.getSourceControlToken(GetSourceControlTokenArgs.builder()
            .type("GitHub")
            .build());

        ctx.export("id", exampleAzurermAppServiceGithubToken.id());
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:appservice:getSourceControlToken
      arguments:
        type: GitHub
outputs:
  id: ${exampleAzurermAppServiceGithubToken.id}
Copy

Using getSourceControlToken

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSourceControlToken(args: GetSourceControlTokenArgs, opts?: InvokeOptions): Promise<GetSourceControlTokenResult>
function getSourceControlTokenOutput(args: GetSourceControlTokenOutputArgs, opts?: InvokeOptions): Output<GetSourceControlTokenResult>
Copy
def get_source_control_token(type: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetSourceControlTokenResult
def get_source_control_token_output(type: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetSourceControlTokenResult]
Copy
func LookupSourceControlToken(ctx *Context, args *LookupSourceControlTokenArgs, opts ...InvokeOption) (*LookupSourceControlTokenResult, error)
func LookupSourceControlTokenOutput(ctx *Context, args *LookupSourceControlTokenOutputArgs, opts ...InvokeOption) LookupSourceControlTokenResultOutput
Copy

> Note: This function is named LookupSourceControlToken in the Go SDK.

public static class GetSourceControlToken 
{
    public static Task<GetSourceControlTokenResult> InvokeAsync(GetSourceControlTokenArgs args, InvokeOptions? opts = null)
    public static Output<GetSourceControlTokenResult> Invoke(GetSourceControlTokenInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSourceControlTokenResult> getSourceControlToken(GetSourceControlTokenArgs args, InvokeOptions options)
public static Output<GetSourceControlTokenResult> getSourceControlToken(GetSourceControlTokenArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:appservice/getSourceControlToken:getSourceControlToken
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Type This property is required. string
The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
Type This property is required. string
The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
type This property is required. String
The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
type This property is required. string
The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
type This property is required. str
The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
type This property is required. String
The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

getSourceControlToken Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Token string
The GitHub Token value.
TokenSecret string
Type string
Id string
The provider-assigned unique ID for this managed resource.
Token string
The GitHub Token value.
TokenSecret string
Type string
id String
The provider-assigned unique ID for this managed resource.
token String
The GitHub Token value.
tokenSecret String
type String
id string
The provider-assigned unique ID for this managed resource.
token string
The GitHub Token value.
tokenSecret string
type string
id str
The provider-assigned unique ID for this managed resource.
token str
The GitHub Token value.
token_secret str
type str
id String
The provider-assigned unique ID for this managed resource.
token String
The GitHub Token value.
tokenSecret String
type String

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi