Table of Contents

Class CreateApiTokenResult

Namespace
Cloudflare.NET.ApiTokens.Models
Assembly
Cloudflare.NET.dll

Result of creating a new API token, including the secret value.

Important: The Value property contains the token secret and is only available at creation time. Store it securely - it cannot be retrieved again.

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

Constructors

CreateApiTokenResult(string, string, string, TokenStatus, DateTime, DateTime, IReadOnlyList<TokenPolicy>, DateTime?, DateTime?, TokenCondition?)

Result of creating a new API token, including the secret value.

Important: The Value property contains the token secret and is only available at creation time. Store it securely - it cannot be retrieved again.

public CreateApiTokenResult(string Id, string Name, string Value, TokenStatus Status, DateTime IssuedOn, DateTime ModifiedOn, IReadOnlyList<TokenPolicy> Policies, DateTime? ExpiresOn = null, DateTime? NotBefore = null, TokenCondition? Condition = null)

Parameters

Id string

Token identifier.

Name string

Token name.

Value string

The token secret value. Only returned on creation. Store securely.

Status TokenStatus

Token status.

IssuedOn DateTime

When the token was created.

ModifiedOn DateTime

When the token was last modified.

Policies IReadOnlyList<TokenPolicy>

Token policies.

ExpiresOn DateTime?

Token expiration time.

NotBefore DateTime?

Token validity start time.

Condition TokenCondition

IP restrictions.

Properties

Condition

IP restrictions.

[JsonPropertyName("condition")]
public TokenCondition? Condition { get; init; }

Property Value

TokenCondition

ExpiresOn

Token expiration time.

[JsonPropertyName("expires_on")]
public DateTime? ExpiresOn { get; init; }

Property Value

DateTime?

Id

Token identifier.

[JsonPropertyName("id")]
public string Id { get; init; }

Property Value

string

IssuedOn

When the token was created.

[JsonPropertyName("issued_on")]
public DateTime IssuedOn { get; init; }

Property Value

DateTime

ModifiedOn

When the token was last modified.

[JsonPropertyName("modified_on")]
public DateTime ModifiedOn { get; init; }

Property Value

DateTime

Name

Token name.

[JsonPropertyName("name")]
public string Name { get; init; }

Property Value

string

NotBefore

Token validity start time.

[JsonPropertyName("not_before")]
public DateTime? NotBefore { get; init; }

Property Value

DateTime?

Policies

Token policies.

[JsonPropertyName("policies")]
public IReadOnlyList<TokenPolicy> Policies { get; init; }

Property Value

IReadOnlyList<TokenPolicy>

Status

Token status.

[JsonPropertyName("status")]
public TokenStatus Status { get; init; }

Property Value

TokenStatus

Value

The token secret value. Only returned on creation. Store securely.

[JsonPropertyName("value")]
public string Value { get; init; }

Property Value

string