published on Monday, Apr 27, 2026 by akeyless-community
published on Monday, Apr 27, 2026 by akeyless-community
OpenAI Target resource
Create TargetOpenai Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TargetOpenai(name: string, args?: TargetOpenaiArgs, opts?: CustomResourceOptions);@overload
def TargetOpenai(resource_name: str,
args: Optional[TargetOpenaiArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def TargetOpenai(resource_name: str,
opts: Optional[ResourceOptions] = None,
api_key: Optional[str] = None,
api_key_id: Optional[str] = None,
description: Optional[str] = None,
keep_prev_version: Optional[str] = None,
key: Optional[str] = None,
max_versions: Optional[str] = None,
model: Optional[str] = None,
name: Optional[str] = None,
openai_url: Optional[str] = None,
organization_id: Optional[str] = None,
target_openai_id: Optional[str] = None)func NewTargetOpenai(ctx *Context, name string, args *TargetOpenaiArgs, opts ...ResourceOption) (*TargetOpenai, error)public TargetOpenai(string name, TargetOpenaiArgs? args = null, CustomResourceOptions? opts = null)
public TargetOpenai(String name, TargetOpenaiArgs args)
public TargetOpenai(String name, TargetOpenaiArgs args, CustomResourceOptions options)
type: akeyless:TargetOpenai
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 TargetOpenaiArgs
- 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 TargetOpenaiArgs
- 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 TargetOpenaiArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TargetOpenaiArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TargetOpenaiArgs
- 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 targetOpenaiResource = new Akeyless.TargetOpenai("targetOpenaiResource", new()
{
ApiKey = "string",
ApiKeyId = "string",
Description = "string",
KeepPrevVersion = "string",
Key = "string",
MaxVersions = "string",
Model = "string",
Name = "string",
OpenaiUrl = "string",
OrganizationId = "string",
TargetOpenaiId = "string",
});
example, err := akeyless.NewTargetOpenai(ctx, "targetOpenaiResource", &akeyless.TargetOpenaiArgs{
ApiKey: pulumi.String("string"),
ApiKeyId: pulumi.String("string"),
Description: pulumi.String("string"),
KeepPrevVersion: pulumi.String("string"),
Key: pulumi.String("string"),
MaxVersions: pulumi.String("string"),
Model: pulumi.String("string"),
Name: pulumi.String("string"),
OpenaiUrl: pulumi.String("string"),
OrganizationId: pulumi.String("string"),
TargetOpenaiId: pulumi.String("string"),
})
var targetOpenaiResource = new TargetOpenai("targetOpenaiResource", TargetOpenaiArgs.builder()
.apiKey("string")
.apiKeyId("string")
.description("string")
.keepPrevVersion("string")
.key("string")
.maxVersions("string")
.model("string")
.name("string")
.openaiUrl("string")
.organizationId("string")
.targetOpenaiId("string")
.build());
target_openai_resource = akeyless.TargetOpenai("targetOpenaiResource",
api_key="string",
api_key_id="string",
description="string",
keep_prev_version="string",
key="string",
max_versions="string",
model="string",
name="string",
openai_url="string",
organization_id="string",
target_openai_id="string")
const targetOpenaiResource = new akeyless.TargetOpenai("targetOpenaiResource", {
apiKey: "string",
apiKeyId: "string",
description: "string",
keepPrevVersion: "string",
key: "string",
maxVersions: "string",
model: "string",
name: "string",
openaiUrl: "string",
organizationId: "string",
targetOpenaiId: "string",
});
type: akeyless:TargetOpenai
properties:
apiKey: string
apiKeyId: string
description: string
keepPrevVersion: string
key: string
maxVersions: string
model: string
name: string
openaiUrl: string
organizationId: string
targetOpenaiId: string
TargetOpenai 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 TargetOpenai resource accepts the following input properties:
- Api
Key string - API key for OpenAI
- Api
Key stringId - API key ID
- Description string
- Description of the object
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Model string
- Default model to use with OpenAI
- Name string
- Target name
- Openai
Url string - Base URL of the OpenAI API
- Organization
Id string - Organization ID
- Target
Openai stringId - The ID of this resource.
- Api
Key string - API key for OpenAI
- Api
Key stringId - API key ID
- Description string
- Description of the object
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Model string
- Default model to use with OpenAI
- Name string
- Target name
- Openai
Url string - Base URL of the OpenAI API
- Organization
Id string - Organization ID
- Target
Openai stringId - The ID of this resource.
- api
Key String - API key for OpenAI
- api
Key StringId - API key ID
- description String
- Description of the object
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- model String
- Default model to use with OpenAI
- name String
- Target name
- openai
Url String - Base URL of the OpenAI API
- organization
Id String - Organization ID
- target
Openai StringId - The ID of this resource.
- api
Key string - API key for OpenAI
- api
Key stringId - API key ID
- description string
- Description of the object
- keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- model string
- Default model to use with OpenAI
- name string
- Target name
- openai
Url string - Base URL of the OpenAI API
- organization
Id string - Organization ID
- target
Openai stringId - The ID of this resource.
- api_
key str - API key for OpenAI
- api_
key_ strid - API key ID
- description str
- Description of the object
- keep_
prev_ strversion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key str
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max_
versions str - Set the maximum number of versions, limited by the account settings defaults.
- model str
- Default model to use with OpenAI
- name str
- Target name
- openai_
url str - Base URL of the OpenAI API
- organization_
id str - Organization ID
- target_
openai_ strid - The ID of this resource.
- api
Key String - API key for OpenAI
- api
Key StringId - API key ID
- description String
- Description of the object
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- model String
- Default model to use with OpenAI
- name String
- Target name
- openai
Url String - Base URL of the OpenAI API
- organization
Id String - Organization ID
- target
Openai StringId - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TargetOpenai resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- project_
id str - Project ID
Look up Existing TargetOpenai Resource
Get an existing TargetOpenai 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?: TargetOpenaiState, opts?: CustomResourceOptions): TargetOpenai@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_key: Optional[str] = None,
api_key_id: Optional[str] = None,
description: Optional[str] = None,
keep_prev_version: Optional[str] = None,
key: Optional[str] = None,
max_versions: Optional[str] = None,
model: Optional[str] = None,
name: Optional[str] = None,
openai_url: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
target_openai_id: Optional[str] = None) -> TargetOpenaifunc GetTargetOpenai(ctx *Context, name string, id IDInput, state *TargetOpenaiState, opts ...ResourceOption) (*TargetOpenai, error)public static TargetOpenai Get(string name, Input<string> id, TargetOpenaiState? state, CustomResourceOptions? opts = null)public static TargetOpenai get(String name, Output<String> id, TargetOpenaiState state, CustomResourceOptions options)resources: _: type: akeyless:TargetOpenai 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 - API key for OpenAI
- Api
Key stringId - API key ID
- Description string
- Description of the object
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Model string
- Default model to use with OpenAI
- Name string
- Target name
- Openai
Url string - Base URL of the OpenAI API
- Organization
Id string - Organization ID
- Project
Id string - Project ID
- Target
Openai stringId - The ID of this resource.
- Api
Key string - API key for OpenAI
- Api
Key stringId - API key ID
- Description string
- Description of the object
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Model string
- Default model to use with OpenAI
- Name string
- Target name
- Openai
Url string - Base URL of the OpenAI API
- Organization
Id string - Organization ID
- Project
Id string - Project ID
- Target
Openai stringId - The ID of this resource.
- api
Key String - API key for OpenAI
- api
Key StringId - API key ID
- description String
- Description of the object
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- model String
- Default model to use with OpenAI
- name String
- Target name
- openai
Url String - Base URL of the OpenAI API
- organization
Id String - Organization ID
- project
Id String - Project ID
- target
Openai StringId - The ID of this resource.
- api
Key string - API key for OpenAI
- api
Key stringId - API key ID
- description string
- Description of the object
- keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- model string
- Default model to use with OpenAI
- name string
- Target name
- openai
Url string - Base URL of the OpenAI API
- organization
Id string - Organization ID
- project
Id string - Project ID
- target
Openai stringId - The ID of this resource.
- api_
key str - API key for OpenAI
- api_
key_ strid - API key ID
- description str
- Description of the object
- keep_
prev_ strversion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key str
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max_
versions str - Set the maximum number of versions, limited by the account settings defaults.
- model str
- Default model to use with OpenAI
- name str
- Target name
- openai_
url str - Base URL of the OpenAI API
- organization_
id str - Organization ID
- project_
id str - Project ID
- target_
openai_ strid - The ID of this resource.
- api
Key String - API key for OpenAI
- api
Key StringId - API key ID
- description String
- Description of the object
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- model String
- Default model to use with OpenAI
- name String
- Target name
- openai
Url String - Base URL of the OpenAI API
- organization
Id String - Organization ID
- project
Id String - Project ID
- target
Openai StringId - The ID of this resource.
Package Details
- Repository
- akeyless akeyless-community/terraform-provider-akeyless
- License
- Notes
- This Pulumi package is based on the
akeylessTerraform Provider.
published on Monday, Apr 27, 2026 by akeyless-community
