• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# OvhApi类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中OvhApi的典型用法代码示例。如果您正苦于以下问题:C# OvhApi类的具体用法?C# OvhApi怎么用?C# OvhApi使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OvhApi类属于命名空间,在下文中一共展示了OvhApi类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: UpdateCdnDedicatedServiceinfos

		/// <summary>
		/// Alter this object properties
		/// <param name="requestBody">New object properties</param>
		/// <param name="serviceName">The internal name of your CDN offer</param>
		/// </summary>
		public async Task UpdateCdnDedicatedServiceinfos(OvhApi.Models.Services.Service requestBody,string serviceName)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("requestBody",requestBody);
			Ensure.NotNullNorEmpty("serviceName",serviceName);



await RawCall(HttpMethod.Put,String.Format("/cdn/dedicated/{0}/serviceInfos",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:16,代码来源:Operations.cs


示例2: GetCdnDedicatedQuotas

		/// <summary>
		/// Return quota history
		/// <param name="period">To be written</param>
		/// <param name="serviceName">The internal name of your CDN offer</param>
		/// </summary>
		public async Task<OvhApi.Models.Cdnanycast.StatsDataType[]> GetCdnDedicatedQuotas(OvhApi.Models.Cdnanycast.StatsPeriodEnum period,string serviceName)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("period",period);
			Ensure.NotNullNorEmpty("serviceName",serviceName);

			var queryString = new QueryString();
			queryString.Add("period",period);


return await RawCall<OvhApi.Models.Cdnanycast.StatsDataType[]>(HttpMethod.Get,String.Format("/cdn/dedicated/{0}/quota{1}",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+"),queryString));
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:18,代码来源:Operations.cs


示例3: CreateCdnDedicatedDomainsCacherules

        /// <summary>
        /// Add a cache rule to a domain
        /// <param name="cacheType">Type of cache rule to add to the domain</param>
        /// <param name="ttl">ttl for cache rule to add to the domain</param>
        /// <param name="fileMatch">File match for cache rule to add to the domain</param>
        /// <param name="fileType">File type for cache rule to add to the domain</param>
        /// <param name="serviceName">The internal name of your CDN offer</param>
        /// <param name="domain">Domain of this object</param>
        /// </summary>
        public OvhApi.Models.Cdnanycast.CacheRule CreateCdnDedicatedDomainsCacherules(OvhApi.Models.Cdnanycast.CacheRuleCacheTypeEnum cacheType,long ttl,string fileMatch,OvhApi.Models.Cdnanycast.CacheRuleFileTypeEnum fileType,string serviceName,string domain)
        {
            if(ConsumerKey == null)
                throw new OvhException("This request must be authenticated");
            Ensure.NotNull("cacheType",cacheType);
            Ensure.IdIsValid("ttl",ttl);
            Ensure.NotNullNorEmpty("fileMatch",fileMatch);
            Ensure.NotNull("fileType",fileType);
            Ensure.NotNullNorEmpty("serviceName",serviceName);
            Ensure.NotNullNorEmpty("domain",domain);

            var requestBody = new Dictionary<string, object>();
            requestBody.Add("cacheType",cacheType);
            requestBody.Add("ttl",ttl);
            requestBody.Add("fileMatch",fileMatch);
            requestBody.Add("fileType",fileType);

            return RawCall<OvhApi.Models.Cdnanycast.CacheRule>(HttpMethod.Post,String.Format("/cdn/dedicated/{0}/domains/{1}/cacheRules",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(domain.ToString()).Replace("%2B", "+")),requestBody);
        }
开发者ID:biapar,项目名称:ovhapicil,代码行数:28,代码来源:Operations.sync.cs


示例4: GetIpMitigations

		/// <summary>
		/// Ip under mitigation
		/// <param name="auto">Filter the value of auto property (=)</param>
		/// <param name="state">Filter the value of state property (=)</param>
		/// <param name="ip">To be written</param>
		/// </summary>
		public async Task<System.Net.IPAddress[]> GetIpMitigations(OVHApi.IPAddressBlock ip,OvhApi.Models.Ip.MitigationStateEnum? state = null,bool? auto = null)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("ip",ip);

			var queryString = new QueryString();
			queryString.Add("auto",auto);
			queryString.Add("state",state);


return await RawCall<System.Net.IPAddress[]>(HttpMethod.Get,String.Format("/ip/{0}/mitigation{1}",System.Uri.EscapeDataString(ip.ToString()).Replace("%2B", "+"),queryString));
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:19,代码来源:Operations.cs


示例5: CreateIpMitigationprofiles

		/// <summary>
		/// Create new profile for one of your ip
		/// <param name="ipMitigationProfile">To be written</param>
		/// <param name="autoMitigationTimeOut">Delay to wait before remove ip from auto mitigation after an attack</param>
		/// <param name="ip">To be written</param>
		/// </summary>
		public async Task<OvhApi.Models.Ip.MitigationProfile> CreateIpMitigationprofiles(System.Net.IPAddress ipMitigationProfile,OvhApi.Models.Ip.MitigationProfileAutoMitigationTimeOutEnum autoMitigationTimeOut,OVHApi.IPAddressBlock ip)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("ipMitigationProfile",ipMitigationProfile);
			Ensure.NotNull("autoMitigationTimeOut",autoMitigationTimeOut);
			Ensure.NotNull("ip",ip);


var requestBody = new Dictionary<string, object>();
requestBody.Add("ipMitigationProfile",ipMitigationProfile);
requestBody.Add("autoMitigationTimeOut",autoMitigationTimeOut);

return await RawCall<OvhApi.Models.Ip.MitigationProfile>(HttpMethod.Post,String.Format("/ip/{0}/mitigationProfiles",System.Uri.EscapeDataString(ip.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:21,代码来源:Operations.cs


示例6: GetIps

		/// <summary>
		/// Your OVH IPs
		/// <param name="ip">Filter the value of ip property (contains or equals)</param>
		/// <param name="routedTo_serviceName">Filter the value of routedTo.serviceName property (like)</param>
		/// <param name="type">Filter the value of type property (=)</param>
		/// <param name="description">Filter the value of description property (like)</param>
		/// </summary>
		public async Task<OVHApi.IPAddressBlock[]> GetIps(string description = null,OvhApi.Models.Ip.IpTypeEnum? type = null,string routedTo_serviceName = null,OVHApi.IPAddressBlock ip = null)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");

			var queryString = new QueryString();
			queryString.Add("ip",ip);
			queryString.Add("routedTo.serviceName",routedTo_serviceName);
			queryString.Add("type",type);
			queryString.Add("description",description);


return await RawCall<OVHApi.IPAddressBlock[]>(HttpMethod.Get,String.Format("/ip{0}",queryString));
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:21,代码来源:Operations.cs


示例7: CreateHostingWebAttacheddomain

		/// <summary>
		/// Link a domain to this hosting
		/// <param name="cdn">Is linked to the hosting cdn</param>
		/// <param name="domain">Domain to link</param>
		/// <param name="path">Domain's path, relative to your home directory</param>
		/// <param name="serviceName">The internal name of your hosting</param>
		/// </summary>
		public async Task<OvhApi.Models.Hosting.Web.Task> CreateHostingWebAttacheddomain(string domain,string path,string serviceName,OvhApi.Models.Hosting.Web.AttachedDomain.CdnEnum? cdn = null)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNullNorEmpty("domain",domain);
			Ensure.NotNullNorEmpty("path",path);
			Ensure.NotNullNorEmpty("serviceName",serviceName);


var requestBody = new Dictionary<string, object>();
requestBody.Add("cdn",cdn);
requestBody.Add("domain",domain);
requestBody.Add("path",path);

return await RawCall<OvhApi.Models.Hosting.Web.Task>(HttpMethod.Post,String.Format("/hosting/web/{0}/attachedDomain",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:23,代码来源:Operations.cs


示例8: UpdateHostingWebCron

		/// <summary>
		/// Alter this object properties
		/// <param name="requestBody">New object properties</param>
		/// <param name="serviceName">The internal name of your hosting</param>
		/// <param name="id">Cron's id</param>
		/// </summary>
		public async Task UpdateHostingWebCron(OvhApi.Models.Hosting.Web.Cron requestBody,string serviceName,long id)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("requestBody",requestBody);
			Ensure.NotNullNorEmpty("serviceName",serviceName);
			Ensure.IdIsValid("id",id);



await RawCall(HttpMethod.Put,String.Format("/hosting/web/{0}/cron/{1}",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(id.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:18,代码来源:Operations.cs


示例9: GetHostingWebCronIds

		/// <summary>
		/// Crons on your hosting
		/// <param name="email">Filter the value of email property (like)</param>
		/// <param name="language">Filter the value of language property (=)</param>
		/// <param name="description">Filter the value of description property (like)</param>
		/// <param name="command">Filter the value of command property (like)</param>
		/// <param name="serviceName">The internal name of your hosting</param>
		/// </summary>
		public async Task<long[]> GetHostingWebCronIds(string serviceName,string command = null,string description = null,OvhApi.Models.Hosting.Web.Cron.LanguageEnum? language = null,string email = null)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNullNorEmpty("serviceName",serviceName);

			var queryString = new QueryString();
			queryString.Add("email",email);
			queryString.Add("language",language);
			queryString.Add("description",description);
			queryString.Add("command",command);


return await RawCall<long[]>(HttpMethod.Get,String.Format("/hosting/web/{0}/cron{1}",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+"),queryString));
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:23,代码来源:Operations.cs


示例10: GetHostingWebDatabaseavailableversions

		/// <summary>
		/// List available database version following a type
		/// <param name="type">Type of the database</param>
		/// <param name="serviceName">The internal name of your hosting</param>
		/// </summary>
		public async Task<OvhApi.Models.Hosting.Web.Database.VersionEnum[]> GetHostingWebDatabaseavailableversions(OvhApi.Models.Hosting.Web.Database.DatabaseTypeEnum type,string serviceName)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("type",type);
			Ensure.NotNullNorEmpty("serviceName",serviceName);

			var queryString = new QueryString();
			queryString.Add("type",type);


return await RawCall<OvhApi.Models.Hosting.Web.Database.VersionEnum[]>(HttpMethod.Get,String.Format("/hosting/web/{0}/databaseAvailableVersion{1}",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+"),queryString));
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:18,代码来源:Operations.cs


示例11: UpdateEmailExchangeServiceResourceaccount

		/// <summary>
		/// Alter this object properties
		/// <param name="requestBody">New object properties</param>
		/// <param name="organizationName">The internal name of your exchange organization</param>
		/// <param name="exchangeService">The internal name of your exchange service</param>
		/// <param name="resourceEmailAddress">resource as email</param>
		/// </summary>
		public async Task UpdateEmailExchangeServiceResourceaccount(OvhApi.Models.Email.Exchange.ResourceAccount requestBody,string organizationName,string exchangeService,string resourceEmailAddress)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("requestBody",requestBody);
			Ensure.NotNullNorEmpty("organizationName",organizationName);
			Ensure.NotNullNorEmpty("exchangeService",exchangeService);
			Ensure.NotNullNorEmpty("resourceEmailAddress",resourceEmailAddress);



await RawCall(HttpMethod.Put,String.Format("/email/exchange/{0}/service/{1}/resourceAccount/{2}",System.Uri.EscapeDataString(organizationName.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(exchangeService.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(resourceEmailAddress.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:20,代码来源:Operations.cs


示例12: CreateEmailExchangeServiceResourceaccount

		/// <summary>
		/// create new resource account in exchange server
		/// <param name="resourceEmailAddress">resource address</param>
		/// <param name="allowConflict">resource can be scheduled by more than one person during the same time period</param>
		/// <param name="type">field of your reservation</param>
		/// <param name="capacity">number of the same equipment or capacity of a room</param>
		/// <param name="displayName">resource account display name</param>
		/// <param name="organizationName">The internal name of your exchange organization</param>
		/// <param name="exchangeService">The internal name of your exchange service</param>
		/// </summary>
		public async Task<OvhApi.Models.Email.Exchange.Task> CreateEmailExchangeServiceResourceaccount(string resourceEmailAddress,OvhApi.Models.Email.Exchange.ResourceTypeEnum type,long capacity,string organizationName,string exchangeService,string displayName = null,bool? allowConflict = null)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNullNorEmpty("resourceEmailAddress",resourceEmailAddress);
			Ensure.NotNull("type",type);
			Ensure.IdIsValid("capacity",capacity);
			Ensure.NotNullNorEmpty("organizationName",organizationName);
			Ensure.NotNullNorEmpty("exchangeService",exchangeService);


var requestBody = new Dictionary<string, object>();
requestBody.Add("resourceEmailAddress",resourceEmailAddress);
requestBody.Add("allowConflict",allowConflict);
requestBody.Add("type",type);
requestBody.Add("capacity",capacity);
requestBody.Add("displayName",displayName);

return await RawCall<OvhApi.Models.Email.Exchange.Task>(HttpMethod.Post,String.Format("/email/exchange/{0}/service/{1}/resourceAccount",System.Uri.EscapeDataString(organizationName.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(exchangeService.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:30,代码来源:Operations.cs


示例13: CreateEmailExchangeServiceMailinglist

		/// <summary>
		/// Add mailing list
		/// <param name="joinRestriction">Join restriction policy</param>
		/// <param name="departRestriction">Depart restriction policy</param>
		/// <param name="hiddenFromGAL">If true mailing list is hiddend in Global Address List</param>
		/// <param name="mailingListAddress">The mailing list address</param>
		/// <param name="senderAuthentification">If true sender has to authenticate</param>
		/// <param name="maxSendSize">Maximum send email size in MB</param>
		/// <param name="maxReceiveSize">Maximum receive email size in MB</param>
		/// <param name="displayName">Name displayed in Global Access List</param>
		/// <param name="organizationName">The internal name of your exchange organization</param>
		/// <param name="exchangeService">The internal name of your exchange service</param>
		/// </summary>
		public async Task<OvhApi.Models.Email.Exchange.Task> CreateEmailExchangeServiceMailinglist(OvhApi.Models.Email.Exchange.MailingListJoinRestrictionEnum joinRestriction,OvhApi.Models.Email.Exchange.MailingListDepartRestrictionEnum departRestriction,string mailingListAddress,string organizationName,string exchangeService,string displayName = null,long? maxReceiveSize = null,long? maxSendSize = null,bool? senderAuthentification = null,bool? hiddenFromGAL = null)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("joinRestriction",joinRestriction);
			Ensure.NotNull("departRestriction",departRestriction);
			Ensure.NotNullNorEmpty("mailingListAddress",mailingListAddress);
			Ensure.NotNullNorEmpty("organizationName",organizationName);
			Ensure.NotNullNorEmpty("exchangeService",exchangeService);


var requestBody = new Dictionary<string, object>();
requestBody.Add("joinRestriction",joinRestriction);
requestBody.Add("departRestriction",departRestriction);
requestBody.Add("hiddenFromGAL",hiddenFromGAL);
requestBody.Add("mailingListAddress",mailingListAddress);
requestBody.Add("senderAuthentification",senderAuthentification);
requestBody.Add("maxSendSize",maxSendSize);
requestBody.Add("maxReceiveSize",maxReceiveSize);
requestBody.Add("displayName",displayName);

return await RawCall<OvhApi.Models.Email.Exchange.Task>(HttpMethod.Post,String.Format("/email/exchange/{0}/service/{1}/mailingList",System.Uri.EscapeDataString(organizationName.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(exchangeService.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:36,代码来源:Operations.cs


示例14: GetCdnWebsiteZoneDomainsStatistics

		/// <summary>
		/// Get statistics about request on CDN, bandwidth value in Bytes
		/// <param name="period">To be written</param>
		/// <param name="value">To be written</param>
		/// <param name="type">To be written</param>
		/// <param name="serviceName">The internal name of your CDN Website offer</param>
		/// <param name="domain">To be written</param>
		/// </summary>
		public async Task<OvhApi.Models.Cdn.Website.StatsDataType[]> GetCdnWebsiteZoneDomainsStatistics(OvhApi.Models.Cdn.Website.StatsPeriodEnum period,OvhApi.Models.Cdn.Website.StatsValueEnum value,OvhApi.Models.Cdn.Website.StatsTypeEnum type,string serviceName,string domain)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("period",period);
			Ensure.NotNull("value",value);
			Ensure.NotNull("type",type);
			Ensure.NotNullNorEmpty("serviceName",serviceName);
			Ensure.NotNullNorEmpty("domain",domain);

			var queryString = new QueryString();
			queryString.Add("period",period);
			queryString.Add("value",value);
			queryString.Add("type",type);


return await RawCall<OvhApi.Models.Cdn.Website.StatsDataType[]>(HttpMethod.Get,String.Format("/cdn/website/{0}/zone/domains/{1}/statistics{2}",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(domain.ToString()).Replace("%2B", "+"),queryString));
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:26,代码来源:Operations.cs


示例15: GetEmailExchangeServiceLicenses

		/// <summary>
		/// Get active licenses for specific period of time
		/// <param name="license">License type</param>
		/// <param name="toDate">Get active licenses until date</param>
		/// <param name="fromDate">Get active licenses since date </param>
		/// <param name="organizationName">The internal name of your exchange organization</param>
		/// <param name="exchangeService">The internal name of your exchange service</param>
		/// </summary>
		public async Task<OvhApi.Models.Email.Exchange.DailyLicense[]> GetEmailExchangeServiceLicenses(string organizationName,string exchangeService,DateTime? fromDate = null,DateTime? toDate = null,OvhApi.Models.Email.Exchange.OvhLicenceEnum? license = null)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNullNorEmpty("organizationName",organizationName);
			Ensure.NotNullNorEmpty("exchangeService",exchangeService);

			var queryString = new QueryString();
			queryString.Add("license",license);
			queryString.Add("toDate",toDate);
			queryString.Add("fromDate",fromDate);


return await RawCall<OvhApi.Models.Email.Exchange.DailyLicense[]>(HttpMethod.Get,String.Format("/email/exchange/{0}/service/{1}/license{2}",System.Uri.EscapeDataString(organizationName.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(exchangeService.ToString()).Replace("%2B", "+"),queryString));
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:23,代码来源:Operations.cs


示例16: CreateHostingWebDatabaseDump

		/// <summary>
		/// Request the dump from your database
		/// <param name="date">The date you want to dump</param>
		/// <param name="serviceName">The internal name of your hosting</param>
		/// <param name="name">Database name</param>
		/// </summary>
		public async Task<OvhApi.Models.Hosting.Web.Task> CreateHostingWebDatabaseDump(OvhApi.Models.Hosting.Web.Database.DumpDateEnum date,string serviceName,string name)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("date",date);
			Ensure.NotNullNorEmpty("serviceName",serviceName);
			Ensure.NotNullNorEmpty("name",name);


var requestBody = new Dictionary<string, object>();
requestBody.Add("date",date);

return await RawCall<OvhApi.Models.Hosting.Web.Task>(HttpMethod.Post,String.Format("/hosting/web/{0}/database/{1}/dump",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(name.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:20,代码来源:Operations.cs


示例17: GetHostingWebDatabaseStatistics

		/// <summary>
		/// Get statistics about this database
		/// <param name="period">To be written</param>
		/// <param name="type">To be written</param>
		/// <param name="serviceName">The internal name of your hosting</param>
		/// <param name="name">Database name</param>
		/// </summary>
		public async Task<OvhApi.Models.ComplexType.ChartSerie<OvhApi.Models.ComplexType.ChartTimestampValue>[]> GetHostingWebDatabaseStatistics(OvhApi.Models.Hosting.Web.StatisticsPeriodEnum period,OvhApi.Models.Hosting.Web.Database.StatisticsTypeEnum type,string serviceName,string name)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("period",period);
			Ensure.NotNull("type",type);
			Ensure.NotNullNorEmpty("serviceName",serviceName);
			Ensure.NotNullNorEmpty("name",name);

			var queryString = new QueryString();
			queryString.Add("period",period);
			queryString.Add("type",type);


return await RawCall<OvhApi.Models.ComplexType.ChartSerie<OvhApi.Models.ComplexType.ChartTimestampValue>[]>(HttpMethod.Get,String.Format("/hosting/web/{0}/database/{1}/statistics{2}",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(name.ToString()).Replace("%2B", "+"),queryString));
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:23,代码来源:Operations.cs


示例18: CreateHostingWebUser

		/// <summary>
		/// Create new ftp/ssh user
		/// <param name="password">Password</param>
		/// <param name="iisRemoteRights">User IIS rights</param>
		/// <param name="home">Home directory</param>
		/// <param name="webDavRights">User WebDav rights</param>
		/// <param name="login">Login use for your new user</param>
		/// <param name="serviceName">The internal name of your hosting</param>
		/// </summary>
		public async Task<OvhApi.Models.Hosting.Web.Task> CreateHostingWebUser(string password,string home,string login,string serviceName,OvhApi.Models.Hosting.Web.User.WebDavRightsEnum? webDavRights = null,OvhApi.Models.Hosting.Web.User.IisRightsEnum? iisRemoteRights = null)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNullNorEmpty("password",password);
			Ensure.NotNullNorEmpty("home",home);
			Ensure.NotNullNorEmpty("login",login);
			Ensure.NotNullNorEmpty("serviceName",serviceName);


var requestBody = new Dictionary<string, object>();
requestBody.Add("password",password);
requestBody.Add("iisRemoteRights",iisRemoteRights);
requestBody.Add("home",home);
requestBody.Add("webDavRights",webDavRights);
requestBody.Add("login",login);

return await RawCall<OvhApi.Models.Hosting.Web.Task>(HttpMethod.Post,String.Format("/hosting/web/{0}/user",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:28,代码来源:Operations.cs


示例19: CreateHostingWebCron

		/// <summary>
		/// Create new cron
		/// <param name="frequency">Frequency ( crontab format ) define for the script ( minutes are ignored )</param>
		/// <param name="email">Email use to receive error log ( stderr )</param>
		/// <param name="language">Cron language</param>
		/// <param name="description">Description field for you</param>
		/// <param name="command">Command to execute</param>
		/// <param name="serviceName">The internal name of your hosting</param>
		/// </summary>
		public async Task<string> CreateHostingWebCron(string frequency,OvhApi.Models.Hosting.Web.Cron.LanguageEnum language,string command,string serviceName,string description = null,string email = null)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNullNorEmpty("frequency",frequency);
			Ensure.NotNull("language",language);
			Ensure.NotNullNorEmpty("command",command);
			Ensure.NotNullNorEmpty("serviceName",serviceName);


var requestBody = new Dictionary<string, object>();
requestBody.Add("frequency",frequency);
requestBody.Add("email",email);
requestBody.Add("language",language);
requestBody.Add("description",description);
requestBody.Add("command",command);

return await RawCall<string>(HttpMethod.Post,String.Format("/hosting/web/{0}/cron",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:28,代码来源:Operations.cs


示例20: UpdateHostingWebUser

		/// <summary>
		/// Alter this object properties
		/// <param name="requestBody">New object properties</param>
		/// <param name="serviceName">The internal name of your hosting</param>
		/// <param name="login">Login used to connect on FTP</param>
		/// </summary>
		public async Task UpdateHostingWebUser(OvhApi.Models.Hosting.Web.User requestBody,string serviceName,string login)
		{
			if(ConsumerKey == null)
				throw new OvhException("This request must be authenticated");
			Ensure.NotNull("requestBody",requestBody);
			Ensure.NotNullNorEmpty("serviceName",serviceName);
			Ensure.NotNullNorEmpty("login",login);



await RawCall(HttpMethod.Put,String.Format("/hosting/web/{0}/user/{1}",System.Uri.EscapeDataString(serviceName.ToString()).Replace("%2B", "+"),System.Uri.EscapeDataString(login.ToString()).Replace("%2B", "+")),requestBody);
		}
开发者ID:biapar,项目名称:ovhapicil,代码行数:18,代码来源:Operations.cs



注:本文中的OvhApi类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# OwinContext类代码示例发布时间:2022-05-24
下一篇:
C# OverrideMethodDelegate类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap