Skip to content

Commit 83fa304

Browse files
authored
docs(cli): update command reference for OCI parity and usability enhancements (#172)
1 parent f4d7a47 commit 83fa304

8 files changed

Lines changed: 267 additions & 23 deletions

File tree

cli/ref/fn-create-app.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,43 @@ COMMAND OPTIONS
1818
--config value Application configuration
1919
--annotation value Application annotations
2020
--syslog-url value Syslog URL to send application logs to
21+
--subnet-id value Subnet OCID (repeatable for multiple subnets)
22+
--tag value Freeform tag in key=value format (repeatable)
23+
--defined-tag value Defined tag in namespace.key=value format (repeatable)
24+
--network-security-group-ids value OCI NSG OCID (repeatable)
25+
--trace-config value OCI trace config JSON or file:// path
26+
--image-policy-config value OCI image policy config JSON or file:// path
27+
--security-attributes value OCI security attributes JSON or file:// path
28+
--from-json value Structured JSON input for command parameters
29+
--wait-for-state value Wait until resource reaches lifecycle state
30+
--max-wait-seconds value Max waiter duration in seconds
31+
--wait-interval-seconds value Waiter poll interval in seconds
2132

2233
```
2334
24-
[Some link](#)
35+
## Examples
36+
37+
Create an app with subnet and tags:
38+
39+
```bash
40+
fn create app my-app \
41+
--subnet-id ocid1.subnet.oc1..aaaa \
42+
--tag Department=Finance \
43+
--defined-tag Operations.CostCenter=42
44+
```
45+
46+
Create an app with advanced OCI parity options:
47+
48+
```bash
49+
fn create app parity-app \
50+
--subnet-id ocid1.subnet.oc1..aaaa \
51+
--network-security-group-ids ocid1.networksecuritygroup.oc1..aaaa \
52+
--trace-config '{"isEnabled":true,"domainId":"ocid1.apmdomain.oc1..aaaa"}'
53+
```
54+
55+
Create from JSON input:
56+
57+
```bash
58+
fn create app json-app --from-json file:///absolute/path/app-create.json
59+
```
2560

cli/ref/fn-create-function.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,52 @@ COMMAND OPTIONS
1919
--idle-timeout value Function idle timeout (eg. 30) (default: 0)
2020
--annotation value Function annotation (can be specified multiple times)
2121
--image value Function image
22+
--provisioned-concurrency value Provisioned concurrency (none | constant:<count>)
23+
--detached-timeout value Detached invocation timeout (e.g. 20m, 1h)
24+
--on-success value Success destination shorthand (<stream|queue|notifications>:<ocid>)
25+
--on-failure value Failure destination shorthand (<stream|queue|notifications>:<ocid>)
26+
--tag value Freeform tag in key=value format (repeatable)
27+
--defined-tag value Defined tag in namespace.key=value format (repeatable)
28+
--pbf value Pre-Built Function listing OCID source
29+
--trace-config value OCI trace config JSON or file:// path
30+
--timeout-in-seconds value OCI parity timeout option in seconds
31+
--detached-mode-timeout-in-seconds value OCI parity detached timeout in seconds
32+
--success-destination value OCI parity destination JSON or file:// path
33+
--failure-destination value OCI parity destination JSON or file:// path
34+
--from-json value Structured JSON input for command parameters
35+
--wait-for-state value Wait until resource reaches lifecycle state
36+
--max-wait-seconds value Max waiter duration in seconds
37+
--wait-interval-seconds value Waiter poll interval in seconds
2238

2339
```
2440
25-
[Some link](#)
41+
## Examples
42+
43+
Create function with provisioned concurrency:
44+
45+
```bash
46+
fn create function my-app my-fn myrepo/myimg:0.0.1 \
47+
--provisioned-concurrency constant:40
48+
```
49+
50+
Create long-running function with destinations:
51+
52+
```bash
53+
fn create function my-app my-detached-fn myrepo/myimg:0.0.1 \
54+
--detached-timeout 20m \
55+
--on-success stream:ocid1.stream.oc1..aaaa \
56+
--on-failure notifications:ocid1.onstopic.oc1..aaaa
57+
```
58+
59+
Create function from PBF:
60+
61+
```bash
62+
fn create function my-app my-pbf-fn --pbf ocid1.pbflisting.oc1..aaaa
63+
```
64+
65+
Create function from JSON input:
66+
67+
```bash
68+
fn create function my-app my-json-fn --from-json file:///absolute/path/fn-create.json
69+
```
2670

cli/ref/fn-init.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,36 @@ COMMAND OPTIONS
2727
--timeout value Function timeout (eg. 30) (default: 0)
2828
--idle-timeout value Function idle timeout (eg. 30) (default: 0)
2929
--annotation value Function annotation (can be specified multiple times)
30+
--tag value Freeform tag in key=value form (repeatable)
31+
--defined-tag value Defined tag in namespace.key=value form (repeatable)
32+
--provisioned-concurrency value Provisioned concurrency (none | constant:<count>)
33+
--detached-timeout value Detached invocation timeout (e.g. 20m, 1h)
34+
--on-success value Success destination shorthand (<stream|queue|notifications>:<ocid>)
35+
--on-failure value Failure destination shorthand (<stream|queue|notifications>:<ocid>)
36+
--pbf value Initialize function from a Pre-Built Function listing OCID
3037

3138
```
3239
33-
[Some link](#)
40+
## Examples
41+
42+
Initialize with provisioned concurrency:
43+
44+
```bash
45+
fn init --runtime go hello-pc --provisioned-concurrency constant:5
46+
```
47+
48+
Initialize with long-running settings:
49+
50+
```bash
51+
fn init --runtime java hello-long \
52+
--detached-timeout 20m \
53+
--on-success stream:ocid1.stream.oc1..aaaa \
54+
--on-failure notifications:ocid1.onstopic.oc1..aaaa
55+
```
56+
57+
Initialize from PBF:
58+
59+
```bash
60+
fn init --name hello-pbf --pbf ocid1.pbflisting.oc1..aaaa
61+
```
3462

cli/ref/fn-invoke.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,33 @@ DESCRIPTION
1313
This command invokes a function. Users may send input to their function by passing input to this command via STDIN.
1414

1515
COMMAND OPTIONS
16-
--endpoint value Specify the function invoke endpoint for this function, the app-name and func-name parameters will be ignored
17-
--content-type value The payload Content-Type for the function invocation.
18-
--display-call-id whether display call ID or not
19-
--output value Output format (json)
16+
--endpoint value Specify the function invoke endpoint for this function, the app-name and func-name parameters will be ignored
17+
--content-type value The payload Content-Type for the function invocation.
18+
--display-call-id whether display call ID or not
19+
--output value Output format (json)
20+
--fn-intent value Optional intent header for function invocation, e.g. httprequest or cloudevent
21+
--is-dry-run Send invocation as a dry run without executing the function
22+
--fn-invoke-type value Invoke type for Oracle Functions: sync or detached
2023

2124
```
2225
23-
[Some link](#)
26+
## Examples
27+
28+
Invoke in detached mode (subcommand):
29+
30+
```bash
31+
fn invoke detached my-app my-fn --display-call-id
32+
```
33+
34+
Invoke with OCI parity detached flag:
35+
36+
```bash
37+
fn invoke my-app my-fn --fn-invoke-type detached --display-call-id
38+
```
39+
40+
Invoke dry-run with intent:
41+
42+
```bash
43+
fn invoke my-app my-fn --is-dry-run --fn-intent cloudevent
44+
```
2445

cli/ref/fn-list-apps.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,35 @@ DESCRIPTION
1313
This command provides a list of defined applications.
1414

1515
COMMAND OPTIONS
16-
--cursor value Pagination cursor
17-
-n value Number of apps to return (default: 100)
18-
--output value Output format (json)
16+
--cursor value Pagination cursor
17+
-n value Number of apps to return (default: 100)
18+
--output value Output format (json)
19+
--from-json value Structured JSON input for command parameters
20+
--display-name value Filter applications by exact display name
21+
--id value Filter applications by OCID
22+
--lifecycle-state value Filter applications by lifecycle state
23+
--sort-by value Sort applications by supported field
24+
--sort-order value Sort order for list results
1925

2026
```
2127
22-
[Some link](#)
28+
## Examples
29+
30+
List apps filtered by display name:
31+
32+
```bash
33+
fn list apps --display-name parity-app
34+
```
35+
36+
List apps with sorting:
37+
38+
```bash
39+
fn list apps --sort-by displayName --sort-order ASC
40+
```
41+
42+
List apps from JSON input:
43+
44+
```bash
45+
fn list apps --from-json '{"displayName":"parity-app","sortBy":"displayName","sortOrder":"ASC"}'
46+
```
2347

cli/ref/fn-list.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ SUBCOMMANDS
1717
config, config, cf List configurations for apps and functions
1818
contexts, context, ctx List contexts
1919
functions, funcs, f, fn List functions for an application
20+
pbfs List Pre-Built Function listings and related resources
2021
triggers, trigs, t, tr List all triggers
2122
help, h Shows a list of commands or help for one command
2223

cli/ref/fn-update-app.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,51 @@ DESCRIPTION
1313
This command updates a created application.
1414

1515
COMMAND OPTIONS
16-
--config value, -c value Application configuration
17-
--annotation value Application annotations
18-
--syslog-url value Syslog URL to send application logs to
16+
--config value, -c value Application configuration
17+
--annotation value Application annotations
18+
--tag value Freeform tag in key=value form (repeatable)
19+
--defined-tag value Defined tag in namespace.key=value form (repeatable)
20+
--remove-tag value Remove a freeform tag by key (repeatable)
21+
--remove-defined-tag value Remove a defined tag by namespace.key (repeatable)
22+
--clear-tags Clear all freeform and defined tags
23+
--clear-freeform-tags Clear all freeform tags
24+
--clear-defined-tags Clear all defined tags
25+
--syslog-url value Syslog URL to send application logs to
26+
--subnet-id value Subnet OCID (accepted for non-Oracle providers; Oracle-backed update currently not supported)
27+
--from-json value Structured JSON input for command parameters
28+
--if-match value Apply optimistic concurrency control using the provided etag
29+
--wait-for-state value Wait until resource reaches lifecycle state
30+
--max-wait-seconds value Max waiter duration in seconds
31+
--wait-interval-seconds value Waiter poll interval in seconds
32+
--network-security-group-ids value OCI NSG OCID (repeatable)
33+
--trace-config value OCI trace config JSON or file:// path
34+
--image-policy-config value OCI image policy config JSON or file:// path
35+
--security-attributes value OCI security attributes JSON or file:// path
1936

2037
```
2138
22-
[Some link](#)
39+
## Examples
40+
41+
Update app tags:
42+
43+
```bash
44+
fn update app my-app \
45+
--tag Team=Payments \
46+
--remove-tag Department \
47+
--clear-defined-tags
48+
```
49+
50+
Update advanced OCI app settings:
51+
52+
```bash
53+
fn update app parity-app \
54+
--image-policy-config file:///absolute/path/image-policy.json \
55+
--security-attributes '{"oracle-zpr":{"MaxEgressCount":{"value":"42","mode":"enforce"}}}'
56+
```
57+
58+
Update from JSON:
59+
60+
```bash
61+
fn update app my-app --from-json file:///absolute/path/app-create.json
62+
```
2363

cli/ref/fn-update-function.md

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,65 @@ DESCRIPTION
1313
This command updates a function in an application.
1414

1515
COMMAND OPTIONS
16-
--memory value, -m value Memory in MiB (default: 0)
17-
--config value, -c value Function configuration
18-
--timeout value Function timeout (eg. 30) (default: 0)
19-
--idle-timeout value Function idle timeout (eg. 30) (default: 0)
20-
--annotation value Function annotation (can be specified multiple times)
21-
--image value Function image
16+
--memory value, -m value Memory in MiB (default: 0)
17+
--config value, -c value Function configuration
18+
--timeout value Function timeout (eg. 30) (default: 0)
19+
--idle-timeout value Function idle timeout (eg. 30) (default: 0)
20+
--annotation value Function annotation (can be specified multiple times)
21+
--image value Function image
22+
--tag value Freeform tag in key=value form (repeatable)
23+
--defined-tag value Defined tag in namespace.key=value form (repeatable)
24+
--remove-tag value Remove a freeform tag by key (repeatable)
25+
--remove-defined-tag value Remove a defined tag by namespace.key (repeatable)
26+
--clear-tags Clear all freeform and defined tags
27+
--clear-freeform-tags Clear all freeform tags
28+
--clear-defined-tags Clear all defined tags
29+
--provisioned-concurrency value Provisioned concurrency (none | constant:<count>)
30+
--detached-timeout value Detached invocation timeout (e.g. 20m, 1h)
31+
--on-success value Success destination shorthand (<stream|queue|notifications>:<ocid>)
32+
--on-failure value Failure destination shorthand (<stream|queue|notifications>:<ocid>)
33+
--clear-on-success Clear detached success destination
34+
--clear-on-failure Clear detached failure destination
35+
--pbf value Pre-Built Function listing OCID source
36+
--from-json value Structured JSON input for command parameters
37+
--if-match value Apply optimistic concurrency control using the provided etag
38+
--wait-for-state value Wait until resource reaches lifecycle state
39+
--max-wait-seconds value Max waiter duration in seconds
40+
--wait-interval-seconds value Waiter poll interval in seconds
41+
--trace-config value OCI trace config JSON or file:// path
42+
--timeout-in-seconds value OCI parity timeout option in seconds
43+
--detached-mode-timeout-in-seconds value OCI parity detached timeout in seconds
44+
--success-destination value OCI parity destination JSON or file:// path
45+
--failure-destination value OCI parity destination JSON or file:// path
2246

2347
```
2448
25-
[Some link](#)
49+
## Examples
50+
51+
Update provisioned concurrency:
52+
53+
```bash
54+
fn update function my-app my-fn --provisioned-concurrency constant:10
55+
```
56+
57+
Update long-running settings:
58+
59+
```bash
60+
fn update function my-app my-fn \
61+
--detached-timeout 1h \
62+
--on-success stream:ocid1.stream.oc1..aaaa \
63+
--on-failure notifications:ocid1.onstopic.oc1..aaaa
64+
```
65+
66+
Clear long-running destinations:
67+
68+
```bash
69+
fn update function my-app my-fn --clear-on-success --clear-on-failure
70+
```
71+
72+
Update from JSON:
73+
74+
```bash
75+
fn update function my-app my-fn --from-json file:///absolute/path/fn-create.json
76+
```
2677

0 commit comments

Comments
 (0)