Table of Contents

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

Name string

Updated token name.

Policies IReadOnlyList<CreateTokenPolicyRequest>

Updated token policies.

ExpiresOn DateTime?

Updated expiration time.

NotBefore DateTime?

Updated not-before time.

Condition TokenCondition

Updated IP restrictions.

Status TokenStatus?

Updated status.

Properties

Condition

Updated IP restrictions.

[JsonPropertyName("condition")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public TokenCondition? Condition { get; init; }

Property Value

TokenCondition

ExpiresOn

Updated expiration time.

[JsonPropertyName("expires_on")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? ExpiresOn { get; init; }

Property Value

DateTime?

Name

Updated token name.

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

Property Value

string

NotBefore

Updated not-before time.

[JsonPropertyName("not_before")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? NotBefore { get; init; }

Property Value

DateTime?

Policies

Updated token policies.

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

Property Value

IReadOnlyList<CreateTokenPolicyRequest>

Status

Updated status.

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

Property Value

TokenStatus?