Azion CLI cache settings command and its subcommands
See the command and subcommands that enable the management of your Cache Settings used on the Azion Platform using Azion CLI.
Listing your cache settings
Section titled Listing your cache settingsList the cache settings configured in an edge application.
Usage
Section titled Usage azioncli cache-settings --application-id 12738
Required flags
Section titled Required flagsapplication-id
Section titled application-idThe --application-id
flag gives the ID for the edge application and, based on that, the cache settings related to the application are listed.
Optional flags
Section titled Optional flagsdetails
Section titled detailsThe --details
option displays all relevant fields when listing.
filter
Section titled filterThe --filter
option filters items by name.
order_by
Section titled order_byThe --order_by
option sorts the output based on the informed field.
The --page
option returns a page of the list based on the selected field.
page_size
Section titled page_sizeThe --page_size
option defines how many items should be returned per page. By default, it’s 10
.
The --sort
option defines the order of the items on the list. The value should be either asc
or desc
.
The --help
option displays more information about the list
subcommand.
Creating cache settings
Section titled Creating cache settingsCreate a Cache Settings configuration based on given attributes to be used with edge applications.
Usage
Section titled Usage azioncli cache_settings create --name cachesettingsname --application-id 00000000001
Required flags
Section titled Required flagsThe --name
flag gives the Cache Settings configuration name.
application-id
Section titled application-idThe --application-id
flag gives the ID for the edge application related to this Cache Settings configuration.
Optional flags
Section titled Optional flagsThe --help
option displays more information about the create
subcommand.
adaptive-delivery-action
Section titled adaptive-delivery-actionThe --adaptive-delivery-action
option informs the Cache Settings configuration adaptive delivery action. By default, it’s set as ignore
.
browser-cache-settings
Section titled browser-cache-settingsThe --browser-cache-settings
option configures the amount of time the content is cached in the web browser.
browser-cache-settings-maximum-ttl
Section titled browser-cache-settings-maximum-ttlThe --browser-cache-settings-maximum-ttl
option informs the browser Cache Settings configuration maximum TTL.
cache-by-cookies
Section titled cache-by-cookiesThe --cache-by-cookies
option defines whether cache by cookies is active or not. By default, it’s ignore
.
cache-by-query-string
Section titled cache-by-query-stringThe --cache-by-query-string
option defines how you want the content to be cached according to variations of Query String in your URLs. By default, it’s 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. By default, it’s honor
.
cdn-cache-settings-maximum-ttl
Section titled cdn-cache-settings-maximum-ttlThe --cdn-cache-settings-maximum-ttl
option informs CDN Cache Settings configuration maximum TTL. By default, it’s 60
.
cookie-names
Section titled cookie-namesThe --cookie-names
option distinguishes objects in the Azion cache by name/value of cookies.
enable-caching-for-options
Section titled enable-caching-for-optionsThe --enable-caching-for-options
option informs whether caching for options is active or not. By default, it’s false
.
enable-caching-for-post
Section titled enable-caching-for-postThe --enable-caching-for-post
option informs whether caching for post is active or not.
enable-caching-string-sort
Section titled enable-caching-string-sortThe --enable-caching-string-sort
option informs whether caching string sort is active or not.
The --in
option informs the file path to a JSON file containing all attributes of the Cache Settings configuration that will be created.
Note: if the
--in
and--application-id
flags are given, all information will be accessed through the filepath that was passed through the flag, so the other flags aren’t necessary.
l2-caching-enabled
Section titled l2-caching-enabledThe --l2-caching-enabled
option informs whether L2 caching is active or not.
query-string-fields
Section titled query-string-fieldsThe --query-string-fields
option gives a list of query strings parameters to be considered in the Cache Settings configuration that will segregate the cache to the same URL.
slice-configuration-enabled
Section titled slice-configuration-enabledThe --slice-configuration-enabled
option informs whether slice configuration is active or not.
slice-configuration-range
Section titled slice-configuration-rangeThe --slice-configuration-range
option gives the slice configuration range.
slice-l2-caching-enabled
Section titled slice-l2-caching-enabledThe --slice-l2-caching-enabled
option informs whether slice L2 configuration is active or not.
Updating cache settings
Section titled Updating cache settingsUpdate a cache settings configuration based on the ID informed and given attributes.
Usage
Section titled Usage azioncli cache_settings update --application-id 1673635839312 --cache-settings-id 115241237 --name "cachesettingstest"
Required flags
Section titled Required flagsapplication-id
Section titled application-idThe --application-id
flag informs the ID of the edge application related to the Cache Settings configuration.
cache-settings-id
Section titled cache-settings-idThe --cache-settings-id
flag informs the unique identifier for a Cache Settings configuration.
Optional flags
Section titled Optional flagsThe --help
option displays more information about the update
subcommand.
The --name
flag gives the Cache Settings configuration name.
adaptive-delivery-action
Section titled adaptive-delivery-actionThe --adaptive-delivery-action
option informs the Cache Settings configuration adaptive delivery action. By default, it’s set as ignore
.
browser-cache-settings
Section titled browser-cache-settingsThe --browser-cache-settings
option configures the amount of time the content is cached in the web browser.
browser-cache-settings-maximum-ttl
Section titled browser-cache-settings-maximum-ttlThe --browser-cache-settings-maximum-ttl
option informs the browser Cache Settings configuration maximum TTL.
cache-by-cookies
Section titled cache-by-cookiesThe --cache-by-cookies
option defines whether cache by cookies is active or not. By default, it’s ignore
.
cache-by-query-string
Section titled cache-by-query-stringThe --cache-by-query-string
option defines how you want the content to be cached according to variations of Query String in your URLs. By default, it’s 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. By default, it’s honor
.
cdn-cache-settings-maximum-ttl
Section titled cdn-cache-settings-maximum-ttlThe cdn-cache-settings-maximum-ttl
option informs CDN Cache Settings configuration maximum TTL. By default, it’s 60
.
cookie-names
Section titled cookie-namesThe --cookie-names
option distinguishes objects in the Azion cache by name/value of cookies.
enable-caching-for-options
Section titled enable-caching-for-optionsThe --enable-caching-for-options
option informs whether caching for options is active or not. By default, it’s false
.
enable-caching-for-post
Section titled enable-caching-for-postThe --enable-caching-for-post
option informs whether caching for post is active or not.
enable-caching-string-sort
Section titled enable-caching-string-sortThe --enable-caching-string-sort
option informs whether caching string sort is active or not.
The --in
option informs the file path to a JSON file containing all attributes of the Cache Settings configuration that will be updated.
Note: if the
--in
and--application-id
flags are given, all information will be accessed through the filepath that was passed through the flag, so the other flags aren’t necessary.
l2-caching-enabled
Section titled l2-caching-enabledThe --l2-caching-enabled
option informs whether L2 caching is active or not.
query-string-fields
Section titled query-string-fieldsThe --query-string-fields
option gives a list of query strings parameters to be considered in the Cache Settings configuration that will segregate the cache to the same URL.
slice-configuration-enabled
Section titled slice-configuration-enabledThe --slice-configuration-enabled
option informs whether slice configuration is active or not.
slice-configuration-range
Section titled slice-configuration-rangeThe --slice-configuration-range
option gives the slice configuration range.
slice-l2-caching-enabled
Section titled slice-l2-caching-enabledThe --slice-l2-caching-enabled
option informs whether slice L2 configuration is active or not.
Describing a cache settings configuration
Section titled Describing a cache settings configurationReturn details about a specific Cache Settings configuration, based on a given ID.
Usage
Section titled Usage azioncli cache_settings describe --application-id 1673635839 --cache-settings-id 107313
Required flags
Section titled Required flagsapplication-id
Section titled application-idThe --application-id
flag informs the ID of the edge application related to the Cache Settings configuration that will be described.
cache-settings-id
Section titled cache-settings-idThe --cache-settings-id
flag informs the unique identifier for a Cache Settings configuration.
Optional flags
Section titled Optional flagsThe --out
option exports the output of the describe
command to a given filepath.
format
Section titled formatThe --format
option, followed by the value json
, changes the output format to JSON.
The --help
option displays more information about the describe
subcommand.
Deleting a cache settings configuration
Section titled Deleting a cache settings configurationDelete a Cache Settings configuration on the Azion platform.
Usage
Section titled Usage azioncli cache_settings delete --application-id 0000092 --cache-settings-id 0029
Required flags
Section titled Required flagsapplication-id
Section titled application-idThe --application-id
flag informs the ID of the edge application related to the Cache Settings configuration that will be deleted.
cache-settings-id
Section titled cache-settings-idThe --cache-settings-id
flag informs the unique identifier for a Cache Settings configuration.
Optional flags
Section titled Optional flagsThe --help
option displays more information about the delete
subcommand.