1 // Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. 2 // 3 // Package policy implements the Azure ARM Policy service API version . 4 // 5 // 6 package policy 7 8 // Copyright (c) Microsoft Corporation. All rights reserved. 9 // Licensed under the MIT License. See License.txt in the project root for license information. 10 // 11 // Code generated by Microsoft (R) AutoRest Code Generator. 12 // Changes may cause incorrect behavior and will be lost if the code is regenerated. 13 14 import ( 15 "github.com/Azure/go-autorest/autorest" 16 ) 17 18 const ( 19 // DefaultBaseURI is the default URI used for the service Policy 20 DefaultBaseURI = "https://management.azure.com" 21 ) 22 23 // BaseClient is the base client for Policy. 24 type BaseClient struct { 25 autorest.Client 26 BaseURI string 27 } 28 29 // New creates an instance of the BaseClient client. 30 func New() BaseClient { 31 return NewWithBaseURI(DefaultBaseURI) 32 } 33 34 // NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with 35 // an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). 36 func NewWithBaseURI(baseURI string) BaseClient { 37 return BaseClient{ 38 Client: autorest.NewClientWithUserAgent(UserAgent()), 39 BaseURI: baseURI, 40 } 41 } 42