1. Packages
  2. Octopusdeploy Provider
  3. API Docs
  4. getAccounts
octopusdeploy 0.43.2 published on Friday, May 30, 2025 by octopusdeploylabs

octopusdeploy.getAccounts

Start a Neo task
Explain and create an octopusdeploy.getAccounts resource
octopusdeploy logo
octopusdeploy 0.43.2 published on Friday, May 30, 2025 by octopusdeploylabs

    Provides information about existing accounts.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as octopusdeploy from "@pulumi/octopusdeploy";
    
    const example = octopusdeploy.getAccounts({
        accountType: "UsernamePassword",
        ids: [
            "Accounts-123",
            "Accounts-321",
        ],
        partialName: "Defau",
        skip: 5,
        take: 100,
    });
    
    import pulumi
    import pulumi_octopusdeploy as octopusdeploy
    
    example = octopusdeploy.get_accounts(account_type="UsernamePassword",
        ids=[
            "Accounts-123",
            "Accounts-321",
        ],
        partial_name="Defau",
        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.GetAccounts(ctx, &octopusdeploy.GetAccountsArgs{
    			AccountType: pulumi.StringRef("UsernamePassword"),
    			Ids: []string{
    				"Accounts-123",
    				"Accounts-321",
    			},
    			PartialName: pulumi.StringRef("Defau"),
    			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.GetAccounts.Invoke(new()
        {
            AccountType = "UsernamePassword",
            Ids = new[]
            {
                "Accounts-123",
                "Accounts-321",
            },
            PartialName = "Defau",
            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.GetAccountsArgs;
    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.getAccounts(GetAccountsArgs.builder()
                .accountType("UsernamePassword")
                .ids(            
                    "Accounts-123",
                    "Accounts-321")
                .partialName("Defau")
                .skip(5)
                .take(100)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: octopusdeploy:getAccounts
          arguments:
            accountType: UsernamePassword
            ids:
              - Accounts-123
              - Accounts-321
            partialName: Defau
            skip: 5
            take: 100
    

    Using getAccounts

    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 getAccounts(args: GetAccountsArgs, opts?: InvokeOptions): Promise<GetAccountsResult>
    function getAccountsOutput(args: GetAccountsOutputArgs, opts?: InvokeOptions): Output<GetAccountsResult>
    def get_accounts(account_type: Optional[str] = None,
                     ids: Optional[Sequence[str]] = None,
                     partial_name: Optional[str] = None,
                     skip: Optional[float] = None,
                     space_id: Optional[str] = None,
                     take: Optional[float] = None,
                     opts: Optional[InvokeOptions] = None) -> GetAccountsResult
    def get_accounts_output(account_type: Optional[pulumi.Input[str]] = None,
                     ids: Optional[pulumi.Input[Sequence[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[GetAccountsResult]
    func GetAccounts(ctx *Context, args *GetAccountsArgs, opts ...InvokeOption) (*GetAccountsResult, error)
    func GetAccountsOutput(ctx *Context, args *GetAccountsOutputArgs, opts ...InvokeOption) GetAccountsResultOutput

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

    public static class GetAccounts 
    {
        public static Task<GetAccountsResult> InvokeAsync(GetAccountsArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountsResult> Invoke(GetAccountsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccountsResult> getAccounts(GetAccountsArgs args, InvokeOptions options)
    public static Output<GetAccountsResult> getAccounts(GetAccountsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: octopusdeploy:index/getAccounts:getAccounts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountType string
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    Ids List<string>
    A filter to search by a list of IDs.
    PartialName string
    A filter to search by the partial match of a name.
    Skip double
    A filter to specify the number of items to skip in the response.
    SpaceId string
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    Take double
    A filter to specify the number of items to take (or return) in the response.
    AccountType string
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    Ids []string
    A filter to search by a list of IDs.
    PartialName string
    A filter to search by the partial match of a name.
    Skip float64
    A filter to specify the number of items to skip in the response.
    SpaceId string
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    Take float64
    A filter to specify the number of items to take (or return) in the response.
    accountType String
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    ids List<String>
    A filter to search by a list of IDs.
    partialName String
    A filter to search by the partial match of a name.
    skip Double
    A filter to specify the number of items to skip in the response.
    spaceId String
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    take Double
    A filter to specify the number of items to take (or return) in the response.
    accountType string
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    ids string[]
    A filter to search by a list of IDs.
    partialName string
    A filter to search by the partial match of a name.
    skip number
    A filter to specify the number of items to skip in the response.
    spaceId string
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    take number
    A filter to specify the number of items to take (or return) in the response.
    account_type str
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    ids Sequence[str]
    A filter to search by a list of IDs.
    partial_name str
    A filter to search by the partial match of a name.
    skip float
    A filter to specify the number of items to skip in the response.
    space_id str
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    take float
    A filter to specify the number of items to take (or return) in the response.
    accountType String
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    ids List<String>
    A filter to search by a list of IDs.
    partialName String
    A filter to search by the partial match of a name.
    skip Number
    A filter to specify the number of items to skip in the response.
    spaceId String
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    take Number
    A filter to specify the number of items to take (or return) in the response.

    getAccounts Result

    The following output properties are available:

    Accounts List<GetAccountsAccount>
    A list of accounts that match the filter(s).
    Id string
    An auto-generated identifier that includes the timestamp when this data source was last modified.
    AccountType string
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    Ids List<string>
    A filter to search by a list of IDs.
    PartialName string
    A filter to search by the partial match of a name.
    Skip double
    A filter to specify the number of items to skip in the response.
    SpaceId string
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    Take double
    A filter to specify the number of items to take (or return) in the response.
    Accounts []GetAccountsAccount
    A list of accounts that match the filter(s).
    Id string
    An auto-generated identifier that includes the timestamp when this data source was last modified.
    AccountType string
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    Ids []string
    A filter to search by a list of IDs.
    PartialName string
    A filter to search by the partial match of a name.
    Skip float64
    A filter to specify the number of items to skip in the response.
    SpaceId string
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    Take float64
    A filter to specify the number of items to take (or return) in the response.
    accounts List<GetAccountsAccount>
    A list of accounts that match the filter(s).
    id String
    An auto-generated identifier that includes the timestamp when this data source was last modified.
    accountType String
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    ids List<String>
    A filter to search by a list of IDs.
    partialName String
    A filter to search by the partial match of a name.
    skip Double
    A filter to specify the number of items to skip in the response.
    spaceId String
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    take Double
    A filter to specify the number of items to take (or return) in the response.
    accounts GetAccountsAccount[]
    A list of accounts that match the filter(s).
    id string
    An auto-generated identifier that includes the timestamp when this data source was last modified.
    accountType string
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    ids string[]
    A filter to search by a list of IDs.
    partialName string
    A filter to search by the partial match of a name.
    skip number
    A filter to specify the number of items to skip in the response.
    spaceId string
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    take number
    A filter to specify the number of items to take (or return) in the response.
    accounts Sequence[GetAccountsAccount]
    A list of accounts that match the filter(s).
    id str
    An auto-generated identifier that includes the timestamp when this data source was last modified.
    account_type str
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    ids Sequence[str]
    A filter to search by a list of IDs.
    partial_name str
    A filter to search by the partial match of a name.
    skip float
    A filter to specify the number of items to skip in the response.
    space_id str
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    take float
    A filter to specify the number of items to take (or return) in the response.
    accounts List<Property Map>
    A list of accounts that match the filter(s).
    id String
    An auto-generated identifier that includes the timestamp when this data source was last modified.
    accountType String
    A filter to search by a list of account types. Valid account types are AmazonWebServicesAccount, AmazonWebServicesRoleAccount, AmazonWebServicesOidcAccount, AzureServicePrincipal, AzureSubscription, GenericOidcAccount, None, SshKeyPair, Token, or UsernamePassword.
    ids List<String>
    A filter to search by a list of IDs.
    partialName String
    A filter to search by the partial match of a name.
    skip Number
    A filter to specify the number of items to skip in the response.
    spaceId String
    A Space ID to filter by. Will revert what is specified on the provider if not set.
    take Number
    A filter to specify the number of items to take (or return) in the response.

    Supporting Types

    GetAccountsAccount

    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.2 published on Friday, May 30, 2025 by octopusdeploylabs
      Meet Neo: Your AI Platform Teammate