idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
13,100 | public ArrayList < String > ip_firewall_GET ( String ip , Boolean enabled , OvhFirewallStateEnum state ) throws IOException { String qPath = "/ip/{ip}/firewall" ; StringBuilder sb = path ( qPath , ip ) ; query ( sb , "enabled" , enabled ) ; query ( sb , "state" , state ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t2 ) ; } | Ip under firewall |
13,101 | public OvhFirewallIp ip_firewall_POST ( String ip , String ipOnFirewall ) throws IOException { String qPath = "/ip/{ip}/firewall" ; StringBuilder sb = path ( qPath , ip ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "ipOnFirewall" , ipOnFirewall ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhFirewallIp . class ) ; } | AntiDDOS option . Add new IP on firewall |
13,102 | public ArrayList < Long > ip_firewall_ipOnFirewall_rule_GET ( String ip , String ipOnFirewall , OvhFirewallRuleStateEnum state ) throws IOException { String qPath = "/ip/{ip}/firewall/{ipOnFirewall}/rule" ; StringBuilder sb = path ( qPath , ip , ipOnFirewall ) ; query ( sb , "state" , state ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t1 ) ; } | Rules for this IP |
13,103 | public OvhFirewallNetworkRule ip_firewall_ipOnFirewall_rule_POST ( String ip , String ipOnFirewall , OvhFirewallActionEnum action , Long destinationPort , OvhFirewallProtocolEnum protocol , OvhFirewallSequenceRangeEnum sequence , String source , Long sourcePort , OvhFirewallOptionTCP tcpOption ) throws IOException { String qPath = "/ip/{ip}/firewall/{ipOnFirewall}/rule" ; StringBuilder sb = path ( qPath , ip , ipOnFirewall ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "action" , action ) ; addBody ( o , "destinationPort" , destinationPort ) ; addBody ( o , "protocol" , protocol ) ; addBody ( o , "sequence" , sequence ) ; addBody ( o , "source" , source ) ; addBody ( o , "sourcePort" , sourcePort ) ; addBody ( o , "tcpOption" , tcpOption ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhFirewallNetworkRule . class ) ; } | AntiDDOS option . Add new rule on your IP |
13,104 | public ArrayList < String > GET ( String description , String ip , String routedTo_serviceName , OvhIpTypeEnum type ) throws IOException { String qPath = "/ip" ; StringBuilder sb = path ( qPath ) ; query ( sb , "description" , description ) ; query ( sb , "ip" , ip ) ; query ( sb , "routedTo.serviceName" , routedTo_serviceName ) ; query ( sb , "type" , type ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t2 ) ; } | Your OVH IPs |
13,105 | public OvhLoadBalancingTask loadBalancing_serviceName_importCustomSsl_POST ( String serviceName , String certificate , String chain , String key ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/importCustomSsl" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "certificate" , certificate ) ; addBody ( o , "chain" , chain ) ; addBody ( o , "key" , key ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhLoadBalancingTask . class ) ; } | Import your own ssl certificate on your IP load balancing . Ssl option is needed to use this url . |
13,106 | public String loadBalancing_serviceName_internalNatIp_GET ( String serviceName , OvhLoadBalancingZoneEnum zone ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/internalNatIp" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "zone" , zone ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , String . class ) ; } | Ip subnet used by OVH to nat requests on your ip lb to your backends . You must ensure that your backends are not part of a network that overlap with this one . |
13,107 | public OvhLoadBalancingTask loadBalancing_serviceName_backend_backend_setWeight_POST ( String serviceName , String backend , Long weight ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/backend/{backend}/setWeight" ; StringBuilder sb = path ( qPath , serviceName , backend ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "weight" , weight ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhLoadBalancingTask . class ) ; } | Set the weight of a backend . For instance if backend A has a weight of 8 and backup B was a weight of 16 backend B will receive twice more connections as backend A . Backends must be on the same POP for the weight parameter to take effect between them . |
13,108 | public OvhLoadBalancingTask loadBalancing_serviceName_backend_backend_backupState_POST ( String serviceName , String backend , Boolean backupStateSet , String mainBackendIp ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/backend/{backend}/backupState" ; StringBuilder sb = path ( qPath , serviceName , backend ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "backupStateSet" , backupStateSet ) ; addBody ( o , "mainBackendIp" , mainBackendIp ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhLoadBalancingTask . class ) ; } | Set or unset the backend as a backup of another backend . Requests will be directed to the backup only if the main backend is in probe fail |
13,109 | public OvhLoadBalancingTask loadBalancing_serviceName_backend_POST ( String serviceName , String ipBackend , OvhLoadBalancingBackendProbeEnum probe , Long weight ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/backend" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "ipBackend" , ipBackend ) ; addBody ( o , "probe" , probe ) ; addBody ( o , "weight" , weight ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhLoadBalancingTask . class ) ; } | Add a new backend on your IP load balancing |
13,110 | public OvhLoadBalancingTask loadBalancing_serviceName_portsRedirection_srcPort_DELETE ( String serviceName , net . minidev . ovh . api . ip . OvhLoadBalancingAdditionalPortEnum srcPort ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/portsRedirection/{srcPort}" ; StringBuilder sb = path ( qPath , serviceName , srcPort ) ; String resp = exec ( qPath , "DELETE" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhLoadBalancingTask . class ) ; } | Delete a port redirection |
13,111 | public ArrayList < OvhLoadBalancingAdditionalPortEnum > loadBalancing_serviceName_portsRedirection_GET ( String serviceName ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/portsRedirection" ; StringBuilder sb = path ( qPath , serviceName ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t6 ) ; } | Get all srcPort |
13,112 | public OvhLoadBalancingTask loadBalancing_serviceName_portsRedirection_POST ( String serviceName , OvhLoadBalancingPort body ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/portsRedirection" ; StringBuilder sb = path ( qPath , serviceName ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , body ) ; return convertTo ( resp , OvhLoadBalancingTask . class ) ; } | Add a new port redirection |
13,113 | public OvhLoadBalancingTask loadBalancing_serviceName_stickiness_POST ( String serviceName , OvhLoadBalancingStickinessEnum stickiness ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/stickiness" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "stickiness" , stickiness ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhLoadBalancingTask . class ) ; } | Set Stickiness type . ipSource will stick clients to a backend by their source ip cookie will stick them by inserting a cookie none is to set no stickiness |
13,114 | public ArrayList < String > loadBalancing_serviceName_probeIp_GET ( String serviceName , OvhLoadBalancingZoneEnum zone ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/probeIp" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "zone" , zone ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t2 ) ; } | Ip subnet used to send probes to your backends |
13,115 | public OvhCompany register_company_POST ( OvhOVHCertifications OVHCertifications , OvhOVHCustomersAdvisedEnum OVHCustomersAdvised , OvhKnowledgeResourcesRangeEnum OVHKnowledgeResources , OvhOVHProductsUsed OVHProductsUsed , OvhTechnicalAdvancedResourcesRangeEnum OVHTechnicalAdvancedResources , OvhTechnicalExpertResourcesRangeEnum OVHTechnicalExpertResources , OvhActivitySectors activitySectors , String address , String city , OvhClientKinds clientKinds , String commercialName , OvhCountryEnum country , String description , String email , OvhEmployeesNumberEnum employeesNumber , OvhExpertisesChoices expertises , OvhExternalCertifications externalCertifications , String facebook , String linkedin , String logo , String name , OvhPartnerKnowledges partnerKnowledges , String phone , OvhProductCountries productCountries , String registrationNumber , OvhRevenueRangeEnum revenue , String twitter , String website , String zipCode ) throws IOException { String qPath = "/partners/register/company" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "OVHCertifications" , OVHCertifications ) ; addBody ( o , "OVHCustomersAdvised" , OVHCustomersAdvised ) ; addBody ( o , "OVHKnowledgeResources" , OVHKnowledgeResources ) ; addBody ( o , "OVHProductsUsed" , OVHProductsUsed ) ; addBody ( o , "OVHTechnicalAdvancedResources" , OVHTechnicalAdvancedResources ) ; addBody ( o , "OVHTechnicalExpertResources" , OVHTechnicalExpertResources ) ; addBody ( o , "activitySectors" , activitySectors ) ; addBody ( o , "address" , address ) ; addBody ( o , "city" , city ) ; addBody ( o , "clientKinds" , clientKinds ) ; addBody ( o , "commercialName" , commercialName ) ; addBody ( o , "country" , country ) ; addBody ( o , "description" , description ) ; addBody ( o , "email" , email ) ; addBody ( o , "employeesNumber" , employeesNumber ) ; addBody ( o , "expertises" , expertises ) ; addBody ( o , "externalCertifications" , externalCertifications ) ; addBody ( o , "facebook" , facebook ) ; addBody ( o , "linkedin" , linkedin ) ; addBody ( o , "logo" , logo ) ; addBody ( o , "name" , name ) ; addBody ( o , "partnerKnowledges" , partnerKnowledges ) ; addBody ( o , "phone" , phone ) ; addBody ( o , "productCountries" , productCountries ) ; addBody ( o , "registrationNumber" , registrationNumber ) ; addBody ( o , "revenue" , revenue ) ; addBody ( o , "twitter" , twitter ) ; addBody ( o , "website" , website ) ; addBody ( o , "zipCode" , zipCode ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhCompany . class ) ; } | Created a new company for the inscription |
13,116 | public OvhCompany register_company_companyId_GET ( String companyId ) throws IOException { String qPath = "/partners/register/company/{companyId}" ; StringBuilder sb = path ( qPath , companyId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhCompany . class ) ; } | Get information on a created company |
13,117 | public OvhContact register_company_companyId_contact_POST ( String companyId , String email , String facebook , String firstName , String lastName , String linkedin , Boolean newsletter , OvhNic [ ] otherNics , String phone , String role , String twitter ) throws IOException { String qPath = "/partners/register/company/{companyId}/contact" ; StringBuilder sb = path ( qPath , companyId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "email" , email ) ; addBody ( o , "facebook" , facebook ) ; addBody ( o , "firstName" , firstName ) ; addBody ( o , "lastName" , lastName ) ; addBody ( o , "linkedin" , linkedin ) ; addBody ( o , "newsletter" , newsletter ) ; addBody ( o , "otherNics" , otherNics ) ; addBody ( o , "phone" , phone ) ; addBody ( o , "role" , role ) ; addBody ( o , "twitter" , twitter ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhContact . class ) ; } | Created a new contact for the inscription |
13,118 | public OvhApplication register_company_companyId_application_POST ( String companyId , Boolean termsAndConditionsOfServiceAccepted ) throws IOException { String qPath = "/partners/register/company/{companyId}/application" ; StringBuilder sb = path ( qPath , companyId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "termsAndConditionsOfServiceAccepted" , termsAndConditionsOfServiceAccepted ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhApplication . class ) ; } | Submit application information for validation |
13,119 | public static DB database ( String url , String user , String password ) throws SQLException { return database ( DriverManager . getConnection ( url , user , password ) ) ; } | Create a new database handle for given database URL user and password . |
13,120 | public static < T > TypedDataSet < T > data ( DataSource dataSource , Conversion < T > conv ) { return new TypedDataSet < > ( dataSource , conv ) ; } | Create a new typed data set . |
13,121 | public static Query query ( DB db , String sql , Object ... args ) { return new Query ( db , sql , args ) ; } | Create a query data source from given SQL code . |
13,122 | public static void takeSnapshot ( DataSource ... dataSources ) { ensureDistinctDataSources ( dataSources , Function . identity ( ) ) ; foreach ( dataSources , ( callInfo , dataSource ) -> dataSource . executeQuery ( callInfo , true ) , CallInfo . create ( ) ) ; } | Take a database snapshot for several data sources . |
13,123 | public static void assertEquals ( DataSet expected , DataSet actual ) throws DBAssertionError { DBAssert . dataSetAssertion ( CallInfo . create ( ) , expected , actual ) ; } | Assert that two data sets are equivalent . |
13,124 | public static void assertTableExists ( DB db , String tableName ) throws DBAssertionError { DBAssert . assertTableExistence ( CallInfo . create ( ) , db , tableName , true ) ; } | Assert that table exists in the database . |
13,125 | public static void assertTableDoesNotExist ( DB db , String tableName ) throws DBAssertionError { DBAssert . assertTableExistence ( CallInfo . create ( ) , db , tableName , false ) ; } | Assert that table does not exist in a database . |
13,126 | public static void assertTableExists ( DB db , String ... tableNames ) throws DBAssertionError { multipleTableExistenceAssertions ( CallInfo . create ( ) , db , tableNames , true ) ; } | Assert that tables exist in the database . |
13,127 | public static void insert ( DataSet ... dataSets ) { foreach ( dataSets , DBSetup :: insert , CallInfo . create ( ) ) ; } | Insert data sets into the database . |
13,128 | public static void update ( DataSet ... dataSets ) { foreach ( dataSets , DBSetup :: update , CallInfo . create ( ) ) ; } | Update database according to given data sets . |
13,129 | public static void delete ( DataSet ... dataSets ) { foreach ( dataSets , DBSetup :: delete , CallInfo . create ( ) ) ; } | Delete data sets from the database . |
13,130 | public static void populate ( DataSet ... dataSets ) { ensureDistinctDataSources ( dataSets , DataSet :: getSource ) ; foreach ( dataSets , DBSetup :: populate , CallInfo . create ( ) ) ; } | Populate database with given data sets . |
13,131 | public static void deleteAll ( Table ... tables ) { foreach ( tables , DBSetup :: deleteAll , CallInfo . create ( ) ) ; } | Delete all data from given tables . |
13,132 | public static void truncate ( Table ... tables ) { foreach ( tables , DBSetup :: truncate , CallInfo . create ( ) ) ; } | Truncate tables . |
13,133 | public static int execute ( DB db , String sql , Object ... args ) { return DBSetup . execute ( CallInfo . create ( ) , db , sql , args ) ; } | Execute arbitrary SQL for a database instance . |
13,134 | public static boolean changed ( DataSource ... dataSources ) { if ( dataSources == null || dataSources . length == 0 ) { throw new InvalidOperationException ( "No data sources specified" ) ; } for ( DataSource ds : dataSources ) { if ( ds . getDirtyStatus ( ) ) { return true ; } } return false ; } | Check if given data sources are seen as changed . |
13,135 | public static void dump ( DataSet data , PrintStream out ) { try ( Log log = Log . create ( out ) ) { log . write ( CallInfo . create ( ) , data ) ; } } | Dump the contents of a data set . |
13,136 | public static void dump ( DataSource dataSource , PrintStream out ) { try ( Log log = Log . create ( out ) ) { log . write ( CallInfo . create ( ) , executeQuery ( dataSource ) ) ; } } | Dump the database contents for a data source . |
13,137 | private static < T > void foreach ( T [ ] arguments , CallHandler < T > handler , CallInfo callInfo ) { if ( arguments == null || arguments . length == 0 ) { throw new InvalidOperationException ( "Empty or null array!" ) ; } for ( T argument : arguments ) { handler . action ( callInfo , argument ) ; } } | Utility method to deal with facade methods that accept variable length arguments . |
13,138 | public String serviceName_reverse_POST ( String serviceName , String reverse ) throws IOException { String qPath = "/hosting/reseller/{serviceName}/reverse" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "reverse" , reverse ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , String . class ) ; } | Set new reverse to ip |
13,139 | public String serviceName_language_POST ( String serviceName , OvhPleskLanguageTypeEnum language ) throws IOException { String qPath = "/hosting/reseller/{serviceName}/language" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "language" , language ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , String . class ) ; } | Change language of the Plesk instance |
13,140 | public OvhOvhId serviceName_vendor_ovhId_POST ( String serviceName , OvhVendorObjectTypeEnum objectType , String vendorId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/vendor/ovhId" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "objectType" , objectType ) ; addBody ( o , "vendorId" , vendorId ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhOvhId . class ) ; } | Get ovh id from object type |
13,141 | public OvhTask serviceName_task_taskId_changeMaintenanceExecutionDate_POST ( String serviceName , Long taskId , Date executionDate ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/task/{taskId}/changeMaintenanceExecutionDate" ; StringBuilder sb = path ( qPath , serviceName , taskId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "executionDate" , executionDate ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Change the execution date of a maintenance . Works only if task type is maintenance and if it has not started yet . |
13,142 | public OvhTask serviceName_vmEncryption_kms_kmsId_changeProperties_POST ( String serviceName , Long kmsId , String description , String sslThumbprint ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/vmEncryption/kms/{kmsId}/changeProperties" ; StringBuilder sb = path ( qPath , serviceName , kmsId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "description" , description ) ; addBody ( o , "sslThumbprint" , sslThumbprint ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Change option user access properties |
13,143 | public OvhTask serviceName_user_userId_objectRight_POST ( String serviceName , Long userId , Boolean propagate , OvhRightEnum right , OvhUserObjectRightTypeEnum type , String vmwareObjectId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/user/{userId}/objectRight" ; StringBuilder sb = path ( qPath , serviceName , userId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "propagate" , propagate ) ; addBody ( o , "right" , right ) ; addBody ( o , "type" , type ) ; addBody ( o , "vmwareObjectId" , vmwareObjectId ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Add a new object right to user in datacenter on Private Cloud |
13,144 | public OvhTask serviceName_user_userId_changeProperties_POST ( String serviceName , Long userId , Boolean canManageIpFailOvers , Boolean canManageNetwork , Boolean canManageRights , String email , String firstName , Boolean fullAdminRo , String lastName , Boolean nsxRight , String phoneNumber , Boolean receiveAlerts , Boolean tokenValidator ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/user/{userId}/changeProperties" ; StringBuilder sb = path ( qPath , serviceName , userId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "canManageIpFailOvers" , canManageIpFailOvers ) ; addBody ( o , "canManageNetwork" , canManageNetwork ) ; addBody ( o , "canManageRights" , canManageRights ) ; addBody ( o , "email" , email ) ; addBody ( o , "firstName" , firstName ) ; addBody ( o , "fullAdminRo" , fullAdminRo ) ; addBody ( o , "lastName" , lastName ) ; addBody ( o , "nsxRight" , nsxRight ) ; addBody ( o , "phoneNumber" , phoneNumber ) ; addBody ( o , "receiveAlerts" , receiveAlerts ) ; addBody ( o , "tokenValidator" , tokenValidator ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Change Private Cloud user properties |
13,145 | public OvhTask serviceName_user_POST ( String serviceName , Boolean canAddRessource , Boolean canManageRights , String email , Date expirationDate , String firstName , String lastName , String name , OvhNetworkRoleEnum networkRole , Boolean nsxRight , String password , String phoneNumber , Boolean receiveAlerts , OvhRightEnum right , Boolean tokenValidator , OvhVmNetworkRoleEnum vmNetworkRole ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/user" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "canAddRessource" , canAddRessource ) ; addBody ( o , "canManageRights" , canManageRights ) ; addBody ( o , "email" , email ) ; addBody ( o , "expirationDate" , expirationDate ) ; addBody ( o , "firstName" , firstName ) ; addBody ( o , "lastName" , lastName ) ; addBody ( o , "name" , name ) ; addBody ( o , "networkRole" , networkRole ) ; addBody ( o , "nsxRight" , nsxRight ) ; addBody ( o , "password" , password ) ; addBody ( o , "phoneNumber" , phoneNumber ) ; addBody ( o , "receiveAlerts" , receiveAlerts ) ; addBody ( o , "right" , right ) ; addBody ( o , "tokenValidator" , tokenValidator ) ; addBody ( o , "vmNetworkRole" , vmNetworkRole ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Create a new User in your Private Cloud |
13,146 | public ArrayList < Long > serviceName_globalTasks_GET ( String serviceName , Long datacenterId , Date endDate_from , Date endDate_to , Date executionDate_from , Date executionDate_to , Long filerId , Long hostId , Date lastModificationDate_from , Date lastModificationDate_to , String name , Long networkAccessId , Long orderId , Long parentTaskId , OvhTaskStateEnum [ ] state , Long userId , Long vlanId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/globalTasks" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "datacenterId" , datacenterId ) ; query ( sb , "endDate.from" , endDate_from ) ; query ( sb , "endDate.to" , endDate_to ) ; query ( sb , "executionDate.from" , executionDate_from ) ; query ( sb , "executionDate.to" , executionDate_to ) ; query ( sb , "filerId" , filerId ) ; query ( sb , "hostId" , hostId ) ; query ( sb , "lastModificationDate.from" , lastModificationDate_from ) ; query ( sb , "lastModificationDate.to" , lastModificationDate_to ) ; query ( sb , "name" , name ) ; query ( sb , "networkAccessId" , networkAccessId ) ; query ( sb , "orderId" , orderId ) ; query ( sb , "parentTaskId" , parentTaskId ) ; query ( sb , "state" , state ) ; query ( sb , "userId" , userId ) ; query ( sb , "vlanId" , vlanId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t2 ) ; } | Get filtered tasks associated with this Private Cloud |
13,147 | public OvhTask serviceName_federation_activeDirectory_POST ( String serviceName , String baseDnForGroups , String baseDnForUsers , String description , String domainAlias , String domainName , String ip , String password , String username ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/federation/activeDirectory" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "baseDnForGroups" , baseDnForGroups ) ; addBody ( o , "baseDnForUsers" , baseDnForUsers ) ; addBody ( o , "description" , description ) ; addBody ( o , "domainAlias" , domainAlias ) ; addBody ( o , "domainName" , domainName ) ; addBody ( o , "ip" , ip ) ; addBody ( o , "password" , password ) ; addBody ( o , "username" , username ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Add a new option user access |
13,148 | public OvhTask serviceName_federation_activeDirectory_activeDirectoryId_changeProperties_POST ( String serviceName , Long activeDirectoryId , String description , String password , String username ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/federation/activeDirectory/{activeDirectoryId}/changeProperties" ; StringBuilder sb = path ( qPath , serviceName , activeDirectoryId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "description" , description ) ; addBody ( o , "password" , password ) ; addBody ( o , "username" , username ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Change Active Directory properties |
13,149 | public OvhTask serviceName_changeProperties_POST ( String serviceName , String description , Boolean sslV3 , OvhUserAccessPolicyEnum userAccessPolicy , Long userLimitConcurrentSession , OvhUserLogoutPolicyEnum userLogoutPolicy , Long userSessionTimeout ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/changeProperties" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "description" , description ) ; addBody ( o , "sslV3" , sslV3 ) ; addBody ( o , "userAccessPolicy" , userAccessPolicy ) ; addBody ( o , "userLimitConcurrentSession" , userLimitConcurrentSession ) ; addBody ( o , "userLogoutPolicy" , userLogoutPolicy ) ; addBody ( o , "userSessionTimeout" , userSessionTimeout ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Update this Private Cloud properties . |
13,150 | public ArrayList < OvhIpDetails > serviceName_ip_network_details_GET ( String serviceName , String network ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/ip/{network}/details" ; StringBuilder sb = path ( qPath , serviceName , network ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t3 ) ; } | List details about this IP Block |
13,151 | public OvhTask serviceName_datacenter_POST ( String serviceName , String commercialRangeName , String vrackName ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "commercialRangeName" , commercialRangeName ) ; addBody ( o , "vrackName" , vrackName ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Add a new Datacenter in your Private Cloud |
13,152 | public net . minidev . ovh . api . dedicatedcloud . host . OvhHourlyConsumption serviceName_datacenter_datacenterId_host_hostId_hourlyConsumption_GET ( String serviceName , Long datacenterId , Long hostId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/host/{hostId}/hourlyConsumption" ; StringBuilder sb = path ( qPath , serviceName , datacenterId , hostId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , net . minidev . ovh . api . dedicatedcloud . host . OvhHourlyConsumption . class ) ; } | Hourly consumption associated with this host . |
13,153 | public ArrayList < OvhProfile > serviceName_datacenter_datacenterId_orderableFilerProfiles_GET ( String serviceName , Long datacenterId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/orderableFilerProfiles" ; StringBuilder sb = path ( qPath , serviceName , datacenterId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t5 ) ; } | List available filers in a given Private Cloud Datacenter |
13,154 | public net . minidev . ovh . api . dedicatedcloud . disasterrecovery . OvhProfile serviceName_datacenter_datacenterId_disasterRecovery_zerto_state_POST ( String serviceName , Long datacenterId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/disasterRecovery/zerto/state" ; StringBuilder sb = path ( qPath , serviceName , datacenterId ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , null ) ; return convertTo ( resp , net . minidev . ovh . api . dedicatedcloud . disasterrecovery . OvhProfile . class ) ; } | Get the current state of Zerto deployment on your dedicated Cloud . |
13,155 | public OvhTask serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_configureVpn_POST ( String serviceName , Long datacenterId , String preSharedKey , String remoteEndpointInternalIp , String remoteEndpointPublicIp , String remoteVraNetwork , String remoteZvmInternalIp ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/disasterRecovery/zertoSingle/configureVpn" ; StringBuilder sb = path ( qPath , serviceName , datacenterId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "preSharedKey" , preSharedKey ) ; addBody ( o , "remoteEndpointInternalIp" , remoteEndpointInternalIp ) ; addBody ( o , "remoteEndpointPublicIp" , remoteEndpointPublicIp ) ; addBody ( o , "remoteVraNetwork" , remoteVraNetwork ) ; addBody ( o , "remoteZvmInternalIp" , remoteZvmInternalIp ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Configure vpn between your OVH Private Cloud and your onsite infrastructure |
13,156 | public OvhTask serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_enable_POST ( String serviceName , Long datacenterId , String localVraNetwork , String ovhEndpointIp , String remoteVraNetwork ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/disasterRecovery/zertoSingle/enable" ; StringBuilder sb = path ( qPath , serviceName , datacenterId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "localVraNetwork" , localVraNetwork ) ; addBody ( o , "ovhEndpointIp" , ovhEndpointIp ) ; addBody ( o , "remoteVraNetwork" , remoteVraNetwork ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Enable Zerto replication between your OVH Private Cloud and your onsite infrastructure |
13,157 | public OvhTask serviceName_datacenter_datacenterId_vm_vmId_backupJob_restorePoints_restorePointId_restore_POST ( String serviceName , Long datacenterId , Long vmId , Long restorePointId , Long filerId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}/restore" ; StringBuilder sb = path ( qPath , serviceName , datacenterId , vmId , restorePointId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "filerId" , filerId ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Restore this restore point |
13,158 | public OvhTask serviceName_datacenter_datacenterId_vm_vmId_backupJob_enable_POST ( String serviceName , Long datacenterId , Long vmId , OvhBackupDaysEnum [ ] backupDays ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/enable" ; StringBuilder sb = path ( qPath , serviceName , datacenterId , vmId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "backupDays" , backupDays ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Enable backup solution on this virtual Machine |
13,159 | public OvhHourlyConsumption serviceName_datacenter_datacenterId_filer_filerId_hourlyConsumption_GET ( String serviceName , Long datacenterId , Long filerId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/filer/{filerId}/hourlyConsumption" ; StringBuilder sb = path ( qPath , serviceName , datacenterId , filerId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhHourlyConsumption . class ) ; } | Hourly consumption associated with this Filer |
13,160 | public ArrayList < net . minidev . ovh . api . dedicatedcloud . host . OvhProfile > serviceName_datacenter_datacenterId_orderableHostProfiles_GET ( String serviceName , Long datacenterId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/orderableHostProfiles" ; StringBuilder sb = path ( qPath , serviceName , datacenterId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t6 ) ; } | List available hosts in a given Private Cloud Datacenter |
13,161 | public OvhTask serviceName_datacenter_datacenterId_backup_changeProperties_POST ( String serviceName , Long datacenterId , Boolean backupDurationInReport , OvhOfferTypeEnum backupOffer , Boolean backupSizeInReport , Boolean diskSizeInReport , Boolean fullDayInReport , String mailAddress , Boolean restorePointInReport , Date scheduleHour ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/changeProperties" ; StringBuilder sb = path ( qPath , serviceName , datacenterId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "backupDurationInReport" , backupDurationInReport ) ; addBody ( o , "backupOffer" , backupOffer ) ; addBody ( o , "backupSizeInReport" , backupSizeInReport ) ; addBody ( o , "diskSizeInReport" , diskSizeInReport ) ; addBody ( o , "fullDayInReport" , fullDayInReport ) ; addBody ( o , "mailAddress" , mailAddress ) ; addBody ( o , "restorePointInReport" , restorePointInReport ) ; addBody ( o , "scheduleHour" , scheduleHour ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Edit the backup on a Private Cloud |
13,162 | public OvhTask serviceName_datacenter_datacenterId_backup_enable_POST ( String serviceName , Long datacenterId , OvhOfferTypeEnum backupOffer ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/enable" ; StringBuilder sb = path ( qPath , serviceName , datacenterId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "backupOffer" , backupOffer ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ; } | Enable backup solution on a Private Cloud |
13,163 | public ArrayList < OvhZpoolStockProfile > location_pccZone_stock_zpool_GET ( String pccZone , String profileFilter ) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}/stock/zpool" ; StringBuilder sb = path ( qPath , pccZone ) ; query ( sb , "profileFilter" , profileFilter ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t7 ) ; } | Available zpool stock |
13,164 | public ArrayList < OvhHostStockProfile > location_pccZone_stock_host_GET ( String pccZone , Long minYear ) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}/stock/host" ; StringBuilder sb = path ( qPath , pccZone ) ; query ( sb , "minYear" , minYear ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t8 ) ; } | Available host stock |
13,165 | public ArrayList < OvhPccStockProfile > location_pccZone_stock_pcc_GET ( String pccZone ) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}/stock/pcc" ; StringBuilder sb = path ( qPath , pccZone ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t9 ) ; } | Available PCC stock |
13,166 | public void tickets_ticketId_reply_POST ( Long ticketId , String body ) throws IOException { String qPath = "/support/tickets/{ticketId}/reply" ; StringBuilder sb = path ( qPath , ticketId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "body" , body ) ; exec ( qPath , "POST" , sb . toString ( ) , o ) ; } | Reply to ticket |
13,167 | public Boolean tickets_ticketId_canBeScored_GET ( Long ticketId ) throws IOException { String qPath = "/support/tickets/{ticketId}/canBeScored" ; StringBuilder sb = path ( qPath , ticketId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , Boolean . class ) ; } | Checks whether ticket can be scored |
13,168 | public ArrayList < OvhMessage > tickets_ticketId_messages_GET ( Long ticketId ) throws IOException { String qPath = "/support/tickets/{ticketId}/messages" ; StringBuilder sb = path ( qPath , ticketId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t1 ) ; } | Get ticket messages |
13,169 | public void tickets_ticketId_score_POST ( Long ticketId , String score , String scoreComment ) throws IOException { String qPath = "/support/tickets/{ticketId}/score" ; StringBuilder sb = path ( qPath , ticketId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "score" , score ) ; addBody ( o , "scoreComment" , scoreComment ) ; exec ( qPath , "POST" , sb . toString ( ) , o ) ; } | Set ticket score |
13,170 | public ArrayList < Long > tickets_GET ( Boolean archived , OvhTicketCategoryEnum category , Date maxCreationDate , Date minCreationDate , OvhTicketProductEnum product , String serviceName , OvhTicketStatusEnum status , String subject , String ticketNumber ) throws IOException { String qPath = "/support/tickets" ; StringBuilder sb = path ( qPath ) ; query ( sb , "archived" , archived ) ; query ( sb , "category" , category ) ; query ( sb , "maxCreationDate" , maxCreationDate ) ; query ( sb , "minCreationDate" , minCreationDate ) ; query ( sb , "product" , product ) ; query ( sb , "serviceName" , serviceName ) ; query ( sb , "status" , status ) ; query ( sb , "subject" , subject ) ; query ( sb , "ticketNumber" , ticketNumber ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t2 ) ; } | List support tickets identifiers for this service |
13,171 | public OvhNewMessageInfo tickets_create_POST ( String body , OvhTicketCategoryEnum category , OvhTicketProductEnum product , String serviceName , OvhTicketSubCategoryEnum subcategory , String subject , OvhTicketTypeEnum type ) throws IOException { String qPath = "/support/tickets/create" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "body" , body ) ; addBody ( o , "category" , category ) ; addBody ( o , "product" , product ) ; addBody ( o , "serviceName" , serviceName ) ; addBody ( o , "subcategory" , subcategory ) ; addBody ( o , "subject" , subject ) ; addBody ( o , "type" , type ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhNewMessageInfo . class ) ; } | Create a new ticket |
13,172 | public final TableBuilder columns ( String ... columns ) { if ( columns == null || columns . length == 0 ) { throw new InvalidOperationException ( "Columns array is null or empty." ) ; } if ( tableColumns != null ) { throw new InvalidOperationException ( "The table columns are already defined." ) ; } tableColumns = columns . clone ( ) ; return this ; } | Set columns . |
13,173 | public final TableBuilder key ( String ... columns ) { if ( columns == null || columns . length == 0 ) { throw new InvalidOperationException ( "Columns array is null or empty." ) ; } if ( keyColumns != null ) { throw new InvalidOperationException ( "The key columns are already defined." ) ; } keyColumns = columns . clone ( ) ; return this ; } | Set key columns . |
13,174 | public Table build ( DB db ) { if ( tableName == null ) { throw new InvalidOperationException ( "The table name has not been set." ) ; } if ( tableColumns == null ) { tableColumns = ALL_COLUMNS ; } return new Table ( CallInfo . create ( ) , db , tableName , tableColumns , keyColumns ) ; } | Build the table object . |
13,175 | protected File gettmpStore ( String nic ) { if ( consumer_key_storage == null || ! consumer_key_storage . isDirectory ( ) ) { if ( e1 == 0 ) { e1 ++ ; log . error ( "No cert directory, can not save consumer_key! please set `consumer_key_storage` variable to a valid directory in your {}, or in your environ variale OVH_CONSUMER_KEY_STORAGE" , configFiles ) ; } return null ; } return new File ( consumer_key_storage , nic + ".ck.txt" ) ; } | storage for previous CK |
13,176 | public static void main ( String [ ] args ) throws IOException { ApiOvhCore core = new ApiOvhCore ( ) ; ApiOvhCloud cloud = new ApiOvhCloud ( core ) ; ArrayList < String > projects = cloud . project_GET ( ) ; for ( String project : projects ) { System . out . println ( project ) ; ArrayList < OvhNetwork > networds = cloud . project_serviceName_network_private_GET ( project ) ; List < String > debug = networds . stream ( ) . map ( ApiOvhUtils :: objectJsonBody ) . collect ( Collectors . toList ( ) ) ; System . out . println ( debug ) ; } } | Login using ovh . conf |
13,177 | public void serviceName_task_taskId_cancel_POST ( String serviceName , Long taskId ) throws IOException { String qPath = "/dedicated/housing/{serviceName}/task/{taskId}/cancel" ; StringBuilder sb = path ( qPath , serviceName , taskId ) ; exec ( qPath , "POST" , sb . toString ( ) , null ) ; } | this action stop the task progression if it s possible |
13,178 | public net . minidev . ovh . api . dedicated . server . OvhTask serviceName_features_backupFTP_POST ( String serviceName ) throws IOException { String qPath = "/dedicated/housing/{serviceName}/features/backupFTP" ; StringBuilder sb = path ( qPath , serviceName ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , null ) ; return convertTo ( resp , net . minidev . ovh . api . dedicated . server . OvhTask . class ) ; } | Create a new Backup FTP space |
13,179 | public String serviceName_PUT ( String serviceName , OvhCrushTunablesEnum crushTunables , String label ) throws IOException { String qPath = "/dedicated/ceph/{serviceName}" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "crushTunables" , crushTunables ) ; addBody ( o , "label" , label ) ; String resp = exec ( qPath , "PUT" , sb . toString ( ) , o ) ; return convertTo ( resp , String . class ) ; } | Update cluster details |
13,180 | public String serviceName_pool_POST ( String serviceName , String poolName ) throws IOException { String qPath = "/dedicated/ceph/{serviceName}/pool" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "poolName" , poolName ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , String . class ) ; } | Create a new ceph pool |
13,181 | public String serviceName_user_userName_pool_PUT ( String serviceName , String userName , Boolean classRead , Boolean classWrite , Boolean execute , String poolName , Boolean read , Boolean write ) throws IOException { String qPath = "/dedicated/ceph/{serviceName}/user/{userName}/pool" ; StringBuilder sb = path ( qPath , serviceName , userName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "classRead" , classRead ) ; addBody ( o , "classWrite" , classWrite ) ; addBody ( o , "execute" , execute ) ; addBody ( o , "poolName" , poolName ) ; addBody ( o , "read" , read ) ; addBody ( o , "write" , write ) ; String resp = exec ( qPath , "PUT" , sb . toString ( ) , o ) ; return convertTo ( resp , String . class ) ; } | Update user - pool permission for single pool |
13,182 | public String serviceName_acl_POST ( String serviceName , String [ ] aclList ) throws IOException { String qPath = "/dedicated/ceph/{serviceName}/acl" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "aclList" , aclList ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , String . class ) ; } | Create one or more new IP ACLs |
13,183 | public ArrayList < OvhTask > serviceName_backupRepository_inventoryName_upgradeQuota_POST ( String serviceName , String inventoryName , Long newQuota ) throws IOException { String qPath = "/veeamCloudConnect/{serviceName}/backupRepository/{inventoryName}/upgradeQuota" ; StringBuilder sb = path ( qPath , serviceName , inventoryName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "newQuota" , newQuota ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , t2 ) ; } | Change your quota |
13,184 | public OvhConsumption serviceName_consumption_GET ( String serviceName , Long duration ) throws IOException { String qPath = "/metrics/{serviceName}/consumption" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "duration" , duration ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhConsumption . class ) ; } | Get consumption for your service |
13,185 | public OvhToken serviceName_token_tokenId_GET ( String serviceName , String tokenId ) throws IOException { String qPath = "/metrics/{serviceName}/token/{tokenId}" ; StringBuilder sb = path ( qPath , serviceName , tokenId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhToken . class ) ; } | Get a specific token |
13,186 | public OvhToken serviceName_token_tokenId_PUT ( String serviceName , String tokenId , String description ) throws IOException { String qPath = "/metrics/{serviceName}/token/{tokenId}" ; StringBuilder sb = path ( qPath , serviceName , tokenId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "description" , description ) ; String resp = exec ( qPath , "PUT" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhToken . class ) ; } | Modify a token |
13,187 | static void insert ( CallInfo callInfo , DataSet data ) { Table table = asTable ( data . getSource ( ) ) ; if ( data . isEmpty ( ) ) { throw new InvalidOperationException ( "Empty data set." ) ; } table . setDirtyStatus ( true ) ; doInsert ( callInfo , table , data ) ; } | Insert a data set onto the database . |
13,188 | static void populate ( CallInfo callInfo , DataSet data ) { Table table = asTable ( data . getSource ( ) ) ; table . setDirtyStatus ( true ) ; doPopulate ( callInfo , table , data ) ; } | Populate database with a data set . |
13,189 | static void populateIfChanged ( CallInfo callInfo , DataSet data ) { Table table = asTable ( data . getSource ( ) ) ; if ( table . getDirtyStatus ( ) ) { table . setDirtyStatus ( true ) ; doPopulate ( callInfo , table , data ) ; } } | Populate database table with a data set if associated table has changed . |
13,190 | private static void doPopulate ( CallInfo callInfo , Table table , DataSet data ) { doDeleteAll ( callInfo , table ) ; doInsert ( callInfo , table , data ) ; table . setSnapshot ( data ) ; } | Auxiliary method to populate a table . |
13,191 | private static void doInsert ( CallInfo callInfo , Table table , DataSet data ) { StringBuilder sql = new StringBuilder ( "INSERT INTO " ) ; List < String > tableColumns = table . getColumns ( ) ; int columnCount = tableColumns . size ( ) ; int [ ] paramIdx = new int [ columnCount ] ; int param = 0 ; Iterator < String > itr = tableColumns . iterator ( ) ; String col = itr . next ( ) ; paramIdx [ param ] = ++ param ; sql . append ( table . getName ( ) ) . append ( '(' ) . append ( col ) ; while ( itr . hasNext ( ) ) { paramIdx [ param ] = ++ param ; col = itr . next ( ) ; sql . append ( ',' ) . append ( col ) ; } sql . append ( ") VALUES (?" ) ; for ( int i = 1 ; i < columnCount ; i ++ ) { sql . append ( ",?" ) ; } sql . append ( ')' ) ; dataSetOperation ( callInfo , table , data , sql . toString ( ) , paramIdx ) ; } | Utility method to perform actual data insertion . |
13,192 | public static void update ( CallInfo callInfo , DataSet data ) { Table table = asTable ( data . getSource ( ) ) ; List < String > keyColumns = table . getKeyColumns ( ) ; if ( keyColumns . isEmpty ( ) ) { throw new InvalidOperationException ( "No key columns defined." ) ; } List < String > tableColumns = table . getColumns ( ) ; int columnCount = tableColumns . size ( ) ; List < String > columnsToUpdate = new LinkedList < > ( ) ; columnsToUpdate . addAll ( tableColumns ) ; columnsToUpdate . removeAll ( keyColumns ) ; if ( columnsToUpdate . isEmpty ( ) ) { throw new InvalidOperationException ( "No columns to update." ) ; } int [ ] paramIdx = new int [ columnCount ] ; int param = 0 ; StringBuilder sql = new StringBuilder ( "UPDATE " ) ; Iterator < String > itr = columnsToUpdate . iterator ( ) ; String col = itr . next ( ) ; paramIdx [ tableColumns . indexOf ( col ) ] = ++ param ; sql . append ( table . getName ( ) ) . append ( " SET " ) . append ( col ) . append ( "=?" ) ; while ( itr . hasNext ( ) ) { col = itr . next ( ) ; paramIdx [ tableColumns . indexOf ( col ) ] = ++ param ; sql . append ( ',' ) . append ( col ) . append ( "=?" ) ; } itr = keyColumns . iterator ( ) ; col = itr . next ( ) ; paramIdx [ tableColumns . indexOf ( col ) ] = ++ param ; sql . append ( WHERE_ ) . append ( col ) . append ( "=?" ) ; while ( itr . hasNext ( ) ) { col = itr . next ( ) ; paramIdx [ tableColumns . indexOf ( col ) ] = ++ param ; sql . append ( AND_ ) . append ( col ) . append ( "=?" ) ; } table . setDirtyStatus ( true ) ; dataSetOperation ( callInfo , table , data , sql . toString ( ) , paramIdx ) ; } | Update rows according to data set . |
13,193 | public static void delete ( CallInfo callInfo , DataSet data ) { Table table = asTable ( data . getSource ( ) ) ; List < String > keyColumns = table . getKeyColumns ( ) ; if ( keyColumns . isEmpty ( ) ) { throw new InvalidOperationException ( "No key columns defined." ) ; } List < String > tableColumns = table . getColumns ( ) ; int param = 0 ; int [ ] paramIdx = new int [ tableColumns . size ( ) ] ; Iterator < String > itr = keyColumns . iterator ( ) ; StringBuilder sql = new StringBuilder ( ) ; String kcol = itr . next ( ) ; paramIdx [ tableColumns . indexOf ( kcol ) ] = ++ param ; sql . append ( DELETE_FROM_ ) . append ( table . getName ( ) ) . append ( WHERE_ ) . append ( kcol ) . append ( "=?" ) ; while ( itr . hasNext ( ) ) { kcol = itr . next ( ) ; paramIdx [ tableColumns . indexOf ( kcol ) ] = ++ param ; sql . append ( AND_ ) . append ( kcol ) . append ( "=?" ) ; } table . setDirtyStatus ( true ) ; dataSetOperation ( callInfo , table , data , sql . toString ( ) , paramIdx ) ; } | Delete rows from data set . |
13,194 | static int deleteAll ( CallInfo callInfo , Table table ) { table . setDirtyStatus ( true ) ; return doDeleteAll ( callInfo , table ) ; } | Delete all data from table . |
13,195 | private static int doDeleteAll ( CallInfo callInfo , Table table ) { DB db = table . getDB ( ) ; return db . access ( callInfo , ( ) -> { String sql = DELETE_FROM_ + table . getName ( ) ; db . logSetup ( callInfo , sql ) ; try ( WrappedStatement ws = db . compile ( sql ) ) { return ws . getStatement ( ) . executeUpdate ( ) ; } } ) ; } | Perform a delete - all operation . |
13,196 | static void truncate ( CallInfo callInfo , Table table ) { final DB db = table . getDB ( ) ; db . access ( callInfo , ( ) -> { String sql = "TRUNCATE TABLE " + table . getName ( ) ; table . setDirtyStatus ( true ) ; db . logSetup ( callInfo , sql ) ; try ( WrappedStatement ws = db . compile ( sql ) ) { ws . getStatement ( ) . execute ( ) ; } return 0 ; } ) ; } | Truncate table . |
13,197 | static int deleteAll ( CallInfo callInfo , Table table , String where , Object ... args ) { final DB db = table . getDB ( ) ; return db . access ( callInfo , ( ) -> { table . setDirtyStatus ( true ) ; String sql = DELETE_FROM_ + table . getName ( ) + WHERE_ + where ; db . logSetup ( callInfo , sql ) ; try ( WrappedStatement ws = db . compile ( sql ) ) { PreparedStatement deleteStmt = ws . getStatement ( ) ; if ( args != null && args . length > 0 ) { for ( int i = 0 ; i < args . length ; i ++ ) { deleteStmt . setObject ( i + 1 , args [ i ] ) ; } } return deleteStmt . executeUpdate ( ) ; } } ) ; } | Delete all data based on a WHERE clause . |
13,198 | static void drop ( CallInfo callInfo , DB db , String tableName ) { String sql = String . format ( "DROP TABLE %s" , tableName ) ; db . access ( callInfo , ( ) -> { db . logSetup ( callInfo , sql ) ; try ( WrappedStatement ws = db . compile ( sql ) ) { PreparedStatement dropStmt = ws . getStatement ( ) ; dropStmt . execute ( ) ; } return 0 ; } ) ; } | Drop a table . |
13,199 | static int execute ( CallInfo callInfo , DB db , String sql , Object [ ] args ) { return db . access ( callInfo , ( ) -> { db . logSetup ( callInfo , sql ) ; try ( WrappedStatement ws = db . compile ( sql ) ) { PreparedStatement stmt = ws . getStatement ( ) ; if ( args != null && args . length != 0 ) { for ( int i = 0 ; i < args . length ; i ++ ) { stmt . setObject ( i + 1 , args [ i ] ) ; } } stmt . execute ( ) ; return stmt . getUpdateCount ( ) ; } } ) ; } | Execute arbitrary SQL code . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.