Class: Anthropic::Models::Organization::Workspace

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/organization/workspace.rb,
sig/anthropic/models/organization/workspace.rbs

Overview

See Also:

  • Anthropic::Resources::Organization::Workspaces#create

Instance Attribute Summary collapse

Instance Method Summary collapse

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:, archived_at:, compartment_id:, created_at:, data_residency:, display_color:, external_key_id:, name:, tags:, user_profile_id:, type: :workspace) ⇒ Workspace

Some parameter documentations has been truncated, see Anthropic::Models::Organization::Workspace for more details.

Parameters:

  • id (String) —

    ID of the Workspace.

  • archived_at (Time, nil) —

    RFC 3339 datetime string indicating when the Workspace was archived, or null i

  • compartment_id (String) —

    Identifier for this Workspace's encryption compartment. When you configure an

  • created_at (Time) —

    RFC 3339 datetime string indicating when the Workspace was created.

  • data_residency (Anthropic::Models::Organization::DataResidency) —

    Data residency configuration.

  • display_color (String) —

    Hex color code representing the Workspace in the Anthropic Console.

  • external_key_id (String, nil) —

    ID of the customer-managed encryption key (CMEK) configuration to use for this

  • name (String) —

    Name of the Workspace.

  • tags (Hash{Symbol=>String}) —

    User-defined tags as string key-value pairs. Keys may not begin with anthropic

  • user_profile_id (String, nil) —

    ID of the user profile attached to the Workspace, or null if it has none. Every

  • type (Symbol, :workspace) (defaults to: :workspace) —

    Object type.

  • id: (String)
  • archived_at: (Time, nil)
  • compartment_id: (String)
  • created_at: (Time)
  • data_residency: (Anthropic::Organization::DataResidency)
  • display_color: (String)
  • external_key_id: (String, nil)
  • name: (String)
  • tags: (::Hash[Symbol, String])
  • user_profile_id: (String, nil)
  • type: (:workspace) (defaults to: :workspace)


# File 'lib/anthropic/models/organization/workspace.rb', line 101

Instance Attribute Details

#archived_at ⇒ Time?

RFC 3339 datetime string indicating when the Workspace was archived, or null if the Workspace is not archived.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


19
# File 'lib/anthropic/models/organization/workspace.rb', line 19

required :archived_at, Time, nil?: true

#compartment_id ⇒ String

Identifier for this Workspace's encryption compartment. When you configure an AWS KMS customer-managed encryption key (CMEK) that isn't bound to a user profile, reference this value in your KMS key-policy condition so the key is scoped to this compartment. On GCP and Azure, Anthropic enforces the compartment binding automatically; you do not need to reference this value in your key configuration. See the CMEK integration guide for the required key configuration; unless your organization is on Claude Platform on AWS, it includes a separate value used during key validation. On Claude Platform on AWS there is no separate validation value: your organization's own key is validated against this Workspace's own value when it is attached, so if its key policy uses the compartment condition, add this value to it before attaching the key.

Parameters:

  • value (String)

Returns:

  • (String)


35
# File 'lib/anthropic/models/organization/workspace.rb', line 35

required :compartment_id, String

#created_at ⇒ Time

RFC 3339 datetime string indicating when the Workspace was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


41
# File 'lib/anthropic/models/organization/workspace.rb', line 41

required :created_at, Time

#data_residency ⇒ Anthropic::Models::Organization::DataResidency

Data residency configuration.

Parameters:

  • value (Anthropic::Organization::DataResidency)

Returns:



47
# File 'lib/anthropic/models/organization/workspace.rb', line 47

required :data_residency, -> { Anthropic::Organization::DataResidency }

#display_color ⇒ String

Hex color code representing the Workspace in the Anthropic Console.

Parameters:

  • value (String)

Returns:

  • (String)


53
# File 'lib/anthropic/models/organization/workspace.rb', line 53

required :display_color, String

#external_key_id ⇒ String?

ID of the customer-managed encryption key (CMEK) configuration to use for this Workspace. Setting this field requires CMEK to be enabled for your organization. When set, data stored for this Workspace is encrypted with the referenced key. Create key configurations with the External Keys API. On Claude Platform on AWS the value for an AWS KMS key is the key's ARN, and your organization's own key must be a single-Region key in the same Region as the Workspace. If that key is outside the Workspace's AWS account, it can be attached only by updating an active Workspace. On that platform the key is validated against this Workspace when it is attached, so a key-policy problem is reported as an error on this request. This field is write-once: once a key is attached to a Workspace it cannot be detached or replaced. To rotate key material, rotate the underlying key on your cloud KMS; the external_key_id stays the same.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


70
# File 'lib/anthropic/models/organization/workspace.rb', line 70

required :external_key_id, String, nil?: true

#id ⇒ String

ID of the Workspace.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/anthropic/models/organization/workspace.rb', line 12

required :id, String

#name ⇒ String

Name of the Workspace.

Parameters:

  • value (String)

Returns:

  • (String)


76
# File 'lib/anthropic/models/organization/workspace.rb', line 76

required :name, String

#tags ⇒ Hash{Symbol=>String}

User-defined tags as string key-value pairs. Keys may not begin with anthropic.

Parameters:

  • value (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String})


83
# File 'lib/anthropic/models/organization/workspace.rb', line 83

required :tags, Anthropic::Internal::Type::HashOf[String]

#type ⇒ Symbol, :workspace

Object type.

For Workspaces, this is always "workspace".

Parameters:

  • value (:workspace)

Returns:

  • (Symbol, :workspace)


91
# File 'lib/anthropic/models/organization/workspace.rb', line 91

required :type, const: :workspace

#user_profile_id ⇒ String?

ID of the user profile attached to the Workspace, or null if it has none. Every inference request through a Workspace that has a user profile must name that profile.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


99
# File 'lib/anthropic/models/organization/workspace.rb', line 99

required :user_profile_id, String, nil?: true

Instance Method Details

#to_hash ⇒ { id: String, archived_at: Time?, compartment_id: String, created_at: Time, data_residency: Anthropic::Organization::DataResidency, display_color: String, external_key_id: String?, name: String, tags: ::Hash[Symbol, String], type: :workspace, user_profile_id: String? }

Returns:

  • ({ id: String, archived_at: Time?, compartment_id: String, created_at: Time, data_residency: Anthropic::Organization::DataResidency, display_color: String, external_key_id: String?, name: String, tags: ::Hash[Symbol, String], type: :workspace, user_profile_id: String? })


56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'sig/anthropic/models/organization/workspace.rbs', line 56

def to_hash: -> {
  id: String,
  archived_at: Time?,
  compartment_id: String,
  created_at: Time,
  data_residency: Anthropic::Organization::DataResidency,
  display_color: String,
  external_key_id: String?,
  name: String,
  tags: ::Hash[Symbol, String],
  type: :workspace,
  user_profile_id: String?
}