acapi2.resources package¶
Submodules¶
acapi2.resources.acquiadata module¶
Acquia Cloud API Data network resource
acapi2.resources.acquialist module¶
Dictionary of Acquia Cloud API resources.
- class acapi2.resources.acquialist.AcquiaList(base_uri, api_key, api_secret, *args, **kwargs)[source]¶
Bases:
acapi2.resources.acquiadata.AcquiaData
,dict
- abstract property base_uri: str¶
- Return type
str
- property sorted_keys: list¶
- Return type
list
acapi2.resources.acquiaresource module¶
Acquia Cloud API resource base.
acapi2.resources.agreement module¶
Agreement resource
acapi2.resources.agreementlist module¶
Agreement list
acapi2.resources.application module¶
Acquia application resource.
- class acapi2.resources.application.Application(uri, api_key, api_secret, data=None)[source]¶
acapi2.resources.applicationlist module¶
Acquia Applications resource
acapi2.resources.environment module¶
Manipulate environments and perform related actions.
- class acapi2.resources.environment.Environment(uri, api_key, api_secret, data=None)[source]¶
Bases:
acapi2.resources.acquiaresource.AcquiaResource
- activate_ssl_cert(cert_id)[source]¶
Activate a previously installed SSL cert. :param: cert_id: The Acquia certificate ID.
- Return type
Session
- backup_details(db_name, backup_id)[source]¶
Return details about a specific backup :type db_name:
str
:param db_name: Database name, typically lower snake case. :type backup_id:str
:param backup_id: Database backup id.- Return type
Session
- backup_download(db_name, backup_id)[source]¶
Get link to be able to download backup.
- Parameters
db_name (
str
) – Database name, typically lower snake case.backup_id (
str
) – Database backup id.
- Return type
Session
- Returns
Acquia response
- backups(db_name)[source]¶
Return a list of backups.
- Parameters
db_name (
str
) – Database name, typically lower snake case.- Return type
Session
- clear_varnish_domain(domain)[source]¶
Clear the Varnish cache for the domain attached to this environment.
- Parameters
domain (
str
) – Domain name.- Return type
Session
- clear_varnish_domains(domains)[source]¶
- Clear the Varnish cache for multiple domains
attached to this environment.
- Parameters
domains (
list
) – Domain name list.- Return type
Session
- code_switch(branch_tag)[source]¶
Switch code on this environment to a different branch or release tag.
- Parameters
branch_tag (
str
) – The tag to switch to.- Return type
Session
- configure(data)[source]¶
Modify configuration settings for an environment.
- Parameters
data (
dict
) – Configuration parameters.- Return type
Session
- create_backup(db_name)[source]¶
Create a backup
- Parameters
db_name (
str
) – Database name, typically lower snake case.- Return type
Session
- create_domain(domain)[source]¶
Add a domain to the environment.
- Parameters
domain (
str
) – Domain to add to the environment.- Return type
Session
- create_log_forwarding_destinations(label, sources, consumer, credentials, address)[source]¶
Create a log forwarding destination. :type label:
str
:param label: Human-friendly identifier of the destination :type sources:list
:param sources: List of log sources to forward :type consumer:str
:param consumer: Application or provider consuming the logs. :type credentials:dict
:param credentials: Dictionary of certificate,key and token. :type address:str
:param address: URL or host name and port of the destination. :param destination_uuid: Log forwarding destination uuid for given env.- Return type
Session
- deactivate_ssl_cert(cert_id)[source]¶
Deactivate a previously installed SSL cert. :param: cert_id: The Acquia certificate ID.
- Return type
Session
- delete_backup(db_name, backup_id)[source]¶
Delete a backup
- Parameters
db_name (
str
) – Database name, typically lower snake case.backup_id (
str
) – Database backup id.
- Return type
Session
- delete_cron(cron_id)[source]¶
Deletes a cron job. :cron_id: An ID that uniquely identifies a cron job.
- Return type
Session
- delete_domain(domain)[source]¶
Remove the domain from the environment.
- Parameters
domain (
str
) – Domain name to delete.- Return type
Session
- delete_log_forwarding_destinations(destination_uuid)[source]¶
Delete a log forwarding destination.
- Parameters
destination_uuid (
str
) – log forwarding destination uuid for given env.- Return type
Session
- delete_ssl_cert(cert_id)[source]¶
Remove an SSL cert. :param: cert_id: The Acquia certificate ID.
- Return type
Session
- deploy_code(id_from)[source]¶
Deploy code to this environment.
- Parameters
id_from (
str
) – uuid for the environment to deploy code from.- Return type
Session
- deploy_database(id_from, db_name)[source]¶
Copy a database to this environment.
- Parameters
id_from (
str
) – uuid for the environment to deploy the db from.db_name (
str
) – the database name to use.
- Return type
Session
- deploy_files(id_from)[source]¶
Copy files to this environment.
- Parameters
id_from (
str
) – uuid for the environment to deploy the files from.- Return type
Session
- disable_cron(cron_id)[source]¶
Disables a cron job. :cron_id: An ID that uniquely identifies a cron job.
- Return type
Session
- enable_cron(cron_id)[source]¶
Enables a cron job. :cron_id: An ID that uniquely identifies a cron job.
- Return type
Session
- get_log_forwarding_destinations()[source]¶
Return a collection of log forwarding destinations.
- Return type
dict
- install_ssl_cert(label, certificate, private_key, ca_certificates=None, legacy=False, csr_id=None)[source]¶
Add a new SSL cert to the environment. :param: label: Human-friendly identifier for the cert. :param: certificate: The certificate in PEM format. :param: private_key: The private keyfor the cert in PEM format. :param: ca_certificates: Any chain certificates, in PEM format.
Defaults to None.
- Param
legacy: Legacy in the sense of Acquia’s legacy architecture, not an old version of the SSL or TLS standards. See Acquia’s docs for more details. Defaults to False.
- Param
csr_id: Associate with an existing installed CSR. Defaults to None.
- Return type
Session
- set_php_version(version)[source]¶
Set the PHP version.
- Parameters
version (
str
) – PHP version number to use.- Return type
Session
- update_log_forwarding_destinations(label, sources, consumer, credentials, address, destination_uuid)[source]¶
Update a log forwarding destination. :type label:
str
:param label: Human-friendly identifier of the destination :type sources:list
:param sources: List of log sources to forward :type consumer:str
:param consumer: Application or provider consuming the logs. :type credentials:dict
:param credentials: Dictionary of certificate,key and token. :type address:str
:param address: URL or host name and port of the destination. :type destination_uuid:str
:param destination_uuid: Log forwarding destination uuid for given env.- Return type
Session
acapi2.resources.environmentlist module¶
Acquia Environment resource
acapi2.resources.notification module¶
Notification object
- class acapi2.resources.notification.Notification(uri, api_key, api_secret, filters=None, *args, **kwargs)[source]¶
Bases:
acapi2.resources.acquiaresource.AcquiaResource
- POLL_INTERVAL = 3¶
- pending()[source]¶
Check if a notification is still pending.
- Return type
bool
- Returns
is the notification task in progress or no
acapi2.resources.notificationlist module¶
Acquia Cloud API notifications.
acapi2.resources.permissionslist module¶
Permissions API Endpoint
acapi2.resources.subscription module¶
acapi2.resources.subscriptionlist module¶
Acquia Subscriptions resource
acapi2.resources.task module¶
Acquia API task queue resource.
- class acapi2.resources.task.Task(uri, api_key, api_secret, data=None)[source]¶
Bases:
acapi2.resources.acquiaresource.AcquiaResource
Task is deprecated, let’s not use it anymore.
- POLL_INTERVAL = 3¶
acapi2.resources.tasklist module¶
Acquia Cloud API task resources.