ApiKey¶
- class oci.generative_ai.models.ApiKey(**kwargs)¶
Bases:
objectApiKeys are resources used to access GenAI models. You must be authorized through an IAM policy to use any API operations. If you’re not authorized, contact an administrator who manages OCI resource access. See Getting Started with Policies and Getting Access to Generative AI Resources.
Attributes:
A constant which can be used with the lifecycle_state property of a ApiKey.
A constant which can be used with the lifecycle_state property of a ApiKey.
A constant which can be used with the lifecycle_state property of a ApiKey.
A constant which can be used with the lifecycle_state property of a ApiKey.
A constant which can be used with the lifecycle_state property of a ApiKey.
A constant which can be used with the lifecycle_state property of a ApiKey.
A constant which can be used with the lifecycle_state property of a ApiKey.
[Required] Gets the compartment_id of this ApiKey.
Gets the defined_tags of this ApiKey.
Gets the description of this ApiKey.
[Required] Gets the display_name of this ApiKey.
Gets the freeform_tags of this ApiKey.
[Required] Gets the id of this ApiKey.
[Required] Gets the keys of this ApiKey.
Gets the lifecycle_details of this ApiKey.
[Required] Gets the lifecycle_state of this ApiKey.
Gets the system_tags of this ApiKey.
[Required] Gets the time_created of this ApiKey.
Gets the time_updated of this ApiKey.
Methods:
__init__(**kwargs)Initializes a new ApiKey object with values from keyword arguments.
- LIFECYCLE_STATE_ACTIVE = 'ACTIVE'¶
A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “ACTIVE”
- LIFECYCLE_STATE_CREATING = 'CREATING'¶
A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “CREATING”
- LIFECYCLE_STATE_DELETED = 'DELETED'¶
A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “DELETED”
- LIFECYCLE_STATE_DELETING = 'DELETING'¶
A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “DELETING”
- LIFECYCLE_STATE_FAILED = 'FAILED'¶
A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “FAILED”
- LIFECYCLE_STATE_INACTIVE = 'INACTIVE'¶
A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “INACTIVE”
- LIFECYCLE_STATE_UPDATING = 'UPDATING'¶
A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “UPDATING”
- __init__(**kwargs)¶
Initializes a new ApiKey object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
- Parameters
id (str) – The value to assign to the id property of this ApiKey.
display_name (str) – The value to assign to the display_name property of this ApiKey.
description (str) – The value to assign to the description property of this ApiKey.
compartment_id (str) – The value to assign to the compartment_id property of this ApiKey.
time_created (datetime) – The value to assign to the time_created property of this ApiKey.
time_updated (datetime) – The value to assign to the time_updated property of this ApiKey.
keys (list[oci.generative_ai.models.ApiKeyItem]) – The value to assign to the keys property of this ApiKey.
lifecycle_state (str) – The value to assign to the lifecycle_state property of this ApiKey. Allowed values for this property are: “CREATING”, “ACTIVE”, “INACTIVE”, “UPDATING”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
lifecycle_details (str) – The value to assign to the lifecycle_details property of this ApiKey.
freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this ApiKey.
defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this ApiKey.
system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this ApiKey.
- property compartment_id¶
[Required] Gets the compartment_id of this ApiKey. The compartment OCID to create the apiKey in.
- Returns
The compartment_id of this ApiKey.
- Return type
str
- property defined_tags¶
Gets the defined_tags of this ApiKey. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {“Operations”: {“CostCenter”: “42”}}
- Returns
The defined_tags of this ApiKey.
- Return type
dict(str, dict(str, object))
- property description¶
Gets the description of this ApiKey. An optional description of the Api key.
- Returns
The description of this ApiKey.
- Return type
str
- property display_name¶
[Required] Gets the display_name of this ApiKey. A user-friendly name. Does not have to be unique, and it’s changeable.
- Returns
The display_name of this ApiKey.
- Return type
str
- property freeform_tags¶
Gets the freeform_tags of this ApiKey. Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {“Department”: “Finance”}
- Returns
The freeform_tags of this ApiKey.
- Return type
dict(str, str)
- property id¶
[Required] Gets the id of this ApiKey. the ApiKey id.
- Returns
The id of this ApiKey.
- Return type
str
- property keys¶
[Required] Gets the keys of this ApiKey. The list of keys.
- Returns
The keys of this ApiKey.
- Return type
- property lifecycle_details¶
Gets the lifecycle_details of this ApiKey. A message describing the current state with detail that can provide actionable information.
- Returns
The lifecycle_details of this ApiKey.
- Return type
str
- property lifecycle_state¶
[Required] Gets the lifecycle_state of this ApiKey. The current state of the API key.
Allowed values for this property are: “CREATING”, “ACTIVE”, “INACTIVE”, “UPDATING”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The lifecycle_state of this ApiKey.
- Return type
str
- property system_tags¶
Gets the system_tags of this ApiKey. System tags for this resource. Each key is predefined and scoped to a namespace.
Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}
- Returns
The system_tags of this ApiKey.
- Return type
dict(str, dict(str, object))
- property time_created¶
[Required] Gets the time_created of this ApiKey. The date and time that the ApiKey was created in the format of an RFC3339 datetime string.
- Returns
The time_created of this ApiKey.
- Return type
datetime
- property time_updated¶
Gets the time_updated of this ApiKey. The date and time the ApiKey was updated, in the format defined by RFC 3339.
- Returns
The time_updated of this ApiKey.
- Return type
datetime