1. Packages
  2. Octopusdeploy Provider
  3. API Docs
  4. getUserRoles
octopusdeploy 0.43.0 published on Thursday, Apr 17, 2025 by octopusdeploylabs

octopusdeploy.getUserRoles

Explore with Pulumi AI

octopusdeploy 0.43.0 published on Thursday, Apr 17, 2025 by octopusdeploylabs

Provides information about existing user roles.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as octopusdeploy from "@pulumi/octopusdeploy";

const example = octopusdeploy.getUserRoles({
    ids: [
        "UserRoles-123",
        "UserRoles-321",
    ],
    partialName: "Administra",
    skip: 5,
    take: 100,
});
Copy
import pulumi
import pulumi_octopusdeploy as octopusdeploy

example = octopusdeploy.get_user_roles(ids=[
        "UserRoles-123",
        "UserRoles-321",
    ],
    partial_name="Administra",
    skip=5,
    take=100)
Copy
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.GetUserRoles(ctx, &octopusdeploy.GetUserRolesArgs{
			Ids: []string{
				"UserRoles-123",
				"UserRoles-321",
			},
			PartialName: pulumi.StringRef("Administra"),
			Skip:        pulumi.Float64Ref(5),
			Take:        pulumi.Float64Ref(100),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Octopusdeploy = Pulumi.Octopusdeploy;

return await Deployment.RunAsync(() => 
{
    var example = Octopusdeploy.GetUserRoles.Invoke(new()
    {
        Ids = new[]
        {
            "UserRoles-123",
            "UserRoles-321",
        },
        PartialName = "Administra",
        Skip = 5,
        Take = 100,
    });

});
Copy
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.GetUserRolesArgs;
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.getUserRoles(GetUserRolesArgs.builder()
            .ids(            
                "UserRoles-123",
                "UserRoles-321")
            .partialName("Administra")
            .skip(5)
            .take(100)
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: octopusdeploy:getUserRoles
      arguments:
        ids:
          - UserRoles-123
          - UserRoles-321
        partialName: Administra
        skip: 5
        take: 100
Copy

Using getUserRoles

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 getUserRoles(args: GetUserRolesArgs, opts?: InvokeOptions): Promise<GetUserRolesResult>
function getUserRolesOutput(args: GetUserRolesOutputArgs, opts?: InvokeOptions): Output<GetUserRolesResult>
Copy
def get_user_roles(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) -> GetUserRolesResult
def get_user_roles_output(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[GetUserRolesResult]
Copy
func GetUserRoles(ctx *Context, args *GetUserRolesArgs, opts ...InvokeOption) (*GetUserRolesResult, error)
func GetUserRolesOutput(ctx *Context, args *GetUserRolesOutputArgs, opts ...InvokeOption) GetUserRolesResultOutput
Copy

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

public static class GetUserRoles 
{
    public static Task<GetUserRolesResult> InvokeAsync(GetUserRolesArgs args, InvokeOptions? opts = null)
    public static Output<GetUserRolesResult> Invoke(GetUserRolesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetUserRolesResult> getUserRoles(GetUserRolesArgs args, InvokeOptions options)
public static Output<GetUserRolesResult> getUserRoles(GetUserRolesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: octopusdeploy:index/getUserRoles:getUserRoles
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

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.
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.
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.
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.
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.
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.

getUserRoles Result

The following output properties are available:

Id string
An auto-generated identifier that includes the timestamp when this data source was last modified.
UserRoles List<GetUserRolesUserRole>
A list of user roles that match the filter(s).
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.
Id string
An auto-generated identifier that includes the timestamp when this data source was last modified.
UserRoles []GetUserRolesUserRole
A list of user roles that match the filter(s).
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.
id String
An auto-generated identifier that includes the timestamp when this data source was last modified.
userRoles List<GetUserRolesUserRole>
A list of user roles that match the filter(s).
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.
id string
An auto-generated identifier that includes the timestamp when this data source was last modified.
userRoles GetUserRolesUserRole[]
A list of user roles that match the filter(s).
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.
id str
An auto-generated identifier that includes the timestamp when this data source was last modified.
user_roles Sequence[GetUserRolesUserRole]
A list of user roles that match the filter(s).
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.
id String
An auto-generated identifier that includes the timestamp when this data source was last modified.
userRoles List<Property Map>
A list of user roles that match the filter(s).
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

GetUserRolesUserRole

CanBeDeleted This property is required. bool
Description This property is required. string
GrantedSpacePermissions This property is required. List<string>
GrantedSystemPermissions This property is required. List<string>
Id This property is required. string
Name This property is required. string
SpacePermissionDescriptions This property is required. List<string>
SupportedRestrictions This property is required. List<string>
SystemPermissionDescriptions This property is required. List<string>
CanBeDeleted This property is required. bool
Description This property is required. string
GrantedSpacePermissions This property is required. []string
GrantedSystemPermissions This property is required. []string
Id This property is required. string
Name This property is required. string
SpacePermissionDescriptions This property is required. []string
SupportedRestrictions This property is required. []string
SystemPermissionDescriptions This property is required. []string
canBeDeleted This property is required. Boolean
description This property is required. String
grantedSpacePermissions This property is required. List<String>
grantedSystemPermissions This property is required. List<String>
id This property is required. String
name This property is required. String
spacePermissionDescriptions This property is required. List<String>
supportedRestrictions This property is required. List<String>
systemPermissionDescriptions This property is required. List<String>
canBeDeleted This property is required. boolean
description This property is required. string
grantedSpacePermissions This property is required. string[]
grantedSystemPermissions This property is required. string[]
id This property is required. string
name This property is required. string
spacePermissionDescriptions This property is required. string[]
supportedRestrictions This property is required. string[]
systemPermissionDescriptions This property is required. string[]
can_be_deleted This property is required. bool
description This property is required. str
granted_space_permissions This property is required. Sequence[str]
granted_system_permissions This property is required. Sequence[str]
id This property is required. str
name This property is required. str
space_permission_descriptions This property is required. Sequence[str]
supported_restrictions This property is required. Sequence[str]
system_permission_descriptions This property is required. Sequence[str]
canBeDeleted This property is required. Boolean
description This property is required. String
grantedSpacePermissions This property is required. List<String>
grantedSystemPermissions This property is required. List<String>
id This property is required. String
name This property is required. String
spacePermissionDescriptions This property is required. List<String>
supportedRestrictions This property is required. List<String>
systemPermissionDescriptions This property is required. List<String>

Package Details

Repository
octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
License
Notes
This Pulumi package is based on the octopusdeploy Terraform Provider.
octopusdeploy 0.43.0 published on Thursday, Apr 17, 2025 by octopusdeploylabs