1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. AccountMember
Cloudflare v5.49.1 published on Tuesday, Feb 18, 2025 by Pulumi

cloudflare.AccountMember

Explore with Pulumi AI

Provides a resource which manages Cloudflare account members.

Example Usage

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

const example = new cloudflare.AccountMember("example", {
    accountId: "f037e56e89293a057740de681ac9abbe",
    emailAddress: "user@example.com",
    roleIds: [
        "68b329da9893e34099c7d8ad5cb9c940",
        "d784fa8b6d98d27699781bd9a7cf19f0",
    ],
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example = cloudflare.AccountMember("example",
    account_id="f037e56e89293a057740de681ac9abbe",
    email_address="user@example.com",
    role_ids=[
        "68b329da9893e34099c7d8ad5cb9c940",
        "d784fa8b6d98d27699781bd9a7cf19f0",
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudflare.NewAccountMember(ctx, "example", &cloudflare.AccountMemberArgs{
			AccountId:    pulumi.String("f037e56e89293a057740de681ac9abbe"),
			EmailAddress: pulumi.String("user@example.com"),
			RoleIds: pulumi.StringArray{
				pulumi.String("68b329da9893e34099c7d8ad5cb9c940"),
				pulumi.String("d784fa8b6d98d27699781bd9a7cf19f0"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var example = new Cloudflare.AccountMember("example", new()
    {
        AccountId = "f037e56e89293a057740de681ac9abbe",
        EmailAddress = "user@example.com",
        RoleIds = new[]
        {
            "68b329da9893e34099c7d8ad5cb9c940",
            "d784fa8b6d98d27699781bd9a7cf19f0",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.AccountMember;
import com.pulumi.cloudflare.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) {
        var example = new AccountMember("example", AccountMemberArgs.builder()
            .accountId("f037e56e89293a057740de681ac9abbe")
            .emailAddress("user@example.com")
            .roleIds(            
                "68b329da9893e34099c7d8ad5cb9c940",
                "d784fa8b6d98d27699781bd9a7cf19f0")
            .build());

    }
}
Copy
resources:
  example:
    type: cloudflare:AccountMember
    properties:
      accountId: f037e56e89293a057740de681ac9abbe
      emailAddress: user@example.com
      roleIds:
        - 68b329da9893e34099c7d8ad5cb9c940
        - d784fa8b6d98d27699781bd9a7cf19f0
Copy

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: AccountMemberArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def AccountMember(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  account_id: Optional[str] = None,
                  email_address: Optional[str] = None,
                  role_ids: Optional[Sequence[str]] = None,
                  status: Optional[str] = None)
func NewAccountMember(ctx *Context, name string, args AccountMemberArgs, opts ...ResourceOption) (*AccountMember, error)
public AccountMember(string name, AccountMemberArgs args, CustomResourceOptions? opts = null)
public AccountMember(String name, AccountMemberArgs args)
public AccountMember(String name, AccountMemberArgs args, CustomResourceOptions options)
type: cloudflare:AccountMember
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AccountMemberArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. AccountMemberArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AccountMemberArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 Cloudflare.AccountMember("accountMemberResource", new()
{
    AccountId = "string",
    EmailAddress = "string",
    RoleIds = new[]
    {
        "string",
    },
    Status = "string",
});
Copy
example, err := cloudflare.NewAccountMember(ctx, "accountMemberResource", &cloudflare.AccountMemberArgs{
	AccountId:    pulumi.String("string"),
	EmailAddress: pulumi.String("string"),
	RoleIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	Status: pulumi.String("string"),
})
Copy
var accountMemberResource = new AccountMember("accountMemberResource", AccountMemberArgs.builder()
    .accountId("string")
    .emailAddress("string")
    .roleIds("string")
    .status("string")
    .build());
Copy
account_member_resource = cloudflare.AccountMember("accountMemberResource",
    account_id="string",
    email_address="string",
    role_ids=["string"],
    status="string")
Copy
const accountMemberResource = new cloudflare.AccountMember("accountMemberResource", {
    accountId: "string",
    emailAddress: "string",
    roleIds: ["string"],
    status: "string",
});
Copy
type: cloudflare:AccountMember
properties:
    accountId: string
    emailAddress: string
    roleIds:
        - string
    status: string
Copy

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 This property is required. string
Account ID to create the account member in.
EmailAddress This property is required. string
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
RoleIds This property is required. List<string>
List of account role IDs that you want to assign to a member.
Status string
A member's status in the account. Available values: accepted, pending.
AccountId This property is required. string
Account ID to create the account member in.
EmailAddress This property is required. string
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
RoleIds This property is required. []string
List of account role IDs that you want to assign to a member.
Status string
A member's status in the account. Available values: accepted, pending.
accountId This property is required. String
Account ID to create the account member in.
emailAddress This property is required. String
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
roleIds This property is required. List<String>
List of account role IDs that you want to assign to a member.
status String
A member's status in the account. Available values: accepted, pending.
accountId This property is required. string
Account ID to create the account member in.
emailAddress This property is required. string
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
roleIds This property is required. string[]
List of account role IDs that you want to assign to a member.
status string
A member's status in the account. Available values: accepted, pending.
account_id This property is required. str
Account ID to create the account member in.
email_address This property is required. str
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
role_ids This property is required. Sequence[str]
List of account role IDs that you want to assign to a member.
status str
A member's status in the account. Available values: accepted, pending.
accountId This property is required. String
Account ID to create the account member in.
emailAddress This property is required. String
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
roleIds This property is required. List<String>
List of account role IDs that you want to assign to a member.
status String
A member's status in the account. Available values: accepted, pending.

Outputs

All input properties are implicitly available as output properties. Additionally, the AccountMember resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

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,
        email_address: Optional[str] = None,
        role_ids: Optional[Sequence[str]] = None,
        status: Optional[str] = None) -> AccountMember
func 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: cloudflare:AccountMember    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AccountId string
Account ID to create the account member in.
EmailAddress string
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
RoleIds List<string>
List of account role IDs that you want to assign to a member.
Status string
A member's status in the account. Available values: accepted, pending.
AccountId string
Account ID to create the account member in.
EmailAddress string
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
RoleIds []string
List of account role IDs that you want to assign to a member.
Status string
A member's status in the account. Available values: accepted, pending.
accountId String
Account ID to create the account member in.
emailAddress String
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
roleIds List<String>
List of account role IDs that you want to assign to a member.
status String
A member's status in the account. Available values: accepted, pending.
accountId string
Account ID to create the account member in.
emailAddress string
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
roleIds string[]
List of account role IDs that you want to assign to a member.
status string
A member's status in the account. Available values: accepted, pending.
account_id str
Account ID to create the account member in.
email_address str
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
role_ids Sequence[str]
List of account role IDs that you want to assign to a member.
status str
A member's status in the account. Available values: accepted, pending.
accountId String
Account ID to create the account member in.
emailAddress String
The email address of the user who you wish to manage. Following creation, this field becomes read only via the API and cannot be updated.
roleIds List<String>
List of account role IDs that you want to assign to a member.
status String
A member's status in the account. Available values: accepted, pending.

Import

$ pulumi import cloudflare:index/accountMember:AccountMember example <account_id>/<member_id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.