az containerapp ingress cors
用于管理容器应用的 CORS 策略的命令。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az containerapp ingress cors disable |
为容器应用禁用 CORS 策略。 |
Core | GA |
az containerapp ingress cors enable |
为容器应用启用 CORS 策略。 |
Core | GA |
az containerapp ingress cors show |
显示容器应用的 CORS 策略。 |
Core | GA |
az containerapp ingress cors update |
更新容器应用的 CORS 策略。 |
Core | GA |
az containerapp ingress cors disable
为容器应用禁用 CORS 策略。
az containerapp ingress cors disable [--ids]
[--name]
[--resource-group]
[--subscription]
示例
为容器应用禁用 CORS 策略。
az containerapp ingress cors disable -n my-containerapp -g MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az containerapp ingress cors enable
为容器应用启用 CORS 策略。
az containerapp ingress cors enable --allowed-origins
[--allow-credentials {false, true}]
[--allowed-headers]
[--allowed-methods]
[--expose-headers]
[--ids]
[--max-age]
[--name]
[--resource-group]
[--subscription]
示例
为容器应用设置允许的源和允许的方法。
az containerapp ingress cors enable -n my-containerapp -g MyResourceGroup --allowed-origins http://www.contoso.com https://www.contoso.com --allowed-methods GET POST
为容器应用设置允许的源、允许的方法和允许的标头。
az containerapp ingress cors enable -n my-containerapp -g MyResourceGroup --allowed-origins * --allowed-methods * --allowed-headers header1 header2
必需参数
容器应用的允许源列表。 值是空格分隔的。 用于清除现有值的空字符串。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
容器应用是否允许凭据。
属性 | 值 |
---|---|
接受的值: | false, true |
容器应用的允许标头列表。 值是空格分隔的。 用于清除现有值的空字符串。
容器应用的允许方法列表。 值是空格分隔的。 用于清除现有值的空字符串。
容器应用的公开标头列表。 值是空格分隔的。 用于清除现有值的空字符串。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
允许的源的最大期限(以秒为单位)。 只允许有后置整数或空字符串。 空字符串将max_age重置为 null。
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az containerapp ingress cors show
显示容器应用的 CORS 策略。
az containerapp ingress cors show [--ids]
[--name]
[--resource-group]
[--subscription]
示例
显示容器应用的 CORS 策略。
az containerapp ingress cors show -n my-containerapp -g MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az containerapp ingress cors update
更新容器应用的 CORS 策略。
az containerapp ingress cors update [--allow-credentials {false, true}]
[--allowed-headers]
[--allowed-methods]
[--allowed-origins]
[--expose-headers]
[--ids]
[--max-age]
[--name]
[--resource-group]
[--subscription]
示例
更新容器应用的允许源和允许的方法,同时保留其他 cors 设置。
az containerapp ingress cors update -n my-containerapp -g MyResourceGroup --allowed-origins http://www.contoso.com https://www.contoso.com --allowed-methods GET POST
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
容器应用是否允许凭据。
属性 | 值 |
---|---|
接受的值: | false, true |
容器应用的允许标头列表。 值是空格分隔的。 用于清除现有值的空字符串。
容器应用的允许方法列表。 值是空格分隔的。 用于清除现有值的空字符串。
容器应用的允许源列表。 值是空格分隔的。 用于清除现有值的空字符串。
容器应用的公开标头列表。 值是空格分隔的。 用于清除现有值的空字符串。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
允许的源的最大期限(以秒为单位)。 只允许有后置整数或空字符串。 空字符串将max_age重置为 null。
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |