178 shaares
8 liens privés
8 liens privés
2 résultats
taggé
api
-- encoding: utf-8 --
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh
Instanciate an OVH Client.
You can generate new credentials with full access to your account on
the token creation page
client = ovh.Client(
endpoint='ovh-eu', # Endpoint of API OVH Europe (List of available endpoints)
application_key='xxxxxxxxxx', # Application Key
application_secret='xxxxxxxxxx', # Application Secret
consumer_key='xxxxxxxxxx', # Consumer Key
)
result = client.put('/domain/zone/{zoneName}/record/{id}',
subDomain='test', // Resource record subdomain (type: string)
target='test', // Resource record target (type: string)
ttl=test, // Resource record ttl (type: long)
)
Pretty print
print json.dumps(result, indent=4)