-
Notifications
You must be signed in to change notification settings - Fork 1.6k
created subscription extensions #1202
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
Merged
Merged
Changes from all commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
9a40ac5
created subscription extensions
432242f
added sdk
236a953
updated with recent version o autorest.cli
9c60e6b
actions
a7d3ccb
actions -> action
3cf6857
generated with new version
ee2f5c9
regenerated
8e5a1ac
fix params
d6d4af3
moved files into the generated folder
d0024f6
fix path
61b7d5d
fixed more imports
7fb75a1
empty line at the end of file
dcd33d7
fixed a few sanity issues
bdcdb99
sanity fixes
1c66a9a
adding entry to CODEOWNERS
1475655
added license header to actions
2001c99
examples & test fixes
01931ff
regenerated with proper tag
8e2bdbf
removed test for now
478dafc
empty init
865e932
import custom properly
626cf8d
fixed problem
26612b3
fixed custom
05d424d
action
1a5484f
updated commands & vendored sdks
95fafb5
relative import
828847b
missing __init__.py in vendored_sdks
ab44a31
regenerated with flattened sdk
0e76196
now actions more complete
78d6755
action is fixed now
8dc461e
removed unnecessary stuff
b8aa386
fixes
170b491
sanity fixes
bd75618
wildcard imports
aa40879
fixed vendored_sdks location
6dfbc99
unused imports again
9ce42ff
fixed import
7fd851f
fixed sanity
2e45ec5
try to disable flake8
a4933cb
f403
84c1a60
two spaces
dc71de7
moved sdk
6eaebd2
removed old, added .flake8
707c6da
another try
673d2f6
try to dump checked files
6a59e0c
navy's changes
2b2e72b
two more fixes
36d210b
fixes
adf2ec2
sdk is regenerated
4a6689d
updated commands
06a49de
fixed client factory
dcf83aa
hack for config
ddd76a3
undo config thing
2e74fed
add credential thingy
24d3bcf
fix for owner
63d179e
fixed body_owners
0e040eb
fix
d976dd1
fixes
63d25e9
one more space
3e28e39
more sanity
3877164
subscription_id help
55ce4c7
removed pass
d78d021
fixed examples
a886bd5
fixing examples
374ae3a
example fixes
806d0d3
one more fix
cefc20e
fix to manual part of sdk
0112cb0
fix import
b908042
try
b9da2b4
too many blank lines
873cab4
fixed help
5ac0ac4
unused import
23c47b4
updated example descriptions
754b9aa
confirmation and isexperimental
e1f803d
subscription create
fcb8234
one more
905b88e
removed isPreview
795fc55
one more blank
a9ea036
updated
9f78100
undo one change
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -97,3 +97,5 @@ | |
| /src/databox/ @jsntcy | ||
|
|
||
| /src/hpc-cache/ @qianwens | ||
|
|
||
| /src/account/ @zikalino | ||
This file contains hidden or 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,8 @@ | ||
| .. :changelog: | ||
|
|
||
| Release History | ||
| =============== | ||
|
|
||
| 0.1.0 | ||
| ++++++ | ||
| * Initial release. |
This file contains hidden or 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,5 @@ | ||
| Microsoft Azure CLI 'account' Extension | ||
| ========================================== | ||
|
|
||
| This package is for the 'account' extension. | ||
| i.e. 'az account' |
This file contains hidden or 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,3 @@ | ||
| [flake8] | ||
| exclude = | ||
| vendored_sdks |
This file contains hidden or 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,41 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from azure.cli.core import AzCommandsLoader | ||
| from azext_account.generated._help import helps # pylint: disable=unused-import | ||
|
|
||
|
|
||
| class SubscriptionClientCommandsLoader(AzCommandsLoader): | ||
|
|
||
| def __init__(self, cli_ctx=None): | ||
| from azure.cli.core.commands import CliCommandType | ||
| from azext_account.generated._client_factory import cf_account | ||
| account_custom = CliCommandType( | ||
| operations_tmpl='azext_account.custom#{}', | ||
| client_factory=cf_account) | ||
| super(SubscriptionClientCommandsLoader, self).__init__(cli_ctx=cli_ctx, | ||
| custom_command_type=account_custom) | ||
|
|
||
| def load_command_table(self, args): | ||
| from azext_account.generated.commands import load_command_table | ||
| load_command_table(self, args) | ||
| try: | ||
| from azext_account.manual.commands import load_command_table as load_command_table_manual | ||
| load_command_table_manual(self, args) | ||
| except ImportError: | ||
| pass | ||
| return self.command_table | ||
|
|
||
| def load_arguments(self, command): | ||
| from azext_account.generated._params import load_arguments | ||
| load_arguments(self, command) | ||
| try: | ||
| from azext_account.manual._params import load_arguments as load_arguments_manual | ||
| load_arguments_manual(self, command) | ||
| except ImportError: | ||
| pass | ||
|
|
||
|
|
||
| COMMAND_LOADER_CLS = SubscriptionClientCommandsLoader |
This file contains hidden or 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,13 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: disable=wildcard-import | ||
| # pylint: disable=unused-wildcard-import | ||
|
|
||
| from azext_account.generated.action import * # noqa: F403 | ||
| try: | ||
| from azext_account.manual.action import * # noqa: F403 | ||
| except ImportError: | ||
| pass |
This file contains hidden or 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,4 @@ | ||
| { | ||
| "azext.isExperimental": true, | ||
| "azext.minCliCoreVersion": "2.3.1" | ||
| } |
This file contains hidden or 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,13 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: disable=wildcard-import | ||
| # pylint: disable=unused-wildcard-import | ||
|
|
||
| from azext_account.generated.custom import * # noqa: F403 | ||
| try: | ||
| from azext_account.manual.custom import * # noqa: F403 | ||
| except ImportError: | ||
| pass |
This file contains hidden or 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,4 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- |
This file contains hidden or 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,24 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| def cf_account(cli_ctx, *_): | ||
| from azure.cli.core.commands.client_factory import _get_mgmt_service_client | ||
| from ..vendored_sdks.subscription import SubscriptionClient | ||
| return _get_mgmt_service_client(cli_ctx, SubscriptionClient, | ||
| subscription_bound=False, | ||
| base_url_bound=False)[0] | ||
|
|
||
|
|
||
| def cf_subscription(cli_ctx, *_): | ||
| return cf_account(cli_ctx).subscription | ||
|
|
||
|
|
||
| def cf_subscription_operation(cli_ctx, *_): | ||
| return cf_account(cli_ctx).subscription_operation | ||
|
|
||
|
|
||
| def cf_operation(cli_ctx, *_): | ||
| return cf_account(cli_ctx).operation |
This file contains hidden or 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,80 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
| # pylint: disable=line-too-long | ||
| # pylint: disable=too-many-lines | ||
|
|
||
| from knack.help_files import helps | ||
|
|
||
|
|
||
| helps['account subscription'] = """ | ||
| type: group | ||
| short-summary: Manage subscriptions | ||
| """ | ||
|
|
||
| helps['account subscription create'] = """ | ||
| type: command | ||
| short-summary: Create a new WebDirect or EA Azure subscription. | ||
| examples: | ||
| - name: Create subscription | ||
| text: |- | ||
| az account subscription create --billing-account-name \\ | ||
| "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_XXXX-XX-XX" \\ | ||
| --billing-profile-name "27VR-HDWX-BG7-TGB" --cost-center "135366376" --display-name \\ | ||
| "Contoso MCA subscription" --owner xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \\ | ||
| --sku-id "0001" --invoice-section-name "JGF7-NSBG-PJA-TGB" | ||
| """ | ||
|
|
||
|
|
||
| helps['account subscription create-in-enrollment-account'] = """ | ||
| type: command | ||
| short-summary: Create subscription in enrolment account | ||
| examples: | ||
| - name: Create subscription in enrollment account | ||
| text: |- | ||
| az account subscription create-in-enrollment-account --display-name \\ | ||
| "Test Ea Azure Sub" --offer-type "MS-AZR-0017P" --owners \\ | ||
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \\ | ||
| xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --enrollment-account-name \\ | ||
| "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| """ | ||
|
|
||
| helps['account subscription create-csp'] = """ | ||
| type: command | ||
| short-summary: Create a new CSP subscription. | ||
| examples: | ||
| - name: Create CSP subscription | ||
| text: |- | ||
| az account subscription create-csp --billing-account-name \\ | ||
| "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_XXXX-XX-XX" \\ | ||
| --display-name "Contoso MCA subscription" --sku-id "0001" --customer-name \\ | ||
| "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| """ | ||
|
|
||
| helps['account subscription rename'] = """ | ||
| type: command | ||
| short-summary: Rename subscription | ||
| examples: | ||
| - name: Rename subscription | ||
| text: |- | ||
| az account subscription rename --subscription-id "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| """ | ||
|
|
||
| helps['account subscription cancel'] = """ | ||
| type: command | ||
| short-summary: Cancel subscription | ||
| examples: | ||
| - name: Cancel subscription | ||
| text: |- | ||
| az account subscription cancel --subscription-id "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| """ | ||
|
|
||
| helps['account subscription enable'] = """ | ||
| type: command | ||
| short-summary: Enable subscription | ||
| examples: | ||
| - name: Enable subscription | ||
| text: |- | ||
| az account subscription enable --subscription-id "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| """ | ||
This file contains hidden or 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,48 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
| # pylint: disable=line-too-long | ||
| # pylint: disable=too-many-lines | ||
| # pylint: disable=too-many-statements | ||
|
|
||
| from azure.cli.core.commands.parameters import ( | ||
| get_enum_type | ||
| ) | ||
|
|
||
|
|
||
| def load_arguments(self, _): | ||
|
|
||
| with self.argument_context('account subscription create') as c: | ||
| c.argument('billing_account_name', help='The name of the Microsoft Customer Agreement billing account for which you want to create the subscription.') | ||
| c.argument('billing_profile_name', help='The name of the billing profile in the billing account for which you want to create the subscription.') | ||
| c.argument('invoice_section_name', help='The name of the invoice section in the billing account for which you want to create the subscription.') | ||
| c.argument('display_name', help='The friendly name of the subscription.') | ||
| c.argument('sku_id', help='The SKU ID of the Azure plan. Azure plan determines the pricing and service-level agreement of the subscription. Use 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for DevTest.') | ||
| c.argument('cost_center', help='If set, the cost center will show up on the Azure usage and charges file.') | ||
| c.argument('owner', help='Active Directory Principal who’ll get owner access on the new subscription.') | ||
| c.argument('management_group_id', help='The identifier of the management group to which this subscription will be associated.') | ||
|
|
||
| with self.argument_context('account subscription create-in-enrollment-account') as c: | ||
| c.argument('enrollment_account_name', help='The name of the enrollment account to which the subscription will be billed.') | ||
| c.argument('display_name', help='The display name of the subscription.') | ||
| c.argument('management_group_id', help='The Management Group Id.') | ||
| c.argument('owners', nargs='+', help='The list of principals that should be granted Owner access on the subscription. Principals should be of type User, Service Principal or Security Group.') | ||
| c.argument('offer_type', arg_type=get_enum_type(['MS-AZR-0017P', 'MS-AZR-0148P']), help='The offer type of the subscription. For example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P (EnterpriseAgreement devTest) are available. Only valid when creating a subscription in a enrollment account scope.') | ||
|
|
||
| with self.argument_context('account subscription create-csp') as c: | ||
| c.argument('billing_account_name', help='The name of the Microsoft Customer Agreement billing account for which you want to create the subscription.') | ||
| c.argument('customer_name', help='The name of the customer.') | ||
| c.argument('display_name', help='The friendly name of the subscription.') | ||
| c.argument('sku_id', help='The SKU ID of the Azure plan. Azure plan determines the pricing and service-level agreement of the subscription. Use 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for DevTest.') | ||
| c.argument('reseller_id', help='Reseller ID, basically MPN Id.') | ||
|
|
||
| with self.argument_context('account subscription rename') as c: | ||
| c.argument('subscription_id', help='Subscription Id.') | ||
| c.argument('subscription_name', help='New subscription name') | ||
|
|
||
| with self.argument_context('account subscription cancel') as c: | ||
| c.argument('subscription_id', help='Subscription Id.') | ||
|
|
||
| with self.argument_context('account subscription enable') as c: | ||
| c.argument('subscription_id', help='Subscription Id.') |
This file contains hidden or 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,4 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- |
This file contains hidden or 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,4 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- |
This file contains hidden or 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,25 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: disable=line-too-long | ||
| # pylint: disable=too-many-lines | ||
| # pylint: disable=too-many-statements | ||
| # pylint: disable=too-many-locals | ||
| from azure.cli.core.commands import CliCommandType | ||
|
|
||
|
|
||
| def load_command_table(self, _): | ||
|
|
||
| from azext_account.generated._client_factory import cf_subscription | ||
| account_subscription = CliCommandType( | ||
| operations_tmpl='azext_account.vendored_sdks.subscription.operations._subscription_operations#SubscriptionOperations.{}', | ||
| client_factory=cf_subscription) | ||
| with self.command_group('account subscription', account_subscription, client_factory=cf_subscription) as g: | ||
| g.custom_command('create', 'account_subscription_create_subscription', supports_no_wait=True) | ||
| g.custom_command('rename', 'account_subscription_rename') | ||
| g.custom_command('cancel', 'account_subscription_cancel', confirmation=True) | ||
| g.custom_command('enable', 'account_subscription_enable') | ||
| g.custom_command('create-csp', 'account_subscription_create_csp_subscription', supports_no_wait=True) | ||
| g.custom_command('create-in-enrollment-account', 'account_subscription_create_subscription_in_enrollment_account', supports_no_wait=True) |
This file contains hidden or 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,76 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
| # pylint: disable=line-too-long | ||
| # pylint: disable=too-many-statements | ||
| # pylint: disable=too-many-lines | ||
| # pylint: disable=too-many-locals | ||
| # pylint: disable=unused-argument | ||
|
|
||
| from azure.cli.core.util import sdk_no_wait | ||
|
|
||
|
|
||
| def account_subscription_create_subscription(cmd, client, | ||
| billing_account_name, | ||
| billing_profile_name, | ||
| invoice_section_name, | ||
| display_name, | ||
| sku_id, | ||
| cost_center=None, | ||
| owner=None, | ||
| management_group_id=None, | ||
| no_wait=False): | ||
|
|
||
| body = {} | ||
| body['display_name'] = display_name | ||
| body['sku_id'] = sku_id | ||
| body['cost_center'] = cost_center | ||
| body['owner'] = {'object_id': owner} | ||
| body['management_group_id'] = management_group_id | ||
| return sdk_no_wait(no_wait, client.create_subscription, billing_account_name=billing_account_name, billing_profile_name=billing_profile_name, invoice_section_name=invoice_section_name, body=body) | ||
|
|
||
|
|
||
| def account_subscription_create_subscription_in_enrollment_account(cmd, client, | ||
| enrollment_account_name, | ||
| display_name=None, | ||
| management_group_id=None, | ||
| owners=None, | ||
| offer_type=None, | ||
| no_wait=False): | ||
| if owners is not None: | ||
| owners = [{'object_id': x} for x in owners] | ||
|
|
||
| body = {} | ||
| body['display_name'] = display_name | ||
| body['management_group_id'] = management_group_id | ||
| body['owners'] = owners | ||
| body['offer_type'] = offer_type | ||
| return sdk_no_wait(no_wait, client.create_subscription_in_enrollment_account, enrollment_account_name=enrollment_account_name, body=body) | ||
|
|
||
|
|
||
| def account_subscription_create_csp_subscription(cmd, client, | ||
| billing_account_name, | ||
| customer_name, | ||
| display_name, | ||
| sku_id, | ||
| reseller_id=None, | ||
| no_wait=False): | ||
| body = {} | ||
| body['display_name'] = display_name | ||
| body['sku_id'] = sku_id | ||
| body['reseller_id'] = reseller_id | ||
| return sdk_no_wait(no_wait, client.create_csp_subscription, billing_account_name=billing_account_name, customer_name=customer_name, body=body) | ||
|
|
||
|
|
||
| def account_subscription_rename(cmd, client, subscription_id, | ||
| subscription_name=None): | ||
| return client.rename(subscription_id=subscription_id, subscription_name=subscription_name) | ||
|
|
||
|
|
||
| def account_subscription_cancel(cmd, client, subscription_id): | ||
| return client.cancel(subscription_id=subscription_id) | ||
|
|
||
|
|
||
| def account_subscription_enable(cmd, client, subscription_id): | ||
| return client.enable(subscription_id=subscription_id) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.