Module: OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body

Extended by:
Internal::Type::Union
Defined in:
lib/openai/models/admin/organization/external_key_create_params.rb,
sig/openai/models/admin/organization/external_key_create_params.rbs

Defined Under Namespace

Classes: Aws, Azure, Gcp, Oci

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

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

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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/admin/organization/external_key_create_params.rb', line 97

Instance Method Details

#initialize(body:, request_options: {}) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# File 'lib/openai/models/admin/organization/external_key_create_params.rb', line 21

module Body
  extend OpenAI::Internal::Type::Union

  discriminator :type

  variant :aws, -> { OpenAI::Admin::Organization::ExternalKeyCreateParams::Body::Aws }

  variant :gcp, -> { OpenAI::Admin::Organization::ExternalKeyCreateParams::Body::Gcp }

  variant :azure, -> { OpenAI::Admin::Organization::ExternalKeyCreateParams::Body::Azure }

  variant :oci, -> { OpenAI::Admin::Organization::ExternalKeyCreateParams::Body::Oci }

  class Aws < OpenAI::Internal::Type::BaseModel
    # @!attribute external_id
    #   The ExternalID that OpenAI will pass in the AssumeRole call for the customer's
    #   AWS account. This must be the OpenAI organization ID or an API project ID that
    #   belongs to the organization.
    #
    #   @return [String]
    required :external_id, String

    # @!attribute kms_arn
    #   The Key Management System ARN for the master key you manage
    #
    #   @return [String]
    required :kms_arn, String

    # @!attribute name
    #   A friendly name to identify this config
    #
    #   @return [String]
    required :name, String

    # @!attribute role_arn
    #   The Role ARN that OpenAI will assume to call your KMS
    #
    #   @return [String]
    required :role_arn, String

    # @!attribute type
    #
    #   @return [Symbol, :aws]
    required :type, const: :aws

    # @!attribute purpose
    #
    #   @return [Symbol, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Aws::Purpose, nil]
    optional :purpose, enum: -> { OpenAI::Admin::Organization::ExternalKeyCreateParams::Body::Aws::Purpose }

    # @!method initialize(external_id:, kms_arn:, name:, role_arn:, purpose: nil, type: :aws)
    #   @param external_id [String]
    #     The ExternalID that OpenAI will pass in the AssumeRole call for the customer's
    #     AWS account. This must be the OpenAI organization ID or an API project ID that
    #     belongs to the organization.
    #
    #   @param kms_arn [String]
    #     The Key Management System ARN for the master key you manage
    #
    #   @param name [String]
    #     A friendly name to identify this config
    #
    #   @param role_arn [String]
    #     The Role ARN that OpenAI will assume to call your KMS
    #
    #   @param purpose [Symbol, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Aws::Purpose]
    #
    #   @param type [Symbol, :aws]

    # @see OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Aws#purpose
    module Purpose
      extend OpenAI::Internal::Type::Enum

      EKM = :ekm
      PSP_DECRYPTION = :psp_decryption

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class Gcp < OpenAI::Internal::Type::BaseModel
    # @!attribute audience
    #   The aud field in the identity token OpenAI will pass in the call to the
    #   customer's GCP STS. This must be the OpenAI organization ID or an API project ID
    #   that belongs to the organization.
    #
    #   @return [String]
    required :audience, String

    # @!attribute kms_key_location
    #   The region where your Key Management System master key is located
    #
    #   @return [String]
    required :kms_key_location, String

    # @!attribute kms_key_name
    #   The name of the Key Management System master key you manage
    #
    #   @return [String]
    required :kms_key_name, String

    # @!attribute kms_key_ring_name
    #   The Key Management System key ring for the master key you manage
    #
    #   @return [String]
    required :kms_key_ring_name, String

    # @!attribute kms_project_id
    #   The string GCP project name where your KMS resides
    #
    #   @return [String]
    required :kms_project_id, String

    # @!attribute name
    #   A friendly name to identify this config
    #
    #   @return [String]
    required :name, String

    # @!attribute type
    #
    #   @return [Symbol, :gcp]
    required :type, const: :gcp

    # @!attribute workload_identity_pool_id
    #   The pool containing the Workload Identity provider that you registered for
    #   OpenAI
    #
    #   @return [String]
    required :workload_identity_pool_id, String

    # @!attribute workload_identity_project_number
    #   The numeric GCP project number where you registered OpenAI's workload identity
    #
    #   @return [String]
    required :workload_identity_project_number, String

    # @!attribute workload_identity_provider_id
    #   The Workload Identity provider that you registered for OpenAI
    #
    #   @return [String]
    required :workload_identity_provider_id, String

    # @!attribute kms_key_version
    #   An exact CryptoKeyVersion number. Required for PSP decryption; not accepted for
    #   EKM.
    #
    #   @return [String, nil]
    optional :kms_key_version, String

    # @!attribute purpose
    #
    #   @return [Symbol, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Gcp::Purpose, nil]
    optional :purpose, enum: -> { OpenAI::Admin::Organization::ExternalKeyCreateParams::Body::Gcp::Purpose }

    # @!method initialize(audience:, kms_key_location:, kms_key_name:, kms_key_ring_name:, kms_project_id:, name:, workload_identity_pool_id:, workload_identity_project_number:, workload_identity_provider_id:, kms_key_version: nil, purpose: nil, type: :gcp)
    #   @param audience [String]
    #     The aud field in the identity token OpenAI will pass in the call to the
    #     customer's GCP STS. This must be the OpenAI organization ID or an API project ID
    #     that belongs to the organization.
    #
    #   @param kms_key_location [String]
    #     The region where your Key Management System master key is located
    #
    #   @param kms_key_name [String]
    #     The name of the Key Management System master key you manage
    #
    #   @param kms_key_ring_name [String]
    #     The Key Management System key ring for the master key you manage
    #
    #   @param kms_project_id [String]
    #     The string GCP project name where your KMS resides
    #
    #   @param name [String]
    #     A friendly name to identify this config
    #
    #   @param workload_identity_pool_id [String]
    #     The pool containing the Workload Identity provider that you registered for
    #     OpenAI
    #
    #   @param workload_identity_project_number [String]
    #     The numeric GCP project number where you registered OpenAI's workload identity
    #
    #   @param workload_identity_provider_id [String]
    #     The Workload Identity provider that you registered for OpenAI
    #
    #   @param kms_key_version [String]
    #     An exact CryptoKeyVersion number. Required for PSP decryption; not accepted for
    #     EKM.
    #
    #   @param purpose [Symbol, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Gcp::Purpose]
    #
    #   @param type [Symbol, :gcp]

    # @see OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Gcp#purpose
    module Purpose
      extend OpenAI::Internal::Type::Enum

      EKM = :ekm
      PSP_DECRYPTION = :psp_decryption

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class Azure < OpenAI::Internal::Type::BaseModel
    # @!attribute key_name
    #   The name of the Azure Key Vault master key that you manage
    #
    #   @return [String]
    required :key_name, String

    # @!attribute name
    #   A friendly name to identify this config
    #
    #   @return [String]
    required :name, String

    # @!attribute tenant_id
    #   Your Azure tenant UUID
    #
    #   @return [String]
    required :tenant_id, String

    # @!attribute type
    #
    #   @return [Symbol, :azure]
    required :type, const: :azure

    # @!attribute vault_uri
    #   The URI of the Azure vault containing the master key you manage
    #
    #   @return [String]
    required :vault_uri, String

    # @!attribute key_version
    #   An exact Azure Key Vault key version. Required for PSP decryption; not accepted
    #   for EKM.
    #
    #   @return [String, nil]
    optional :key_version, String

    # @!attribute purpose
    #
    #   @return [Symbol, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Azure::Purpose, nil]
    optional(
      :purpose,
      enum: -> { OpenAI::Admin::Organization::ExternalKeyCreateParams::Body::Azure::Purpose }
    )

    # @!method initialize(key_name:, name:, tenant_id:, vault_uri:, key_version: nil, purpose: nil, type: :azure)
    #   @param key_name [String]
    #     The name of the Azure Key Vault master key that you manage
    #
    #   @param name [String]
    #     A friendly name to identify this config
    #
    #   @param tenant_id [String]
    #     Your Azure tenant UUID
    #
    #   @param vault_uri [String]
    #     The URI of the Azure vault containing the master key you manage
    #
    #   @param key_version [String]
    #     An exact Azure Key Vault key version. Required for PSP decryption; not accepted
    #     for EKM.
    #
    #   @param purpose [Symbol, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Azure::Purpose]
    #
    #   @param type [Symbol, :azure]

    # @see OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Azure#purpose
    module Purpose
      extend OpenAI::Internal::Type::Enum

      EKM = :ekm
      PSP_DECRYPTION = :psp_decryption

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class Oci < OpenAI::Internal::Type::BaseModel
    # @!attribute key_ocid
    #   The OCI Vault key OCID
    #
    #   @return [String]
    required :key_ocid, String

    # @!attribute name
    #   A friendly name to identify this config
    #
    #   @return [String]
    required :name, String

    # @!attribute region
    #   The OCI region containing the vault
    #
    #   @return [String]
    required :region, String

    # @!attribute type
    #
    #   @return [Symbol, :oci]
    required :type, const: :oci

    # @!attribute vault_ocid
    #   The customer OCI Vault OCID
    #
    #   @return [String]
    required :vault_ocid, String

    # @!attribute key_version_ocid
    #   The exact OCI key version OCID for PSP decryption.
    #
    #   @return [String, nil]
    optional :key_version_ocid, String

    # @!attribute purpose
    #
    #   @return [Symbol, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Oci::Purpose, nil]
    optional :purpose, enum: -> { OpenAI::Admin::Organization::ExternalKeyCreateParams::Body::Oci::Purpose }

    # @!method initialize(key_ocid:, name:, region:, vault_ocid:, key_version_ocid: nil, purpose: nil, type: :oci)
    #   @param key_ocid [String]
    #     The OCI Vault key OCID
    #
    #   @param name [String]
    #     A friendly name to identify this config
    #
    #   @param region [String]
    #     The OCI region containing the vault
    #
    #   @param vault_ocid [String]
    #     The customer OCI Vault OCID
    #
    #   @param key_version_ocid [String]
    #     The exact OCI key version OCID for PSP decryption.
    #
    #   @param purpose [Symbol, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Oci::Purpose]
    #
    #   @param type [Symbol, :oci]

    # @see OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Oci#purpose
    module Purpose
      extend OpenAI::Internal::Type::Enum

      EKM = :ekm
      PSP_DECRYPTION = :psp_decryption

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  # @!method self.variants
  #   @return [Array(OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Aws, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Gcp, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Azure, OpenAI::Models::Admin::Organization::ExternalKeyCreateParams::Body::Oci)]
end