From 4764179bd61cf62af8fcbe7673d424be06b55c19 Mon Sep 17 00:00:00 2001 From: david becher Date: Mon, 17 May 2021 18:14:14 -0500 Subject: [PATCH] Adding optional to the script parameter (#14437) Co-authored-by: David Becher --- .../2021-06-01/examples/ScriptCmdlets_Get.json | 9 ++++++--- .../2021-06-01/examples/ScriptCmdlets_List.json | 15 ++++++++++----- .../Microsoft.AVS/stable/2021-06-01/vmware.json | 13 +++++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/examples/ScriptCmdlets_Get.json b/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/examples/ScriptCmdlets_Get.json index 4a96299ab2b8..5c7ea0e76669 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/examples/ScriptCmdlets_Get.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/examples/ScriptCmdlets_Get.json @@ -20,19 +20,22 @@ "name": "DomainName", "description": "Domain name of the Server", "type": "String", - "visibility": "Visible" + "visibility": "Visible", + "optional": "Required" }, { "name": "BaseUserDN", "description": "Base User DN of the Server", "type": "String", - "visibility": "Visible" + "visibility": "Visible", + "optional": "Required" }, { "name": "Password", "description": "Password for authenticating to the server", "type": "SecureString", - "visibility": "Hidden" + "visibility": "Hidden", + "optional": "Required" } ] }, diff --git a/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/examples/ScriptCmdlets_List.json b/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/examples/ScriptCmdlets_List.json index a1419f5f80f2..fe0e6f92cc13 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/examples/ScriptCmdlets_List.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/examples/ScriptCmdlets_List.json @@ -21,13 +21,15 @@ "name": "VM", "description": "VM to set the storage policy on", "type": "String", - "visibility": "Visible" + "visibility": "Visible", + "optional": "Required" }, { "name": "StoragePolicyName", "description": "Name of the storage policy to set", "type": "String", - "visibility": "Visible" + "visibility": "Visible", + "optional": "Required" } ] }, @@ -44,19 +46,22 @@ "name": "DomainName", "description": "Domain name of the Server", "type": "String", - "visibility": "Visible" + "visibility": "Visible", + "optional": "Required" }, { "name": "BaseUserDN", "description": "Base User DN of the Server", "type": "String", - "visibility": "Visible" + "visibility": "Visible", + "optional": "Required" }, { "name": "Password", "description": "Password for authenticating to the server", "type": "SecureString", - "visibility": "Hidden" + "visibility": "Hidden", + "optional": "Required" } ] }, diff --git a/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/vmware.json b/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/vmware.json index d0d7d5171b57..884f796b5e32 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/vmware.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/stable/2021-06-01/vmware.json @@ -6728,6 +6728,19 @@ "name": "VisibilityParameterEnum", "modelAsString": true } + }, + "optional": { + "description": "Is this parameter required or optional", + "type": "string", + "readOnly": true, + "enum": [ + "Optional", + "Required" + ], + "x-ms-enum": { + "name": "OptionalParamEnum", + "modelAsString": true + } } } },