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
IdstringToken identifier.
NamestringToken name.
ValuestringThe token secret value. Only returned on creation. Store securely.
StatusTokenStatusToken status.
IssuedOnDateTimeWhen the token was created.
ModifiedOnDateTimeWhen the token was last modified.
PoliciesIReadOnlyList<TokenPolicy>Token policies.
ExpiresOnDateTime?Token expiration time.
NotBeforeDateTime?Token validity start time.
ConditionTokenConditionIP restrictions.
Properties
Condition
IP restrictions.
[JsonPropertyName("condition")]
public TokenCondition? Condition { get; init; }
Property Value
ExpiresOn
Token expiration time.
[JsonPropertyName("expires_on")]
public DateTime? ExpiresOn { get; init; }
Property Value
Id
Token identifier.
[JsonPropertyName("id")]
public string Id { get; init; }
Property Value
IssuedOn
When the token was created.
[JsonPropertyName("issued_on")]
public DateTime IssuedOn { get; init; }
Property Value
ModifiedOn
When the token was last modified.
[JsonPropertyName("modified_on")]
public DateTime ModifiedOn { get; init; }
Property Value
Name
Token name.
[JsonPropertyName("name")]
public string Name { get; init; }
Property Value
NotBefore
Token validity start time.
[JsonPropertyName("not_before")]
public DateTime? NotBefore { get; init; }
Property Value
Policies
Token policies.
[JsonPropertyName("policies")]
public IReadOnlyList<TokenPolicy> Policies { get; init; }
Property Value
Status
Token status.
[JsonPropertyName("status")]
public TokenStatus Status { get; init; }
Property Value
Value
The token secret value. Only returned on creation. Store securely.
[JsonPropertyName("value")]
public string Value { get; init; }