Table of Contents

Class CreateAccountMemberRequest

Namespace
Cloudflare.NET.Members.Models
Assembly
Cloudflare.NET.dll

Request to invite a new member to an account.

An invitation email will be sent to the specified email address. The user must accept the invitation to become an active member.

public record CreateAccountMemberRequest : IEquatable<CreateAccountMemberRequest>
Inheritance
CreateAccountMemberRequest
Implements
Inherited Members

Examples

var request = new CreateAccountMemberRequest(
  Email: "[email protected]",
  Roles: new[] { "dns-admin-role-id", "viewer-role-id" }
);
var member = await client.Members.CreateAccountMemberAsync(accountId, request);

Constructors

CreateAccountMemberRequest(string, IReadOnlyList<string>, IReadOnlyList<CreateMemberPolicyRequest>?, MemberStatus?)

Request to invite a new member to an account.

An invitation email will be sent to the specified email address. The user must accept the invitation to become an active member.

public CreateAccountMemberRequest(string Email, IReadOnlyList<string> Roles, IReadOnlyList<CreateMemberPolicyRequest>? Policies = null, MemberStatus? Status = null)

Parameters

Email string

Email address of the user to invite.

Roles IReadOnlyList<string>

Role IDs to assign to the member upon acceptance.

Policies IReadOnlyList<CreateMemberPolicyRequest>

Optional policies for fine-grained access control.

Status MemberStatus?

Optional status to set (typically omitted for new invitations).

Examples

var request = new CreateAccountMemberRequest(
  Email: "[email protected]",
  Roles: new[] { "dns-admin-role-id", "viewer-role-id" }
);
var member = await client.Members.CreateAccountMemberAsync(accountId, request);

Properties

Email

Email address of the user to invite.

[JsonPropertyName("email")]
public string Email { get; init; }

Property Value

string

Policies

Optional policies for fine-grained access control.

[JsonPropertyName("policies")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyList<CreateMemberPolicyRequest>? Policies { get; init; }

Property Value

IReadOnlyList<CreateMemberPolicyRequest>

Roles

Role IDs to assign to the member upon acceptance.

[JsonPropertyName("roles")]
public IReadOnlyList<string> Roles { get; init; }

Property Value

IReadOnlyList<string>

Status

Optional status to set (typically omitted for new invitations).

[JsonPropertyName("status")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public MemberStatus? Status { get; init; }

Property Value

MemberStatus?