Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.11.0 published on Monday, Jun 27, 2022 by Pulumi

getSourceControlToken

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.AppService.GetSourceControlToken.InvokeAsync(new Azure.AppService.GetSourceControlTokenArgs
        {
            Type = "GitHub",
        }));
        this.Id = data.Azurerm_app_service_github_token.Example.Id;
    }

    [Output("id")]
    public Output<string> Id { get; set; }
}
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.LookupSourceControlToken(ctx, &appservice.LookupSourceControlTokenArgs{
			Type: "GitHub",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", data.Azurerm_app_service_github_token.Example.Id)
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(AppserviceFunctions.getSourceControlToken(GetSourceControlTokenArgs.builder()
            .type("GitHub")
            .build()));

        ctx.export("id", data.azurerm_app_service_github_token().example().id());
    }
}
import pulumi
import pulumi_azure as azure

example = azure.appservice.get_source_control_token(type="GitHub")
pulumi.export("id", data["azurerm_app_service_github_token"]["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.appservice.getSourceControlToken({
    type: "GitHub",
});
export const id = data.azurerm_app_service_github_token.example.id;
variables:
  example:
    Fn::Invoke:
      Function: azure:appservice:getSourceControlToken
      Arguments:
        type: GitHub
outputs:
  id: ${data.azurerm_app_service_github_token.example.id}

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>
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]
func LookupSourceControlToken(ctx *Context, args *LookupSourceControlTokenArgs, opts ...InvokeOption) (*LookupSourceControlTokenResult, error)
func LookupSourceControlTokenOutput(ctx *Context, args *LookupSourceControlTokenOutputArgs, opts ...InvokeOption) LookupSourceControlTokenResultOutput

> 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)
}
public static CompletableFuture<GetSourceControlTokenResult> getSourceControlToken(GetSourceControlTokenArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azure:appservice/getSourceControlToken:getSourceControlToken
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Type string

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

Type string

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

type String

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

type string

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

type str

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

type 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
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.