applications
Creates, updates, deletes, gets or lists an applications resource.
Overview​
| Name | applications |
| Type | Resource |
| Id | oci.functions.applications |
Fields​
The following fields are returned by SELECT queries:
- get
- list
Succesfully retrieved application.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the application. |
compartmentId | string | The OCID of the compartment that contains the application. |
config | object | Application 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. |
definedTags | object | Defined 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"}} |
displayName | string | The display name of the application. The display name is unique within the compartment containing the application. |
freeformTags | object | 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](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
imagePolicyConfig | object | Define the image signature verification policy for an application. |
lifecycleState | string | The current state of the application. (CREATING, ACTIVE, INACTIVE, UPDATING, DELETING, DELETED, FAILED) |
logging | object | Set logging configuration for an application. This is only used if Service Logs for the application are enabled in the OCI Logging service. |
networkSecurityGroupIds | array | The [OCID](/iaas/Content/General/Concepts/identifiers.htm)s of the Network Security Groups to add the application to. |
securityAttributes | object | Security 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"}}} |
shape | string | Valid 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) |
subnetIds | array | The [OCID](/iaas/Content/General/Concepts/identifiers.htm)s of the subnets in which to run functions in the application. |
syslogUrl | string | A 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 |
timeCreated | string (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 |
timeUpdated | string (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 |
traceConfig | object | Define the tracing configuration for an application. |
Summary of an application.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the application. |
compartmentId | string | The OCID of the compartment that contains the application. |
definedTags | object | Defined 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"}} |
displayName | string | The display name of the application. The display name is unique within the compartment containing the application. |
freeformTags | object | 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](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
imagePolicyConfig | object | Define the image signature verification policy for an application. |
lifecycleState | string | The current state of the application. (x-obmcs-enumref: #/definitions/Application/lifecycleState) |
logging | object | Set logging configuration for an application. This is only used if Service Logs for the application are enabled in the OCI Logging service. |
networkSecurityGroupIds | array | The [OCID](/iaas/Content/General/Concepts/identifiers.htm)s of the Network Security Groups to add the application to. |
securityAttributes | object | Security 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"}}} |
shape | string | Valid 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) |
subnetIds | array | The [OCID](/iaas/Content/General/Concepts/identifiers.htm)s of the subnets in which to run functions in the application. |
timeCreated | string (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 |
timeUpdated | string (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 |
traceConfig | object | Define the tracing configuration for an application. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | applicationId, region | opc-request-id | Retrieves an application. |
list | select | compartmentId, region | limit, page, opc-request-id, lifecycleState, displayName, id, sortOrder, sortBy | Lists applications for a compartment. |
create | insert | region, displayName, subnetIds, compartmentId | opc-request-id | Creates a new application. |
update | update | applicationId, region | if-match, opc-request-id | Modifies an application |
delete | delete | applicationId, region | if-match, opc-request-id | Deletes an application. |
change_compartment | exec | applicationId, region, compartmentId | if-match, opc-request-id | 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 /> |
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.
| Name | Datatype | Description |
|---|---|---|
applicationId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of this application. |
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment to which this resource belongs. |
region | string | OCI 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) |
displayName | string | A filter to return only applications with display names that match the display name string. Matching is exact. |
id | string | A filter to return only applications with the specified OCID. |
if-match | string | For 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. |
lifecycleState | string | A filter to return only applications that match the lifecycle state in this parameter. Example: Creating |
limit | integer | The maximum number of items to return. 1 is the minimum, 50 is the maximum. Default: 10 |
opc-request-id | string | The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
page | string | The pagination token for a list query returned by a previous operation |
sortBy | string | Specifies the attribute with which to sort the rules. Default: displayName * timeCreated: Sorts by timeCreated. * displayName: Sorts by displayName. * id: Sorts by id. |
sortOrder | string | Specifies sort order. * ASC: Ascending sort order. * DESC: Descending sort order. |
SELECT examples​
- get
- list
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 }}'
;
Lists applications for a compartment.
SELECT
id,
compartmentId,
definedTags,
displayName,
freeformTags,
imagePolicyConfig,
lifecycleState,
logging,
networkSecurityGroupIds,
securityAttributes,
shape,
subnetIds,
timeCreated,
timeUpdated,
traceConfig
FROM oci.functions.applications
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND opc-request-id = '{{ opc-request-id }}'
AND lifecycleState = '{{ lifecycleState }}'
AND displayName = '{{ displayName }}'
AND id = '{{ id }}'
AND sortOrder = '{{ sortOrder }}'
AND sortBy = '{{ sortBy }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: applications
props:
- name: region
value: "{{ region }}"
description: Required parameter for the applications resource.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The OCID of the compartment to create the application within.
- name: config
value: "{{ config }}"
description: |
Application configuration. These values are passed on to the function as environment variables, functions may override 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.
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined 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"}}`
- name: displayName
value: "{{ displayName }}"
description: |
The display name of the application. The display name must be unique within the compartment containing the application. Avoid entering confidential information.
- name: freeformTags
value: "{{ freeformTags }}"
description: |
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](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Department": "Finance"}`
- name: imagePolicyConfig
description: |
Define the image signature verification policy for an application.
value:
isPolicyEnabled: {{ isPolicyEnabled }}
keyDetails:
- kmsKeyId: "{{ kmsKeyId }}"
- name: logging
description: |
Set logging configuration for an application. This is only used if Service Logs for the application are enabled in the OCI Logging service.
value:
lineFormat: "{{ lineFormat }}"
- name: networkSecurityGroupIds
value:
- "{{ networkSecurityGroupIds }}"
description: |
The [OCID](/iaas/Content/General/Concepts/identifiers.htm)s of the Network Security Groups to add the application to.
- name: securityAttributes
value: "{{ securityAttributes }}"
description: |
Security 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"}}}`
- name: shape
value: "{{ shape }}"
description: |
Valid 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`
valid_values: ['GENERIC_X86', 'GENERIC_ARM', 'GENERIC_X86_ARM']
- name: subnetIds
value:
- "{{ subnetIds }}"
description: |
The [OCID](/iaas/Content/General/Concepts/identifiers.htm)s of the subnets in which to run functions in the application.
- name: syslogUrl
value: "{{ syslogUrl }}"
description: |
A 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`
- name: traceConfig
description: |
Define the tracing configuration for an application.
value:
domainId: "{{ domainId }}"
isEnabled: {{ isEnabled }}
- name: opc-request-id
value: "{{ opc-request-id }}"
description: The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
description: The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
UPDATE examples​
- update
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​
- delete
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​
- change_compartment
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 }}"
}'
;