azuredevops.getArea
Explore with Pulumi AI
Use this data source to access information about an existing Area (Component) within Azure DevOps.
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.
Example Usage
using System.Collections.Generic;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() =>
{
var exampleProject = new AzureDevOps.Project("exampleProject", new()
{
WorkItemTemplate = "Agile",
VersionControl = "Git",
Visibility = "private",
Description = "Managed by Terraform",
});
var exampleArea = AzureDevOps.GetArea.Invoke(new()
{
ProjectId = exampleProject.Id,
Path = "/",
FetchChildren = false,
});
});
package main
import (
"github.com/pulumi/pulumi-azuredevops/sdk/v2/go/azuredevops"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleProject, err := azuredevops.NewProject(ctx, "exampleProject", &azuredevops.ProjectArgs{
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.GetAreaOutput(ctx, azuredevops.GetAreaOutputArgs{
ProjectId: id,
Path: "/",
FetchChildren: false,
}, nil), nil
}).(azuredevops.GetAreaResultOutput)
return nil
})
}
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()
.workItemTemplate("Agile")
.versionControl("Git")
.visibility("private")
.description("Managed by Terraform")
.build());
final var exampleArea = AzuredevopsFunctions.getArea(GetAreaArgs.builder()
.projectId(exampleProject.id())
.path("/")
.fetchChildren("false")
.build());
}
}
import pulumi
import pulumi_azuredevops as azuredevops
example_project = azuredevops.Project("exampleProject",
work_item_template="Agile",
version_control="Git",
visibility="private",
description="Managed by Terraform")
example_area = example_project.id.apply(lambda id: azuredevops.get_area_output(project_id=id,
path="/",
fetch_children=False))
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const exampleProject = new azuredevops.Project("exampleProject", {
workItemTemplate: "Agile",
versionControl: "Git",
visibility: "private",
description: "Managed by Terraform",
});
const exampleArea = exampleProject.id.apply(id => azuredevops.getAreaOutput({
projectId: id,
path: "/",
fetchChildren: false,
}));
resources:
exampleProject:
type: azuredevops:Project
properties:
workItemTemplate: Agile
versionControl: Git
visibility: private
description: Managed by Terraform
variables:
exampleArea:
fn::invoke:
Function: azuredevops:getArea
Arguments:
projectId: ${exampleProject.id}
path: /
fetchChildren: 'false'
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.