Class: Anthropic::Models::Beta::Organization::BetaAPIKey
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::Organization::BetaAPIKey
- Defined in:
- lib/anthropic/models/beta/organization/beta_api_key.rb,
sig/anthropic/models/beta/organization/beta_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::Beta::Organization::BetaAPIKeyCreatedBy?
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::Beta::Organization::BetaAPIKeyUserActor, ...
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::Beta::Organization::BetaAPIKeyOrganizationScope, Anthropic::Models::Beta::Organization::BetaAPIKeyWorkspaceScope
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::Beta::Organization::BetaAPIKey::Status
Status of the API key.
-
#type ⇒ Symbol, :api_key
Object type.
-
#workspace_id ⇒ String?
deprecated
Deprecated.
Use
scopeinstead.workspace_idisnullboth for an API key in the default
Instance Method Summary collapse
-
#initialize(id:, created_at:, created_by:, expires_at:, name:, partial_key_hint:, principal:, scope:, status:, workspace_id:, type: :api_key) ⇒ Object
constructor
Some parameter documentations has been truncated, see BetaAPIKey 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:, workspace_id:, type: :api_key) ⇒ Object
Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::BetaAPIKey for more details.
|
|
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 90
|
Instance Attribute Details
#created_at ⇒ Time
RFC 3339 datetime string indicating when the API Key was created.
19 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 19 required :created_at, Time |
#created_by ⇒ Anthropic::Models::Beta::Organization::BetaAPIKeyCreatedBy?
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).
27 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 27 required :created_by, -> { Anthropic::Beta::Organization::BetaAPIKeyCreatedBy }, nil?: true |
#expires_at ⇒ Time?
RFC 3339 datetime string indicating when the API Key expires, or null if it
never expires.
34 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 34 required :expires_at, Time, nil?: true |
#id ⇒ String
ID of the API key.
13 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 13 required :id, String |
#name ⇒ String
Name of the API key.
40 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 40 required :name, String |
#partial_key_hint ⇒ String?
Partially redacted hint for the API key.
46 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 46 required :partial_key_hint, String, nil?: true |
#principal ⇒ Anthropic::Models::Beta::Organization::BetaAPIKeyUserActor, ...
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.
53 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 53 required :principal, union: -> { Anthropic::Beta::Organization::BetaAPIKey::Principal }, nil?: true |
#scope ⇒ Anthropic::Models::Beta::Organization::BetaAPIKeyOrganizationScope, Anthropic::Models::Beta::Organization::BetaAPIKeyWorkspaceScope
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.
63 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 63 required :scope, union: -> { Anthropic::Beta::Organization::BetaAPIKey::Scope } |
#status ⇒ Symbol, Anthropic::Models::Beta::Organization::BetaAPIKey::Status
Status of the API key.
69 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 69 required :status, enum: -> { Anthropic::Beta::Organization::BetaAPIKey::Status } |
#type ⇒ Symbol, :api_key
Object type.
For API Keys, this is always "api_key".
77 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 77 required :type, const: :api_key |
#workspace_id ⇒ String?
Use scope instead. workspace_id is null both for an API key in the default
Workspace and for a principal-bound API key that has no Workspace.
Deprecated: use scope instead. ID of the Workspace associated with the API
key, or null if the API key belongs to the default Workspace. Also null for
a principal-bound API key that has no Workspace; scope tells the two apart.
88 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 88 required :workspace_id, String, nil?: true |
Instance Method Details
#to_hash ⇒ {
57 |
# File 'sig/anthropic/models/beta/organization/beta_api_key.rbs', line 57
def to_hash: -> {
|