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

{Subscription} Update supported --offer-types of az account create #4790

Merged
merged 4 commits into from
May 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion src/subscription/azext_subscription/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
# --------------------------------------------------------------------------------------------

from azure.cli.core.commands.parameters import get_enum_type
from .subscription.models import OfferType


# pylint: disable=line-too-long
def load_arguments(self, _):
with self.argument_context('account create') as c:
c.argument('enrollment_account_name', options_list=('--enrollment-account-name', '--enrollment-account-object-id'), required=True, help='The name of the enrollment account which should be used to create a subscription.')
c.argument('offer_type', required=True, help='The offer type of the subscription. For example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P (EnterpriseAgreement devTest) are available.', arg_type=get_enum_type(['MS-AZR-0017P', 'MS-AZR-0148P']))
c.argument('offer_type', required=True, help='The offer type of the subscription. For example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P (EnterpriseAgreement devTest) are available.', arg_type=get_enum_type(OfferType))
c.argument('display_name', help='The display name of the subscription.')
c.argument('owner_object_id', help='The object id(s) of the owner(s) which should be granted access to the new subscription.')
c.argument('owner_spn', help='The service principal name(s) of the owner(s) which should be granted access to the new subscription.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class OfferType(str, Enum):

ms_azr_0017_p = "MS-AZR-0017P"
ms_azr_0148_p = "MS-AZR-0148P"
MS_AZR_USGOV_0017P = "MS-AZR-USGOV-0017P"
MS_AZR_USGOV_0003P = "MS-AZR-USGOV-0003P"
cxznmhdcxz marked this conversation as resolved.
Show resolved Hide resolved


class SubscriptionState(str, Enum):
Expand Down