digitalocean.GenaiOpenaiApiKey
Explore with Pulumi AI
Create GenaiOpenaiApiKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GenaiOpenaiApiKey(name: string, args: GenaiOpenaiApiKeyArgs, opts?: CustomResourceOptions);
@overload
def GenaiOpenaiApiKey(resource_name: str,
args: GenaiOpenaiApiKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GenaiOpenaiApiKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
api_key: Optional[str] = None,
models: Optional[Sequence[GenaiOpenaiApiKeyModelArgs]] = None,
name: Optional[str] = None)
func NewGenaiOpenaiApiKey(ctx *Context, name string, args GenaiOpenaiApiKeyArgs, opts ...ResourceOption) (*GenaiOpenaiApiKey, error)
public GenaiOpenaiApiKey(string name, GenaiOpenaiApiKeyArgs args, CustomResourceOptions? opts = null)
public GenaiOpenaiApiKey(String name, GenaiOpenaiApiKeyArgs args)
public GenaiOpenaiApiKey(String name, GenaiOpenaiApiKeyArgs args, CustomResourceOptions options)
type: digitalocean:GenaiOpenaiApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GenaiOpenaiApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args GenaiOpenaiApiKeyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args GenaiOpenaiApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GenaiOpenaiApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GenaiOpenaiApiKeyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var genaiOpenaiApiKeyResource = new DigitalOcean.GenaiOpenaiApiKey("genaiOpenaiApiKeyResource", new()
{
ApiKey = "string",
Models = new[]
{
new DigitalOcean.Inputs.GenaiOpenaiApiKeyModelArgs
{
Agreements = new[]
{
new DigitalOcean.Inputs.GenaiOpenaiApiKeyModelAgreementArgs
{
Description = "string",
Name = "string",
Url = "string",
Uuid = "string",
},
},
CreatedAt = "string",
InferenceName = "string",
InferenceVersion = "string",
IsFoundational = false,
Name = "string",
ParentUuid = "string",
Provider = "string",
UpdatedAt = "string",
UploadComplete = false,
Url = "string",
Usecases = new[]
{
"string",
},
Versions = new[]
{
new DigitalOcean.Inputs.GenaiOpenaiApiKeyModelVersionArgs
{
Major = 0,
Minor = 0,
Patch = 0,
},
},
},
},
Name = "string",
});
example, err := digitalocean.NewGenaiOpenaiApiKey(ctx, "genaiOpenaiApiKeyResource", &digitalocean.GenaiOpenaiApiKeyArgs{
ApiKey: pulumi.String("string"),
Models: digitalocean.GenaiOpenaiApiKeyModelArray{
&digitalocean.GenaiOpenaiApiKeyModelArgs{
Agreements: digitalocean.GenaiOpenaiApiKeyModelAgreementArray{
&digitalocean.GenaiOpenaiApiKeyModelAgreementArgs{
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Url: pulumi.String("string"),
Uuid: pulumi.String("string"),
},
},
CreatedAt: pulumi.String("string"),
InferenceName: pulumi.String("string"),
InferenceVersion: pulumi.String("string"),
IsFoundational: pulumi.Bool(false),
Name: pulumi.String("string"),
ParentUuid: pulumi.String("string"),
Provider: pulumi.String("string"),
UpdatedAt: pulumi.String("string"),
UploadComplete: pulumi.Bool(false),
Url: pulumi.String("string"),
Usecases: pulumi.StringArray{
pulumi.String("string"),
},
Versions: digitalocean.GenaiOpenaiApiKeyModelVersionArray{
&digitalocean.GenaiOpenaiApiKeyModelVersionArgs{
Major: pulumi.Int(0),
Minor: pulumi.Int(0),
Patch: pulumi.Int(0),
},
},
},
},
Name: pulumi.String("string"),
})
var genaiOpenaiApiKeyResource = new GenaiOpenaiApiKey("genaiOpenaiApiKeyResource", GenaiOpenaiApiKeyArgs.builder()
.apiKey("string")
.models(GenaiOpenaiApiKeyModelArgs.builder()
.agreements(GenaiOpenaiApiKeyModelAgreementArgs.builder()
.description("string")
.name("string")
.url("string")
.uuid("string")
.build())
.createdAt("string")
.inferenceName("string")
.inferenceVersion("string")
.isFoundational(false)
.name("string")
.parentUuid("string")
.provider("string")
.updatedAt("string")
.uploadComplete(false)
.url("string")
.usecases("string")
.versions(GenaiOpenaiApiKeyModelVersionArgs.builder()
.major(0)
.minor(0)
.patch(0)
.build())
.build())
.name("string")
.build());
genai_openai_api_key_resource = digitalocean.GenaiOpenaiApiKey("genaiOpenaiApiKeyResource",
api_key="string",
models=[{
"agreements": [{
"description": "string",
"name": "string",
"url": "string",
"uuid": "string",
}],
"created_at": "string",
"inference_name": "string",
"inference_version": "string",
"is_foundational": False,
"name": "string",
"parent_uuid": "string",
"provider": "string",
"updated_at": "string",
"upload_complete": False,
"url": "string",
"usecases": ["string"],
"versions": [{
"major": 0,
"minor": 0,
"patch": 0,
}],
}],
name="string")
const genaiOpenaiApiKeyResource = new digitalocean.GenaiOpenaiApiKey("genaiOpenaiApiKeyResource", {
apiKey: "string",
models: [{
agreements: [{
description: "string",
name: "string",
url: "string",
uuid: "string",
}],
createdAt: "string",
inferenceName: "string",
inferenceVersion: "string",
isFoundational: false,
name: "string",
parentUuid: "string",
provider: "string",
updatedAt: "string",
uploadComplete: false,
url: "string",
usecases: ["string"],
versions: [{
major: 0,
minor: 0,
patch: 0,
}],
}],
name: "string",
});
type: digitalocean:GenaiOpenaiApiKey
properties:
apiKey: string
models:
- agreements:
- description: string
name: string
url: string
uuid: string
createdAt: string
inferenceName: string
inferenceVersion: string
isFoundational: false
name: string
parentUuid: string
provider: string
updatedAt: string
uploadComplete: false
url: string
usecases:
- string
versions:
- major: 0
minor: 0
patch: 0
name: string
GenaiOpenaiApiKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GenaiOpenaiApiKey resource accepts the following input properties:
- Api
Key string - The OpenAI API key.
- Models
List<Pulumi.
Digital Ocean. Inputs. Genai Openai Api Key Model> - Models associated with the OpenAI API key
- Name string
- A name for the API key.
- Api
Key string - The OpenAI API key.
- Models
[]Genai
Openai Api Key Model Args - Models associated with the OpenAI API key
- Name string
- A name for the API key.
- api
Key String - The OpenAI API key.
- models
List<Genai
Openai Api Key Model> - Models associated with the OpenAI API key
- name String
- A name for the API key.
- api
Key string - The OpenAI API key.
- models
Genai
Openai Api Key Model[] - Models associated with the OpenAI API key
- name string
- A name for the API key.
- api_
key str - The OpenAI API key.
- models
Sequence[Genai
Openai Api Key Model Args] - Models associated with the OpenAI API key
- name str
- A name for the API key.
- api
Key String - The OpenAI API key.
- models List<Property Map>
- Models associated with the OpenAI API key
- name String
- A name for the API key.
Outputs
All input properties are implicitly available as output properties. Additionally, the GenaiOpenaiApiKey resource produces the following output properties:
- created_
at str - When the API key was created.
- created_
by str - Who created the API key.
- deleted_
at str - When the API key was deleted.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - When the API key was last updated.
- uuid str
- The UUID of the API key.
Look up Existing GenaiOpenaiApiKey Resource
Get an existing GenaiOpenaiApiKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: GenaiOpenaiApiKeyState, opts?: CustomResourceOptions): GenaiOpenaiApiKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_key: Optional[str] = None,
created_at: Optional[str] = None,
created_by: Optional[str] = None,
deleted_at: Optional[str] = None,
models: Optional[Sequence[GenaiOpenaiApiKeyModelArgs]] = None,
name: Optional[str] = None,
updated_at: Optional[str] = None,
uuid: Optional[str] = None) -> GenaiOpenaiApiKey
func GetGenaiOpenaiApiKey(ctx *Context, name string, id IDInput, state *GenaiOpenaiApiKeyState, opts ...ResourceOption) (*GenaiOpenaiApiKey, error)
public static GenaiOpenaiApiKey Get(string name, Input<string> id, GenaiOpenaiApiKeyState? state, CustomResourceOptions? opts = null)
public static GenaiOpenaiApiKey get(String name, Output<String> id, GenaiOpenaiApiKeyState state, CustomResourceOptions options)
resources: _: type: digitalocean:GenaiOpenaiApiKey get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Api
Key string - The OpenAI API key.
- Created
At string - When the API key was created.
- Created
By string - Who created the API key.
- Deleted
At string - When the API key was deleted.
- Models
List<Pulumi.
Digital Ocean. Inputs. Genai Openai Api Key Model> - Models associated with the OpenAI API key
- Name string
- A name for the API key.
- Updated
At string - When the API key was last updated.
- Uuid string
- The UUID of the API key.
- Api
Key string - The OpenAI API key.
- Created
At string - When the API key was created.
- Created
By string - Who created the API key.
- Deleted
At string - When the API key was deleted.
- Models
[]Genai
Openai Api Key Model Args - Models associated with the OpenAI API key
- Name string
- A name for the API key.
- Updated
At string - When the API key was last updated.
- Uuid string
- The UUID of the API key.
- api
Key String - The OpenAI API key.
- created
At String - When the API key was created.
- created
By String - Who created the API key.
- deleted
At String - When the API key was deleted.
- models
List<Genai
Openai Api Key Model> - Models associated with the OpenAI API key
- name String
- A name for the API key.
- updated
At String - When the API key was last updated.
- uuid String
- The UUID of the API key.
- api
Key string - The OpenAI API key.
- created
At string - When the API key was created.
- created
By string - Who created the API key.
- deleted
At string - When the API key was deleted.
- models
Genai
Openai Api Key Model[] - Models associated with the OpenAI API key
- name string
- A name for the API key.
- updated
At string - When the API key was last updated.
- uuid string
- The UUID of the API key.
- api_
key str - The OpenAI API key.
- created_
at str - When the API key was created.
- created_
by str - Who created the API key.
- deleted_
at str - When the API key was deleted.
- models
Sequence[Genai
Openai Api Key Model Args] - Models associated with the OpenAI API key
- name str
- A name for the API key.
- updated_
at str - When the API key was last updated.
- uuid str
- The UUID of the API key.
- api
Key String - The OpenAI API key.
- created
At String - When the API key was created.
- created
By String - Who created the API key.
- deleted
At String - When the API key was deleted.
- models List<Property Map>
- Models associated with the OpenAI API key
- name String
- A name for the API key.
- updated
At String - When the API key was last updated.
- uuid String
- The UUID of the API key.
Supporting Types
GenaiOpenaiApiKeyModel, GenaiOpenaiApiKeyModelArgs
- Agreements
List<Pulumi.
Digital Ocean. Inputs. Genai Openai Api Key Model Agreement> - Agreement information for the model
- Created
At string - Created At timestamp for the Knowledge Base
- Inference
Name string - Inference name of the model
- Inference
Version string - Infernce version of the model
- Is
Foundational bool - Indicates if the Model Base is foundational
- Name string
- Name of the Knowledge Base
- Parent
Uuid string - Parent UUID of the Model
- Provider string
- Provider of the Model
- Updated
At string - Timestamp when the Knowledge Base was updated
- Upload
Complete bool - Indicates if the Model upload is complete
- Url string
- URL of the Model
- Usecases List<string>
- List of Usecases for the Model
- Versions
List<Pulumi.
Digital Ocean. Inputs. Genai Openai Api Key Model Version> - URL of the Model
- Agreements
[]Genai
Openai Api Key Model Agreement - Agreement information for the model
- Created
At string - Created At timestamp for the Knowledge Base
- Inference
Name string - Inference name of the model
- Inference
Version string - Infernce version of the model
- Is
Foundational bool - Indicates if the Model Base is foundational
- Name string
- Name of the Knowledge Base
- Parent
Uuid string - Parent UUID of the Model
- Provider string
- Provider of the Model
- Updated
At string - Timestamp when the Knowledge Base was updated
- Upload
Complete bool - Indicates if the Model upload is complete
- Url string
- URL of the Model
- Usecases []string
- List of Usecases for the Model
- Versions
[]Genai
Openai Api Key Model Version - URL of the Model
- agreements
List<Genai
Openai Api Key Model Agreement> - Agreement information for the model
- created
At String - Created At timestamp for the Knowledge Base
- inference
Name String - Inference name of the model
- inference
Version String - Infernce version of the model
- is
Foundational Boolean - Indicates if the Model Base is foundational
- name String
- Name of the Knowledge Base
- parent
Uuid String - Parent UUID of the Model
- provider String
- Provider of the Model
- updated
At String - Timestamp when the Knowledge Base was updated
- upload
Complete Boolean - Indicates if the Model upload is complete
- url String
- URL of the Model
- usecases List<String>
- List of Usecases for the Model
- versions
List<Genai
Openai Api Key Model Version> - URL of the Model
- agreements
Genai
Openai Api Key Model Agreement[] - Agreement information for the model
- created
At string - Created At timestamp for the Knowledge Base
- inference
Name string - Inference name of the model
- inference
Version string - Infernce version of the model
- is
Foundational boolean - Indicates if the Model Base is foundational
- name string
- Name of the Knowledge Base
- parent
Uuid string - Parent UUID of the Model
- provider string
- Provider of the Model
- updated
At string - Timestamp when the Knowledge Base was updated
- upload
Complete boolean - Indicates if the Model upload is complete
- url string
- URL of the Model
- usecases string[]
- List of Usecases for the Model
- versions
Genai
Openai Api Key Model Version[] - URL of the Model
- agreements
Sequence[Genai
Openai Api Key Model Agreement] - Agreement information for the model
- created_
at str - Created At timestamp for the Knowledge Base
- inference_
name str - Inference name of the model
- inference_
version str - Infernce version of the model
- is_
foundational bool - Indicates if the Model Base is foundational
- name str
- Name of the Knowledge Base
- parent_
uuid str - Parent UUID of the Model
- provider str
- Provider of the Model
- updated_
at str - Timestamp when the Knowledge Base was updated
- upload_
complete bool - Indicates if the Model upload is complete
- url str
- URL of the Model
- usecases Sequence[str]
- List of Usecases for the Model
- versions
Sequence[Genai
Openai Api Key Model Version] - URL of the Model
- agreements List<Property Map>
- Agreement information for the model
- created
At String - Created At timestamp for the Knowledge Base
- inference
Name String - Inference name of the model
- inference
Version String - Infernce version of the model
- is
Foundational Boolean - Indicates if the Model Base is foundational
- name String
- Name of the Knowledge Base
- parent
Uuid String - Parent UUID of the Model
- provider String
- Provider of the Model
- updated
At String - Timestamp when the Knowledge Base was updated
- upload
Complete Boolean - Indicates if the Model upload is complete
- url String
- URL of the Model
- usecases List<String>
- List of Usecases for the Model
- versions List<Property Map>
- URL of the Model
GenaiOpenaiApiKeyModelAgreement, GenaiOpenaiApiKeyModelAgreementArgs
- Description string
- Description of the agreement
- Name string
- Name of the agreement
- Url string
- URL of the agreement
- Uuid string
- UUID of the agreement
- Description string
- Description of the agreement
- Name string
- Name of the agreement
- Url string
- URL of the agreement
- Uuid string
- UUID of the agreement
- description String
- Description of the agreement
- name String
- Name of the agreement
- url String
- URL of the agreement
- uuid String
- UUID of the agreement
- description string
- Description of the agreement
- name string
- Name of the agreement
- url string
- URL of the agreement
- uuid string
- UUID of the agreement
- description str
- Description of the agreement
- name str
- Name of the agreement
- url str
- URL of the agreement
- uuid str
- UUID of the agreement
- description String
- Description of the agreement
- name String
- Name of the agreement
- url String
- URL of the agreement
- uuid String
- UUID of the agreement
GenaiOpenaiApiKeyModelVersion, GenaiOpenaiApiKeyModelVersionArgs
Package Details
- Repository
- DigitalOcean pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitalocean
Terraform Provider.