-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #587 from Jing-song/jins-ext-subscription
Migrate subscription to AAZ
- Loading branch information
Showing
5 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# [Command] _account create_ | ||
|
||
Create a subscription. | ||
|
||
## Versions | ||
|
||
### [2018-03-01-preview](/Resources/mgmt-plane/L3Byb3ZpZGVycy9taWNyb3NvZnQuYmlsbGluZy9lbnJvbGxtZW50YWNjb3VudHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5zdWJzY3JpcHRpb24vY3JlYXRlc3Vic2NyaXB0aW9u/2018-03-01-preview.xml) **Preview** | ||
|
||
<!-- mgmt-plane /providers/microsoft.billing/enrollmentaccounts/{}/providers/microsoft.subscription/createsubscription 2018-03-01-preview --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...vdmlkZXJzL21pY3Jvc29mdC5zdWJzY3JpcHRpb24vY3JlYXRlc3Vic2NyaXB0aW9u/2018-03-01-preview.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"plane": "mgmt-plane", "resources": [{"id": "/providers/microsoft.billing/enrollmentaccounts/{}/providers/microsoft.subscription/createsubscription", "version": "2018-03-01-preview", "swagger": "mgmt-plane/subscription/ResourceProviders/Microsoft.Subscription/Paths/L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9lbnJvbGxtZW50QWNjb3VudHMve2Vucm9sbG1lbnRBY2NvdW50TmFtZX0vcHJvdmlkZXJzL01pY3Jvc29mdC5TdWJzY3JpcHRpb24vY3JlYXRlU3Vic2NyaXB0aW9u/V/MjAxOC0wMy0wMS1wcmV2aWV3"}], "commandGroups": [{"name": "account", "commands": [{"name": "create", "version": "2018-03-01-preview", "resources": [{"id": "/providers/microsoft.billing/enrollmentaccounts/{}/providers/microsoft.subscription/createsubscription", "version": "2018-03-01-preview", "swagger": "mgmt-plane/subscription/ResourceProviders/Microsoft.Subscription/Paths/L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9lbnJvbGxtZW50QWNjb3VudHMve2Vucm9sbG1lbnRBY2NvdW50TmFtZX0vcHJvdmlkZXJzL01pY3Jvc29mdC5TdWJzY3JpcHRpb24vY3JlYXRlU3Vic2NyaXB0aW9u/V/MjAxOC0wMy0wMS1wcmV2aWV3"}], "argGroups": [{"name": "", "args": [{"type": "string", "var": "$Path.enrollmentAccountName", "options": ["enrollment-account-name", "enrollment-account-object-id"], "required": true, "group": "", "help": {"short": "The name of the enrollment account to which the subscription will be billed."}}, {"type": "object", "var": "$body.additionalParameters", "options": ["additional-parameters"], "group": "", "help": {"short": "Additional, untyped parameters to support custom subscription creation scenarios."}, "additionalProps": {"item": {"type": "object", "additionalProps": {"anyType": true}}}}, {"type": "string", "var": "$body.displayName", "options": ["display-name"], "group": "", "help": {"short": "The display name of the subscription."}}, {"type": "string", "var": "$body.offerType", "options": ["offer-type"], "group": "", "help": {"short": "The offer type of the subscription. For example, MS-AZR-0017P(EnterpriseAgreement) and MS-AZR-0148P(EnterpriseAgreement devTest) are available. Allowed values: MS-AZR-0017P, MS-AZR-0148P, MS-AZR-USGOV-0015P, MS-AZR-USGOV-0017P, MS-AZR-USGOV-0148P."}, "enum": {"items": [{"name": "MS-AZR-0017P", "value": "MS-AZR-0017P"}, {"name": "MS-AZR-0148P", "value": "MS-AZR-0148P"}, {"name": "MS-AZR-USGOV-0015P", "value": "MS-AZR-USGOV-0015P"}, {"name": "MS-AZR-USGOV-0017P", "value": "MS-AZR-USGOV-0017P"}, {"name": "MS-AZR-USGOV-0148P", "value": "MS-AZR-USGOV-0148P"}]}}, {"type": "array<object>", "var": "$body.owners", "options": ["owners"], "group": "", "help": {"short": "The list of principals that should be granted Owner access on the subscription. Principals should be of type User, Service Principal or Security Group."}, "item": {"type": "object", "args": [{"type": "string", "var": "$body.owners[].objectId", "options": ["object-id"], "required": true, "help": {"short": "Object id of the Principal"}}]}}]}], "operations": [{"longRunning": {"finalStateVia": "azure-async-operation"}, "operationId": "SubscriptionFactory_CreateSubscriptionInEnrollmentAccount", "http": {"path": "/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountName}/providers/Microsoft.Subscription/createSubscription", "request": {"method": "post", "path": {"params": [{"type": "string", "name": "enrollmentAccountName", "arg": "$Path.enrollmentAccountName", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2018-03-01-preview"}, "type": "string", "name": "api-version", "required": true}]}, "body": {"json": {"schema": {"type": "object", "name": "body", "required": true, "props": [{"type": "object", "name": "additionalParameters", "arg": "$body.additionalParameters", "additionalProps": {"item": {"type": "object", "additionalProps": {"anyType": true}}}}, {"type": "string", "name": "displayName", "arg": "$body.displayName"}, {"type": "string", "name": "offerType", "arg": "$body.offerType", "enum": {"items": [{"value": "MS-AZR-0017P"}, {"value": "MS-AZR-0148P"}, {"value": "MS-AZR-USGOV-0015P"}, {"value": "MS-AZR-USGOV-0017P"}, {"value": "MS-AZR-USGOV-0148P"}]}}, {"type": "array<object>", "name": "owners", "arg": "$body.owners", "item": {"type": "object", "props": [{"type": "string", "name": "objectId", "arg": "$body.owners[].objectId", "required": true}]}}], "clientFlatten": true}}}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"type": "string", "name": "subscriptionLink"}]}}}}, {"statusCode": [202], "header": {"items": [{"name": "Location"}, {"name": "Retry-After"}]}}, {"isError": true, "body": {"json": {"schema": {"type": "@ODataV4Format"}}}}]}}], "outputs": [{"type": "object", "ref": "$Instance", "clientFlatten": true}], "confirmation": ""}]}]} |
109 changes: 109 additions & 0 deletions
109
...JvdmlkZXJzL21pY3Jvc29mdC5zdWJzY3JpcHRpb24vY3JlYXRlc3Vic2NyaXB0aW9u/2018-03-01-preview.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<CodeGen plane="mgmt-plane"> | ||
<resource id="/providers/microsoft.billing/enrollmentaccounts/{}/providers/microsoft.subscription/createsubscription" version="2018-03-01-preview" swagger="mgmt-plane/subscription/ResourceProviders/Microsoft.Subscription/Paths/L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9lbnJvbGxtZW50QWNjb3VudHMve2Vucm9sbG1lbnRBY2NvdW50TmFtZX0vcHJvdmlkZXJzL01pY3Jvc29mdC5TdWJzY3JpcHRpb24vY3JlYXRlU3Vic2NyaXB0aW9u/V/MjAxOC0wMy0wMS1wcmV2aWV3"/> | ||
<commandGroup name="account"> | ||
<command name="create" version="2018-03-01-preview" confirmation=""> | ||
<resource id="/providers/microsoft.billing/enrollmentaccounts/{}/providers/microsoft.subscription/createsubscription" version="2018-03-01-preview" swagger="mgmt-plane/subscription/ResourceProviders/Microsoft.Subscription/Paths/L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9lbnJvbGxtZW50QWNjb3VudHMve2Vucm9sbG1lbnRBY2NvdW50TmFtZX0vcHJvdmlkZXJzL01pY3Jvc29mdC5TdWJzY3JpcHRpb24vY3JlYXRlU3Vic2NyaXB0aW9u/V/MjAxOC0wMy0wMS1wcmV2aWV3"/> | ||
<argGroup name=""> | ||
<arg type="string" var="$Path.enrollmentAccountName" options="enrollment-account-object-id enrollment-account-name" required="True" group=""> | ||
<help short="The name of the enrollment account to which the subscription will be billed."/> | ||
</arg> | ||
<arg type="object" var="$body.additionalParameters" options="additional-parameters" group=""> | ||
<help short="Additional, untyped parameters to support custom subscription creation scenarios."/> | ||
<additionalProp> | ||
<item type="object"> | ||
<additionalProp anyType="True"/> | ||
</item> | ||
</additionalProp> | ||
</arg> | ||
<arg type="string" var="$body.displayName" options="display-name" group=""> | ||
<help short="The display name of the subscription."/> | ||
</arg> | ||
<arg type="string" var="$body.offerType" options="offer-type" group=""> | ||
<help short="The offer type of the subscription. For example, MS-AZR-0017P(EnterpriseAgreement) and MS-AZR-0148P(EnterpriseAgreement devTest) are available. Allowed values: MS-AZR-0017P, MS-AZR-0148P, MS-AZR-USGOV-0015P, MS-AZR-USGOV-0017P, MS-AZR-USGOV-0148P."/> | ||
<enum> | ||
<item name="MS-AZR-0017P" value=""MS-AZR-0017P""/> | ||
<item name="MS-AZR-0148P" value=""MS-AZR-0148P""/> | ||
<item name="MS-AZR-USGOV-0015P" value=""MS-AZR-USGOV-0015P""/> | ||
<item name="MS-AZR-USGOV-0017P" value=""MS-AZR-USGOV-0017P""/> | ||
<item name="MS-AZR-USGOV-0148P" value=""MS-AZR-USGOV-0148P""/> | ||
</enum> | ||
</arg> | ||
<arg type="array<object>" var="$body.owners" options="owners" group=""> | ||
<help short="The list of principals that should be granted Owner access on the subscription. Principals should be of type User, Service Principal or Security Group."/> | ||
<item type="object"> | ||
<arg type="string" var="$body.owners[].objectId" options="object-id" required="True"> | ||
<help short="Object id of the Principal"/> | ||
</arg> | ||
</item> | ||
</arg> | ||
</argGroup> | ||
<operation operationId="SubscriptionFactory_CreateSubscriptionInEnrollmentAccount"> | ||
<longRunning finalStateVia="azure-async-operation"/> | ||
<http path="/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountName}/providers/Microsoft.Subscription/createSubscription"> | ||
<request method="post"> | ||
<path> | ||
<param type="string" name="enrollmentAccountName" arg="$Path.enrollmentAccountName" required="True"/> | ||
</path> | ||
<query> | ||
<const readOnly="True" const="True" type="string" name="api-version" required="True"> | ||
<default value=""2018-03-01-preview""/> | ||
</const> | ||
</query> | ||
<body> | ||
<json> | ||
<schema type="object" name="body" required="True" clientFlatten="True"> | ||
<prop type="object" name="additionalParameters" arg="$body.additionalParameters"> | ||
<additionalProp> | ||
<item type="object"> | ||
<additionalProp anyType="True"/> | ||
</item> | ||
</additionalProp> | ||
</prop> | ||
<prop type="string" name="displayName" arg="$body.displayName"/> | ||
<prop type="string" name="offerType" arg="$body.offerType"> | ||
<enum> | ||
<item value=""MS-AZR-0017P""/> | ||
<item value=""MS-AZR-0148P""/> | ||
<item value=""MS-AZR-USGOV-0015P""/> | ||
<item value=""MS-AZR-USGOV-0017P""/> | ||
<item value=""MS-AZR-USGOV-0148P""/> | ||
</enum> | ||
</prop> | ||
<prop type="array<object>" name="owners" arg="$body.owners"> | ||
<item type="object"> | ||
<prop type="string" name="objectId" arg="$body.owners[].objectId" required="True"/> | ||
</item> | ||
</prop> | ||
</schema> | ||
</json> | ||
</body> | ||
</request> | ||
<response statusCode="200"> | ||
<body> | ||
<json var="$Instance"> | ||
<schema type="object"> | ||
<prop type="string" name="subscriptionLink"/> | ||
</schema> | ||
</json> | ||
</body> | ||
</response> | ||
<response statusCode="202"> | ||
<header> | ||
<item name="Location"/> | ||
<item name="Retry-After"/> | ||
</header> | ||
</response> | ||
<response isError="True"> | ||
<body> | ||
<json> | ||
<schema type="@ODataV4Format"/> | ||
</json> | ||
</body> | ||
</response> | ||
</http> | ||
</operation> | ||
<output type="object" ref="$Instance" clientFlatten="True"/> | ||
</command> | ||
</commandGroup> | ||
</CodeGen> |