Source Control Args
data class SourceControlArgs(val autoSync: Output<Boolean>? = null, val automationAccountName: Output<String>? = null, val branch: Output<String>? = null, val description: Output<String>? = null, val folderPath: Output<String>? = null, val publishRunbook: Output<Boolean>? = null, val repoUrl: Output<String>? = null, val resourceGroupName: Output<String>? = null, val securityToken: Output<SourceControlSecurityTokenPropertiesArgs>? = null, val sourceControlName: Output<String>? = null, val sourceType: Output<Either<String, SourceType>>? = null) : ConvertibleToJava<SourceControlArgs>
Definition of the source control. API Version: 2019-06-01.
Example Usage
Create or update a source control
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sourceControl = new AzureNative.Automation.SourceControl("sourceControl", new()
{
AutoSync = true,
AutomationAccountName = "sampleAccount9",
Branch = "master",
Description = "my description",
FolderPath = "/folderOne/folderTwo",
PublishRunbook = true,
RepoUrl = "https://sampleUser.visualstudio.com/myProject/_git/myRepository",
ResourceGroupName = "rg",
SecurityToken = new AzureNative.Automation.Inputs.SourceControlSecurityTokenPropertiesArgs
{
AccessToken = "******",
TokenType = "PersonalAccessToken",
},
SourceControlName = "sampleSourceControl",
SourceType = "VsoGit",
});
});
Content copied to clipboard
package main
import (
automation "github.com/pulumi/pulumi-azure-native-sdk/automation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := automation.NewSourceControl(ctx, "sourceControl", &automation.SourceControlArgs{
AutoSync: pulumi.Bool(true),
AutomationAccountName: pulumi.String("sampleAccount9"),
Branch: pulumi.String("master"),
Description: pulumi.String("my description"),
FolderPath: pulumi.String("/folderOne/folderTwo"),
PublishRunbook: pulumi.Bool(true),
RepoUrl: pulumi.String("https://sampleUser.visualstudio.com/myProject/_git/myRepository"),
ResourceGroupName: pulumi.String("rg"),
SecurityToken: &automation.SourceControlSecurityTokenPropertiesArgs{
AccessToken: pulumi.String("******"),
TokenType: pulumi.String("PersonalAccessToken"),
},
SourceControlName: pulumi.String("sampleSourceControl"),
SourceType: pulumi.String("VsoGit"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.automation.SourceControl;
import com.pulumi.azurenative.automation.SourceControlArgs;
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 sourceControl = new SourceControl("sourceControl", SourceControlArgs.builder()
.autoSync(true)
.automationAccountName("sampleAccount9")
.branch("master")
.description("my description")
.folderPath("/folderOne/folderTwo")
.publishRunbook(true)
.repoUrl("https://sampleUser.visualstudio.com/myProject/_git/myRepository")
.resourceGroupName("rg")
.securityToken(Map.ofEntries(
Map.entry("accessToken", "******"),
Map.entry("tokenType", "PersonalAccessToken")
))
.sourceControlName("sampleSourceControl")
.sourceType("VsoGit")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:automation:SourceControl sampleSourceControl /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(autoSync: Output<Boolean>? = null, automationAccountName: Output<String>? = null, branch: Output<String>? = null, description: Output<String>? = null, folderPath: Output<String>? = null, publishRunbook: Output<Boolean>? = null, repoUrl: Output<String>? = null, resourceGroupName: Output<String>? = null, securityToken: Output<SourceControlSecurityTokenPropertiesArgs>? = null, sourceControlName: Output<String>? = null, sourceType: Output<Either<String, SourceType>>? = null)
Properties
Link copied to clipboard
The name of the automation account.
Link copied to clipboard
The user description of the source control.
Link copied to clipboard
The folder path of the source control. Path must be relative.
Link copied to clipboard
The auto publish of the source control. Default is true.
Link copied to clipboard
Name of an Azure Resource group.
Link copied to clipboard
The authorization token for the repo of the source control.
Link copied to clipboard
The source control name.
Link copied to clipboard
The source type. Must be one of VsoGit, VsoTfvc, GitHub, case sensitive.