Class CreateTempCredentialsRequest
- Namespace
- Cloudflare.NET.Accounts.Models
- Assembly
- Cloudflare.NET.dll
Defines the request payload for creating temporary R2 access credentials.
public record CreateTempCredentialsRequest : IEquatable<CreateTempCredentialsRequest>
- Inheritance
-
CreateTempCredentialsRequest
- Implements
- Inherited Members
Constructors
CreateTempCredentialsRequest(string, string, TempCredentialPermission, int, IReadOnlyList<string>?, IReadOnlyList<string>?)
Defines the request payload for creating temporary R2 access credentials.
public CreateTempCredentialsRequest(string Bucket, string ParentAccessKeyId, TempCredentialPermission Permission, int TtlSeconds, IReadOnlyList<string>? Objects = null, IReadOnlyList<string>? Prefixes = null)
Parameters
BucketstringThe name of the R2 bucket to scope the credentials to.
ParentAccessKeyIdstringThe parent access key ID to derive the temporary credentials from.
PermissionTempCredentialPermissionThe permission level for the temporary credentials.
TtlSecondsintThe time-to-live for the credentials in seconds.
ObjectsIReadOnlyList<string>Optional list of specific object keys to scope access to. If not specified, credentials have access to all objects matching the bucket/prefix scope.
PrefixesIReadOnlyList<string>Optional list of object key prefixes to scope access to. If not specified, credentials have access to all objects in the bucket.
Properties
Bucket
The name of the R2 bucket to scope the credentials to.
[JsonPropertyName("bucket")]
public string Bucket { get; init; }
Property Value
Objects
Optional list of specific object keys to scope access to. If not specified, credentials have access to all objects matching the bucket/prefix scope.
[JsonPropertyName("objects")]
public IReadOnlyList<string>? Objects { get; init; }
Property Value
ParentAccessKeyId
The parent access key ID to derive the temporary credentials from.
[JsonPropertyName("parentAccessKeyId")]
public string ParentAccessKeyId { get; init; }
Property Value
Permission
The permission level for the temporary credentials.
[JsonPropertyName("permission")]
public TempCredentialPermission Permission { get; init; }
Property Value
Prefixes
Optional list of object key prefixes to scope access to. If not specified, credentials have access to all objects in the bucket.
[JsonPropertyName("prefixes")]
public IReadOnlyList<string>? Prefixes { get; init; }
Property Value
TtlSeconds
The time-to-live for the credentials in seconds.
[JsonPropertyName("ttlSeconds")]
public int TtlSeconds { get; init; }