示例#1
0
 internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, AuthenticationName authenticationName)
 {
     var message = _pipeline.CreateMessage();
     var request = message.Request;
     request.Method = RequestMethod.Get;
     var uri = new RawRequestUriBuilder();
     uri.Reset(_endpoint);
     uri.AppendPath("/subscriptions/", false);
     uri.AppendPath(subscriptionId, true);
     uri.AppendPath("/resourceGroups/", false);
     uri.AppendPath(resourceGroupName, true);
     uri.AppendPath("/providers/Microsoft.Sql/servers/", false);
     uri.AppendPath(serverName, true);
     uri.AppendPath("/azureADOnlyAuthentications/", false);
     uri.AppendPath(authenticationName.ToString(), true);
     uri.AppendQuery("api-version", _apiVersion, true);
     request.Uri = uri;
     request.Headers.Add("Accept", "application/json");
     _userAgent.Apply(message);
     return message;
 }
示例#2
0
        internal HttpMessage CreateGetRequest(string resourceGroupName, string serverName, AuthenticationName authenticationName)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;

            request.Method = RequestMethod.Get;
            var uri = new RawRequestUriBuilder();

            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/resourceGroups/", false);
            uri.AppendPath(resourceGroupName, true);
            uri.AppendPath("/providers/Microsoft.Sql/servers/", false);
            uri.AppendPath(serverName, true);
            uri.AppendPath("/azureADOnlyAuthentications/", false);
            uri.AppendPath(authenticationName.ToString(), true);
            uri.AppendQuery("api-version", "2020-02-02-preview", true);
            request.Uri = uri;
            return(message);
        }
示例#3
0
        internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string managedInstanceName, AuthenticationName authenticationName)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;

            request.Method = RequestMethod.Get;
            var uri = new RawRequestUriBuilder();

            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/resourceGroups/", false);
            uri.AppendPath(resourceGroupName, true);
            uri.AppendPath("/providers/Microsoft.Sql/managedInstances/", false);
            uri.AppendPath(managedInstanceName, true);
            uri.AppendPath("/azureADOnlyAuthentications/", false);
            uri.AppendPath(authenticationName.ToString(), true);
            uri.AppendQuery("api-version", "2020-11-01-preview", true);
            request.Uri = uri;
            request.Headers.Add("Accept", "application/json");
            message.SetProperty("UserAgentOverride", _userAgent);
            return(message);
        }