Skip to main content

applications

Creates, updates, deletes, gets or lists an applications resource.

Overview​

Nameapplications
TypeResource
Idoci.functions.applications

Fields​

The following fields are returned by SELECT queries:

Succesfully retrieved application.

NameDatatypeDescription
idstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the application.
compartmentIdstringThe OCID of the compartment that contains the application.
configobjectApplication configuration for functions in this application (passed as environment variables). Can be overridden by function 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.
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}}
displayNamestringThe display name of the application. The display name is unique within the compartment containing the application.
freeformTagsobjectFree-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](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"}
imagePolicyConfigobjectDefine the image signature verification policy for an application.
lifecycleStatestringThe current state of the application. (CREATING, ACTIVE, INACTIVE, UPDATING, DELETING, DELETED, FAILED)
loggingobjectSet logging configuration for an application. This is only used if Service Logs for the application are enabled in the OCI Logging service.
networkSecurityGroupIdsarrayThe [OCID](/iaas/Content/General/Concepts/identifiers.htm)s of the Network Security Groups to add the application to.
securityAttributesobjectSecurity attributes for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "enforce"}}}
shapestringValid values are GENERIC_X86, GENERIC_ARM and GENERIC_X86_ARM. Default is GENERIC_X86. Setting this to GENERIC_X86, will run the functions in the application on X86 processor architecture. Setting this to GENERIC_ARM, will run the functions in the application on ARM processor architecture. When set to GENERIC_X86_ARM, functions in the application are run on either X86 or ARM processor architecture. Accepted values are: GENERIC_X86, GENERIC_ARM, GENERIC_X86_ARM (GENERIC_X86, GENERIC_ARM, GENERIC_X86_ARM)
subnetIdsarrayThe [OCID](/iaas/Content/General/Concepts/identifiers.htm)s of the subnets in which to run functions in the application.
syslogUrlstringA syslog URL to which to send all function logs. Supports tcp, udp, and tcp+tls. The syslog URL must be reachable from all of the subnets configured for the application. Note: If you enable the OCI Logging service for this application, the syslogUrl value is ignored. Function logs are sent to the OCI Logging service, and not to the syslog URL. Example: tcp:​//logserver.myserver:1234
timeCreatedstring (date-time)The time the application was created, expressed in [RFC 3339](https:​//tools.ietf.org/html/rfc3339) timestamp format. Example: 2018-09-12T22:47:12.613Z
timeUpdatedstring (date-time)The time the application was updated, expressed in [RFC 3339](https:​//tools.ietf.org/html/rfc3339) timestamp format. Example: 2018-09-12T22:47:12.613Z
traceConfigobjectDefine the tracing configuration for an application.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectapplicationId, regionopc-request-idRetrieves an application.
listselectcompartmentId, regionlimit, page, opc-request-id, lifecycleState, displayName, id, sortOrder, sortByLists applications for a compartment.
createinsertregion, displayName, subnetIds, compartmentIdopc-request-idCreates a new application.
updateupdateapplicationId, regionif-match, opc-request-idModifies an application
deletedeleteapplicationId, regionif-match, opc-request-idDeletes an application.
change_compartmentexecapplicationId, region, compartmentIdif-match, opc-request-idMoves an application into a different compartment within the same tenancy.<br />For information about moving resources between compartments, see [Moving Resources Between Compartments](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
applicationIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of this application.
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment to which this resource belongs.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
displayNamestringA filter to return only applications with display names that match the display name string. Matching is exact.
idstringA filter to return only applications with the specified OCID.
if-matchstringFor optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
lifecycleStatestringA filter to return only applications that match the lifecycle state in this parameter. Example: Creating
limitintegerThe maximum number of items to return. 1 is the minimum, 50 is the maximum. Default: 10
opc-request-idstringThe unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
pagestringThe pagination token for a list query returned by a previous operation
sortBystringSpecifies the attribute with which to sort the rules. Default: displayName * timeCreated: Sorts by timeCreated. * displayName: Sorts by displayName. * id: Sorts by id.
sortOrderstringSpecifies sort order. * ASC: Ascending sort order. * DESC: Descending sort order.

SELECT examples​

Retrieves an application.

SELECT
id,
compartmentId,
config,
definedTags,
displayName,
freeformTags,
imagePolicyConfig,
lifecycleState,
logging,
networkSecurityGroupIds,
securityAttributes,
shape,
subnetIds,
syslogUrl,
timeCreated,
timeUpdated,
traceConfig
FROM oci.functions.applications
WHERE applicationId = '{{ applicationId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;

INSERT examples​

Creates a new application.

INSERT INTO oci.functions.applications (
compartmentId,
config,
definedTags,
displayName,
freeformTags,
imagePolicyConfig,
logging,
networkSecurityGroupIds,
securityAttributes,
shape,
subnetIds,
syslogUrl,
traceConfig,
region,
opc-request-id
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ config }}',
'{{ definedTags }}',
'{{ displayName }}' /* required */,
'{{ freeformTags }}',
'{{ imagePolicyConfig }}',
'{{ logging }}',
'{{ networkSecurityGroupIds }}',
'{{ securityAttributes }}',
'{{ shape }}',
'{{ subnetIds }}' /* required */,
'{{ syslogUrl }}',
'{{ traceConfig }}',
'{{ region }}',
'{{ opc-request-id }}'
RETURNING
id,
compartmentId,
config,
definedTags,
displayName,
freeformTags,
imagePolicyConfig,
lifecycleState,
logging,
networkSecurityGroupIds,
securityAttributes,
shape,
subnetIds,
syslogUrl,
timeCreated,
timeUpdated,
traceConfig
;

UPDATE examples​

Modifies an application

UPDATE oci.functions.applications
SET
config = '{{ config }}',
definedTags = '{{ definedTags }}',
freeformTags = '{{ freeformTags }}',
imagePolicyConfig = '{{ imagePolicyConfig }}',
logging = '{{ logging }}',
networkSecurityGroupIds = '{{ networkSecurityGroupIds }}',
securityAttributes = '{{ securityAttributes }}',
syslogUrl = '{{ syslogUrl }}',
traceConfig = '{{ traceConfig }}'
WHERE
applicationId = '{{ applicationId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
RETURNING
id,
compartmentId,
config,
definedTags,
displayName,
freeformTags,
imagePolicyConfig,
lifecycleState,
logging,
networkSecurityGroupIds,
securityAttributes,
shape,
subnetIds,
syslogUrl,
timeCreated,
timeUpdated,
traceConfig;

DELETE examples​

Deletes an application.

DELETE FROM oci.functions.applications
WHERE applicationId = '{{ applicationId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND opc-request-id = '{{ opc-request-id }}'
;

Lifecycle Methods​

Moves an application into a different compartment within the same tenancy.<br />For information about moving resources between compartments, see [Moving Resources Between Compartments](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br />

EXEC oci.functions.applications.change_compartment
@applicationId='{{ applicationId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-request-id='{{ opc-request-id }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;