Function¶
- class oci.functions.models.Function(**kwargs)¶
Bases:
objectA function resource defines the code (Docker image) and configuration for a specific function. Functions are defined in applications. Avoid entering confidential information.
Attributes:
A constant which can be used with the lifecycle_state property of a Function.
A constant which can be used with the lifecycle_state property of a Function.
A constant which can be used with the lifecycle_state property of a Function.
A constant which can be used with the lifecycle_state property of a Function.
A constant which can be used with the lifecycle_state property of a Function.
A constant which can be used with the lifecycle_state property of a Function.
A constant which can be used with the lifecycle_state property of a Function.
A constant which can be used with the shape property of a Function.
A constant which can be used with the shape property of a Function.
A constant which can be used with the shape property of a Function.
Gets the application_id of this Function.
Gets the compartment_id of this Function.
Gets the config of this Function.
Gets the defined_tags of this Function.
Gets the detached_mode_timeout_in_seconds of this Function.
Gets the display_name of this Function.
Gets the failure_destination of this Function.
Gets the freeform_tags of this Function.
[Required] Gets the id of this Function.
Gets the invoke_endpoint of this Function.
Gets the lifecycle_state of this Function.
Gets the memory_in_mbs of this Function.
Gets the provisioned_concurrency_config of this Function.
Gets the shape of this Function.
[Required] Gets the source_details of this Function.
Gets the success_destination of this Function.
Gets the time_created of this Function.
Gets the time_updated of this Function.
Gets the timeout_in_seconds of this Function.
Gets the trace_config of this Function.
Methods:
__init__(**kwargs)Initializes a new Function object with values from keyword arguments.
- LIFECYCLE_STATE_ACTIVE = 'ACTIVE'¶
A constant which can be used with the lifecycle_state property of a Function. This constant has a value of “ACTIVE”
- LIFECYCLE_STATE_CREATING = 'CREATING'¶
A constant which can be used with the lifecycle_state property of a Function. This constant has a value of “CREATING”
- LIFECYCLE_STATE_DELETED = 'DELETED'¶
A constant which can be used with the lifecycle_state property of a Function. This constant has a value of “DELETED”
- LIFECYCLE_STATE_DELETING = 'DELETING'¶
A constant which can be used with the lifecycle_state property of a Function. This constant has a value of “DELETING”
- LIFECYCLE_STATE_FAILED = 'FAILED'¶
A constant which can be used with the lifecycle_state property of a Function. This constant has a value of “FAILED”
- LIFECYCLE_STATE_INACTIVE = 'INACTIVE'¶
A constant which can be used with the lifecycle_state property of a Function. This constant has a value of “INACTIVE”
- LIFECYCLE_STATE_UPDATING = 'UPDATING'¶
A constant which can be used with the lifecycle_state property of a Function. This constant has a value of “UPDATING”
- SHAPE_GENERIC_ARM = 'GENERIC_ARM'¶
A constant which can be used with the shape property of a Function. This constant has a value of “GENERIC_ARM”
- SHAPE_GENERIC_X86 = 'GENERIC_X86'¶
A constant which can be used with the shape property of a Function. This constant has a value of “GENERIC_X86”
- SHAPE_GENERIC_X86_ARM = 'GENERIC_X86_ARM'¶
A constant which can be used with the shape property of a Function. This constant has a value of “GENERIC_X86_ARM”
- __init__(**kwargs)¶
Initializes a new Function 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 Function.
display_name (str) – The value to assign to the display_name property of this Function.
lifecycle_state (str) – The value to assign to the lifecycle_state property of this Function. 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’.
application_id (str) – The value to assign to the application_id property of this Function.
compartment_id (str) – The value to assign to the compartment_id property of this Function.
source_details (oci.functions.models.FunctionSourceDetails) – The value to assign to the source_details property of this Function.
shape (str) – The value to assign to the shape property of this Function. Allowed values for this property are: “GENERIC_X86”, “GENERIC_ARM”, “GENERIC_X86_ARM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
memory_in_mbs (int) – The value to assign to the memory_in_mbs property of this Function.
config (dict(str, str)) – The value to assign to the config property of this Function.
timeout_in_seconds (int) – The value to assign to the timeout_in_seconds property of this Function.
provisioned_concurrency_config (oci.functions.models.FunctionProvisionedConcurrencyConfig) – The value to assign to the provisioned_concurrency_config property of this Function.
detached_mode_timeout_in_seconds (int) – The value to assign to the detached_mode_timeout_in_seconds property of this Function.
failure_destination (oci.functions.models.FailureDestinationDetails) – The value to assign to the failure_destination property of this Function.
success_destination (oci.functions.models.SuccessDestinationDetails) – The value to assign to the success_destination property of this Function.
trace_config (oci.functions.models.FunctionTraceConfig) – The value to assign to the trace_config property of this Function.
freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Function.
invoke_endpoint (str) – The value to assign to the invoke_endpoint property of this Function.
defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Function.
time_created (datetime) – The value to assign to the time_created property of this Function.
time_updated (datetime) – The value to assign to the time_updated property of this Function.
- property application_id¶
Gets the application_id of this Function. The OCID of the application the function belongs to.
- Returns
The application_id of this Function.
- Return type
str
- property compartment_id¶
Gets the compartment_id of this Function. The OCID of the compartment that contains the function.
- Returns
The compartment_id of this Function.
- Return type
str
- property config¶
Gets the config of this Function. Function configuration. Overrides application configuration. Keys must be ASCII strings consisting solely of letters, digits, and the ‘_’ (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters.
Example: {“MY_FUNCTION_CONFIG”: “ConfVal”}
The maximum size for all configuration keys and values is limited to 4KB. This is measured as the sum of octets necessary to represent each key and value in UTF-8.
- Returns
The config of this Function.
- Return type
dict(str, str)
- property defined_tags¶
Gets the defined_tags of this Function. 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 Function.
- Return type
dict(str, dict(str, object))
- property detached_mode_timeout_in_seconds¶
Gets the detached_mode_timeout_in_seconds of this Function. Timeout for detached function invocations. Value in seconds.
Example: {“detachedModeTimeoutInSeconds”: 900}
- Returns
The detached_mode_timeout_in_seconds of this Function.
- Return type
int
- property display_name¶
Gets the display_name of this Function. The display name of the function. The display name is unique within the application containing the function.
- Returns
The display_name of this Function.
- Return type
str
- property failure_destination¶
Gets the failure_destination of this Function.
- Returns
The failure_destination of this Function.
- Return type
- property freeform_tags¶
Gets the freeform_tags of this Function. 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 Function.
- Return type
dict(str, str)
- property id¶
[Required] Gets the id of this Function. The OCID of the function.
- Returns
The id of this Function.
- Return type
str
- property invoke_endpoint¶
Gets the invoke_endpoint of this Function. The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.
- Returns
The invoke_endpoint of this Function.
- Return type
str
- property lifecycle_state¶
Gets the lifecycle_state of this Function. The current state of the function.
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 Function.
- Return type
str
- property memory_in_mbs¶
Gets the memory_in_mbs of this Function. Maximum usable memory for the function (MiB).
- Returns
The memory_in_mbs of this Function.
- Return type
int
- property provisioned_concurrency_config¶
Gets the provisioned_concurrency_config of this Function.
- Returns
The provisioned_concurrency_config of this Function.
- Return type
- property shape¶
Gets the shape of this Function. The processor shape (GENERIC_X86/GENERIC_ARM) on which to run functions in the application, extracted from the image manifest.
Allowed values for this property are: “GENERIC_X86”, “GENERIC_ARM”, “GENERIC_X86_ARM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The shape of this Function.
- Return type
str
- property source_details¶
[Required] Gets the source_details of this Function.
- Returns
The source_details of this Function.
- Return type
- property success_destination¶
Gets the success_destination of this Function.
- Returns
The success_destination of this Function.
- Return type
- property time_created¶
Gets the time_created of this Function. The time the function was created, expressed in RFC 3339 timestamp format.
Example: 2018-09-12T22:47:12.613Z
- Returns
The time_created of this Function.
- Return type
datetime
- property time_updated¶
Gets the time_updated of this Function. The time the function was updated, expressed in RFC 3339 timestamp format.
Example: 2018-09-12T22:47:12.613Z
- Returns
The time_updated of this Function.
- Return type
datetime
- property timeout_in_seconds¶
Gets the timeout_in_seconds of this Function. Timeout for executions of the function. Value in seconds.
- Returns
The timeout_in_seconds of this Function.
- Return type
int
- property trace_config¶
Gets the trace_config of this Function.
- Returns
The trace_config of this Function.
- Return type