当前位置: 首页>>代码示例>>C#>>正文


C# OvhApi类代码示例

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


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


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