pub struct CreateProviderAccountRequest {
pub alert_threshold: Option<f64>,
pub display_name: Option<String>,
pub enabled: Option<bool>,
pub expires_at: Option<DateTime<Utc>>,
pub kind: String,
pub max_concurrency: Option<i32>,
pub name: String,
pub plan: Option<String>,
pub priority: Option<i32>,
pub tags: Option<Vec<String>>,
pub token: String,
}Expand description
Request body to add a Provider Account. Admin only.
JSON schema
{
"description": "Request body to add a Provider Account. Admin only.",
"type": "object",
"required": [
"kind",
"name",
"token"
],
"properties": {
"alert_threshold": {
"description": "Utilization from which the account is shown as near its limit, in `(0, 1]` (default 0.8).",
"type": [
"number",
"null"
],
"format": "double"
},
"display_name": {
"description": "Human-readable name, defaults to `name`.",
"type": [
"string",
"null"
]
},
"enabled": {
"description": "Whether the account may be selected (default `true`).",
"type": [
"boolean",
"null"
]
},
"expires_at": {
"description": "When the credential expires (default: now + 365 days).",
"type": [
"string",
"null"
],
"format": "date-time"
},
"kind": {
"description": "Account kind (see `GET /provider-accounts/kinds`).",
"type": "string"
},
"max_concurrency": {
"description": "Maximum concurrent steps (>= 1).",
"type": [
"integer",
"null"
],
"format": "int32",
"minimum": 0.0
},
"name": {
"description": "Unique slug, immutable (`^[a-z0-9][a-z0-9-]{0,62}$`).",
"type": "string"
},
"plan": {
"description": "Subscription plan, informative (`pro`, `max`).",
"type": [
"string",
"null"
]
},
"priority": {
"description": "Priority, lower is preferred (default 100).",
"type": [
"integer",
"null"
],
"format": "int32"
},
"tags": {
"description": "Tags, each a slug.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"token": {
"description": "Credential, write-only (e.g. a `claude setup-token` token).",
"type": "string"
}
}
}
```ignore
</details>Fields§
§alert_threshold: Option<f64>Utilization from which the account is shown as near its limit, in (0, 1] (default 0.8).
display_name: Option<String>Human-readable name, defaults to name.
enabled: Option<bool>Whether the account may be selected (default true).
expires_at: Option<DateTime<Utc>>When the credential expires (default: now + 365 days).
kind: StringAccount kind (see GET /provider-accounts/kinds).
max_concurrency: Option<i32>Maximum concurrent steps (>= 1).
name: StringUnique slug, immutable (^[a-z0-9][a-z0-9-]{0,62}$).
plan: Option<String>Subscription plan, informative (pro, max).
priority: Option<i32>Priority, lower is preferred (default 100).
Tags, each a slug.
token: StringCredential, write-only (e.g. a claude setup-token token).
Implementations§
Trait Implementations§
Source§impl Clone for CreateProviderAccountRequest
impl Clone for CreateProviderAccountRequest
Source§impl Debug for CreateProviderAccountRequest
impl Debug for CreateProviderAccountRequest
Source§impl<'de> Deserialize<'de> for CreateProviderAccountRequest
impl<'de> Deserialize<'de> for CreateProviderAccountRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CreateProviderAccountRequest> for CreateProviderAccountRequest
impl From<CreateProviderAccountRequest> for CreateProviderAccountRequest
Source§fn from(value: CreateProviderAccountRequest) -> Self
fn from(value: CreateProviderAccountRequest) -> Self
Converts to this type from the input type.
Source§impl TryFrom<CreateProviderAccountRequest> for CreateProviderAccountRequest
impl TryFrom<CreateProviderAccountRequest> for CreateProviderAccountRequest
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
value: CreateProviderAccountRequest,
) -> Result<Self, ConversionError>
fn try_from( value: CreateProviderAccountRequest, ) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for CreateProviderAccountRequest
impl RefUnwindSafe for CreateProviderAccountRequest
impl Send for CreateProviderAccountRequest
impl Sync for CreateProviderAccountRequest
impl Unpin for CreateProviderAccountRequest
impl UnsafeUnpin for CreateProviderAccountRequest
impl UnwindSafe for CreateProviderAccountRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more