prefect 2.20.1 published on Friday, Mar 7, 2025 by prefecthq
prefect.getAccountRole
Explore with Pulumi AI
Get information about an existing Workspace Role.
Use this data source read down the pre-defined Roles, to manage User and Service Account access.
For more information, see manage account roles.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as prefect from "@pulumi/prefect";
const admin = prefect.getAccountRole({
name: "Admin",
});
const member = prefect.getAccountRole({
name: "Member",
});
const owner = prefect.getAccountRole({
name: "Owner",
});
import pulumi
import pulumi_prefect as prefect
admin = prefect.get_account_role(name="Admin")
member = prefect.get_account_role(name="Member")
owner = prefect.get_account_role(name="Owner")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/prefect/v2/prefect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := prefect.GetAccountRole(ctx, &prefect.GetAccountRoleArgs{
Name: "Admin",
}, nil)
if err != nil {
return err
}
_, err = prefect.GetAccountRole(ctx, &prefect.GetAccountRoleArgs{
Name: "Member",
}, nil)
if err != nil {
return err
}
_, err = prefect.GetAccountRole(ctx, &prefect.GetAccountRoleArgs{
Name: "Owner",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Prefect = Pulumi.Prefect;
return await Deployment.RunAsync(() =>
{
var admin = Prefect.GetAccountRole.Invoke(new()
{
Name = "Admin",
});
var member = Prefect.GetAccountRole.Invoke(new()
{
Name = "Member",
});
var owner = Prefect.GetAccountRole.Invoke(new()
{
Name = "Owner",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.prefect.PrefectFunctions;
import com.pulumi.prefect.inputs.GetAccountRoleArgs;
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 admin = PrefectFunctions.getAccountRole(GetAccountRoleArgs.builder()
.name("Admin")
.build());
final var member = PrefectFunctions.getAccountRole(GetAccountRoleArgs.builder()
.name("Member")
.build());
final var owner = PrefectFunctions.getAccountRole(GetAccountRoleArgs.builder()
.name("Owner")
.build());
}
}
variables:
admin:
fn::invoke:
function: prefect:getAccountRole
arguments:
name: Admin
member:
fn::invoke:
function: prefect:getAccountRole
arguments:
name: Member
owner:
fn::invoke:
function: prefect:getAccountRole
arguments:
name: Owner
Using getAccountRole
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 getAccountRole(args: GetAccountRoleArgs, opts?: InvokeOptions): Promise<GetAccountRoleResult>
function getAccountRoleOutput(args: GetAccountRoleOutputArgs, opts?: InvokeOptions): Output<GetAccountRoleResult>
def get_account_role(account_id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccountRoleResult
def get_account_role_output(account_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccountRoleResult]
func GetAccountRole(ctx *Context, args *GetAccountRoleArgs, opts ...InvokeOption) (*GetAccountRoleResult, error)
func GetAccountRoleOutput(ctx *Context, args *GetAccountRoleOutputArgs, opts ...InvokeOption) GetAccountRoleResultOutput
> Note: This function is named GetAccountRole
in the Go SDK.
public static class GetAccountRole
{
public static Task<GetAccountRoleResult> InvokeAsync(GetAccountRoleArgs args, InvokeOptions? opts = null)
public static Output<GetAccountRoleResult> Invoke(GetAccountRoleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccountRoleResult> getAccountRole(GetAccountRoleArgs args, InvokeOptions options)
public static Output<GetAccountRoleResult> getAccountRole(GetAccountRoleArgs args, InvokeOptions options)
fn::invoke:
function: prefect:index/getAccountRole:getAccountRole
arguments:
# arguments dictionary
The following arguments are supported:
- name str
- Name of the Account Role
- account_
id str - Account ID (UUID) where the resource resides
getAccountRole Result
The following output properties are available:
- Created string
- Timestamp of when the resource was created (RFC3339)
- Id string
- Account Role ID (UUID)
- Is
System boolRole - Boolean specifying if the Account Role is a system role
- Name string
- Name of the Account Role
- Permissions List<string>
- List of permissions linked to the Account Role
- Updated string
- Timestamp of when the resource was updated (RFC3339)
- Account
Id string - Account ID (UUID) where the resource resides
- Created string
- Timestamp of when the resource was created (RFC3339)
- Id string
- Account Role ID (UUID)
- Is
System boolRole - Boolean specifying if the Account Role is a system role
- Name string
- Name of the Account Role
- Permissions []string
- List of permissions linked to the Account Role
- Updated string
- Timestamp of when the resource was updated (RFC3339)
- Account
Id string - Account ID (UUID) where the resource resides
- created String
- Timestamp of when the resource was created (RFC3339)
- id String
- Account Role ID (UUID)
- is
System BooleanRole - Boolean specifying if the Account Role is a system role
- name String
- Name of the Account Role
- permissions List<String>
- List of permissions linked to the Account Role
- updated String
- Timestamp of when the resource was updated (RFC3339)
- account
Id String - Account ID (UUID) where the resource resides
- created string
- Timestamp of when the resource was created (RFC3339)
- id string
- Account Role ID (UUID)
- is
System booleanRole - Boolean specifying if the Account Role is a system role
- name string
- Name of the Account Role
- permissions string[]
- List of permissions linked to the Account Role
- updated string
- Timestamp of when the resource was updated (RFC3339)
- account
Id string - Account ID (UUID) where the resource resides
- created str
- Timestamp of when the resource was created (RFC3339)
- id str
- Account Role ID (UUID)
- is_
system_ boolrole - Boolean specifying if the Account Role is a system role
- name str
- Name of the Account Role
- permissions Sequence[str]
- List of permissions linked to the Account Role
- updated str
- Timestamp of when the resource was updated (RFC3339)
- account_
id str - Account ID (UUID) where the resource resides
- created String
- Timestamp of when the resource was created (RFC3339)
- id String
- Account Role ID (UUID)
- is
System BooleanRole - Boolean specifying if the Account Role is a system role
- name String
- Name of the Account Role
- permissions List<String>
- List of permissions linked to the Account Role
- updated String
- Timestamp of when the resource was updated (RFC3339)
- account
Id String - Account ID (UUID) where the resource resides
Package Details
- Repository
- prefect prefecthq/terraform-provider-prefect
- License
- Notes
- This Pulumi package is based on the
prefect
Terraform Provider.