Azion CLI create
With the azion create [resource]
command you can create:
Edge applications
Usage
Required flags
name
The --name
flag sets the name of the edge application being created. It’s required if the --file
flag isn’t used.
Optional flags
address
The --address
option specifies the address of the origin server.
browser-cache-settings
The --browser-cache-settings
option configures the amount of time that content is cached in the user’s browser. Possible values are honor
or override
.
browser-cache-settings-maximum-ttl
The --browser-cache-settings-maximum-ttl
option defines the maximum time to live (TTL) of cached resources in the browser. It sets a time limit for how long resources can be cached in the browser, in seconds.
cdn-cache-settings
The --cdn-cache-settings
option configures how Azion caches content at the edge. Possible values are honor
or override
.
cdn-cache-settings-maximum-ttl
The --cdn-cache-settings-maximum-ttl
option defines the maximum time to live (TTL) of cached resources in the edge. It sets a time limit for how long resources can be cached on the edge nodes, in seconds.
delivery-protocol
The --delivery-protocol
option specifies whether the data should be delivered via HTTP or HTTPS.
host-header
The --host-header
option allows customization of the Host
header.
http-port
The --http-port
flag specifies the edge application’s HTTP delivery port. The default is 80
.
https-port
The --https-port
flag specifies the edge application’s HTTPS delivery port. The default is 443
.
http3
The --http3
option enables delivery in HTTP/3.
file
The --file
option specifies a path to a JSON file containing the attributes of the edge application being created. It can also read from stdin using -
.
Attributes inside a JSON
file:
origin-protocol-policy
The --origin-protocol-policy
option specifies the type of connection between the edge nodes and the origin. Possible values are preserve
, http
, or https
.
origin-type
The --origin-type
option specifies the type of the origin. Possible values are single_origin
(default value), load_balancer
, or live_ingest
.
supported-ciphers
The --supported-ciphers
option determines which cipher suite will be used in the TLS connections of your edge application.
websocket
The --websocket
option allows you to establish the WebSocket communication protocol between your application and your users under the reverse proxy architecture.
debug-rules
The --debug-rules
option allows you to check whether rules or rule sets created using the Rules Engine module for Edge Application or Edge Firewall have been successfully executed in your application.
Edge functions
Usage
Required flags
name
The --name
flag sets the name of the edge function being created.
code
The --code
flag sets the path to the edge function’s code.
active
The --active
flag specifies whether the edge function is active or not. Accepts true
or false
.
Optional flags
args
The --args
flag sets the path to the edge function’s arguments JSON file.
file
The --file
flag specifies the file path to create an edge function. You can use -
for reading from stdin.
Attributes inside a JSON
file:
help
The --help
option displays more information about the azion create edge-function
command.
Rules engine
Usage
Required flags
application-id
The --application-id
flag sets the unique identifier for an edge application.
phase
The --phase
flag specifies the phase for the rule. It’s either request
or response
.
Optional flags
file
The --file
flag specifies the path to a JSON file containing the attributes of the rule that’ll be created. You can use -
to read from stdin.
Attributes inside a JSON
file:
help
The --help
flag displays more information about the azion create rules-engine
action.
Cache settings
Usage
Required flags
application-id
The --application-id
flag sets the unique identifier for the edge application.
name
The --name
flag sets the name of the Cache Settings configuration being created.
Optional flags
adaptive-delivery-action
The --adaptive-delivery-action
option informs the Cache Settings configuration adaptive delivery action. The default value is ignore
.
browser-cache-settings
The --browser-cache-settings
option configures the amount of time that the content is cached in the web browser. The default value is honor
.
browser-cache-settings-maximum-ttl
The --browser-cache-settings-maximum-ttl
option informs Browser Cache Settings configuration maximum TTL.
cache-by-cookies
The --cache-by-cookies
option defines if cache by cookies is active. The default value is ignore
.
cache-by-query-string
The --cache-by-query-string
option defines how the content should be cached according to variations of the Query String in URLs. The default value is ignore
.
cdn-cache-settings
The --cdn-cache-settings
option configures the amount of time Azion’s edge applications take to cache the content. It can either Honor Origin Cache Headers or Override Cache Settings. The default value is honor
.
cnd-cache-settings-maximum-ttl
The --cnd-cache-settings-maximum-ttl
option informs CDN Cache Settings configuration maximum TTL. The default value is 60
.
cookie-names
The --cookie-names
option distinguishes objects in the Azion cache by the name/value of cookies.
enable-caching-for-options
The --enable-caching-for-options
option defines if caching for options is active. The default value is false
.
enable-caching-for-post
The --enable-caching-for-post
option defines if caching for post is active.
enable-caching-string-sort
The --enable-caching-string-sort
option defines if caching string sort is active.
file
The --file
option specifies the path to a JSON file containing the attributes of the Cache Settings configuration that’ll be created. You can use -
for reading from stdin.
Attributes inside a JSON
file:
help
The --help
option displays more information about the azion create cache-setting
command.
l2-caching-enabled
The --l2-caching-enabled
option defines if Tiered Cache is active.
query-string-fields
The --query-string-fields
option gives a list of query string parameters to be considered in the Cache Settings configuration, segregating the cache to the same URL.
slice-configuration-enabled
The --slice-configuration-enabled
option defines if Large File Optimization is active.
slice-configuration-range
The --slice-configuration-range
option informs the fragment range.
slice-l2-caching-enabled
The --slice-l2-caching-enabled
option defines if Large File Optimization for Tiered Cache is active.
Domains
Description
Creates a domain.
Usage
Required flags
application-id
The --application-id
flag sets the edge application’s unique identifier.
name
The --name
flag sets the domain’s name.
Optional flags
active
The --active
option specifies if the domain is active. The default value is true
.
cname-access-only
The --cname-access-only
option specifies if the domain is accessed only through the CNAMEs. The default value is false
.
cnames
The --cnames
option is a list of domains’ CNAMEs to associate with the domain.
digital-certificate-id
The --digital-certificate-id
option sets the digital certificate’s unique identifier. It can be an integer, null, or the string lets_encrypt
. If lets_encrypt
is informed, then a Let’s Encrypt certificate will be created for you.
help
The --help
option displays more information about the azion create domain
action.
file
The --file
option specifies a path to a JSON file containing the attributes that will be updated. You can use -
to read from stdin.
Attributes inside a JSON
file:
Origins
Usage
Required flags
application-id
The --application-id
flag sets the unique identifier for the edge application in which the origin will be created.
name
The --name
flag sets the name of the origin being created.
addresses
The --addresses
flag passes a list of addresses linked to the origin. Multiple addresses should be separated by commas.
Optional flags
file
The --file
flag specifies the path to a JSON file containing the attributes of the origin that will be created. You can use -
for reading from stdin.
Attributes inside a JSON
file:
hmac-access-key
The --hmac-access-key
flag informs the Hmac Access Key.
hmac-authentication
The --hmac-authentication
flag specifies whether Hmac Authentication is used or not.
hmac-region-name
The --hmac-region-name
flag informs the Hmac region name.
hmac-secret-key
The --hmac-secret-key
flag informs the Hmac Secret Key.
host-header
The --host-header
flag specifies the hostname of the server being accessed.
origin-path
The --origin-path
flag defines the path to be appended to the URI when forwarding the request to the origin. Leave it blank to use only the URI.
origin-protocol-policy
The --origin-protocol-policy
flag tells the protocol policy used in the origin.
origin-type
The --origin-type
flag identifies the source of a record. Accepted values:
single_origin
(default)load_balancer
live_ingest
object_storage
bucket
The --bucket
flag informs the name of the Edge Storage bucket. Required when origin-type is equal to object_storage
.
prefix
The --bucket
flag informs the path or location within the bucket from which the content must be retrieved. Optional and only used when origin-type is equal to object_storage
help
The -h
or --help
option displays more information about the azion create origin
action.
Variables
Create a new environment variable or secret to be used inside your edge functions.
Usage
Required flags if the --in flag isn’t informed
key
The --key
flag provides the variable’s key.
value
The --value
flag provides the variable’s value.
secret
The --secret
flag indicates whether the value is meant to be confidential. The default value is true
.
Optional flags
file
The --file
flag informs the file path to the file containing all attributes of the variable being created. You can use -
for reading from stdin.
Attributes inside a JSON
file:
help
The --help
option displays more information about the azion create variables
command.
Personal tokens
Usage
Optional flags
file
The --file
option informs the file path to a JSON file containing all attributes of the personal token being created.
Attributes inside a JSON
file:
help
The --help
option displays more information about the create
subcommand.
Required flags when --file isn’t informed
description
The --description
option informs the personal token’s description.
expiration
The --expiration
option informs the personal token’s expiration.
name
The --name
option informs the personal token’s name.
Edge Storage bucket
Usage
Required flags
edge-access
The --edge-access
flag indicates the type of permission for actions within the bucket. Possible values include read_only
, read_write
, or restricted
.
name
The --name
flag defines the name of the Edge Storage bucket.
Optional flags
file
The --file
option specifies the path to a JSON file containing the attributes of the bucket that will be created. Alternatively, you can use ’-’ for reading from stdin.
Attributes inside a JSON
file:
help
The --help
option displays more information about the ‘create edge-storage bucket’ command.
Edge Storage object
Usage
Required flags
bucket-name
The --bucket-name
flag sets the name of the Edge Storage bucket where the object will be stored.
object-key
The --object-key
flag sets the name of the object to be stored in the bucket. It can also be used to indicate a full file path (such as ‘path/to/file/bucket/file.txt’).
source
The --source
flag defines the path to the local file to be uploaded to the bucket. The path should be absolute.
Optional flags
file
The --file
option allows you to specify a path to a JSON file containing the attributes of the objects to be created. You can use -
for reading from stdin.
Attributes inside a JSON
file:
help
The -h
or --help
option displays more detailed information about the azion create edge-storage object
command.