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

[SQL] az mi create/update: Add optional parameter --database-format and --pricing-model for SQL Managed Server resource #28173

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 @@ -20,7 +20,7 @@ interactions:
User-Agent:
- AZURECLI/2.54.0 azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.0 (Windows-10-10.0.17763-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertA000002?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertA000002?api-version=2023-05-01-preview
response:
body:
string: '{"operation":"UpsertLogicalServer","startTime":"2023-11-21T15:19:34.257Z"}'
Expand Down Expand Up @@ -482,7 +482,7 @@ interactions:
User-Agent:
- AZURECLI/2.54.0 azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.0 (Windows-10-10.0.17763-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertA000002?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertA000002?api-version=2023-05-01-preview
response:
body:
string: '{"kind":"v12.0","properties":{"administratorLogin":"admin123","version":"12.0","state":"Ready","fullyQualifiedDomainName":"clitestservermatricalertapvgwx2vfdywvcn5vwivxawa462dkcobp3ce4e.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"None","publicNetworkAccess":"Enabled","restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertapvgwx2vfdywvcn5vwivxawa462dkcobp3ce4e","name":"clitestservermatricalertapvgwx2vfdywvcn5vwivxawa462dkcobp3ce4e","type":"Microsoft.Sql/servers"}'
Expand Down Expand Up @@ -528,7 +528,7 @@ interactions:
User-Agent:
- AZURECLI/2.54.0 azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.0 (Windows-10-10.0.17763-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertA000002?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertA000002?api-version=2023-05-01-preview
response:
body:
string: '{"kind":"v12.0","properties":{"administratorLogin":"admin123","version":"12.0","state":"Ready","fullyQualifiedDomainName":"clitestservermatricalertapvgwx2vfdywvcn5vwivxawa462dkcobp3ce4e.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"None","publicNetworkAccess":"Enabled","restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertapvgwx2vfdywvcn5vwivxawa462dkcobp3ce4e","name":"clitestservermatricalertapvgwx2vfdywvcn5vwivxawa462dkcobp3ce4e","type":"Microsoft.Sql/servers"}'
Expand Down Expand Up @@ -574,7 +574,7 @@ interactions:
User-Agent:
- AZURECLI/2.54.0 azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.0 (Windows-10-10.0.17763-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertA000002?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertA000002?api-version=2023-05-01-preview
response:
body:
string: '{"kind":"v12.0","properties":{"administratorLogin":"admin123","version":"12.0","state":"Ready","fullyQualifiedDomainName":"clitestservermatricalertapvgwx2vfdywvcn5vwivxawa462dkcobp3ce4e.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"None","publicNetworkAccess":"Enabled","restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v1_2000001/providers/Microsoft.Sql/servers/clitestservermatricalertapvgwx2vfdywvcn5vwivxawa462dkcobp3ce4e","name":"clitestservermatricalertapvgwx2vfdywvcn5vwivxawa462dkcobp3ce4e","type":"Microsoft.Sql/servers"}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/servers/cli-test-resource-000006?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/servers/cli-test-resource-000006?api-version=2023-05-01-preview
response:
body:
string: '{"operation":"UpsertLogicalServer","startTime":"2023-12-14T09:38:41.693Z"}'
headers:
azure-asyncoperation:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-02-01-preview
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-05-01-preview
cache-control:
- no-cache
content-length:
Expand All @@ -81,7 +81,7 @@ interactions:
expires:
- '-1'
location:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverOperationResults/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-02-01-preview
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverOperationResults/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-05-01-preview
pragma:
- no-cache
server:
Expand Down Expand Up @@ -111,7 +111,7 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-05-01-preview
response:
body:
string: '{"name":"f490f76d-8974-4b22-b1d2-d100a89b452c","status":"InProgress","startTime":"2023-12-14T09:38:41.693Z"}'
Expand Down Expand Up @@ -157,7 +157,7 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-05-01-preview
response:
body:
string: '{"name":"f490f76d-8974-4b22-b1d2-d100a89b452c","status":"InProgress","startTime":"2023-12-14T09:38:41.693Z"}'
Expand Down Expand Up @@ -203,7 +203,7 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-05-01-preview
response:
body:
string: '{"name":"f490f76d-8974-4b22-b1d2-d100a89b452c","status":"InProgress","startTime":"2023-12-14T09:38:41.693Z"}'
Expand Down Expand Up @@ -249,7 +249,7 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-05-01-preview
response:
body:
string: '{"name":"f490f76d-8974-4b22-b1d2-d100a89b452c","status":"InProgress","startTime":"2023-12-14T09:38:41.693Z"}'
Expand Down Expand Up @@ -295,7 +295,7 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-05-01-preview
response:
body:
string: '{"name":"f490f76d-8974-4b22-b1d2-d100a89b452c","status":"InProgress","startTime":"2023-12-14T09:38:41.693Z"}'
Expand Down Expand Up @@ -341,7 +341,7 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-05-01-preview
response:
body:
string: '{"name":"f490f76d-8974-4b22-b1d2-d100a89b452c","status":"InProgress","startTime":"2023-12-14T09:38:41.693Z"}'
Expand Down Expand Up @@ -387,7 +387,7 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-05-01-preview
response:
body:
string: '{"name":"f490f76d-8974-4b22-b1d2-d100a89b452c","status":"InProgress","startTime":"2023-12-14T09:38:41.693Z"}'
Expand Down Expand Up @@ -433,7 +433,7 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/locations/eastus/serverAzureAsyncOperation/f490f76d-8974-4b22-b1d2-d100a89b452c?api-version=2023-05-01-preview
response:
body:
string: '{"name":"f490f76d-8974-4b22-b1d2-d100a89b452c","status":"Succeeded","startTime":"2023-12-14T09:38:41.693Z"}'
Expand Down Expand Up @@ -479,7 +479,7 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/servers/cli-test-resource-000006?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/servers/cli-test-resource-000006?api-version=2023-05-01-preview
response:
body:
string: '{"kind":"v12.0","properties":{"administratorLogin":"admin123","version":"12.0","state":"Ready","fullyQualifiedDomainName":"cli-test-resource-000006.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"None","publicNetworkAccess":"Enabled","restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/servers/cli-test-resource-000006","name":"cli-test-resource-000006","type":"Microsoft.Sql/servers"}'
Expand Down Expand Up @@ -525,7 +525,7 @@ interactions:
User-Agent:
- AZURECLI/2.55.0 (PIP) azsdk-python-mgmt-sql/4.0.0b13 Python/3.8.10 (Windows-10-10.0.19045-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/servers/cli-test-resource-000006?api-version=2023-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/servers/cli-test-resource-000006?api-version=2023-05-01-preview
response:
body:
string: '{"kind":"v12.0","properties":{"administratorLogin":"admin123","version":"12.0","state":"Ready","fullyQualifiedDomainName":"cli-test-resource-000006.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"None","publicNetworkAccess":"Enabled","restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_private_endpoint_connection_sql_server000001/providers/Microsoft.Sql/servers/cli-test-resource-000006","name":"cli-test-resource-000006","type":"Microsoft.Sql/servers"}'
Expand Down
4 changes: 4 additions & 0 deletions src/azure-cli/azure/cli/command_modules/sql/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,8 @@
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} -z false
- name: Create managed instance with instance pool name
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --instance-pool-name myinstancepool
- name: Create managed instance with database format and pricing model
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --database-format Regular --pricing-model AlwaysUpToDate
"""

helps['sql mi delete'] = """
Expand Down Expand Up @@ -1031,6 +1033,8 @@
text: az sql mi update -g mygroup -n myinstance --instance-pool-name myinstancepool
- name: Move managed instance out of instance pool
text: az sql mi update -g mygroup -n myinstance --remove instancePoolId --capacity vcorecapacity
- name: Update mi database format and pricing model
text: az sql mi update -g mygroup -n myinstance --database-format Regular --pricing-model AlwaysUpToDate
"""

helps['sql midb'] = """
Expand Down
Loading