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

We recommend using Azure Native.

Azure v6.13.0 published on Monday, Dec 9, 2024 by Pulumi

azure.appservice.getSourceControlToken

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.13.0 published on Monday, Dec 9, 2024 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;
    
    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"])
    
    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
    	})
    }
    
    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,
        };
    });
    
    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());
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:appservice:getSourceControlToken
          Arguments:
            type: GitHub
    outputs:
      id: ${exampleAzurermAppServiceGithubToken.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
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.13.0 published on Monday, Dec 9, 2024 by Pulumi