Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cosmos DB] az cosmosdb create/update: Add support for minimum allowed TLS version and burst capacity configuration #27322

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ interactions:
Connection:
- keep-alive
User-Agent:
- AZURECLI/2.25.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)
- AZURECLI/2.53.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.10 (Windows-10-10.0.22621-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations?api-version=2020-01-01
response:
body:
string: '{"value":[{"properties":{"exclude":false,"lowCpuThreshold":"5"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"},{"properties":{"exclude":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_advisoripcu3gifgpo44xopcegt2haqnc43nf5yrkalubotkoo25bdy2yfsy25eycg/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
string: '{"value":[{"properties":{"exclude":false,"lowCpuThreshold":"5","low_cpu_threshold":"5"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"},{"properties":{"exclude":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_advisor7hvijcv4aoxrbaafths7cpv5lugepkaffp5gyvwxeuollq5rwmglttc7c6a/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
headers:
cache-control:
- no-cache
content-length:
- '528'
- '552'
content-type:
- application/json; charset=utf-8
date:
- Mon, 21 Jun 2021 02:38:51 GMT
- Tue, 03 Oct 2023 22:03:57 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -59,21 +59,21 @@ interactions:
ParameterSetName:
- --low-cpu-threshold --exclude
User-Agent:
- AZURECLI/2.25.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)
- AZURECLI/2.53.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.10 (Windows-10-10.0.22621-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations?api-version=2020-01-01
response:
body:
string: '{"value":[{"properties":{"exclude":false,"lowCpuThreshold":"5"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"},{"properties":{"exclude":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_advisoripcu3gifgpo44xopcegt2haqnc43nf5yrkalubotkoo25bdy2yfsy25eycg/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
string: '{"value":[{"properties":{"exclude":false,"lowCpuThreshold":"5","low_cpu_threshold":"5"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"},{"properties":{"exclude":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_advisor7hvijcv4aoxrbaafths7cpv5lugepkaffp5gyvwxeuollq5rwmglttc7c6a/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
headers:
cache-control:
- no-cache
content-length:
- '528'
- '552'
content-type:
- application/json; charset=utf-8
date:
- Mon, 21 Jun 2021 02:38:51 GMT
- Tue, 03 Oct 2023 22:03:57 GMT
expires:
- '-1'
pragma:
Expand All @@ -89,7 +89,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-resource-requests:
- '598'
- '599'
status:
code: 200
message: OK
Expand All @@ -111,21 +111,21 @@ interactions:
ParameterSetName:
- --low-cpu-threshold --exclude
User-Agent:
- AZURECLI/2.25.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)
- AZURECLI/2.53.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.10 (Windows-10-10.0.22621-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default?api-version=2020-01-01
response:
body:
string: '{"properties":{"exclude":true,"lowCpuThreshold":"15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}'
string: '{"properties":{"exclude":true,"lowCpuThreshold":"15","low_cpu_threshold":"15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}'
headers:
cache-control:
- no-cache
content-length:
- '223'
- '248'
content-type:
- application/json; charset=utf-8
date:
- Mon, 21 Jun 2021 02:38:52 GMT
- Tue, 03 Oct 2023 22:03:59 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -157,21 +157,21 @@ interactions:
Connection:
- keep-alive
User-Agent:
- AZURECLI/2.25.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)
- AZURECLI/2.53.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.10 (Windows-10-10.0.22621-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations?api-version=2020-01-01
response:
body:
string: '{"value":[{"properties":{"exclude":true,"lowCpuThreshold":"15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
string: '{"value":[{"properties":{"exclude":true,"lowCpuThreshold":"15","low_cpu_threshold":"15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
headers:
cache-control:
- no-cache
content-length:
- '235'
- '260'
content-type:
- application/json; charset=utf-8
date:
- Mon, 21 Jun 2021 02:38:52 GMT
- Tue, 03 Oct 2023 22:03:58 GMT
expires:
- '-1'
pragma:
Expand All @@ -187,7 +187,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-resource-requests:
- '595'
- '599'
status:
code: 200
message: OK
Expand All @@ -205,21 +205,21 @@ interactions:
ParameterSetName:
- --low-cpu-threshold --include
User-Agent:
- AZURECLI/2.25.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)
- AZURECLI/2.53.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.10 (Windows-10-10.0.22621-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations?api-version=2020-01-01
response:
body:
string: '{"value":[{"properties":{"exclude":true,"lowCpuThreshold":"15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
string: '{"value":[{"properties":{"exclude":true,"lowCpuThreshold":"15","low_cpu_threshold":"15"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
headers:
cache-control:
- no-cache
content-length:
- '235'
- '260'
content-type:
- application/json; charset=utf-8
date:
- Mon, 21 Jun 2021 02:38:53 GMT
- Tue, 03 Oct 2023 22:03:58 GMT
expires:
- '-1'
pragma:
Expand All @@ -235,7 +235,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-resource-requests:
- '598'
- '599'
status:
code: 200
message: OK
Expand All @@ -257,21 +257,21 @@ interactions:
ParameterSetName:
- --low-cpu-threshold --include
User-Agent:
- AZURECLI/2.25.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)
- AZURECLI/2.53.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.10 (Windows-10-10.0.22621-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default?api-version=2020-01-01
response:
body:
string: '{"properties":{"exclude":false,"lowCpuThreshold":"5"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}'
string: '{"properties":{"exclude":false,"lowCpuThreshold":"5","low_cpu_threshold":"5"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}'
headers:
cache-control:
- no-cache
content-length:
- '223'
- '247'
content-type:
- application/json; charset=utf-8
date:
- Mon, 21 Jun 2021 02:38:55 GMT
- Tue, 03 Oct 2023 22:04:00 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -303,21 +303,21 @@ interactions:
Connection:
- keep-alive
User-Agent:
- AZURECLI/2.25.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)
- AZURECLI/2.53.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.10 (Windows-10-10.0.22621-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations?api-version=2020-01-01
response:
body:
string: '{"value":[{"properties":{"exclude":false,"lowCpuThreshold":"5"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"},{"properties":{"exclude":true},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_advisorfroqepzkdo4l3onsogex552pjtr7bzod2o6guvxvhlrnimkh7egi6f656ca/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
string: '{"value":[{"properties":{"exclude":false,"lowCpuThreshold":"5","low_cpu_threshold":"5"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
headers:
cache-control:
- no-cache
content-length:
- '527'
- '259'
content-type:
- application/json; charset=utf-8
date:
- Mon, 21 Jun 2021 02:38:55 GMT
- Tue, 03 Oct 2023 22:03:59 GMT
expires:
- '-1'
pragma:
Expand All @@ -333,7 +333,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-resource-requests:
- '597'
- '599'
status:
code: 200
message: OK
Expand All @@ -349,21 +349,21 @@ interactions:
Connection:
- keep-alive
User-Agent:
- AZURECLI/2.25.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)
- AZURECLI/2.53.0 azsdk-python-mgmt-advisor/9.0.0 Python/3.8.10 (Windows-10-10.0.22621-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations?api-version=2020-01-01
response:
body:
string: '{"value":[{"properties":{"exclude":false,"lowCpuThreshold":"5"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"},{"properties":{"exclude":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_advisorfroqepzkdo4l3onsogex552pjtr7bzod2o6guvxvhlrnimkh7egi6f656ca/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
string: '{"value":[{"properties":{"exclude":false,"lowCpuThreshold":"5","low_cpu_threshold":"5"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/configurations/default","type":"Microsoft.Advisor/Configurations","name":"default"}]}'
headers:
cache-control:
- no-cache
content-length:
- '528'
- '259'
content-type:
- application/json; charset=utf-8
date:
- Mon, 21 Jun 2021 02:38:56 GMT
- Tue, 03 Oct 2023 22:04:00 GMT
expires:
- '-1'
pragma:
Expand Down
26 changes: 26 additions & 0 deletions src/azure-cli/azure/cli/command_modules/cosmosdb/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,19 @@
short-summary: Add table names to restore
long-summary: |
Usage: --tables-to-restore tables=table1 [table2 ...]
- name: --minimal-tls-version
short-summary: Indicate the minimum allowed TLS version
long-summary: |
Usage: --minimal-tls-version TLSVersion
Default: Tls, except for Cassandra and Mongo APIs, which only work with Tls12
The accepted values for the minimal TLS version are 'Tls', 'Tls11', and 'Tls12', which correspond to the
TLS versions 1.0, 1.1, and 1.2.
- name: --enable-burst-capacity
short-summary: Flag to Enable/Disable burst capacity feature
long-summary: |
Usage: --enable-burst-capacity true
Default: false
The accepted values for the enable-burst-capacity are true and false.
examples:
- name: Creates a new Azure Cosmos DB database account. (autogenerated)
text: az cosmosdb create --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --subscription MySubscription
Expand Down Expand Up @@ -927,6 +940,19 @@
Default: single region account in the location of the specified resource group.
Failover priority values are 0 for write regions and greater than 0 for read regions. A failover priority value must be unique and less than the total number of regions.
Multiple locations can be specified by using more than one `--locations` argument.
- name: --minimal-tls-version
short-summary: Indicate the minimum allowed TLS version
long-summary: |
Usage: --minimal-tls-version TLSVersion
Default: Tls, except for Cassandra and Mongo APIs, which only work with Tls12
The accepted values for the minimal TLS version are 'Tls', 'Tls11', and 'Tls12', which correspond to the
TLS versions 1.0, 1.1, and 1.2.
- name: --enable-burst-capacity
short-summary: Flag to Enable/Disable burst capacity feature
long-summary: |
Usage: --enable-burst-capacity true
Default: false
The accepted values for the enable-burst-capacity are true and false.
examples:
- name: Update an Azure Cosmos DB database account. (autogenerated)
text: az cosmosdb update --capabilities EnableGremlin --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup
Expand Down
Loading