prefect.AccountMember
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as prefect from "@pulumi/prefect";
const member = prefect.getAccountRole({
    name: "Member",
});
// Manage an account member's role.
// Note: this resource must be imported before it can be managed
// because it cannot be created by Terraform.
const test = new prefect.AccountMember("test", {accountRoleId: member.then(member => member.id)});
import pulumi
import pulumi_prefect as prefect
member = prefect.get_account_role(name="Member")
# Manage an account member's role.
# Note: this resource must be imported before it can be managed
# because it cannot be created by Terraform.
test = prefect.AccountMember("test", account_role_id=member.id)
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 {
		member, err := prefect.GetAccountRole(ctx, &prefect.GetAccountRoleArgs{
			Name: "Member",
		}, nil)
		if err != nil {
			return err
		}
		// Manage an account member's role.
		// Note: this resource must be imported before it can be managed
		// because it cannot be created by Terraform.
		_, err = prefect.NewAccountMember(ctx, "test", &prefect.AccountMemberArgs{
			AccountRoleId: pulumi.String(member.Id),
		})
		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 member = Prefect.GetAccountRole.Invoke(new()
    {
        Name = "Member",
    });
    // Manage an account member's role.
    // Note: this resource must be imported before it can be managed
    // because it cannot be created by Terraform.
    var test = new Prefect.AccountMember("test", new()
    {
        AccountRoleId = member.Apply(getAccountRoleResult => getAccountRoleResult.Id),
    });
});
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 com.pulumi.prefect.AccountMember;
import com.pulumi.prefect.AccountMemberArgs;
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 member = PrefectFunctions.getAccountRole(GetAccountRoleArgs.builder()
            .name("Member")
            .build());
        // Manage an account member's role.
        // Note: this resource must be imported before it can be managed
        // because it cannot be created by Terraform.
        var test = new AccountMember("test", AccountMemberArgs.builder()
            .accountRoleId(member.applyValue(getAccountRoleResult -> getAccountRoleResult.id()))
            .build());
    }
}
resources:
  # Manage an account member's role.
  # Note: this resource must be imported before it can be managed
  # because it cannot be created by Terraform.
  test:
    type: prefect:AccountMember
    properties:
      accountRoleId: ${member.id}
variables:
  member:
    fn::invoke:
      function: prefect:getAccountRole
      arguments:
        name: Member
Create AccountMember Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccountMember(name: string, args?: AccountMemberArgs, opts?: CustomResourceOptions);@overload
def AccountMember(resource_name: str,
                  args: Optional[AccountMemberArgs] = None,
                  opts: Optional[ResourceOptions] = None)
@overload
def AccountMember(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  account_id: Optional[str] = None,
                  account_role_id: Optional[str] = None)func NewAccountMember(ctx *Context, name string, args *AccountMemberArgs, opts ...ResourceOption) (*AccountMember, error)public AccountMember(string name, AccountMemberArgs? args = null, CustomResourceOptions? opts = null)
public AccountMember(String name, AccountMemberArgs args)
public AccountMember(String name, AccountMemberArgs args, CustomResourceOptions options)
type: prefect:AccountMember
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AccountMemberArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AccountMemberArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccountMemberArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountMemberArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountMemberArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var accountMemberResource = new Prefect.AccountMember("accountMemberResource", new()
{
    AccountId = "string",
    AccountRoleId = "string",
});
example, err := prefect.NewAccountMember(ctx, "accountMemberResource", &prefect.AccountMemberArgs{
	AccountId:     pulumi.String("string"),
	AccountRoleId: pulumi.String("string"),
})
var accountMemberResource = new AccountMember("accountMemberResource", AccountMemberArgs.builder()
    .accountId("string")
    .accountRoleId("string")
    .build());
account_member_resource = prefect.AccountMember("accountMemberResource",
    account_id="string",
    account_role_id="string")
const accountMemberResource = new prefect.AccountMember("accountMemberResource", {
    accountId: "string",
    accountRoleId: "string",
});
type: prefect:AccountMember
properties:
    accountId: string
    accountRoleId: string
AccountMember Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AccountMember resource accepts the following input properties:
- AccountId string
- Account ID (UUID)
- AccountRole stringId 
- Acount Role ID (UUID)
- AccountId string
- Account ID (UUID)
- AccountRole stringId 
- Acount Role ID (UUID)
- accountId String
- Account ID (UUID)
- accountRole StringId 
- Acount Role ID (UUID)
- accountId string
- Account ID (UUID)
- accountRole stringId 
- Acount Role ID (UUID)
- account_id str
- Account ID (UUID)
- account_role_ strid 
- Acount Role ID (UUID)
- accountId String
- Account ID (UUID)
- accountRole StringId 
- Acount Role ID (UUID)
Outputs
All input properties are implicitly available as output properties. Additionally, the AccountMember resource produces the following output properties:
- AccountRole stringName 
- Name of Account Role assigned to member
- ActorId string
- Actor ID (UUID)
- Email string
- Member email
- FirstName string
- Member's first name
- Handle string
- Member handle, or a human-readable identifier
- Id string
- The provider-assigned unique ID for this managed resource.
- LastName string
- Member's last name
- UserId string
- User ID (UUID)
- AccountRole stringName 
- Name of Account Role assigned to member
- ActorId string
- Actor ID (UUID)
- Email string
- Member email
- FirstName string
- Member's first name
- Handle string
- Member handle, or a human-readable identifier
- Id string
- The provider-assigned unique ID for this managed resource.
- LastName string
- Member's last name
- UserId string
- User ID (UUID)
- accountRole StringName 
- Name of Account Role assigned to member
- actorId String
- Actor ID (UUID)
- email String
- Member email
- firstName String
- Member's first name
- handle String
- Member handle, or a human-readable identifier
- id String
- The provider-assigned unique ID for this managed resource.
- lastName String
- Member's last name
- userId String
- User ID (UUID)
- accountRole stringName 
- Name of Account Role assigned to member
- actorId string
- Actor ID (UUID)
- email string
- Member email
- firstName string
- Member's first name
- handle string
- Member handle, or a human-readable identifier
- id string
- The provider-assigned unique ID for this managed resource.
- lastName string
- Member's last name
- userId string
- User ID (UUID)
- account_role_ strname 
- Name of Account Role assigned to member
- actor_id str
- Actor ID (UUID)
- email str
- Member email
- first_name str
- Member's first name
- handle str
- Member handle, or a human-readable identifier
- id str
- The provider-assigned unique ID for this managed resource.
- last_name str
- Member's last name
- user_id str
- User ID (UUID)
- accountRole StringName 
- Name of Account Role assigned to member
- actorId String
- Actor ID (UUID)
- email String
- Member email
- firstName String
- Member's first name
- handle String
- Member handle, or a human-readable identifier
- id String
- The provider-assigned unique ID for this managed resource.
- lastName String
- Member's last name
- userId String
- User ID (UUID)
Look up Existing AccountMember Resource
Get an existing AccountMember resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccountMemberState, opts?: CustomResourceOptions): AccountMember@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        account_role_id: Optional[str] = None,
        account_role_name: Optional[str] = None,
        actor_id: Optional[str] = None,
        email: Optional[str] = None,
        first_name: Optional[str] = None,
        handle: Optional[str] = None,
        last_name: Optional[str] = None,
        user_id: Optional[str] = None) -> AccountMemberfunc GetAccountMember(ctx *Context, name string, id IDInput, state *AccountMemberState, opts ...ResourceOption) (*AccountMember, error)public static AccountMember Get(string name, Input<string> id, AccountMemberState? state, CustomResourceOptions? opts = null)public static AccountMember get(String name, Output<String> id, AccountMemberState state, CustomResourceOptions options)resources:  _:    type: prefect:AccountMember    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AccountId string
- Account ID (UUID)
- AccountRole stringId 
- Acount Role ID (UUID)
- AccountRole stringName 
- Name of Account Role assigned to member
- ActorId string
- Actor ID (UUID)
- Email string
- Member email
- FirstName string
- Member's first name
- Handle string
- Member handle, or a human-readable identifier
- LastName string
- Member's last name
- UserId string
- User ID (UUID)
- AccountId string
- Account ID (UUID)
- AccountRole stringId 
- Acount Role ID (UUID)
- AccountRole stringName 
- Name of Account Role assigned to member
- ActorId string
- Actor ID (UUID)
- Email string
- Member email
- FirstName string
- Member's first name
- Handle string
- Member handle, or a human-readable identifier
- LastName string
- Member's last name
- UserId string
- User ID (UUID)
- accountId String
- Account ID (UUID)
- accountRole StringId 
- Acount Role ID (UUID)
- accountRole StringName 
- Name of Account Role assigned to member
- actorId String
- Actor ID (UUID)
- email String
- Member email
- firstName String
- Member's first name
- handle String
- Member handle, or a human-readable identifier
- lastName String
- Member's last name
- userId String
- User ID (UUID)
- accountId string
- Account ID (UUID)
- accountRole stringId 
- Acount Role ID (UUID)
- accountRole stringName 
- Name of Account Role assigned to member
- actorId string
- Actor ID (UUID)
- email string
- Member email
- firstName string
- Member's first name
- handle string
- Member handle, or a human-readable identifier
- lastName string
- Member's last name
- userId string
- User ID (UUID)
- account_id str
- Account ID (UUID)
- account_role_ strid 
- Acount Role ID (UUID)
- account_role_ strname 
- Name of Account Role assigned to member
- actor_id str
- Actor ID (UUID)
- email str
- Member email
- first_name str
- Member's first name
- handle str
- Member handle, or a human-readable identifier
- last_name str
- Member's last name
- user_id str
- User ID (UUID)
- accountId String
- Account ID (UUID)
- accountRole StringId 
- Acount Role ID (UUID)
- accountRole StringName 
- Name of Account Role assigned to member
- actorId String
- Actor ID (UUID)
- email String
- Member email
- firstName String
- Member's first name
- handle String
- Member handle, or a human-readable identifier
- lastName String
- Member's last name
- userId String
- User ID (UUID)
Import
prefect_account_member resources can be imported by the email address
$ pulumi import prefect:index/accountMember:AccountMember my_account_member marvin@prefect.io
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- prefect prefecthq/terraform-provider-prefect
- License
- Notes
- This Pulumi package is based on the prefectTerraform Provider.