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

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.appservice.SourceControlToken

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.appservice.SourceControlToken("example", {
        type: "GitHub",
        token: "ghp_sometokenvaluesecretsauce",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.appservice.SourceControlToken("example",
        type="GitHub",
        token="ghp_sometokenvaluesecretsauce")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      example:
        type: azure:appservice:SourceControlToken
        properties:
          type: GitHub
          token: ghp_sometokenvaluesecretsauce
    

    Create SourceControlToken Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SourceControlToken(name: string, args: SourceControlTokenArgs, opts?: CustomResourceOptions);
    @overload
    def SourceControlToken(resource_name: str,
                           args: SourceControlTokenArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def SourceControlToken(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           token: Optional[str] = None,
                           type: Optional[str] = None,
                           token_secret: Optional[str] = None)
    func NewSourceControlToken(ctx *Context, name string, args SourceControlTokenArgs, opts ...ResourceOption) (*SourceControlToken, error)
    public SourceControlToken(string name, SourceControlTokenArgs args, CustomResourceOptions? opts = null)
    public SourceControlToken(String name, SourceControlTokenArgs args)
    public SourceControlToken(String name, SourceControlTokenArgs args, CustomResourceOptions options)
    
    type: azure:appservice:SourceControlToken
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SourceControlTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SourceControlTokenArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SourceControlTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SourceControlTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SourceControlTokenArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var sourceControlTokenResource = new Azure.AppService.SourceControlToken("sourceControlTokenResource", new()
    {
        Token = "string",
        Type = "string",
        TokenSecret = "string",
    });
    
    example, err := appservice.NewSourceControlToken(ctx, "sourceControlTokenResource", &appservice.SourceControlTokenArgs{
    	Token:       pulumi.String("string"),
    	Type:        pulumi.String("string"),
    	TokenSecret: pulumi.String("string"),
    })
    
    var sourceControlTokenResource = new SourceControlToken("sourceControlTokenResource", SourceControlTokenArgs.builder()
        .token("string")
        .type("string")
        .tokenSecret("string")
        .build());
    
    source_control_token_resource = azure.appservice.SourceControlToken("sourceControlTokenResource",
        token="string",
        type="string",
        token_secret="string")
    
    const sourceControlTokenResource = new azure.appservice.SourceControlToken("sourceControlTokenResource", {
        token: "string",
        type: "string",
        tokenSecret: "string",
    });
    
    type: azure:appservice:SourceControlToken
    properties:
        token: string
        tokenSecret: string
        type: string
    

    SourceControlToken Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SourceControlToken resource accepts the following input properties:

    Token string
    The Access Token.
    Type string
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    TokenSecret string

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    Token string
    The Access Token.
    Type string
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    TokenSecret string

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    token String
    The Access Token.
    type String
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    tokenSecret String

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    token string
    The Access Token.
    type string
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    tokenSecret string

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    token str
    The Access Token.
    type str
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    token_secret str

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    token String
    The Access Token.
    type String
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    tokenSecret String

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SourceControlToken resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SourceControlToken Resource

    Get an existing SourceControlToken resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SourceControlTokenState, opts?: CustomResourceOptions): SourceControlToken
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            token: Optional[str] = None,
            token_secret: Optional[str] = None,
            type: Optional[str] = None) -> SourceControlToken
    func GetSourceControlToken(ctx *Context, name string, id IDInput, state *SourceControlTokenState, opts ...ResourceOption) (*SourceControlToken, error)
    public static SourceControlToken Get(string name, Input<string> id, SourceControlTokenState? state, CustomResourceOptions? opts = null)
    public static SourceControlToken get(String name, Output<String> id, SourceControlTokenState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Token string
    The Access Token.
    TokenSecret string

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    Type string
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    Token string
    The Access Token.
    TokenSecret string

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    Type string
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    token String
    The Access Token.
    tokenSecret String

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    type String
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    token string
    The Access Token.
    tokenSecret string

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    type string
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    token str
    The Access Token.
    token_secret str

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

    type str
    The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.
    token String
    The Access Token.
    tokenSecret String

    The Access Token Secret.

    NOTE: The token used for deploying App Service needs the following permissions: repo and workflow.

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

    Import

    App Service Source GitHub Tokens can be imported using the resource id, e.g.

    $ pulumi import azure:appservice/sourceControlToken:SourceControlToken example /providers/Microsoft.Web/sourceControls/GitHub
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi