Module: Anthropic::Models::Beta::Vaults::CredentialUpdateParams::Auth

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

Overview

New authentication settings for the credential. The type must match the credential's current type, which can't be changed.

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:, access_token:, expires_at:, refresh:) ⇒ Anthropic::Beta::Vaults::BetaManagedAgentsMCPOAuthUpdateParams .new(type:, token:) ⇒ Anthropic::Beta::Vaults::BetaManagedAgentsStaticBearerUpdateParams .new(type:, injection_location:, networking:, secret_value:) ⇒ Anthropic::Beta::Vaults::BetaManagedAgentsEnvironmentVariableUpdateParams .new(type:, access_token:, expires_at:, refresh:, token:, injection_location:, networking:, secret_value:) ⇒ Anthropic::Models::Beta::Vaults::CredentialUpdateParams::auth

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

Some parameter documentations has been truncated, see Anthropic::Models::Beta::Vaults::CredentialUpdateParams::Auth for more details.

Overloads:

  • .new(type:, access_token:, expires_at:, refresh:) ⇒ Anthropic::Beta::Vaults::BetaManagedAgentsMCPOAuthUpdateParams

    Parameters:

    • type: (:mcp_oauth, "mcp_oauth")
    • access_token: (String, nil)
    • expires_at: (Time, nil)
    • refresh: (Anthropic::Beta::Vaults::BetaManagedAgentsMCPOAuthRefreshUpdateParams, nil)

    Returns:

    • (Anthropic::Beta::Vaults::BetaManagedAgentsMCPOAuthUpdateParams)
  • .new(type:, token:) ⇒ Anthropic::Beta::Vaults::BetaManagedAgentsStaticBearerUpdateParams

    Parameters:

    • type: (:static_bearer, "static_bearer")
    • token: (String, nil)

    Returns:

    • (Anthropic::Beta::Vaults::BetaManagedAgentsStaticBearerUpdateParams)
  • .new(type:, injection_location:, networking:, secret_value:) ⇒ Anthropic::Beta::Vaults::BetaManagedAgentsEnvironmentVariableUpdateParams

    Parameters:

    • type: (:environment_variable, "environment_variable")
    • injection_location: (Anthropic::Beta::Vaults::BetaManagedAgentsInjectionLocationUpdateParams)
    • networking: (Anthropic::Models::Beta::Vaults::beta_managed_agents_credential_networking_params, nil)
    • secret_value: (String, nil)

    Returns:

    • (Anthropic::Beta::Vaults::BetaManagedAgentsEnvironmentVariableUpdateParams)
  • .new(type:, access_token:, expires_at:, refresh:, token:, injection_location:, networking:, secret_value:) ⇒ Anthropic::Models::Beta::Vaults::CredentialUpdateParams::auth

    Parameters:

    • type: (Anthropic::Models::Beta::Vaults::CredentialUpdateParams::Auth::type_, String)
    • access_token: (String, nil)
    • expires_at: (Time, nil)
    • refresh: (Anthropic::Beta::Vaults::BetaManagedAgentsMCPOAuthRefreshUpdateParams, nil)
    • token: (String, nil)
    • injection_location: (Anthropic::Beta::Vaults::BetaManagedAgentsInjectionLocationUpdateParams)
    • networking: (Anthropic::Models::Beta::Vaults::beta_managed_agents_credential_networking_params, nil)
    • secret_value: (String, nil)

    Returns:

    • (Anthropic::Models::Beta::Vaults::CredentialUpdateParams::auth)

Parameters:

  • type (Symbol, Anthropic::Models::Beta::Vaults::CredentialUpdateParams::Auth::Type, String)
  • args (Hash{Symbol=>Object}) —

    Attributes for the chosen variant.

    @option args [String, nil] :access_token The new OAuth access token to replace the stored one.

    @option args [Time, nil] :expires_at When the credential's access token expires, in RFC 3339. Leave it out to keep th

    @option args [Anthropic::Models::Beta::Vaults::BetaManagedAgentsMCPOAuthRefreshUpdateParams, nil] :refresh Updated refresh token configuration.

    @option args [String, nil] :token The new static bearer token to replace the stored one.

    @option args [Anthropic::Models::Beta::Vaults::BetaManagedAgentsInjectionLocationUpdateParams] :injection_location Updated injection location.

    @option args [Anthropic::Models::Beta::Vaults::BetaManagedAgentsUnrestrictedCredentialNetworkingParams, Anthropic::Models::Beta::Vaults::BetaManagedAgentsLimitedCredentialNetworkingParams, nil] :networking The new networking scope, which replaces the stored one as a whole.

    @option args [String, nil] :secret_value The new secret value to replace the stored one.

Returns:

Raises:

  • (ArgumentError)


140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/anthropic/models/beta/vaults/credential_update_params.rb', line 140

def self.new(type:, **args)
  case type.to_sym
  when :mcp_oauth
    Anthropic::Beta::Vaults::BetaManagedAgentsMCPOAuthUpdateParams.new(**args)
  when :static_bearer
    Anthropic::Beta::Vaults::BetaManagedAgentsStaticBearerUpdateParams.new(**args)
  when :environment_variable
    Anthropic::Beta::Vaults::BetaManagedAgentsEnvironmentVariableUpdateParams.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/vaults/credential_update_params.rb', line 106

.variants ⇒ Array(Anthropic::Models::Beta::Vaults::BetaManagedAgentsMCPOAuthUpdateParams, Anthropic::Models::Beta::Vaults::BetaManagedAgentsStaticBearerUpdateParams, Anthropic::Models::Beta::Vaults::BetaManagedAgentsEnvironmentVariableUpdateParams)



# File 'lib/anthropic/models/beta/vaults/credential_update_params.rb', line 110