diff --git a/src/CognitiveServices/CognitiveServices/ChangeLog.md b/src/CognitiveServices/CognitiveServices/ChangeLog.md index 8ebd3d1f9a91..4832ab456737 100644 --- a/src/CognitiveServices/CognitiveServices/ChangeLog.md +++ b/src/CognitiveServices/CognitiveServices/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Show additional legal terms for certain APIs. ## Version 1.5.1 * Used `Deny` specifically as NetworkRules default action. diff --git a/src/CognitiveServices/CognitiveServices/CognitiveServices.csproj b/src/CognitiveServices/CognitiveServices/CognitiveServices.csproj index a3795812e78e..8777c489cff6 100644 --- a/src/CognitiveServices/CognitiveServices/CognitiveServices.csproj +++ b/src/CognitiveServices/CognitiveServices/CognitiveServices.csproj @@ -14,4 +14,10 @@ + + + True + + + \ No newline at end of file diff --git a/src/CognitiveServices/CognitiveServices/CognitiveServicesAccount/NewAzureCognitiveServicesAccount.cs b/src/CognitiveServices/CognitiveServices/CognitiveServicesAccount/NewAzureCognitiveServicesAccount.cs index 93d0f805d0e2..74a32e921239 100644 --- a/src/CognitiveServices/CognitiveServices/CognitiveServicesAccount/NewAzureCognitiveServicesAccount.cs +++ b/src/CognitiveServices/CognitiveServices/CognitiveServicesAccount/NewAzureCognitiveServicesAccount.cs @@ -245,6 +245,24 @@ public override void ExecuteCmdlet() } } } + + if (Type.Equals("Face", StringComparison.InvariantCultureIgnoreCase) || Type.Equals("CognitiveServices", StringComparison.InvariantCultureIgnoreCase)) + { + if (Force.IsPresent) + { + WriteWarning(Resources.NewAccount_LegalTerm_NotPolice); + } + else + { + bool yesToAll = false, noToAll = false; + if (!ShouldContinue(Resources.NewAccount_LegalTerm_NotPolice, "Notice", true, ref yesToAll, ref noToAll)) + { + return; + } + } + } + + try { CognitiveServicesAccount createAccountResponse = CognitiveServicesClient.Accounts.Create( diff --git a/src/CognitiveServices/CognitiveServices/Properties/Resources.Designer.cs b/src/CognitiveServices/CognitiveServices/Properties/Resources.Designer.cs index 96221fd3282d..9cd6a1a18cd5 100644 --- a/src/CognitiveServices/CognitiveServices/Properties/Resources.Designer.cs +++ b/src/CognitiveServices/CognitiveServices/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Commands.Management.CognitiveServices.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -61,7 +61,16 @@ internal Resources() { } /// - /// Looks up a localized string similar to Microsoft will use data you send to Bing Search Services or the Translator Speech API to improve Microsoft products and services. Where you send personal data to these Cognitive Services, you are responsible for obtaining sufficient consent from the data subjects. The General Privacy and Security Terms in the Online Services Terms do not apply to these Cognitive Services. Please refer to the Microsoft Cognitive Services section in the Online Services Terms (https://www.microsoft.com/en-us/Licensing/product- [rest of string was truncated]";. + /// Looks up a localized string similar to I certify that use of this service is not by or for a police department in the United States.. + /// + internal static string NewAccount_LegalTerm_NotPolice { + get { + return ResourceManager.GetString("NewAccount_LegalTerm_NotPolice", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft will use data you send to Bing Search Services to improve Microsoft products and services. Where you send personal data to these Cognitive Services, you are responsible for obtaining sufficient consent from the data subjects. The General Privacy and Security Terms in the Online Services Terms do not apply to these Cognitive Services. Please refer to the Microsoft Cognitive Services section in the Online Services Terms (https://www.microsoft.com/en-us/Licensing/product-licensing/products.aspx) for [rest of string was truncated]";. /// internal static string NewAccount_Notice { get { diff --git a/src/CognitiveServices/CognitiveServices/Properties/Resources.resx b/src/CognitiveServices/CognitiveServices/Properties/Resources.resx index 7fcd0d82e10d..72c8cadbe9fa 100644 --- a/src/CognitiveServices/CognitiveServices/Properties/Resources.resx +++ b/src/CognitiveServices/CognitiveServices/Properties/Resources.resx @@ -120,6 +120,9 @@ Regenerating Key {0} for account {1}. + + I certify that use of this service is not by or for a police department in the United States. + Microsoft will use data you send to Bing Search Services to improve Microsoft products and services. Where you send personal data to these Cognitive Services, you are responsible for obtaining sufficient consent from the data subjects. The General Privacy and Security Terms in the Online Services Terms do not apply to these Cognitive Services. Please refer to the Microsoft Cognitive Services section in the Online Services Terms (https://www.microsoft.com/en-us/Licensing/product-licensing/products.aspx) for details. Microsoft offers policy controls that may be used to disable new Cognitive Services deployments (https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-apis-create-account).