vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getTask
Explore with Pulumi AI
Provides a data source for available tasks.
Supported in provider v3.8+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
export = async () => {
const some_taskTask = await vcd.getTask({
id: "d4fdcaa9-8db4-45a9-80b8-69de49901bc7",
});
return {
"some-task": some_taskTask,
};
}
import pulumi
import pulumi_vcd as vcd
some_task_task = vcd.get_task(id="d4fdcaa9-8db4-45a9-80b8-69de49901bc7")
pulumi.export("some-task", some_task_task)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
some_taskTask, err := vcd.GetTask(ctx, &vcd.GetTaskArgs{
Id: "d4fdcaa9-8db4-45a9-80b8-69de49901bc7",
}, nil)
if err != nil {
return err
}
ctx.Export("some-task", some_taskTask)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var some_taskTask = Vcd.GetTask.Invoke(new()
{
Id = "d4fdcaa9-8db4-45a9-80b8-69de49901bc7",
});
return new Dictionary<string, object?>
{
["some-task"] = some_taskTask,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetTaskArgs;
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) {
final var some-taskTask = VcdFunctions.getTask(GetTaskArgs.builder()
.id("d4fdcaa9-8db4-45a9-80b8-69de49901bc7")
.build());
ctx.export("some-task", some_taskTask);
}
}
variables:
some-taskTask:
fn::invoke:
function: vcd:getTask
arguments:
id: d4fdcaa9-8db4-45a9-80b8-69de49901bc7
outputs:
some-task: ${["some-taskTask"]}
Sample output:
some_task = {
"cancel_requested" = false
"description" = ""
"end_time" = "2022-10-27T06:17:27.326Z"
"error" = tostring(null)
"expiry_time" = "2023-01-25T06:17:26.122Z"
"href" = "https://example.com/api/task/d4fdcaa9-8db4-45a9-80b8-69de49901bc7"
"id" = "d4fdcaa9-8db4-45a9-80b8-69de49901bc7"
"name" = tostring(null)
"operation" = "Created Catalog remote-subscriber(919e800b-088b-40ea-813c-5458b55829e7)"
"operation_name" = "catalogCreateCatalog"
"org_id" = "79b61f14-34f2-4b65-98cb-b5427ce57d67"
"org_name" = "datacloud"
"owner_id" = "919e800b-088b-40ea-813c-5458b55829e7"
"owner_name" = "remote-subscriber"
"owner_type" = "application/vnd.vmware.admin.catalog+xml"
"progress" = 0
"start_time" = "2022-10-27T06:17:26.122Z"
"status" = "success"
"type" = "application/vnd.vmware.vcloud.task+xml"
"user_id" = "cb5df7fb-34c4-4ce1-99e2-f0094458c486"
"user_name" = "administrator"
}
Using getTask
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 getTask(args: GetTaskArgs, opts?: InvokeOptions): Promise<GetTaskResult>
function getTaskOutput(args: GetTaskOutputArgs, opts?: InvokeOptions): Output<GetTaskResult>
def get_task(id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTaskResult
def get_task_output(id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTaskResult]
func GetTask(ctx *Context, args *GetTaskArgs, opts ...InvokeOption) (*GetTaskResult, error)
func GetTaskOutput(ctx *Context, args *GetTaskOutputArgs, opts ...InvokeOption) GetTaskResultOutput
> Note: This function is named GetTask
in the Go SDK.
public static class GetTask
{
public static Task<GetTaskResult> InvokeAsync(GetTaskArgs args, InvokeOptions? opts = null)
public static Output<GetTaskResult> Invoke(GetTaskInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTaskResult> getTask(GetTaskArgs args, InvokeOptions options)
public static Output<GetTaskResult> getTask(GetTaskArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getTask:getTask
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The ID of the task
- Id string
- The ID of the task
- id String
- The ID of the task
- id string
- The ID of the task
- id str
- The ID of the task
- id String
- The ID of the task
getTask Result
The following output properties are available:
- Cancel
Requested bool - Whether user has requested this processing to be canceled (
true
orfalse
). - Description string
- An optional description of the task.
- End
Time string - The date and time that processing of the task was completed. May not be present if the task is still being executed.
- Error string
- error information from a failed task.
- Expiry
Time string - The date and time at which the task resource will be destroyed and no longer available for retrieval. May not be present if the task has not been executed or is still being executed.
- Href string
- The URI of the task.
- Id string
- Name string
- Name of the task. May not be unique. Defines the general operation being performed.
- Operation string
- A message describing the operation that is tracked by this task.
- Operation
Name string - The short name of the operation that is tracked by this task.
- Org
Id string - The unique identifier of the user org.
- Org
Name string - The name of the org to which the user belongs.
- Owner
Id string - The unique identifier of the task owner.
- Owner
Name string - The name of the task owner. This is typically the object that the task is creating or updating.
- Owner
Type string - The type of the task owner.
- Progress double
- Indicator of task progress as an approximate percentage between 0 and 100. Not available for all tasks.
- Start
Time string - The date and time the system started executing the task. May not be present if the task has not been executed yet.
- Status string
- The execution status of the task. One of queued, preRunning, running, success, error, aborted.
- Type string
- Type of the task.
- User
Id string - The unique identifier of the task user.
- User
Name string - The name of the user who started the task.
- Cancel
Requested bool - Whether user has requested this processing to be canceled (
true
orfalse
). - Description string
- An optional description of the task.
- End
Time string - The date and time that processing of the task was completed. May not be present if the task is still being executed.
- Error string
- error information from a failed task.
- Expiry
Time string - The date and time at which the task resource will be destroyed and no longer available for retrieval. May not be present if the task has not been executed or is still being executed.
- Href string
- The URI of the task.
- Id string
- Name string
- Name of the task. May not be unique. Defines the general operation being performed.
- Operation string
- A message describing the operation that is tracked by this task.
- Operation
Name string - The short name of the operation that is tracked by this task.
- Org
Id string - The unique identifier of the user org.
- Org
Name string - The name of the org to which the user belongs.
- Owner
Id string - The unique identifier of the task owner.
- Owner
Name string - The name of the task owner. This is typically the object that the task is creating or updating.
- Owner
Type string - The type of the task owner.
- Progress float64
- Indicator of task progress as an approximate percentage between 0 and 100. Not available for all tasks.
- Start
Time string - The date and time the system started executing the task. May not be present if the task has not been executed yet.
- Status string
- The execution status of the task. One of queued, preRunning, running, success, error, aborted.
- Type string
- Type of the task.
- User
Id string - The unique identifier of the task user.
- User
Name string - The name of the user who started the task.
- cancel
Requested Boolean - Whether user has requested this processing to be canceled (
true
orfalse
). - description String
- An optional description of the task.
- end
Time String - The date and time that processing of the task was completed. May not be present if the task is still being executed.
- error String
- error information from a failed task.
- expiry
Time String - The date and time at which the task resource will be destroyed and no longer available for retrieval. May not be present if the task has not been executed or is still being executed.
- href String
- The URI of the task.
- id String
- name String
- Name of the task. May not be unique. Defines the general operation being performed.
- operation String
- A message describing the operation that is tracked by this task.
- operation
Name String - The short name of the operation that is tracked by this task.
- org
Id String - The unique identifier of the user org.
- org
Name String - The name of the org to which the user belongs.
- owner
Id String - The unique identifier of the task owner.
- owner
Name String - The name of the task owner. This is typically the object that the task is creating or updating.
- owner
Type String - The type of the task owner.
- progress Double
- Indicator of task progress as an approximate percentage between 0 and 100. Not available for all tasks.
- start
Time String - The date and time the system started executing the task. May not be present if the task has not been executed yet.
- status String
- The execution status of the task. One of queued, preRunning, running, success, error, aborted.
- type String
- Type of the task.
- user
Id String - The unique identifier of the task user.
- user
Name String - The name of the user who started the task.
- cancel
Requested boolean - Whether user has requested this processing to be canceled (
true
orfalse
). - description string
- An optional description of the task.
- end
Time string - The date and time that processing of the task was completed. May not be present if the task is still being executed.
- error string
- error information from a failed task.
- expiry
Time string - The date and time at which the task resource will be destroyed and no longer available for retrieval. May not be present if the task has not been executed or is still being executed.
- href string
- The URI of the task.
- id string
- name string
- Name of the task. May not be unique. Defines the general operation being performed.
- operation string
- A message describing the operation that is tracked by this task.
- operation
Name string - The short name of the operation that is tracked by this task.
- org
Id string - The unique identifier of the user org.
- org
Name string - The name of the org to which the user belongs.
- owner
Id string - The unique identifier of the task owner.
- owner
Name string - The name of the task owner. This is typically the object that the task is creating or updating.
- owner
Type string - The type of the task owner.
- progress number
- Indicator of task progress as an approximate percentage between 0 and 100. Not available for all tasks.
- start
Time string - The date and time the system started executing the task. May not be present if the task has not been executed yet.
- status string
- The execution status of the task. One of queued, preRunning, running, success, error, aborted.
- type string
- Type of the task.
- user
Id string - The unique identifier of the task user.
- user
Name string - The name of the user who started the task.
- cancel_
requested bool - Whether user has requested this processing to be canceled (
true
orfalse
). - description str
- An optional description of the task.
- end_
time str - The date and time that processing of the task was completed. May not be present if the task is still being executed.
- error str
- error information from a failed task.
- expiry_
time str - The date and time at which the task resource will be destroyed and no longer available for retrieval. May not be present if the task has not been executed or is still being executed.
- href str
- The URI of the task.
- id str
- name str
- Name of the task. May not be unique. Defines the general operation being performed.
- operation str
- A message describing the operation that is tracked by this task.
- operation_
name str - The short name of the operation that is tracked by this task.
- org_
id str - The unique identifier of the user org.
- org_
name str - The name of the org to which the user belongs.
- owner_
id str - The unique identifier of the task owner.
- owner_
name str - The name of the task owner. This is typically the object that the task is creating or updating.
- owner_
type str - The type of the task owner.
- progress float
- Indicator of task progress as an approximate percentage between 0 and 100. Not available for all tasks.
- start_
time str - The date and time the system started executing the task. May not be present if the task has not been executed yet.
- status str
- The execution status of the task. One of queued, preRunning, running, success, error, aborted.
- type str
- Type of the task.
- user_
id str - The unique identifier of the task user.
- user_
name str - The name of the user who started the task.
- cancel
Requested Boolean - Whether user has requested this processing to be canceled (
true
orfalse
). - description String
- An optional description of the task.
- end
Time String - The date and time that processing of the task was completed. May not be present if the task is still being executed.
- error String
- error information from a failed task.
- expiry
Time String - The date and time at which the task resource will be destroyed and no longer available for retrieval. May not be present if the task has not been executed or is still being executed.
- href String
- The URI of the task.
- id String
- name String
- Name of the task. May not be unique. Defines the general operation being performed.
- operation String
- A message describing the operation that is tracked by this task.
- operation
Name String - The short name of the operation that is tracked by this task.
- org
Id String - The unique identifier of the user org.
- org
Name String - The name of the org to which the user belongs.
- owner
Id String - The unique identifier of the task owner.
- owner
Name String - The name of the task owner. This is typically the object that the task is creating or updating.
- owner
Type String - The type of the task owner.
- progress Number
- Indicator of task progress as an approximate percentage between 0 and 100. Not available for all tasks.
- start
Time String - The date and time the system started executing the task. May not be present if the task has not been executed yet.
- status String
- The execution status of the task. One of queued, preRunning, running, success, error, aborted.
- type String
- Type of the task.
- user
Id String - The unique identifier of the task user.
- user
Name String - The name of the user who started the task.
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.