1. Packages
  2. Harness Provider
  3. API Docs
  4. getDelegate
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

harness.getDelegate

Explore with Pulumi AI

harness logo
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

    Data source for retrieving a Harness delegate. If more than one delegate matches the query the first one will be returned.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const example = harness.getDelegate({
        name: "harness-delegate",
        type: "KUBERNETES",
        status: "ENABLED",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    example = harness.get_delegate(name="harness-delegate",
        type="KUBERNETES",
        status="ENABLED")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := harness.GetDelegate(ctx, &harness.GetDelegateArgs{
    			Name:   pulumi.StringRef("harness-delegate"),
    			Type:   pulumi.StringRef("KUBERNETES"),
    			Status: pulumi.StringRef("ENABLED"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Harness.GetDelegate.Invoke(new()
        {
            Name = "harness-delegate",
            Type = "KUBERNETES",
            Status = "ENABLED",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.HarnessFunctions;
    import com.pulumi.harness.inputs.GetDelegateArgs;
    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 example = HarnessFunctions.getDelegate(GetDelegateArgs.builder()
                .name("harness-delegate")
                .type("KUBERNETES")
                .status("ENABLED")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: harness:getDelegate
          Arguments:
            name: harness-delegate
            type: KUBERNETES
            status: ENABLED
    

    Using getDelegate

    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 getDelegate(args: GetDelegateArgs, opts?: InvokeOptions): Promise<GetDelegateResult>
    function getDelegateOutput(args: GetDelegateOutputArgs, opts?: InvokeOptions): Output<GetDelegateResult>
    def get_delegate(hostname: Optional[str] = None,
                     id: Optional[str] = None,
                     name: Optional[str] = None,
                     status: Optional[str] = None,
                     type: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetDelegateResult
    def get_delegate_output(hostname: Optional[pulumi.Input[str]] = None,
                     id: Optional[pulumi.Input[str]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     status: Optional[pulumi.Input[str]] = None,
                     type: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetDelegateResult]
    func GetDelegate(ctx *Context, args *GetDelegateArgs, opts ...InvokeOption) (*GetDelegateResult, error)
    func GetDelegateOutput(ctx *Context, args *GetDelegateOutputArgs, opts ...InvokeOption) GetDelegateResultOutput

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

    public static class GetDelegate 
    {
        public static Task<GetDelegateResult> InvokeAsync(GetDelegateArgs args, InvokeOptions? opts = null)
        public static Output<GetDelegateResult> Invoke(GetDelegateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDelegateResult> getDelegate(GetDelegateArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: harness:index/getDelegate:getDelegate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Hostname string
    The hostname of the delegate.
    Id string
    Unique identifier of the delegate
    Name string
    The name of the delegate to query for.
    Status string
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    Type string
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT
    Hostname string
    The hostname of the delegate.
    Id string
    Unique identifier of the delegate
    Name string
    The name of the delegate to query for.
    Status string
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    Type string
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT
    hostname String
    The hostname of the delegate.
    id String
    Unique identifier of the delegate
    name String
    The name of the delegate to query for.
    status String
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    type String
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT
    hostname string
    The hostname of the delegate.
    id string
    Unique identifier of the delegate
    name string
    The name of the delegate to query for.
    status string
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    type string
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT
    hostname str
    The hostname of the delegate.
    id str
    Unique identifier of the delegate
    name str
    The name of the delegate to query for.
    status str
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    type str
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT
    hostname String
    The hostname of the delegate.
    id String
    Unique identifier of the delegate
    name String
    The name of the delegate to query for.
    status String
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    type String
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT

    getDelegate Result

    The following output properties are available:

    AccountId string
    The account id the delegate belongs to.
    Description string
    The description of the delegate.
    Ip string
    The ip address of the delegate.
    LastHeartbeat string
    The last time the delegate was heard from.
    PollingModeEnabled bool
    Whether the delegate is in polling mode.
    ProfileId string
    The id of the profile assigned to the delegate.
    Version string
    The version of the delegate.
    Hostname string
    The hostname of the delegate.
    Id string
    Unique identifier of the delegate
    Name string
    The name of the delegate to query for.
    Status string
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    Type string
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT
    AccountId string
    The account id the delegate belongs to.
    Description string
    The description of the delegate.
    Ip string
    The ip address of the delegate.
    LastHeartbeat string
    The last time the delegate was heard from.
    PollingModeEnabled bool
    Whether the delegate is in polling mode.
    ProfileId string
    The id of the profile assigned to the delegate.
    Version string
    The version of the delegate.
    Hostname string
    The hostname of the delegate.
    Id string
    Unique identifier of the delegate
    Name string
    The name of the delegate to query for.
    Status string
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    Type string
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT
    accountId String
    The account id the delegate belongs to.
    description String
    The description of the delegate.
    ip String
    The ip address of the delegate.
    lastHeartbeat String
    The last time the delegate was heard from.
    pollingModeEnabled Boolean
    Whether the delegate is in polling mode.
    profileId String
    The id of the profile assigned to the delegate.
    version String
    The version of the delegate.
    hostname String
    The hostname of the delegate.
    id String
    Unique identifier of the delegate
    name String
    The name of the delegate to query for.
    status String
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    type String
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT
    accountId string
    The account id the delegate belongs to.
    description string
    The description of the delegate.
    ip string
    The ip address of the delegate.
    lastHeartbeat string
    The last time the delegate was heard from.
    pollingModeEnabled boolean
    Whether the delegate is in polling mode.
    profileId string
    The id of the profile assigned to the delegate.
    version string
    The version of the delegate.
    hostname string
    The hostname of the delegate.
    id string
    Unique identifier of the delegate
    name string
    The name of the delegate to query for.
    status string
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    type string
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT
    account_id str
    The account id the delegate belongs to.
    description str
    The description of the delegate.
    ip str
    The ip address of the delegate.
    last_heartbeat str
    The last time the delegate was heard from.
    polling_mode_enabled bool
    Whether the delegate is in polling mode.
    profile_id str
    The id of the profile assigned to the delegate.
    version str
    The version of the delegate.
    hostname str
    The hostname of the delegate.
    id str
    Unique identifier of the delegate
    name str
    The name of the delegate to query for.
    status str
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    type str
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT
    accountId String
    The account id the delegate belongs to.
    description String
    The description of the delegate.
    ip String
    The ip address of the delegate.
    lastHeartbeat String
    The last time the delegate was heard from.
    pollingModeEnabled Boolean
    Whether the delegate is in polling mode.
    profileId String
    The id of the profile assigned to the delegate.
    version String
    The version of the delegate.
    hostname String
    The hostname of the delegate.
    id String
    Unique identifier of the delegate
    name String
    The name of the delegate to query for.
    status String
    The status of the delegate to query for. Valid values are DELETED, ENABLED, WAITINGFORAPPROVAL
    type String
    The type of the delegate to query for. Valid values are DOCKER, ECS, HELMDELEGATE, KUBERNETES, SHELLSCRIPT

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi