Function

class oci.functions.models.Function(**kwargs)

Bases: object

A function resource defines the code (Docker image) and configuration for a specific function. Functions are defined in applications. Avoid entering confidential information.

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"

__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.
  • image (str) -- The value to assign to the image property of this Function.
  • image_digest (str) -- The value to assign to the image_digest property of this Function.
  • 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.
  • 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.
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
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
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)
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))
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
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)
id

Gets the id of this Function. The OCID of the function.

Returns:The id of this Function.
Return type:str
image

Gets the image of this Function. The qualified name of the Docker image to use in the function, including the image tag. The image should be in the OCI Registry that is in the same region as the function itself. Example: phx.ocir.io/ten/functions/function:0.0.1

Returns:The image of this Function.
Return type:str
image_digest

Gets the image_digest of this Function. The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the OCI Registry will be used. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

Returns:The image_digest of this Function.
Return type:str
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
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
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
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
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
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