SourceControlArgs

data class SourceControlArgs(val contentTypes: Output<List<Either<String, ContentType>>>? = null, val createdAt: Output<String>? = null, val createdBy: Output<String>? = null, val createdByType: Output<Either<String, CreatedByType>>? = null, val description: Output<String>? = null, val displayName: Output<String>? = null, val id: Output<String>? = null, val lastModifiedAt: Output<String>? = null, val lastModifiedBy: Output<String>? = null, val lastModifiedByType: Output<Either<String, CreatedByType>>? = null, val operationalInsightsResourceProvider: Output<String>? = null, val repoType: Output<Either<String, RepoType>>? = null, val repository: Output<RepositoryArgs>? = null, val resourceGroupName: Output<String>? = null, val sourceControlId: Output<String>? = null, val workspaceName: Output<String>? = null) : ConvertibleToJava<SourceControlArgs>

Represents a SourceControl in Azure Security Insights. API Version: 2021-03-01-preview.

Example Usage

Creates a source control.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sourceControl = new AzureNative.SecurityInsights.SourceControl("sourceControl", new()
{
ContentTypes = new[]
{
"AnalyticRules",
"Workbook",
},
Description = "This is a source control",
DisplayName = "My Source Control",
OperationalInsightsResourceProvider = "Microsoft.OperationalInsights",
RepoType = "Github",
Repository = new AzureNative.SecurityInsights.Inputs.RepositoryArgs
{
Branch = "master",
DisplayUrl = "https://github.com/user/repo",
PathMapping = new[]
{
new AzureNative.SecurityInsights.Inputs.ContentPathMapArgs
{
ContentType = "AnalyticRules",
Path = "path/to/rules",
},
new AzureNative.SecurityInsights.Inputs.ContentPathMapArgs
{
ContentType = "Workbook",
Path = "path/to/workbooks",
},
},
Url = "https://github.com/user/repo",
},
ResourceGroupName = "myRg",
SourceControlId = "789e0c1f-4a3d-43ad-809c-e713b677b04a",
WorkspaceName = "myWorkspace",
});
});
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native-sdk/securityinsights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityinsights.NewSourceControl(ctx, "sourceControl", &securityinsights.SourceControlArgs{
ContentTypes: pulumi.StringArray{
pulumi.String("AnalyticRules"),
pulumi.String("Workbook"),
},
Description: pulumi.String("This is a source control"),
DisplayName: pulumi.String("My Source Control"),
OperationalInsightsResourceProvider: pulumi.String("Microsoft.OperationalInsights"),
RepoType: pulumi.String("Github"),
Repository: securityinsights.RepositoryResponse{
Branch: pulumi.String("master"),
DisplayUrl: pulumi.String("https://github.com/user/repo"),
PathMapping: securityinsights.ContentPathMapArray{
&securityinsights.ContentPathMapArgs{
ContentType: pulumi.String("AnalyticRules"),
Path: pulumi.String("path/to/rules"),
},
&securityinsights.ContentPathMapArgs{
ContentType: pulumi.String("Workbook"),
Path: pulumi.String("path/to/workbooks"),
},
},
Url: pulumi.String("https://github.com/user/repo"),
},
ResourceGroupName: pulumi.String("myRg"),
SourceControlId: pulumi.String("789e0c1f-4a3d-43ad-809c-e713b677b04a"),
WorkspaceName: pulumi.String("myWorkspace"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.securityinsights.SourceControl;
import com.pulumi.azurenative.securityinsights.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()
.contentTypes(
"AnalyticRules",
"Workbook")
.description("This is a source control")
.displayName("My Source Control")
.operationalInsightsResourceProvider("Microsoft.OperationalInsights")
.repoType("Github")
.repository(Map.ofEntries(
Map.entry("branch", "master"),
Map.entry("displayUrl", "https://github.com/user/repo"),
Map.entry("pathMapping",
Map.ofEntries(
Map.entry("contentType", "AnalyticRules"),
Map.entry("path", "path/to/rules")
),
Map.ofEntries(
Map.entry("contentType", "Workbook"),
Map.entry("path", "path/to/workbooks")
)),
Map.entry("url", "https://github.com/user/repo")
))
.resourceGroupName("myRg")
.sourceControlId("789e0c1f-4a3d-43ad-809c-e713b677b04a")
.workspaceName("myWorkspace")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:securityinsights:SourceControl 789e0c1f-4a3d-43ad-809c-e713b677b04a /subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/sourcecontrols/789e0c1f-4a3d-43ad-809c-e713b677b04a

Constructors

Link copied to clipboard
constructor(contentTypes: Output<List<Either<String, ContentType>>>? = null, createdAt: Output<String>? = null, createdBy: Output<String>? = null, createdByType: Output<Either<String, CreatedByType>>? = null, description: Output<String>? = null, displayName: Output<String>? = null, id: Output<String>? = null, lastModifiedAt: Output<String>? = null, lastModifiedBy: Output<String>? = null, lastModifiedByType: Output<Either<String, CreatedByType>>? = null, operationalInsightsResourceProvider: Output<String>? = null, repoType: Output<Either<String, RepoType>>? = null, repository: Output<RepositoryArgs>? = null, resourceGroupName: Output<String>? = null, sourceControlId: Output<String>? = null, workspaceName: Output<String>? = null)

Properties

Link copied to clipboard
val contentTypes: Output<List<Either<String, ContentType>>>? = null

Array of source control content types.

Link copied to clipboard
val createdAt: Output<String>? = null

The timestamp of resource creation (UTC).

Link copied to clipboard
val createdBy: Output<String>? = null

The identity that created the resource.

Link copied to clipboard
val createdByType: Output<Either<String, CreatedByType>>? = null

The type of identity that created the resource.

Link copied to clipboard
val description: Output<String>? = null

A description of the source control

Link copied to clipboard
val displayName: Output<String>? = null

The display name of the source control

Link copied to clipboard
val id: Output<String>? = null

The id (a Guid) of the source control

Link copied to clipboard
val lastModifiedAt: Output<String>? = null

The timestamp of resource last modification (UTC)

Link copied to clipboard
val lastModifiedBy: Output<String>? = null

The identity that last modified the resource.

Link copied to clipboard
val lastModifiedByType: Output<Either<String, CreatedByType>>? = null

The type of identity that last modified the resource.

Link copied to clipboard

The namespace of workspaces resource provider- Microsoft.OperationalInsights.

Link copied to clipboard
val repository: Output<RepositoryArgs>? = null

Repository metadata.

Link copied to clipboard
val repoType: Output<Either<String, RepoType>>? = null

The repository type of the source control

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val sourceControlId: Output<String>? = null

Source control Id

Link copied to clipboard
val workspaceName: Output<String>? = null

The name of the workspace.

Functions

Link copied to clipboard
open override fun toJava(): SourceControlArgs