Class: OpenAI::Models::Admin::Organization::Projects::ServiceAccountCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/admin/organization/projects/service_account_create_params.rb,
sig/openai/models/admin/organization/projects/service_account_create_params.rbs

Overview

See Also:

  • OpenAI::Resources::Admin::Organization::Projects::ServiceAccounts#create

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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(project_id:, name:, create_service_account_only: nil, expires_in_seconds: nil, request_options: {}) ⇒ Object

Parameters:

  • name —

    The name of the service account being created.

  • create_service_account_only (defaults to: nil) —

    Create the service account without default roles or an API key.

  • expires_in_seconds (defaults to: nil) —

    Number of seconds until the initial API key expires. If omitted or null, the key does not expire unless the effective organization or project policy requires an expiration. When a policy sets a maximum lifetime, this value must be provided and must not exceed that limit. A non-null value cannot be used when create_service_account_only is true.



# File 'lib/openai/models/admin/organization/projects/service_account_create_params.rb', line 40

Instance Attribute Details

#create_service_account_only ⇒ Boolean?

Create the service account without default roles or an API key.

Returns:



28
# File 'lib/openai/models/admin/organization/projects/service_account_create_params.rb', line 28

optional :create_service_account_only, OpenAI::Internal::Type::Boolean, nil?: true

#expires_in_seconds ⇒ Integer?

Number of seconds until the initial API key expires. If omitted or null, the key does not expire unless the effective organization or project policy requires an expiration. When a policy sets a maximum lifetime, this value must be provided and must not exceed that limit. A non-null value cannot be used when create_service_account_only is true.

Returns:

  • (Integer, nil)


38
# File 'lib/openai/models/admin/organization/projects/service_account_create_params.rb', line 38

optional :expires_in_seconds, Integer, nil?: true

#name ⇒ String

The name of the service account being created.

Returns:

  • (String)


22
# File 'lib/openai/models/admin/organization/projects/service_account_create_params.rb', line 22

required :name, String

#project_id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/openai/models/admin/organization/projects/service_account_create_params.rb', line 16

required :project_id, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


52
# File 'sig/openai/models/admin/organization/projects/service_account_create_params.rbs', line 52

def to_hash: -> {