1. Packages
  2. Octopusdeploy Provider
  3. API Docs
  4. getWorkers
octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs

octopusdeploy.getWorkers

Explore with Pulumi AI

octopusdeploy logo
octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs

    Provides information about existing workers.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as octopusdeploy from "@pulumi/octopusdeploy";
    
    const example = octopusdeploy.getWorkers({
        communicationStyles: ["TentaclePassive"],
        healthStatuses: ["Unavailable"],
        ids: ["Workers-123"],
        isDisabled: true,
        name: "Exact name",
        partialName: "Test",
        skip: 5,
        take: 100,
    });
    
    import pulumi
    import pulumi_octopusdeploy as octopusdeploy
    
    example = octopusdeploy.get_workers(communication_styles=["TentaclePassive"],
        health_statuses=["Unavailable"],
        ids=["Workers-123"],
        is_disabled=True,
        name="Exact name",
        partial_name="Test",
        skip=5,
        take=100)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/octopusdeploy/octopusdeploy"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := octopusdeploy.GetWorkers(ctx, &octopusdeploy.GetWorkersArgs{
    			CommunicationStyles: []string{
    				"TentaclePassive",
    			},
    			HealthStatuses: []string{
    				"Unavailable",
    			},
    			Ids: []string{
    				"Workers-123",
    			},
    			IsDisabled:  pulumi.BoolRef(true),
    			Name:        pulumi.StringRef("Exact name"),
    			PartialName: pulumi.StringRef("Test"),
    			Skip:        pulumi.Float64Ref(5),
    			Take:        pulumi.Float64Ref(100),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Octopusdeploy = Pulumi.Octopusdeploy;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Octopusdeploy.GetWorkers.Invoke(new()
        {
            CommunicationStyles = new[]
            {
                "TentaclePassive",
            },
            HealthStatuses = new[]
            {
                "Unavailable",
            },
            Ids = new[]
            {
                "Workers-123",
            },
            IsDisabled = true,
            Name = "Exact name",
            PartialName = "Test",
            Skip = 5,
            Take = 100,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.octopusdeploy.OctopusdeployFunctions;
    import com.pulumi.octopusdeploy.inputs.GetWorkersArgs;
    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 = OctopusdeployFunctions.getWorkers(GetWorkersArgs.builder()
                .communicationStyles("TentaclePassive")
                .healthStatuses("Unavailable")
                .ids("Workers-123")
                .isDisabled(true)
                .name("Exact name")
                .partialName("Test")
                .skip(5)
                .take(100)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: octopusdeploy:getWorkers
          arguments:
            communicationStyles:
              - TentaclePassive
            healthStatuses:
              - Unavailable
            ids:
              - Workers-123
            isDisabled: true
            name: Exact name
            partialName: Test
            skip: 5
            take: 100
    

    Using getWorkers

    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 getWorkers(args: GetWorkersArgs, opts?: InvokeOptions): Promise<GetWorkersResult>
    function getWorkersOutput(args: GetWorkersOutputArgs, opts?: InvokeOptions): Output<GetWorkersResult>
    def get_workers(communication_styles: Optional[Sequence[str]] = None,
                    health_statuses: Optional[Sequence[str]] = None,
                    ids: Optional[Sequence[str]] = None,
                    is_disabled: Optional[bool] = None,
                    name: Optional[str] = None,
                    partial_name: Optional[str] = None,
                    skip: Optional[float] = None,
                    space_id: Optional[str] = None,
                    take: Optional[float] = None,
                    opts: Optional[InvokeOptions] = None) -> GetWorkersResult
    def get_workers_output(communication_styles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                    health_statuses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                    ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                    is_disabled: Optional[pulumi.Input[bool]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    partial_name: Optional[pulumi.Input[str]] = None,
                    skip: Optional[pulumi.Input[float]] = None,
                    space_id: Optional[pulumi.Input[str]] = None,
                    take: Optional[pulumi.Input[float]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetWorkersResult]
    func GetWorkers(ctx *Context, args *GetWorkersArgs, opts ...InvokeOption) (*GetWorkersResult, error)
    func GetWorkersOutput(ctx *Context, args *GetWorkersOutputArgs, opts ...InvokeOption) GetWorkersResultOutput

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

    public static class GetWorkers 
    {
        public static Task<GetWorkersResult> InvokeAsync(GetWorkersArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkersResult> Invoke(GetWorkersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkersResult> getWorkers(GetWorkersArgs args, InvokeOptions options)
    public static Output<GetWorkersResult> getWorkers(GetWorkersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: octopusdeploy:index/getWorkers:getWorkers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CommunicationStyles List<string>
    A filter to search by communication styles
    HealthStatuses List<string>
    A filter to search by health statuses
    Ids List<string>
    A filter to search by a list of IDs.
    IsDisabled bool
    Name string
    The name of this resource.
    PartialName string
    A filter to search by a partial name.
    Skip double
    A filter to specify the number of items to skip in the response.
    SpaceId string
    The space ID associated with this workers.
    Take double
    A filter to specify the number of items to take (or return) in the response.
    CommunicationStyles []string
    A filter to search by communication styles
    HealthStatuses []string
    A filter to search by health statuses
    Ids []string
    A filter to search by a list of IDs.
    IsDisabled bool
    Name string
    The name of this resource.
    PartialName string
    A filter to search by a partial name.
    Skip float64
    A filter to specify the number of items to skip in the response.
    SpaceId string
    The space ID associated with this workers.
    Take float64
    A filter to specify the number of items to take (or return) in the response.
    communicationStyles List<String>
    A filter to search by communication styles
    healthStatuses List<String>
    A filter to search by health statuses
    ids List<String>
    A filter to search by a list of IDs.
    isDisabled Boolean
    name String
    The name of this resource.
    partialName String
    A filter to search by a partial name.
    skip Double
    A filter to specify the number of items to skip in the response.
    spaceId String
    The space ID associated with this workers.
    take Double
    A filter to specify the number of items to take (or return) in the response.
    communicationStyles string[]
    A filter to search by communication styles
    healthStatuses string[]
    A filter to search by health statuses
    ids string[]
    A filter to search by a list of IDs.
    isDisabled boolean
    name string
    The name of this resource.
    partialName string
    A filter to search by a partial name.
    skip number
    A filter to specify the number of items to skip in the response.
    spaceId string
    The space ID associated with this workers.
    take number
    A filter to specify the number of items to take (or return) in the response.
    communication_styles Sequence[str]
    A filter to search by communication styles
    health_statuses Sequence[str]
    A filter to search by health statuses
    ids Sequence[str]
    A filter to search by a list of IDs.
    is_disabled bool
    name str
    The name of this resource.
    partial_name str
    A filter to search by a partial name.
    skip float
    A filter to specify the number of items to skip in the response.
    space_id str
    The space ID associated with this workers.
    take float
    A filter to specify the number of items to take (or return) in the response.
    communicationStyles List<String>
    A filter to search by communication styles
    healthStatuses List<String>
    A filter to search by health statuses
    ids List<String>
    A filter to search by a list of IDs.
    isDisabled Boolean
    name String
    The name of this resource.
    partialName String
    A filter to search by a partial name.
    skip Number
    A filter to specify the number of items to skip in the response.
    spaceId String
    The space ID associated with this workers.
    take Number
    A filter to specify the number of items to take (or return) in the response.

    getWorkers Result

    The following output properties are available:

    Id string
    The unique ID for this resource.
    IsDisabled bool
    SpaceId string
    The space ID associated with this workers.
    Workers List<GetWorkersWorker>
    CommunicationStyles List<string>
    A filter to search by communication styles
    HealthStatuses List<string>
    A filter to search by health statuses
    Ids List<string>
    A filter to search by a list of IDs.
    Name string
    The name of this resource.
    PartialName string
    A filter to search by a partial name.
    Skip double
    A filter to specify the number of items to skip in the response.
    Take double
    A filter to specify the number of items to take (or return) in the response.
    Id string
    The unique ID for this resource.
    IsDisabled bool
    SpaceId string
    The space ID associated with this workers.
    Workers []GetWorkersWorker
    CommunicationStyles []string
    A filter to search by communication styles
    HealthStatuses []string
    A filter to search by health statuses
    Ids []string
    A filter to search by a list of IDs.
    Name string
    The name of this resource.
    PartialName string
    A filter to search by a partial name.
    Skip float64
    A filter to specify the number of items to skip in the response.
    Take float64
    A filter to specify the number of items to take (or return) in the response.
    id String
    The unique ID for this resource.
    isDisabled Boolean
    spaceId String
    The space ID associated with this workers.
    workers List<GetWorkersWorker>
    communicationStyles List<String>
    A filter to search by communication styles
    healthStatuses List<String>
    A filter to search by health statuses
    ids List<String>
    A filter to search by a list of IDs.
    name String
    The name of this resource.
    partialName String
    A filter to search by a partial name.
    skip Double
    A filter to specify the number of items to skip in the response.
    take Double
    A filter to specify the number of items to take (or return) in the response.
    id string
    The unique ID for this resource.
    isDisabled boolean
    spaceId string
    The space ID associated with this workers.
    workers GetWorkersWorker[]
    communicationStyles string[]
    A filter to search by communication styles
    healthStatuses string[]
    A filter to search by health statuses
    ids string[]
    A filter to search by a list of IDs.
    name string
    The name of this resource.
    partialName string
    A filter to search by a partial name.
    skip number
    A filter to specify the number of items to skip in the response.
    take number
    A filter to specify the number of items to take (or return) in the response.
    id str
    The unique ID for this resource.
    is_disabled bool
    space_id str
    The space ID associated with this workers.
    workers Sequence[GetWorkersWorker]
    communication_styles Sequence[str]
    A filter to search by communication styles
    health_statuses Sequence[str]
    A filter to search by health statuses
    ids Sequence[str]
    A filter to search by a list of IDs.
    name str
    The name of this resource.
    partial_name str
    A filter to search by a partial name.
    skip float
    A filter to specify the number of items to skip in the response.
    take float
    A filter to specify the number of items to take (or return) in the response.
    id String
    The unique ID for this resource.
    isDisabled Boolean
    spaceId String
    The space ID associated with this workers.
    workers List<Property Map>
    communicationStyles List<String>
    A filter to search by communication styles
    healthStatuses List<String>
    A filter to search by health statuses
    ids List<String>
    A filter to search by a list of IDs.
    name String
    The name of this resource.
    partialName String
    A filter to search by a partial name.
    skip Number
    A filter to specify the number of items to skip in the response.
    take Number
    A filter to specify the number of items to take (or return) in the response.

    Supporting Types

    GetWorkersWorker

    AccountId string
    CommunicationStyle string
    DotnetPlatform string
    Fingerprint string
    HealthStatus string
    Host string
    Id string
    The unique ID for this resource.
    IsDisabled bool
    MachinePolicyId string
    Name string
    The name of this resource.
    Port double
    ProxyId string
    SpaceId string
    The space ID associated with this workers.
    Thumbprint string
    Uri string
    WorkerPoolIds List<string>
    AccountId string
    CommunicationStyle string
    DotnetPlatform string
    Fingerprint string
    HealthStatus string
    Host string
    Id string
    The unique ID for this resource.
    IsDisabled bool
    MachinePolicyId string
    Name string
    The name of this resource.
    Port float64
    ProxyId string
    SpaceId string
    The space ID associated with this workers.
    Thumbprint string
    Uri string
    WorkerPoolIds []string
    accountId String
    communicationStyle String
    dotnetPlatform String
    fingerprint String
    healthStatus String
    host String
    id String
    The unique ID for this resource.
    isDisabled Boolean
    machinePolicyId String
    name String
    The name of this resource.
    port Double
    proxyId String
    spaceId String
    The space ID associated with this workers.
    thumbprint String
    uri String
    workerPoolIds List<String>
    accountId string
    communicationStyle string
    dotnetPlatform string
    fingerprint string
    healthStatus string
    host string
    id string
    The unique ID for this resource.
    isDisabled boolean
    machinePolicyId string
    name string
    The name of this resource.
    port number
    proxyId string
    spaceId string
    The space ID associated with this workers.
    thumbprint string
    uri string
    workerPoolIds string[]
    account_id str
    communication_style str
    dotnet_platform str
    fingerprint str
    health_status str
    host str
    id str
    The unique ID for this resource.
    is_disabled bool
    machine_policy_id str
    name str
    The name of this resource.
    port float
    proxy_id str
    space_id str
    The space ID associated with this workers.
    thumbprint str
    uri str
    worker_pool_ids Sequence[str]
    accountId String
    communicationStyle String
    dotnetPlatform String
    fingerprint String
    healthStatus String
    host String
    id String
    The unique ID for this resource.
    isDisabled Boolean
    machinePolicyId String
    name String
    The name of this resource.
    port Number
    proxyId String
    spaceId String
    The space ID associated with this workers.
    thumbprint String
    uri String
    workerPoolIds List<String>

    Package Details

    Repository
    octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
    License
    Notes
    This Pulumi package is based on the octopusdeploy Terraform Provider.
    octopusdeploy logo
    octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs