1. Packages
  2. Vcd Provider
  3. API Docs
  4. getTask
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.getTask

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    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:

    CancelRequested bool
    Whether user has requested this processing to be canceled (true or false).
    Description string
    An optional description of the task.
    EndTime 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.
    ExpiryTime 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.
    OperationName string
    The short name of the operation that is tracked by this task.
    OrgId string
    The unique identifier of the user org.
    OrgName string
    The name of the org to which the user belongs.
    OwnerId string
    The unique identifier of the task owner.
    OwnerName string
    The name of the task owner. This is typically the object that the task is creating or updating.
    OwnerType 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.
    StartTime 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.
    UserId string
    The unique identifier of the task user.
    UserName string
    The name of the user who started the task.
    CancelRequested bool
    Whether user has requested this processing to be canceled (true or false).
    Description string
    An optional description of the task.
    EndTime 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.
    ExpiryTime 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.
    OperationName string
    The short name of the operation that is tracked by this task.
    OrgId string
    The unique identifier of the user org.
    OrgName string
    The name of the org to which the user belongs.
    OwnerId string
    The unique identifier of the task owner.
    OwnerName string
    The name of the task owner. This is typically the object that the task is creating or updating.
    OwnerType 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.
    StartTime 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.
    UserId string
    The unique identifier of the task user.
    UserName string
    The name of the user who started the task.
    cancelRequested Boolean
    Whether user has requested this processing to be canceled (true or false).
    description String
    An optional description of the task.
    endTime 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.
    expiryTime 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.
    operationName String
    The short name of the operation that is tracked by this task.
    orgId String
    The unique identifier of the user org.
    orgName String
    The name of the org to which the user belongs.
    ownerId String
    The unique identifier of the task owner.
    ownerName String
    The name of the task owner. This is typically the object that the task is creating or updating.
    ownerType 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.
    startTime 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.
    userId String
    The unique identifier of the task user.
    userName String
    The name of the user who started the task.
    cancelRequested boolean
    Whether user has requested this processing to be canceled (true or false).
    description string
    An optional description of the task.
    endTime 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.
    expiryTime 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.
    operationName string
    The short name of the operation that is tracked by this task.
    orgId string
    The unique identifier of the user org.
    orgName string
    The name of the org to which the user belongs.
    ownerId string
    The unique identifier of the task owner.
    ownerName string
    The name of the task owner. This is typically the object that the task is creating or updating.
    ownerType 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.
    startTime 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.
    userId string
    The unique identifier of the task user.
    userName string
    The name of the user who started the task.
    cancel_requested bool
    Whether user has requested this processing to be canceled (true or false).
    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.
    cancelRequested Boolean
    Whether user has requested this processing to be canceled (true or false).
    description String
    An optional description of the task.
    endTime 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.
    expiryTime 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.
    operationName String
    The short name of the operation that is tracked by this task.
    orgId String
    The unique identifier of the user org.
    orgName String
    The name of the org to which the user belongs.
    ownerId String
    The unique identifier of the task owner.
    ownerName String
    The name of the task owner. This is typically the object that the task is creating or updating.
    ownerType 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.
    startTime 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.
    userId String
    The unique identifier of the task user.
    userName 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.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware