Azion CLI create
With the azion create [resource]
command you can create:
Edge applications
Section titled Edge applicationsUsage
Section titled UsageRequired flags
Section titled Required flagsThe --name
flag sets the name of the edge application being created. It’s required if the --file
flag isn’t used.
Optional flags
Section titled Optional flagsaddress
Section titled addressThe --address
option specifies the address of the origin server.
browser-cache-settings
Section titled browser-cache-settingsThe --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
Section titled browser-cache-settings-maximum-ttlThe --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
Section titled cdn-cache-settingsThe --cdn-cache-settings
option configures how Azion caches content at the edge. Possible values are honor
or override
.
cdn-cache-settings-maximum-ttl
Section titled cdn-cache-settings-maximum-ttlThe --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
Section titled delivery-protocolThe --delivery-protocol
option specifies whether the data should be delivered via HTTP or HTTPS.
host-header
Section titled host-headerThe --host-header
option allows customization of the Host
header.
http-port
Section titled http-portThe --http-port
flag specifies the edge application’s HTTP delivery port. The default is 80
.
https-port
Section titled https-portThe --https-port
flag specifies the edge application’s HTTPS delivery port. The default is 443
.
http3
Section titled http3The --http3
option enables delivery in HTTP/3.
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
Section titled origin-protocol-policyThe --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
Section titled origin-typeThe --origin-type
option specifies the type of the origin. Possible values are single_origin
(default value), load_balancer
, or live_ingest
.
supported-ciphers
Section titled supported-ciphersThe --supported-ciphers
option determines which cipher suite will be used in the TLS connections of your edge application.
websocket
Section titled websocketThe --websocket
option allows you to establish the WebSocket communication protocol between your application and your users under the reverse proxy architecture.
debug-rules
Section titled debug-rulesThe --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
Section titled Edge functionsUsage
Section titled UsageRequired flags
Section titled Required flagsThe --name
flag sets the name of the edge function being created.
The --code
flag sets the path to the edge function’s code.
active
Section titled activeThe --active
flag specifies whether the edge function is active or not. Accepts true
or false
.
Optional flags
Section titled Optional flagsThe --args
flag sets the path to the edge function’s arguments JSON 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:
The --help
option displays more information about the azion create edge-function
command.
Rules engine
Section titled Rules engineUsage
Section titled UsageRequired flags
Section titled Required flagsapplication-id
Section titled application-idThe --application-id
flag sets the unique identifier for an edge application.
phase
Section titled phaseThe --phase
flag specifies the phase for the rule. It’s either request
or response
.
Optional flags
Section titled Optional flagsThe --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.
The --help
flag displays more information about the azion create rules-engine
action.
Cache settings
Section titled Cache settingsUsage
Section titled UsageRequired flags
Section titled Required flagsapplication-id
Section titled application-idThe --application-id
flag sets the unique identifier for the edge application.
The --name
flag sets the name of the Cache Settings configuration being created.
Optional flags
Section titled Optional flagsadaptive-delivery-action
Section titled adaptive-delivery-actionThe --adaptive-delivery-action
option informs the Cache Settings configuration adaptive delivery action. The default value is ignore
.
browser-cache-settings
Section titled browser-cache-settingsThe --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
Section titled browser-cache-settings-maximum-ttlThe --browser-cache-settings-maximum-ttl
option informs Browser Cache Settings configuration maximum TTL.
cache-by-cookies
Section titled cache-by-cookiesThe --cache-by-cookies
option defines if cache by cookies is active. The default value is ignore
.
cache-by-query-string
Section titled cache-by-query-stringThe --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
Section titled cdn-cache-settingsThe --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
Section titled cnd-cache-settings-maximum-ttlThe --cnd-cache-settings-maximum-ttl
option informs CDN Cache Settings configuration maximum TTL. The default value is 60
.
cookie-names
Section titled cookie-namesThe --cookie-names
option distinguishes objects in the Azion cache by the name/value of cookies.
enable-caching-for-options
Section titled enable-caching-for-optionsThe --enable-caching-for-options
option defines if caching for options is active. The default value is false
.
enable-caching-for-post
Section titled enable-caching-for-postThe --enable-caching-for-post
option defines if caching for post is active.
enable-caching-string-sort
Section titled enable-caching-string-sortThe --enable-caching-string-sort
option defines if caching string sort is active.
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.
The --help
option displays more information about the azion create cache-setting
command.
l2-caching-enabled
Section titled l2-caching-enabledThe --l2-caching-enabled
option defines if Tiered Cache is active.
query-string-fields
Section titled query-string-fieldsThe --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
Section titled slice-configuration-enabledThe --slice-configuration-enabled
option defines if Large File Optimization is active.
slice-configuration-range
Section titled slice-configuration-rangeThe --slice-configuration-range
option informs the fragment range.
slice-l2-caching-enabled
Section titled slice-l2-caching-enabledThe --slice-l2-caching-enabled
option defines if Large File Optimization for Tiered Cache is active.
Domains
Section titled DomainsDescription
Section titled DescriptionCreates a domain.
Usage
Section titled UsageRequired flags
Section titled Required flagsapplication-id
Section titled application-idThe --application-id
flag sets the edge application’s unique identifier.
The --name
flag sets the domain’s name.
Optional flags
Section titled Optional flagsactive
Section titled activeThe --active
option specifies if the domain is active. The default value is true
.
cname-access-only
Section titled cname-access-onlyThe --cname-access-only
option specifies if the domain is accessed only through the CNAMEs. The default value is false
.
cnames
Section titled cnamesThe --cnames
option is a list of domains’ CNAMEs to associate with the domain.
digital-certificate-id
Section titled digital-certificate-idThe --digital-certificate-id
option sets the digital certificate’s unique identifier. It can be an integer or null.
The --help
option displays more information about the azion create domain
action.
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
Section titled OriginsUsage
Section titled UsageRequired flags
Section titled Required flagsapplication-id
Section titled application-idThe --application-id
flag sets the unique identifier for the edge application in which the origin will be created.
The --name
flag sets the name of the origin being created.
addresses
Section titled addressesThe --addresses
flag passes a list of addresses linked to the origin. Multiple addresses should be separated by commas.
Optional flags
Section titled Optional flagsThe --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
Section titled hmac-access-keyThe --hmac-access-key
flag informs the Hmac Access Key.
hmac-authentication
Section titled hmac-authenticationThe --hmac-authentication
flag specifies whether Hmac Authentication is used or not.
hmac-region-name
Section titled hmac-region-nameThe --hmac-region-name
flag informs the Hmac region name.
hmac-secret-key
Section titled hmac-secret-keyThe --hmac-secret-key
flag informs the Hmac Secret Key.
host-header
Section titled host-headerThe --host-header
flag specifies the hostname of the server being accessed.
origin-path
Section titled origin-pathThe --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
Section titled origin-protocol-policyThe --origin-protocol-policy
flag tells the protocol policy used in the origin.
origin-type
Section titled origin-typeThe --origin-type
flag identifies the source of a record. Accepted values:
single_origin
(default)load_balancer
live_ingest
object_storage
bucket
Section titled bucketThe --bucket
flag informs the name of the Edge Storage bucket. Required when origin-type is equal to object_storage
.
prefix
Section titled prefixThe --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
The -h
or --help
option displays more information about the azion create origin
action.
Variables
Section titled VariablesCreate a new environment variable or secret to be used inside your edge functions.
Usage
Section titled UsageRequired flags if the --in flag isn’t informed
Section titled Required flags if the --in flag isn’t informedThe --key
flag provides the variable’s key.
value
Section titled valueThe --value
flag provides the variable’s value.
secret
Section titled secretThe --secret
flag indicates whether the value is meant to be confidential. The default value is true
.
Optional flags
Section titled Optional flagsThe --file
flag informs the file path to the file containing all attributes of the variable being created. You can use -
for reading from stdin.
The --help
option displays more information about the azion create variables
command.
Personal tokens
Section titled Personal tokensUsage
Section titled UsageOptional flags
Section titled Optional flagsThe --file
option informs the file path to a JSON file containing all attributes of the personal token being created.
Example
The --help
option displays more information about the create
subcommand.
Required flags when --file isn’t informed
Section titled Required flags when --file isn’t informeddescription
Section titled descriptionThe --description
option informs the personal token’s description.
expiration
Section titled expirationThe --expiration
option informs the personal token’s expiration.
The --name
option informs the personal token’s name.
Edge Storage bucket
Section titled Edge Storage bucketUsage
Section titled UsageRequired flags
Section titled Required flagsedge-access
Section titled edge-accessThe --edge-access
flag indicates the type of permission for actions within the bucket. Possible values include read_only
, read_write
, or restricted
.
The --name
flag defines the name of the Edge Storage bucket.
Optional flags
Section titled Optional flagsThe --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.
The --help
option displays more information about the ‘create edge-storage bucket’ command.
Edge Storage object
Section titled Edge Storage objectUsage
Section titled UsageRequired flags
Section titled Required flagsbucket-name
Section titled bucket-nameThe --bucket-name
flag sets the name of the Edge Storage bucket where the object will be stored.
object-key
Section titled object-keyThe --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
Section titled sourceThe --source
flag defines the path to the local file to be uploaded to the bucket. The path should be absolute.
Optional flags
Section titled Optional flagsThe --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.
The -h
or --help
option displays more detailed information about the azion create edge-storage object
command.