diff --git a/core/Azure.Mcp.Core/src/Models/Option/OptionDefinitions.cs b/core/Azure.Mcp.Core/src/Models/Option/OptionDefinitions.cs index 803fc0322a..a3abb286f1 100644 --- a/core/Azure.Mcp.Core/src/Models/Option/OptionDefinitions.cs +++ b/core/Azure.Mcp.Core/src/Models/Option/OptionDefinitions.cs @@ -14,34 +14,26 @@ public static class Common public const string ResourceGroupName = "resource-group"; public const string AuthMethodName = "auth-method"; - public static readonly Option Tenant = new( - $"--{TenantName}" - ) + public static readonly Option Tenant = new($"--{TenantName}") { Required = false, Description = "The Microsoft Entra ID tenant ID or name. This can be either the GUID identifier or the display name of your Entra ID tenant." }; - public static readonly Option Subscription = new( - $"--{SubscriptionName}" - ) + public static readonly Option Subscription = new($"--{SubscriptionName}") { Description = "Specifies the Azure subscription to use. Accepts either a subscription ID (GUID) or display name. " + "If not specified, the AZURE_SUBSCRIPTION_ID environment variable will be used instead.", Required = false }; - public static readonly Option AuthMethod = new( - $"--{AuthMethodName}" - ) + public static readonly Option AuthMethod = new($"--{AuthMethodName}") { Description = "Authentication method to use. Options: 'credential' (Azure CLI/managed identity), 'key' (access key), or 'connectionString'.", Required = false }; - public static readonly Option ResourceGroup = new( - $"--{ResourceGroupName}" - ) + public static readonly Option ResourceGroup = new($"--{ResourceGroupName}") { Description = "The name of the Azure resource group. This is a logical container for Azure resources.", Required = false @@ -56,41 +48,31 @@ public static class RetryPolicy public const string ModeName = "retry-mode"; public const string NetworkTimeoutName = "retry-network-timeout"; - public static readonly Option Delay = new( - $"--{DelayName}" - ) + public static readonly Option Delay = new($"--{DelayName}") { Description = "Initial delay in seconds between retry attempts. For exponential backoff, this value is used as the base.", Required = false }; - public static readonly Option MaxDelay = new( - $"--{MaxDelayName}" - ) + public static readonly Option MaxDelay = new($"--{MaxDelayName}") { Description = "Maximum delay in seconds between retries, regardless of the retry strategy.", Required = false }; - public static readonly Option MaxRetries = new( - $"--{MaxRetriesName}" - ) + public static readonly Option MaxRetries = new($"--{MaxRetriesName}") { Description = "Maximum number of retry attempts for failed operations before giving up.", Required = false }; - public static readonly Option Mode = new( - $"--{ModeName}" - ) + public static readonly Option Mode = new($"--{ModeName}") { Description = "Retry strategy to use. 'fixed' uses consistent delays, 'exponential' increases delay between attempts.", Required = false }; - public static readonly Option NetworkTimeout = new( - $"--{NetworkTimeoutName}" - ) + public static readonly Option NetworkTimeout = new($"--{NetworkTimeoutName}") { Description = "Network operation timeout in seconds. Operations taking longer than this will be cancelled.", Required = false @@ -101,9 +83,7 @@ public static class Authorization { public const string ScopeName = "scope"; - public static readonly Option Scope = new( - $"--{ScopeName}" - ) + public static readonly Option Scope = new($"--{ScopeName}") { Description = "Scope at which the role assignment or definition applies to, e.g., /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup, or /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM.", Required = true, @@ -122,73 +102,53 @@ public static class LoadTesting public const string DurationOption = "duration"; public const string RampUpTimeOption = "ramp-up-time"; public const string EndpointOption = "endpoint"; - public static readonly Option TestResource = new( - $"--{TestResourceName}" - ) + public static readonly Option TestResource = new($"--{TestResourceName}") { Description = "The name of the load test resource for which you want to fetch the details.", Required = false }; - public static readonly Option TestRun = new( - $"--{TestRunId}" - ) + public static readonly Option TestRun = new($"--{TestRunId}") { Description = "The ID of the load test run for which you want to fetch the details.", Required = false }; - public static readonly Option Test = new( - $"--{TestId}" - ) + public static readonly Option Test = new($"--{TestId}") { - Description = "The ID of the load test for which you want to fetch the details.", + Description = "The ID of the load test for which you want to fetch the details (between 2 and 50 characters).", Required = true }; - public static readonly Option DisplayName = new( - $"--{DisplayNameOption}" - ) + public static readonly Option DisplayName = new($"--{DisplayNameOption}") { - Description = "The display name for the load test run. This is a user-friendly name to identify the test run.", + Description = "The display name for the load test run. This is a user-friendly name to identify the test run (between 2 and 50 characters).", Required = false }; - public static readonly Option Description = new( - $"--{DescriptionOption}" - ) + public static readonly Option Description = new($"--{DescriptionOption}") { - Description = "The description for the load test run. This provides additional context about the test run.", + Description = "The description for the load test run. This provides additional context about the test run (maximum of 100 characters).", Required = false }; - public static readonly Option OldTestRunId = new( - $"--{OldTestRunIdOption}" - ) + public static readonly Option OldTestRunId = new($"--{OldTestRunIdOption}") { Description = "The ID of an existing test run to update. If provided, the command will trigger a rerun of the given test run id.", Required = false }; - public static readonly Option VirtualUsers = new( - $"--{VirtualUsersOption}" - ) + public static readonly Option VirtualUsers = new($"--{VirtualUsersOption}") { Description = "Virtual users is a measure of load that is simulated to test the HTTP endpoint. (Default - 50)", Required = false }; - public static readonly Option Duration = new( - $"--{DurationOption}" - ) + public static readonly Option Duration = new($"--{DurationOption}") { Description = "This is the duration for which the load is simulated against the endpoint. Enter decimals for fractional minutes (e.g., 1.5 for 1 minute and 30 seconds). Default is 20 mins", Required = false }; - public static readonly Option RampUpTime = new( - $"--{RampUpTimeOption}" - ) + public static readonly Option RampUpTime = new($"--{RampUpTimeOption}") { Description = "The ramp-up time is the time it takes for the system to ramp-up to the total load specified. Enter decimals for fractional minutes (e.g., 1.5 for 1 minute and 30 seconds). Default is 1 min", Required = false }; - public static readonly Option Endpoint = new( - $"--{EndpointOption}" - ) + public static readonly Option Endpoint = new($"--{EndpointOption}") { Description = "The endpoint URL to be tested. This is the URL of the HTTP endpoint that will be subjected to load testing.", Required = false @@ -213,121 +173,91 @@ public static class Marketplace public const string ExpandName = "expand"; public const string NextCursorName = "next-cursor"; - public static readonly Option ProductId = new( - $"--{ProductIdName}" - ) + public static readonly Option ProductId = new($"--{ProductIdName}") { Description = "The ID of the marketplace product to retrieve. This is the unique identifier for the product in the Azure Marketplace.", Required = true }; - public static readonly Option IncludeStopSoldPlans = new( - $"--{IncludeStopSoldPlansName}" - ) + public static readonly Option IncludeStopSoldPlans = new($"--{IncludeStopSoldPlansName}") { Description = "Include stop-sold or hidden plans in the response.", Required = false }; - public static readonly Option Language = new( - $"--{LanguageName}" - ) + public static readonly Option Language = new($"--{LanguageName}") { Description = "Product language code (e.g., 'en' for English, 'fr' for French).", Required = false }; - public static readonly Option Market = new( - $"--{MarketName}" - ) + public static readonly Option Market = new($"--{MarketName}") { Description = "Product market code (e.g., 'US' for United States, 'UK' for United Kingdom).", Required = false }; - public static readonly Option LookupOfferInTenantLevel = new( - $"--{LookupOfferInTenantLevelName}" - ) + public static readonly Option LookupOfferInTenantLevel = new($"--{LookupOfferInTenantLevelName}") { Description = "Check against tenant private audience when retrieving the product.", Required = false }; - public static readonly Option PlanId = new( - $"--{PlanIdName}" - ) + public static readonly Option PlanId = new($"--{PlanIdName}") { Description = "Filter results by a specific plan ID.", Required = false }; - public static readonly Option SkuId = new( - $"--{SkuIdName}" - ) + public static readonly Option SkuId = new($"--{SkuIdName}") { Description = "Filter results by a specific SKU ID.", Required = false }; - public static readonly Option IncludeServiceInstructionTemplates = new( - $"--{IncludeServiceInstructionTemplatesName}" - ) + public static readonly Option IncludeServiceInstructionTemplates = new($"--{IncludeServiceInstructionTemplatesName}") { Description = "Include service instruction templates in the response.", Required = false }; - public static readonly Option PricingAudience = new( - $"--{PricingAudienceName}" - ) + public static readonly Option PricingAudience = new($"--{PricingAudienceName}") { Description = "Pricing audience for the request header.", Required = false }; - public static readonly Option Search = new( - $"--{SearchName}" - ) + public static readonly Option Search = new($"--{SearchName}") { Description = "Search for products using a short general term (up to 25 characters)", Required = false }; - public static readonly Option Filter = new( - $"--{FilterName}" - ) + public static readonly Option Filter = new($"--{FilterName}") { Description = "OData filter expression to filter results based on ProductSummary properties (e.g., \"displayName eq 'Azure'\").", Required = false }; - public static readonly Option OrderBy = new( - $"--{OrderByName}" - ) + public static readonly Option OrderBy = new($"--{OrderByName}") { Description = "OData orderby expression to sort results by ProductSummary fields (e.g., \"displayName asc\" or \"popularity desc\").", Required = false }; - public static readonly Option Select = new( - $"--{SelectName}" - ) + public static readonly Option Select = new($"--{SelectName}") { Description = "OData select expression to choose specific ProductSummary fields to return (e.g., \"displayName,publisherDisplayName,uniqueProductId\").", Required = false }; - public static readonly Option NextCursor = new( - $"--{NextCursorName}" - ) + public static readonly Option NextCursor = new($"--{NextCursorName}") { Description = "Pagination cursor to retrieve the next page of results. Use the NextPageLink value from a previous response.", Required = false }; - public static readonly Option Expand = new( - $"--{ExpandName}" - ) + public static readonly Option Expand = new($"--{ExpandName}") { Description = "OData expand expression to include related data in the response (e.g., \"plans\" to include plan details).", Required = false