Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi
azuredevops.getArea
Explore with Pulumi AI
Use this data source to access information about an existing Area (Component) within Azure DevOps.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const exampleProject = new azuredevops.Project("example", {
name: "Example Project",
workItemTemplate: "Agile",
versionControl: "Git",
visibility: "private",
description: "Managed by Terraform",
});
const example = exampleProject.id.apply(id => azuredevops.getAreaOutput({
projectId: id,
path: "/",
fetchChildren: false,
}));
import pulumi
import pulumi_azuredevops as azuredevops
example_project = azuredevops.Project("example",
name="Example Project",
work_item_template="Agile",
version_control="Git",
visibility="private",
description="Managed by Terraform")
example = example_project.id.apply(lambda id: azuredevops.get_area_output(project_id=id,
path="/",
fetch_children=False))
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 {
exampleProject, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
Name: pulumi.String("Example Project"),
WorkItemTemplate: pulumi.String("Agile"),
VersionControl: pulumi.String("Git"),
Visibility: pulumi.String("private"),
Description: pulumi.String("Managed by Terraform"),
})
if err != nil {
return err
}
_ = exampleProject.ID().ApplyT(func(id string) (azuredevops.GetAreaResult, error) {
return azuredevops.GetAreaResult(interface{}(azuredevops.GetAreaOutput(ctx, azuredevops.GetAreaOutputArgs{
ProjectId: id,
Path: "/",
FetchChildren: false,
}, nil))), nil
}).(azuredevops.GetAreaResultOutput)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() =>
{
var exampleProject = new AzureDevOps.Project("example", new()
{
Name = "Example Project",
WorkItemTemplate = "Agile",
VersionControl = "Git",
Visibility = "private",
Description = "Managed by Terraform",
});
var example = AzureDevOps.GetArea.Invoke(new()
{
ProjectId = exampleProject.Id,
Path = "/",
FetchChildren = false,
});
});
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.AzuredevopsFunctions;
import com.pulumi.azuredevops.inputs.GetAreaArgs;
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 exampleProject = new Project("exampleProject", ProjectArgs.builder()
.name("Example Project")
.workItemTemplate("Agile")
.versionControl("Git")
.visibility("private")
.description("Managed by Terraform")
.build());
final var example = AzuredevopsFunctions.getArea(GetAreaArgs.builder()
.projectId(exampleProject.id())
.path("/")
.fetchChildren("false")
.build());
}
}
resources:
exampleProject:
type: azuredevops:Project
name: example
properties:
name: Example Project
workItemTemplate: Agile
versionControl: Git
visibility: private
description: Managed by Terraform
variables:
example:
fn::invoke:
Function: azuredevops:getArea
Arguments:
projectId: ${exampleProject.id}
path: /
fetchChildren: 'false'
Relevant Links
PAT Permissions Required
- Project & Team: vso.work - Grants the ability to read work items, queries, boards, area and iterations paths, and other work item tracking related metadata. Also grants the ability to execute queries, search work items and to receive notifications about work item events via service hooks.
Using getArea
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 getArea(args: GetAreaArgs, opts?: InvokeOptions): Promise<GetAreaResult>
function getAreaOutput(args: GetAreaOutputArgs, opts?: InvokeOptions): Output<GetAreaResult>
def get_area(fetch_children: Optional[bool] = None,
path: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAreaResult
def get_area_output(fetch_children: Optional[pulumi.Input[bool]] = None,
path: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAreaResult]
func GetArea(ctx *Context, args *GetAreaArgs, opts ...InvokeOption) (*GetAreaResult, error)
func GetAreaOutput(ctx *Context, args *GetAreaOutputArgs, opts ...InvokeOption) GetAreaResultOutput
> Note: This function is named GetArea
in the Go SDK.
public static class GetArea
{
public static Task<GetAreaResult> InvokeAsync(GetAreaArgs args, InvokeOptions? opts = null)
public static Output<GetAreaResult> Invoke(GetAreaInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAreaResult> getArea(GetAreaArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azuredevops:index/getArea:getArea
arguments:
# arguments dictionary
The following arguments are supported:
- Project
Id string - The project ID.
- Fetch
Children bool - Read children nodes, Depth: 1, Default:
true
- Path string
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned
- Project
Id string - The project ID.
- Fetch
Children bool - Read children nodes, Depth: 1, Default:
true
- Path string
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned
- project
Id String - The project ID.
- fetch
Children Boolean - Read children nodes, Depth: 1, Default:
true
- path String
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned
- project
Id string - The project ID.
- fetch
Children boolean - Read children nodes, Depth: 1, Default:
true
- path string
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned
- project_
id str - The project ID.
- fetch_
children bool - Read children nodes, Depth: 1, Default:
true
- path str
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned
- project
Id String - The project ID.
- fetch
Children Boolean - Read children nodes, Depth: 1, Default:
true
- path String
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned
getArea Result
The following output properties are available:
- Childrens
List<Pulumi.
Azure Dev Ops. Outputs. Get Area Children> - A list of
children
blocks as defined below, empty ifhas_children == false
- Has
Children bool - Indicator if the child Area node has child nodes
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the child Area node
- Path string
- The complete path (in relative URL format) of the child Area
- Project
Id string - The project ID of the child Area node
- Fetch
Children bool
- Childrens
[]Get
Area Children - A list of
children
blocks as defined below, empty ifhas_children == false
- Has
Children bool - Indicator if the child Area node has child nodes
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the child Area node
- Path string
- The complete path (in relative URL format) of the child Area
- Project
Id string - The project ID of the child Area node
- Fetch
Children bool
- childrens
List<Get
Area Children> - A list of
children
blocks as defined below, empty ifhas_children == false
- has
Children Boolean - Indicator if the child Area node has child nodes
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the child Area node
- path String
- The complete path (in relative URL format) of the child Area
- project
Id String - The project ID of the child Area node
- fetch
Children Boolean
- childrens
Get
Area Children[] - A list of
children
blocks as defined below, empty ifhas_children == false
- has
Children boolean - Indicator if the child Area node has child nodes
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the child Area node
- path string
- The complete path (in relative URL format) of the child Area
- project
Id string - The project ID of the child Area node
- fetch
Children boolean
- childrens
Sequence[Get
Area Children] - A list of
children
blocks as defined below, empty ifhas_children == false
- has_
children bool - Indicator if the child Area node has child nodes
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the child Area node
- path str
- The complete path (in relative URL format) of the child Area
- project_
id str - The project ID of the child Area node
- fetch_
children bool
- childrens List<Property Map>
- A list of
children
blocks as defined below, empty ifhas_children == false
- has
Children Boolean - Indicator if the child Area node has child nodes
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the child Area node
- path String
- The complete path (in relative URL format) of the child Area
- project
Id String - The project ID of the child Area node
- fetch
Children Boolean
Supporting Types
GetAreaChildren
- Has
Children bool - Indicator if the child Area node has child nodes
- Id string
- The id of the child Area node
- Name string
- The name of the child Area node
- Path string
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned - Project
Id string - The project ID.
- Has
Children bool - Indicator if the child Area node has child nodes
- Id string
- The id of the child Area node
- Name string
- The name of the child Area node
- Path string
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned - Project
Id string - The project ID.
- has
Children Boolean - Indicator if the child Area node has child nodes
- id String
- The id of the child Area node
- name String
- The name of the child Area node
- path String
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned - project
Id String - The project ID.
- has
Children boolean - Indicator if the child Area node has child nodes
- id string
- The id of the child Area node
- name string
- The name of the child Area node
- path string
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned - project
Id string - The project ID.
- has_
children bool - Indicator if the child Area node has child nodes
- id str
- The id of the child Area node
- name str
- The name of the child Area node
- path str
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned - project_
id str - The project ID.
- has
Children Boolean - Indicator if the child Area node has child nodes
- id String
- The id of the child Area node
- name String
- The name of the child Area node
- path String
- The path to the Area; Format: URL relative; if omitted, or value
"/"
is used, the root Area will be returned - project
Id String - The project ID.
Package Details
- Repository
- Azure DevOps pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azuredevops
Terraform Provider.