Class UpdateApiTokenRequest
- Namespace
- Cloudflare.NET.ApiTokens.Models
- Assembly
- Cloudflare.NET.dll
Request to update an existing API token.
public record UpdateApiTokenRequest : IEquatable<UpdateApiTokenRequest>
- Inheritance
-
UpdateApiTokenRequest
- Implements
- Inherited Members
Constructors
UpdateApiTokenRequest(string, IReadOnlyList<CreateTokenPolicyRequest>, DateTime?, DateTime?, TokenCondition?, TokenStatus?)
Request to update an existing API token.
public UpdateApiTokenRequest(string Name, IReadOnlyList<CreateTokenPolicyRequest> Policies, DateTime? ExpiresOn = null, DateTime? NotBefore = null, TokenCondition? Condition = null, TokenStatus? Status = null)
Parameters
NamestringUpdated token name.
PoliciesIReadOnlyList<CreateTokenPolicyRequest>Updated token policies.
ExpiresOnDateTime?Updated expiration time.
NotBeforeDateTime?Updated not-before time.
ConditionTokenConditionUpdated IP restrictions.
StatusTokenStatus?Updated status.
Properties
Condition
Updated IP restrictions.
[JsonPropertyName("condition")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public TokenCondition? Condition { get; init; }
Property Value
ExpiresOn
Updated expiration time.
[JsonPropertyName("expires_on")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? ExpiresOn { get; init; }
Property Value
Name
Updated token name.
[JsonPropertyName("name")]
public string Name { get; init; }
Property Value
NotBefore
Updated not-before time.
[JsonPropertyName("not_before")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? NotBefore { get; init; }
Property Value
Policies
Updated token policies.
[JsonPropertyName("policies")]
public IReadOnlyList<CreateTokenPolicyRequest> Policies { get; init; }
Property Value
Status
Updated status.
[JsonPropertyName("status")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public TokenStatus? Status { get; init; }