1. Packages
  2. Azuredevops Provider
  3. API Docs
  4. Wiki
Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi

azuredevops.Wiki

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi

    Manages Wikis within Azure DevOps project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuredevops from "@pulumi/azuredevops";
    
    const example = new azuredevops.Project("example", {
        name: "Example Project",
        description: "Managed by Terraform",
    });
    const exampleGit = new azuredevops.Git("example", {
        projectId: example.id,
        name: "Example Repository",
        initialization: {
            initType: "Clean",
        },
    });
    const exampleWiki = new azuredevops.Wiki("example", {
        name: "Example project wiki ",
        projectId: example.id,
        type: "projectWiki",
    });
    const example2 = new azuredevops.Wiki("example2", {
        name: "Example wiki in repository",
        projectId: example.id,
        repositoryId: exampleGit.id,
        version: "main",
        type: "codeWiki",
        mappedpath: "/",
    });
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example = azuredevops.Project("example",
        name="Example Project",
        description="Managed by Terraform")
    example_git = azuredevops.Git("example",
        project_id=example.id,
        name="Example Repository",
        initialization={
            "init_type": "Clean",
        })
    example_wiki = azuredevops.Wiki("example",
        name="Example project wiki ",
        project_id=example.id,
        type="projectWiki")
    example2 = azuredevops.Wiki("example2",
        name="Example wiki in repository",
        project_id=example.id,
        repository_id=example_git.id,
        version="main",
        type="codeWiki",
        mappedpath="/")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
    			Name:        pulumi.String("Example Project"),
    			Description: pulumi.String("Managed by Terraform"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleGit, err := azuredevops.NewGit(ctx, "example", &azuredevops.GitArgs{
    			ProjectId: example.ID(),
    			Name:      pulumi.String("Example Repository"),
    			Initialization: &azuredevops.GitInitializationArgs{
    				InitType: pulumi.String("Clean"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuredevops.NewWiki(ctx, "example", &azuredevops.WikiArgs{
    			Name:      pulumi.String("Example project wiki "),
    			ProjectId: example.ID(),
    			Type:      pulumi.String("projectWiki"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuredevops.NewWiki(ctx, "example2", &azuredevops.WikiArgs{
    			Name:         pulumi.String("Example wiki in repository"),
    			ProjectId:    example.ID(),
    			RepositoryId: exampleGit.ID(),
    			Version:      pulumi.String("main"),
    			Type:         pulumi.String("codeWiki"),
    			Mappedpath:   pulumi.String("/"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureDevOps = Pulumi.AzureDevOps;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureDevOps.Project("example", new()
        {
            Name = "Example Project",
            Description = "Managed by Terraform",
        });
    
        var exampleGit = new AzureDevOps.Git("example", new()
        {
            ProjectId = example.Id,
            Name = "Example Repository",
            Initialization = new AzureDevOps.Inputs.GitInitializationArgs
            {
                InitType = "Clean",
            },
        });
    
        var exampleWiki = new AzureDevOps.Wiki("example", new()
        {
            Name = "Example project wiki ",
            ProjectId = example.Id,
            Type = "projectWiki",
        });
    
        var example2 = new AzureDevOps.Wiki("example2", new()
        {
            Name = "Example wiki in repository",
            ProjectId = example.Id,
            RepositoryId = exampleGit.Id,
            Version = "main",
            Type = "codeWiki",
            Mappedpath = "/",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuredevops.Project;
    import com.pulumi.azuredevops.ProjectArgs;
    import com.pulumi.azuredevops.Git;
    import com.pulumi.azuredevops.GitArgs;
    import com.pulumi.azuredevops.inputs.GitInitializationArgs;
    import com.pulumi.azuredevops.Wiki;
    import com.pulumi.azuredevops.WikiArgs;
    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 Project("example", ProjectArgs.builder()
                .name("Example Project")
                .description("Managed by Terraform")
                .build());
    
            var exampleGit = new Git("exampleGit", GitArgs.builder()
                .projectId(example.id())
                .name("Example Repository")
                .initialization(GitInitializationArgs.builder()
                    .initType("Clean")
                    .build())
                .build());
    
            var exampleWiki = new Wiki("exampleWiki", WikiArgs.builder()
                .name("Example project wiki ")
                .projectId(example.id())
                .type("projectWiki")
                .build());
    
            var example2 = new Wiki("example2", WikiArgs.builder()
                .name("Example wiki in repository")
                .projectId(example.id())
                .repositoryId(exampleGit.id())
                .version("main")
                .type("codeWiki")
                .mappedpath("/")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuredevops:Project
        properties:
          name: Example Project
          description: Managed by Terraform
      exampleGit:
        type: azuredevops:Git
        name: example
        properties:
          projectId: ${example.id}
          name: Example Repository
          initialization:
            initType: Clean
      exampleWiki:
        type: azuredevops:Wiki
        name: example
        properties:
          name: 'Example project wiki '
          projectId: ${example.id}
          type: projectWiki
      example2:
        type: azuredevops:Wiki
        properties:
          name: Example wiki in repository
          projectId: ${example.id}
          repositoryId: ${exampleGit.id}
          version: main
          type: codeWiki
          mappedpath: /
    

    Create Wiki Resource

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

    Constructor syntax

    new Wiki(name: string, args: WikiArgs, opts?: CustomResourceOptions);
    @overload
    def Wiki(resource_name: str,
             args: WikiArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Wiki(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             type: Optional[str] = None,
             mapped_path: Optional[str] = None,
             name: Optional[str] = None,
             project_id: Optional[str] = None,
             repository_id: Optional[str] = None,
             version: Optional[str] = None)
    func NewWiki(ctx *Context, name string, args WikiArgs, opts ...ResourceOption) (*Wiki, error)
    public Wiki(string name, WikiArgs args, CustomResourceOptions? opts = null)
    public Wiki(String name, WikiArgs args)
    public Wiki(String name, WikiArgs args, CustomResourceOptions options)
    
    type: azuredevops:Wiki
    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 WikiArgs
    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 WikiArgs
    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 WikiArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WikiArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WikiArgs
    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 wikiResource = new AzureDevOps.Wiki("wikiResource", new()
    {
        Type = "string",
        MappedPath = "string",
        Name = "string",
        ProjectId = "string",
        RepositoryId = "string",
        Version = "string",
    });
    
    example, err := azuredevops.NewWiki(ctx, "wikiResource", &azuredevops.WikiArgs{
    	Type:         pulumi.String("string"),
    	MappedPath:   pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	ProjectId:    pulumi.String("string"),
    	RepositoryId: pulumi.String("string"),
    	Version:      pulumi.String("string"),
    })
    
    var wikiResource = new Wiki("wikiResource", WikiArgs.builder()
        .type("string")
        .mappedPath("string")
        .name("string")
        .projectId("string")
        .repositoryId("string")
        .version("string")
        .build());
    
    wiki_resource = azuredevops.Wiki("wikiResource",
        type="string",
        mapped_path="string",
        name="string",
        project_id="string",
        repository_id="string",
        version="string")
    
    const wikiResource = new azuredevops.Wiki("wikiResource", {
        type: "string",
        mappedPath: "string",
        name: "string",
        projectId: "string",
        repositoryId: "string",
        version: "string",
    });
    
    type: azuredevops:Wiki
    properties:
        mappedPath: string
        name: string
        projectId: string
        repositoryId: string
        type: string
        version: string
    

    Wiki Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Wiki resource accepts the following input properties:

    Type string
    The type of the wiki. Possible values are codeWiki, projectWiki.
    MappedPath string
    Name string
    The name of the Wiki.
    ProjectId string
    The ID of the Project.
    RepositoryId string
    The ID of the repository.
    Version string
    Version of the wiki.
    Type string
    The type of the wiki. Possible values are codeWiki, projectWiki.
    MappedPath string
    Name string
    The name of the Wiki.
    ProjectId string
    The ID of the Project.
    RepositoryId string
    The ID of the repository.
    Version string
    Version of the wiki.
    type String
    The type of the wiki. Possible values are codeWiki, projectWiki.
    mappedPath String
    name String
    The name of the Wiki.
    projectId String
    The ID of the Project.
    repositoryId String
    The ID of the repository.
    version String
    Version of the wiki.
    type string
    The type of the wiki. Possible values are codeWiki, projectWiki.
    mappedPath string
    name string
    The name of the Wiki.
    projectId string
    The ID of the Project.
    repositoryId string
    The ID of the repository.
    version string
    Version of the wiki.
    type str
    The type of the wiki. Possible values are codeWiki, projectWiki.
    mapped_path str
    name str
    The name of the Wiki.
    project_id str
    The ID of the Project.
    repository_id str
    The ID of the repository.
    version str
    Version of the wiki.
    type String
    The type of the wiki. Possible values are codeWiki, projectWiki.
    mappedPath String
    name String
    The name of the Wiki.
    projectId String
    The ID of the Project.
    repositoryId String
    The ID of the repository.
    version String
    Version of the wiki.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RemoteUrl string
    The remote web url to the wiki.
    Url string
    The REST url for this wiki.
    Id string
    The provider-assigned unique ID for this managed resource.
    RemoteUrl string
    The remote web url to the wiki.
    Url string
    The REST url for this wiki.
    id String
    The provider-assigned unique ID for this managed resource.
    remoteUrl String
    The remote web url to the wiki.
    url String
    The REST url for this wiki.
    id string
    The provider-assigned unique ID for this managed resource.
    remoteUrl string
    The remote web url to the wiki.
    url string
    The REST url for this wiki.
    id str
    The provider-assigned unique ID for this managed resource.
    remote_url str
    The remote web url to the wiki.
    url str
    The REST url for this wiki.
    id String
    The provider-assigned unique ID for this managed resource.
    remoteUrl String
    The remote web url to the wiki.
    url String
    The REST url for this wiki.

    Look up Existing Wiki Resource

    Get an existing Wiki 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?: WikiState, opts?: CustomResourceOptions): Wiki
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            mapped_path: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            remote_url: Optional[str] = None,
            repository_id: Optional[str] = None,
            type: Optional[str] = None,
            url: Optional[str] = None,
            version: Optional[str] = None) -> Wiki
    func GetWiki(ctx *Context, name string, id IDInput, state *WikiState, opts ...ResourceOption) (*Wiki, error)
    public static Wiki Get(string name, Input<string> id, WikiState? state, CustomResourceOptions? opts = null)
    public static Wiki get(String name, Output<String> id, WikiState 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:
    MappedPath string
    Name string
    The name of the Wiki.
    ProjectId string
    The ID of the Project.
    RemoteUrl string
    The remote web url to the wiki.
    RepositoryId string
    The ID of the repository.
    Type string
    The type of the wiki. Possible values are codeWiki, projectWiki.
    Url string
    The REST url for this wiki.
    Version string
    Version of the wiki.
    MappedPath string
    Name string
    The name of the Wiki.
    ProjectId string
    The ID of the Project.
    RemoteUrl string
    The remote web url to the wiki.
    RepositoryId string
    The ID of the repository.
    Type string
    The type of the wiki. Possible values are codeWiki, projectWiki.
    Url string
    The REST url for this wiki.
    Version string
    Version of the wiki.
    mappedPath String
    name String
    The name of the Wiki.
    projectId String
    The ID of the Project.
    remoteUrl String
    The remote web url to the wiki.
    repositoryId String
    The ID of the repository.
    type String
    The type of the wiki. Possible values are codeWiki, projectWiki.
    url String
    The REST url for this wiki.
    version String
    Version of the wiki.
    mappedPath string
    name string
    The name of the Wiki.
    projectId string
    The ID of the Project.
    remoteUrl string
    The remote web url to the wiki.
    repositoryId string
    The ID of the repository.
    type string
    The type of the wiki. Possible values are codeWiki, projectWiki.
    url string
    The REST url for this wiki.
    version string
    Version of the wiki.
    mapped_path str
    name str
    The name of the Wiki.
    project_id str
    The ID of the Project.
    remote_url str
    The remote web url to the wiki.
    repository_id str
    The ID of the repository.
    type str
    The type of the wiki. Possible values are codeWiki, projectWiki.
    url str
    The REST url for this wiki.
    version str
    Version of the wiki.
    mappedPath String
    name String
    The name of the Wiki.
    projectId String
    The ID of the Project.
    remoteUrl String
    The remote web url to the wiki.
    repositoryId String
    The ID of the repository.
    type String
    The type of the wiki. Possible values are codeWiki, projectWiki.
    url String
    The REST url for this wiki.
    version String
    Version of the wiki.

    Import

    Azure DevOps Wiki can be imported using the id

    $ pulumi import azuredevops:index/wiki:Wiki wiki 00000000-0000-0000-0000-000000000000
    

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

    Package Details

    Repository
    Azure DevOps pulumi/pulumi-azuredevops
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuredevops Terraform Provider.
    azuredevops logo
    Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi