public SubscriptionCreateOrUpdateContract ToSubscriptionCreateOrUpdateContract(ApimSettings settings)
 {
     return(new SubscriptionCreateOrUpdateContract
     {
         Properties = new SubscriptionCreateOrUpdateProperties
         {
             State = this.State,
             OwnerId = string.Format("subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ApiManagement/service/{2}/{3}",
                                     settings.SubscriptionId,
                                     settings.ResourceGroupName,
                                     settings.ServiceName,
                                     this.OwnerId),
             Scope = string.Format("subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ApiManagement/service/{2}/{3}",
                                   settings.SubscriptionId,
                                   settings.ResourceGroupName,
                                   settings.ServiceName,
                                   this.Scope)
         }
     });
 }
Beispiel #2
0
        public static string GetRequestUri(ApimSettings settings, string endPoint, string queryParameters)
        {
            var requestUri = string.Format(settings.UriFormat, settings.SubscriptionId, settings.ResourceGroupName, settings.ServiceName, endPoint, settings.ApiVersion, queryParameters);

            return(requestUri);
        }