Module: Anthropic::Models::Beta::BetaManagedAgentsExecutionIdentity

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/beta/beta_managed_agents_execution_identity.rb,
sig/anthropic/models/beta/beta_managed_agents_execution_identity.rbs

Overview

Execution principal for runs of this agent as returned in API responses.

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Class Method Details

.new(type:, role_arn:) ⇒ Anthropic::Beta::BetaManagedAgentsAWSRoleExecutionIdentity .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsServiceAccountExecutionIdentity .new(type:, role_arn:) ⇒ Anthropic::Models::Beta::beta_managed_agents_execution_identity

Creates a new instance of the variant class whose type matches the given value, passing the remaining arguments to its constructor.

Overloads:

  • .new(type:, role_arn:) ⇒ Anthropic::Beta::BetaManagedAgentsAWSRoleExecutionIdentity

    Parameters:

    • type: (:aws_role, "aws_role")
    • role_arn: (String)

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsAWSRoleExecutionIdentity)
  • .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsServiceAccountExecutionIdentity

    Parameters:

    • type: (:service_account, "service_account")

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsServiceAccountExecutionIdentity)
  • .new(type:, role_arn:) ⇒ Anthropic::Models::Beta::beta_managed_agents_execution_identity

    Parameters:

    • type: (Anthropic::Models::Beta::BetaManagedAgentsExecutionIdentity::type_, String)
    • role_arn: (String)

    Returns:

    • (Anthropic::Models::Beta::beta_managed_agents_execution_identity)

Parameters:

Returns:

Raises:

  • (ArgumentError)


42
43
44
45
46
47
48
49
50
51
# File 'lib/anthropic/models/beta/beta_managed_agents_execution_identity.rb', line 42

def self.new(type:, **args)
  case type.to_sym
  when :aws_role
    Anthropic::Beta::BetaManagedAgentsAWSRoleExecutionIdentity.new(**args)
  when :service_account
    Anthropic::Beta::BetaManagedAgentsServiceAccountExecutionIdentity.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/beta_managed_agents_execution_identity.rb', line 24

.variants ⇒ Array(Anthropic::Models::Beta::BetaManagedAgentsAWSRoleExecutionIdentity, Anthropic::Models::Beta::BetaManagedAgentsServiceAccountExecutionIdentity)



# File 'lib/anthropic/models/beta/beta_managed_agents_execution_identity.rb', line 28