Skip to content

Commit

Permalink
add --sku to be consistent with account create
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinhzy committed Aug 3, 2023
1 parent 2364a65 commit 3b0a859
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/startaccountmigration", "version": "2023-01-01", "swagger": "mgmt-plane/storage/ResourceProviders/Microsoft.Storage/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMve2FjY291bnROYW1lfS9zdGFydEFjY291bnRNaWdyYXRpb24=/V/MjAyMy0wMS0wMQ=="}], "commandGroups": [{"name": "storage account migration", "commands": [{"name": "start", "version": "2023-01-01", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/startaccountmigration", "version": "2023-01-01", "swagger": "mgmt-plane/storage/ResourceProviders/Microsoft.Storage/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMve2FjY291bnROYW1lfS9zdGFydEFjY291bnRNaWdyYXRpb24=/V/MjAyMy0wMS0wMQ=="}], "argGroups": [{"name": "", "args": [{"type": "string", "var": "$Path.accountName", "options": ["account-name"], "required": true, "idPart": "name", "help": {"short": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only."}, "format": {"pattern": "^[a-z0-9]+$", "maxLength": 24, "minLength": 3}}, {"type": "ResourceGroupName", "var": "$Path.resourceGroupName", "options": ["g", "resource-group"], "required": true, "idPart": "resource_group"}, {"type": "SubscriptionId", "var": "$Path.subscriptionId", "options": ["subscription"], "required": true, "idPart": "subscription"}]}, {"name": "Parameters", "args": [{"type": "string", "var": "$parameters.name", "options": ["name"], "group": "Parameters", "help": {"short": "current value is 'default' for customer initiated migration"}}, {"type": "string", "var": "$parameters.type", "options": ["type"], "group": "Parameters", "help": {"short": "SrpAccountMigrationType in ARM contract which is 'accountMigrations'"}}]}, {"name": "Properties", "args": [{"type": "string", "var": "$parameters.properties.targetSkuName", "options": ["sku", "target-sku-name"], "required": true, "group": "Properties", "help": {"short": "Target sku name for the account"}, "enum": {"items": [{"name": "Premium_LRS", "value": "Premium_LRS"}, {"name": "Premium_ZRS", "value": "Premium_ZRS"}, {"name": "Standard_GRS", "value": "Standard_GRS"}, {"name": "Standard_GZRS", "value": "Standard_GZRS"}, {"name": "Standard_LRS", "value": "Standard_LRS"}, {"name": "Standard_RAGRS", "value": "Standard_RAGRS"}, {"name": "Standard_RAGZRS", "value": "Standard_RAGZRS"}, {"name": "Standard_ZRS", "value": "Standard_ZRS"}]}}]}], "operations": [{"longRunning": {"finalStateVia": "location"}, "operationId": "StorageAccounts_CustomerInitiatedMigration", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", "request": {"method": "post", "path": {"params": [{"type": "string", "name": "accountName", "arg": "$Path.accountName", "required": true, "format": {"pattern": "^[a-z0-9]+$", "maxLength": 24, "minLength": 3}}, {"type": "string", "name": "resourceGroupName", "arg": "$Path.resourceGroupName", "required": true, "format": {"pattern": "^[-\\w\\._\\(\\)]+$", "maxLength": 90, "minLength": 1}}, {"type": "string", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true, "format": {"minLength": 1}}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2023-01-01"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}, "body": {"json": {"schema": {"type": "object", "name": "parameters", "required": true, "props": [{"type": "string", "name": "name", "arg": "$parameters.name"}, {"type": "object", "name": "properties", "required": true, "props": [{"type": "string", "name": "targetSkuName", "arg": "$parameters.properties.targetSkuName", "required": true, "enum": {"items": [{"value": "Premium_LRS"}, {"value": "Premium_ZRS"}, {"value": "Standard_GRS"}, {"value": "Standard_GZRS"}, {"value": "Standard_LRS"}, {"value": "Standard_RAGRS"}, {"value": "Standard_RAGZRS"}, {"value": "Standard_ZRS"}]}}], "clientFlatten": true}, {"type": "string", "name": "type", "arg": "$parameters.type"}], "clientFlatten": true}}}}, "responses": [{"statusCode": [200]}, {"statusCode": [202], "header": {"items": [{"name": "Location"}]}}, {"isError": true, "body": {"json": {"schema": {"type": "@MgmtErrorFormat"}}}}]}}], "confirmation": ""}]}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version='1.0' encoding='utf-8'?>
<CodeGen plane="mgmt-plane">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/startaccountmigration" version="2023-01-01" swagger="mgmt-plane/storage/ResourceProviders/Microsoft.Storage/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMve2FjY291bnROYW1lfS9zdGFydEFjY291bnRNaWdyYXRpb24=/V/MjAyMy0wMS0wMQ=="/>
<commandGroup name="storage account migration">
<command name="start" version="2023-01-01" confirmation="">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/startaccountmigration" version="2023-01-01" swagger="mgmt-plane/storage/ResourceProviders/Microsoft.Storage/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMve2FjY291bnROYW1lfS9zdGFydEFjY291bnRNaWdyYXRpb24=/V/MjAyMy0wMS0wMQ=="/>
<argGroup name="">
<arg type="string" var="$Path.accountName" options="account-name" required="True" idPart="name">
<help short="The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only."/>
<format pattern="^[a-z0-9]+$" maxLength="24" minLength="3"/>
</arg>
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
</argGroup>
<argGroup name="Parameters">
<arg type="string" var="$parameters.name" options="name" group="Parameters">
<help short="current value is 'default' for customer initiated migration"/>
</arg>
<arg type="string" var="$parameters.type" options="type" group="Parameters">
<help short="SrpAccountMigrationType in ARM contract which is 'accountMigrations'"/>
</arg>
</argGroup>
<argGroup name="Properties">
<arg type="string" var="$parameters.properties.targetSkuName" options="target-sku-name sku" required="True" group="Properties">
<help short="Target sku name for the account"/>
<enum>
<item name="Premium_LRS" value="&quot;Premium_LRS&quot;"/>
<item name="Premium_ZRS" value="&quot;Premium_ZRS&quot;"/>
<item name="Standard_GRS" value="&quot;Standard_GRS&quot;"/>
<item name="Standard_GZRS" value="&quot;Standard_GZRS&quot;"/>
<item name="Standard_LRS" value="&quot;Standard_LRS&quot;"/>
<item name="Standard_RAGRS" value="&quot;Standard_RAGRS&quot;"/>
<item name="Standard_RAGZRS" value="&quot;Standard_RAGZRS&quot;"/>
<item name="Standard_ZRS" value="&quot;Standard_ZRS&quot;"/>
</enum>
</arg>
</argGroup>
<operation operationId="StorageAccounts_CustomerInitiatedMigration">
<longRunning finalStateVia="location"/>
<http path="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration">
<request method="post">
<path>
<param type="string" name="accountName" arg="$Path.accountName" required="True">
<format pattern="^[a-z0-9]+$" maxLength="24" minLength="3"/>
</param>
<param type="string" name="resourceGroupName" arg="$Path.resourceGroupName" required="True">
<format pattern="^[-\w\._\(\)]+$" maxLength="90" minLength="1"/>
</param>
<param type="string" name="subscriptionId" arg="$Path.subscriptionId" required="True">
<format minLength="1"/>
</param>
</path>
<query>
<const readOnly="True" const="True" type="string" name="api-version" required="True">
<default value="&quot;2023-01-01&quot;"/>
<format minLength="1"/>
</const>
</query>
<body>
<json>
<schema type="object" name="parameters" required="True" clientFlatten="True">
<prop type="string" name="name" arg="$parameters.name"/>
<prop type="object" name="properties" required="True" clientFlatten="True">
<prop type="string" name="targetSkuName" arg="$parameters.properties.targetSkuName" required="True">
<enum>
<item value="&quot;Premium_LRS&quot;"/>
<item value="&quot;Premium_ZRS&quot;"/>
<item value="&quot;Standard_GRS&quot;"/>
<item value="&quot;Standard_GZRS&quot;"/>
<item value="&quot;Standard_LRS&quot;"/>
<item value="&quot;Standard_RAGRS&quot;"/>
<item value="&quot;Standard_RAGZRS&quot;"/>
<item value="&quot;Standard_ZRS&quot;"/>
</enum>
</prop>
</prop>
<prop type="string" name="type" arg="$parameters.type"/>
</schema>
</json>
</body>
</request>
<response statusCode="200"/>
<response statusCode="202">
<header>
<item name="Location"/>
</header>
</response>
<response isError="True">
<body>
<json>
<schema type="@MgmtErrorFormat"/>
</json>
</body>
</response>
</http>
</operation>
</command>
</commandGroup>
</CodeGen>

0 comments on commit 3b0a859

Please sign in to comment.