Class: Anthropic::Models::Organization::APIKey
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Organization::APIKey
- Defined in:
- lib/anthropic/models/organization/api_key.rb,
sig/anthropic/models/organization/api_key.rbs
Overview
Defined Under Namespace
Modules: Principal, Scope, Status
Instance Attribute Summary collapse
-
#created_at ⇒ Time
RFC 3339 datetime string indicating when the API Key was created.
-
#created_by ⇒ Anthropic::Models::Organization::APIKeyCreatedBy?
The ID and type of the actor that created the API key, or
nullwhen the creator is not recorded (legacy, workload-identity-federated, or system-created keys). -
#expires_at ⇒ Time?
RFC 3339 datetime string indicating when the API Key expires, or
nullif it never expires. -
#id ⇒ String
ID of the API key.
-
#name ⇒ String
Name of the API key.
-
#partial_key_hint ⇒ String?
Partially redacted hint for the API key.
-
#principal ⇒ Anthropic::Models::Organization::APIKeyUserActor, ...
The principal the API key acts as (a User or a Service Account), or
nullif the API key is not bound to a principal. -
#scope ⇒ Anthropic::Models::Organization::APIKeyOrganizationScope, Anthropic::Models::Organization::APIKeyWorkspaceScope
Where the API key belongs: its Workspace (
{"type": "workspace", "workspace_id": "wrkspc_..."}, with the Workspace's real ID even when it is the organization's default Workspace), or the organization ({"type": "organization"}) for a principal-bound API key that has no Workspace. -
#status ⇒ Symbol, Anthropic::Models::Organization::APIKey::Status
Status of the API key.
-
#type ⇒ Symbol, :api_key
Object type.
Instance Method Summary collapse
-
#initialize(id:, created_at:, created_by:, expires_at:, name:, partial_key_hint:, principal:, scope:, status:, type: :api_key) ⇒ void
constructor
Some parameter documentations has been truncated, see APIKey for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, created_at:, created_by:, expires_at:, name:, partial_key_hint:, principal:, scope:, status:, type: :api_key) ⇒ void
Some parameter documentations has been truncated, see Anthropic::Models::Organization::APIKey for more details.
|
|
# File 'lib/anthropic/models/organization/api_key.rb', line 78
|
Instance Attribute Details
#created_at ⇒ Time
RFC 3339 datetime string indicating when the API Key was created.
18 |
# File 'lib/anthropic/models/organization/api_key.rb', line 18 required :created_at, Time |
#created_by ⇒ Anthropic::Models::Organization::APIKeyCreatedBy?
The ID and type of the actor that created the API key, or null when the
creator is not recorded (legacy, workload-identity-federated, or system-created
keys).
26 |
# File 'lib/anthropic/models/organization/api_key.rb', line 26 required :created_by, -> { Anthropic::Organization::APIKeyCreatedBy }, nil?: true |
#expires_at ⇒ Time?
RFC 3339 datetime string indicating when the API Key expires, or null if it
never expires.
33 |
# File 'lib/anthropic/models/organization/api_key.rb', line 33 required :expires_at, Time, nil?: true |
#id ⇒ String
ID of the API key.
12 |
# File 'lib/anthropic/models/organization/api_key.rb', line 12 required :id, String |
#name ⇒ String
Name of the API key.
39 |
# File 'lib/anthropic/models/organization/api_key.rb', line 39 required :name, String |
#partial_key_hint ⇒ String?
Partially redacted hint for the API key.
45 |
# File 'lib/anthropic/models/organization/api_key.rb', line 45 required :partial_key_hint, String, nil?: true |
#principal ⇒ Anthropic::Models::Organization::APIKeyUserActor, ...
The principal the API key acts as (a User or a Service Account), or null if
the API key is not bound to a principal.
52 |
# File 'lib/anthropic/models/organization/api_key.rb', line 52 required :principal, union: -> { Anthropic::Organization::APIKey::Principal }, nil?: true |
#scope ⇒ Anthropic::Models::Organization::APIKeyOrganizationScope, Anthropic::Models::Organization::APIKeyWorkspaceScope
Where the API key belongs: its Workspace
({"type": "workspace", "workspace_id": "wrkspc_..."}, with the Workspace's
real ID even when it is the organization's default Workspace), or the
organization ({"type": "organization"}) for a principal-bound API key that has
no Workspace.
62 |
# File 'lib/anthropic/models/organization/api_key.rb', line 62 required :scope, union: -> { Anthropic::Organization::APIKey::Scope } |
#status ⇒ Symbol, Anthropic::Models::Organization::APIKey::Status
Status of the API key.
68 |
# File 'lib/anthropic/models/organization/api_key.rb', line 68 required :status, enum: -> { Anthropic::Organization::APIKey::Status } |
#type ⇒ Symbol, :api_key
Object type.
For API Keys, this is always "api_key".
76 |
# File 'lib/anthropic/models/organization/api_key.rb', line 76 required :type, const: :api_key |
Instance Method Details
#to_hash ⇒ {
52 |
# File 'sig/anthropic/models/organization/api_key.rbs', line 52 def to_hash: -> { |