AzureDevOps

Pulumi Official
Package maintained by Pulumi
v2.4.0 published on Friday, Apr 22, 2022 by Pulumi

getIteration

Use this data source to access information about an existing Iteration (Sprint) within Azure DevOps.

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 Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new AzureDevOps.Project("example", new AzureDevOps.ProjectArgs
        {
            WorkItemTemplate = "Agile",
            VersionControl = "Git",
            Visibility = "private",
            Description = "Managed by Terraform",
        });
        var example_root_iteration = AzureDevOps.GetIteration.Invoke(new AzureDevOps.GetIterationInvokeArgs
        {
            ProjectId = example.Id,
            Path = "/",
            FetchChildren = true,
        });
        var example_child_iteration = AzureDevOps.GetIteration.Invoke(new AzureDevOps.GetIterationInvokeArgs
        {
            ProjectId = example.Id,
            Path = "/Iteration 1",
            FetchChildren = true,
        });
    }

}
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 {
		example, err := azuredevops.NewProject(ctx, "example", &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
		}
		_ = azuredevops.GetIterationOutput(ctx, GetIterationOutputArgs{
			ProjectId:     example.ID(),
			Path:          pulumi.String("/"),
			FetchChildren: pulumi.Bool(true),
		}, nil)
		_ = azuredevops.GetIterationOutput(ctx, GetIterationOutputArgs{
			ProjectId:     example.ID(),
			Path:          pulumi.String("/Iteration 1"),
			FetchChildren: pulumi.Bool(true),
		}, nil)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.Project("example",
    work_item_template="Agile",
    version_control="Git",
    visibility="private",
    description="Managed by Terraform")
example_root_iteration = azuredevops.get_iteration_output(project_id=example.id,
    path="/",
    fetch_children=True)
example_child_iteration = azuredevops.get_iteration_output(project_id=example.id,
    path="/Iteration 1",
    fetch_children=True)
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const example = new azuredevops.Project("example", {
    workItemTemplate: "Agile",
    versionControl: "Git",
    visibility: "private",
    description: "Managed by Terraform",
});
const example-root-iteration = azuredevops.getIterationOutput({
    projectId: example.id,
    path: "/",
    fetchChildren: true,
});
const example-child-iteration = azuredevops.getIterationOutput({
    projectId: example.id,
    path: "/Iteration 1",
    fetchChildren: true,
});

Coming soon!

Using getIteration

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 getIteration(args: GetIterationArgs, opts?: InvokeOptions): Promise<GetIterationResult>
function getIterationOutput(args: GetIterationOutputArgs, opts?: InvokeOptions): Output<GetIterationResult>
def get_iteration(fetch_children: Optional[bool] = None,
                  path: Optional[str] = None,
                  project_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetIterationResult
def get_iteration_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[GetIterationResult]
func GetIteration(ctx *Context, args *GetIterationArgs, opts ...InvokeOption) (*GetIterationResult, error)
func GetIterationOutput(ctx *Context, args *GetIterationOutputArgs, opts ...InvokeOption) GetIterationResultOutput

> Note: This function is named GetIteration in the Go SDK.

public static class GetIteration 
{
    public static Task<GetIterationResult> InvokeAsync(GetIterationArgs args, InvokeOptions? opts = null)
    public static Output<GetIterationResult> Invoke(GetIterationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIterationResult> getIteration(GetIterationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azuredevops:index/getIteration:getIteration
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ProjectId string

The project ID.

FetchChildren bool

Read children nodes, Depth: 1, Default: true

Path string

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

ProjectId string

The project ID.

FetchChildren bool

Read children nodes, Depth: 1, Default: true

Path string

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

projectId String

The project ID.

fetchChildren Boolean

Read children nodes, Depth: 1, Default: true

path String

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

projectId string

The project ID.

fetchChildren boolean

Read children nodes, Depth: 1, Default: true

path string

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration 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 Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

projectId String

The project ID.

fetchChildren Boolean

Read children nodes, Depth: 1, Default: true

path String

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

getIteration Result

The following output properties are available:

Childrens List<Pulumi.AzureDevOps.Outputs.GetIterationChildren>

A list of children blocks as defined below, empty if has_children == false

HasChildren bool

Indicator if the child Iteration node has child nodes

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the child Iteration node

Path string

The complete path (in relative URL format) of the child Iteration

ProjectId string

The project ID of the child Iteration node

FetchChildren bool
Childrens []GetIterationChildren

A list of children blocks as defined below, empty if has_children == false

HasChildren bool

Indicator if the child Iteration node has child nodes

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the child Iteration node

Path string

The complete path (in relative URL format) of the child Iteration

ProjectId string

The project ID of the child Iteration node

FetchChildren bool
childrens List<GetIterationChildren>

A list of children blocks as defined below, empty if has_children == false

hasChildren Boolean

Indicator if the child Iteration node has child nodes

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the child Iteration node

path String

The complete path (in relative URL format) of the child Iteration

projectId String

The project ID of the child Iteration node

fetchChildren Boolean
childrens GetIterationChildren[]

A list of children blocks as defined below, empty if has_children == false

hasChildren boolean

Indicator if the child Iteration node has child nodes

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the child Iteration node

path string

The complete path (in relative URL format) of the child Iteration

projectId string

The project ID of the child Iteration node

fetchChildren boolean
childrens Sequence[GetIterationChildren]

A list of children blocks as defined below, empty if has_children == false

has_children bool

Indicator if the child Iteration node has child nodes

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the child Iteration node

path str

The complete path (in relative URL format) of the child Iteration

project_id str

The project ID of the child Iteration node

fetch_children bool
childrens List<Property Map>

A list of children blocks as defined below, empty if has_children == false

hasChildren Boolean

Indicator if the child Iteration node has child nodes

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the child Iteration node

path String

The complete path (in relative URL format) of the child Iteration

projectId String

The project ID of the child Iteration node

fetchChildren Boolean

Supporting Types

GetIterationChildren

HasChildren bool

Indicator if the child Iteration node has child nodes

Id string

The id of the child Iteration node

Name string

The name of the child Iteration node

Path string

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

ProjectId string

The project ID.

HasChildren bool

Indicator if the child Iteration node has child nodes

Id string

The id of the child Iteration node

Name string

The name of the child Iteration node

Path string

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

ProjectId string

The project ID.

hasChildren Boolean

Indicator if the child Iteration node has child nodes

id String

The id of the child Iteration node

name String

The name of the child Iteration node

path String

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

projectId String

The project ID.

hasChildren boolean

Indicator if the child Iteration node has child nodes

id string

The id of the child Iteration node

name string

The name of the child Iteration node

path string

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

projectId string

The project ID.

has_children bool

Indicator if the child Iteration node has child nodes

id str

The id of the child Iteration node

name str

The name of the child Iteration node

path str

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

project_id str

The project ID.

hasChildren Boolean

Indicator if the child Iteration node has child nodes

id String

The id of the child Iteration node

name String

The name of the child Iteration node

path String

The path to the Iteration, Format: URL relative; if omitted, or value "/" is used, the root Iteration will be returned

projectId String

The project ID.

Package Details

Repository
https://github.com/pulumi/pulumi-azuredevops
License
Apache-2.0
Notes

This Pulumi package is based on the azuredevops Terraform Provider.