avn service
Full list of commands for avn service
.
Manage service details
Commands for managing Aiven services via avn
commands.
avn service acl
Manages the Aiven for Apache Kafka® ACL entries.
More information on acl-add
, acl-delete
and acl-list
can be found
in the dedicated page.
avn service backup-list
Retrieves the list of backups for a certain service.
Parameter | Information |
---|---|
service_name | The name of the service |
Example: Retrieve the list of backups for the service
grafana-25c408a5
.
avn service backup-list grafana-25c408a5
An example of service backup-list
output:
BACKUP_NAME BACKUP_TIME DATA_SIZE STORAGE_LOCATION
============================== ==================== ========= ===================
grafana-20220614T140308137245Z 2022-06-14T14:03:08Z 774144 google-europe-west3
avn service ca get
Retrieves the project CA that the selected service belongs to.
Parameter | Information |
---|---|
service_name | The name of the service |
--target-filepath | The file path used to store the CA certificate locally |
Example: Retrieve the CA certificate for the project where the
service named kafka-doc
belongs and store it under /tmp/ca.pem
.
avn service ca get kafka-doc --target-filepath /tmp/ca.pem
avn service cli
Opens the appropriate interactive shell, such as psql
or valkey-cli
,
to the given service. Supported only for Aiven for PostgreSQL®, Aiven
for Valkey™ and Aiven for Caching.
Parameter | Information |
---|---|
service_name | The name of the service |
Example: Open a new psql
shell connecting to an Aiven for
PostgreSQL® service named pg-doc
.
avn service cli pg-doc
avn service connection-info
Retrieves the connection information for Aiven for Apache Kafka®, Aiven for PostgreSQL® and Aiven for Caching in a variety of formats.
More information on connection-info
can be found in
the dedicated page.
avn service connection-pool
Manages the PgBouncer connection pool for a given PostgreSQL® service.
More information on connection-pool-add
, connection-pool-delete
,
connection-pool-list
and connection-pool-update
can be found in
the dedicated page.
avn service connector
Set of commands for managing Aiven for Apache Kafka® Connect connectors.
More information on connector available
, connector create
,
connector delete
, connector list
, connector pause
,
connector restart
, connector restart-task
, connector resume
,
connector schema
, connector status
and connector update
can be
found in the dedicated page.
avn service create
Creates a new service.
Parameter | Information |
---|---|
service_name | The name of the service |
--service-type | The type of service; the service types command has the available values |
--plan | Aiven subscription plan name; check avn_service_plan for more information |
--cloud | The cloud region name; check avn-cloud-list for more information |
--disk-space-gib | Total amount of disk space for data storage (GiB) |
--no-fail-if-exists | The create command will not fail if a service with the same name already exists |
--project-vpc-id | Id of the project VPC where to include the created service. The cloud of the project's VPC must match the service's cloud |
--no-project-vpc | Stops the service to be included in the project VPC even if one is available in the selected cloud |
--enable-termination-protection | Enables termination protection for the service |
-c KEY=VALUE | Any additional configuration settings for your service; check our documentation for more information, or use the service types command which has a verbose mode that shows all options. |
Example: Create new Aiven for Kafka® service named kafka-demo
in
the region google-europe-west3
with:
- the
business-4
plan - Kafka Connect enabled
- 600 GiB of total storage capacity
avn service create kafka-demo \
--service-type kafka \
--cloud google-europe-west3 \
--plan business-4 \
-c kafka_connect=true \
--disk-space-gib 600
avn service credentials-reset
Resets the service credentials. More information on user password change is provided in the dedicated page.
Parameter | Information |
---|---|
service_name | The name of the service |
Example: Reset the credentials of a service named kafka-demo
.
avn service credentials-reset kafka-demo
avn service current-queries
List current service connections/queries for an Aiven for PostgreSQL®, Aiven for MySQL or Aiven for Caching service.
Parameter | Information |
---|---|
service_name | The name of the service |
Example: List the queries running for a service named pg-demo
.
avn service current-queries pg-demo
avn service database
Manages databases within an Aiven for PostgreSQL®, or Aiven for MySQL.
More information on database-add
, database-delete
and
database-list
can be found in
the dedicated page.
avn service es-acl
Manages rules to OpenSearch® ACL and extended ACL configuration.
More information on es-acl-add
, es-acl-del
, es-acl-disable
,
es-acl-enable
, es-acl-extended-disable
, es-acl-extended-enable
and
es-acl-extended-list
can be found in
the dedicated page.
avn service flink
Manages Aiven for Apache Flink® tables and jobs.
More info on flink create-application
, flink list-applications
,
flink get-application
, flink update-application
,
flink delete-application
, flink create-application-version
,
flink validate-application-version
, flink get-application-version
,
flink delete-application-version
,
flink list-application-deployments
,
flink get-application-deployment
,
flink create-application-deployment
,
flink delete-application-deployment
,
flink stop-application-deployment
,
flink cancel-application-deployment
can be found in
the dedicated page.
avn service get
Retrieves a single service details.
Parameter | Information |
---|---|
service_name | The name of the service |
--format | Format of the output string |
Example: Retrieve the pg-demo
service details in the
'{service_name} {service_uri}'
format.
avn service get pg-demo --format '{service_name} {service_uri}'
Example: Retrieve the pg-demo
full service details in JSON format.
avn service get pg-demo --json
avn service index
Manages OpenSearch® service indexes. the dedicated page.
avn service integration
Manages Aiven internal and external services integrations.
More information on integration-delete
, integration-endpoint-create
,
integration-endpoint-delete
, integration-endpoint-list
,
integration-endpoint-types-list
, integration-endpoint-update
,
integration-list
, integration-types-list
and integration-update
can be found in
the dedicated page.
avn service kafka-acl
Manages the Apache Kafka® native ACL entries.
More information on kafka-acl-add
, kafka-acl-delete
and kafka-acl-list
can be found
in the dedicated page.
avn service keypair get
Service keypair commands. The use cases for this command are limited to
accessing the keypair for an Aiven for Apache Cassandra® service that
was started in migration mode
. For more information about this, see
Parameter | Information |
---|---|
service_name | The name of the service |
keypair | The name of the keypair. Options are cassandra_migrate_sstableloader_user |
--key-filepath | The location to download the key to |
--cert-filepath | The location to download the certificate to |
Example: Retrieve the keypair, and save them to the /tmp
directory, for an Aiven for Apache Cassandra® service, called
test-cass
, that was started in migration mode.
avn service keypair get --key-filepath /tmp/keyfile --cert-filepath /tmp/certfile test-cass cassandra_migrate_sstableloader_user
The output of this command results in 2 files (keyfile
and certfile
)
saved to the /tmp
directory.
avn service list
Lists services within an Aiven project.
Parameter | Information |
---|---|
service_name | The name of the service |
Example: Retrieve all the services running in the currently selected project.
avn service list
An example of service list
output:
SERVICE_NAME SERVICE_TYPE STATE CLOUD_NAME PLAN CREATE_TIME UPDATE_TIME
================== ============ ======= =================== =========== ==================== ====================
cassandra-28962a5b cassandra RUNNING google-europe-west3 business-16 2021-09-27T10:18:19Z 2021-09-27T10:25:58Z
os-24a6d6db opensearch RUNNING google-europe-west3 business-4 2021-09-27T10:18:04Z 2021-09-27T10:23:31Z
kafka-2134 kafka RUNNING google-europe-west3 business-4 2021-09-27T08:48:35Z 2021-09-27T11:20:55Z
mysql-12f7628c mysql RUNNING google-europe-west3 business-4 2021-09-27T10:18:09Z 2021-09-27T10:23:02Z
pg-123456 pg RUNNING google-europe-west3 business-4 2021-09-27T07:41:04Z 2021-09-27T10:56:19Z
Example: Retrieve all the services with name demo-pg
running in
the project named mytestproject
.
avn service list demo-pg --project mytestproject
avn service logs
Retrieves the selected service logs.
Parameter | Information |
---|---|
service_name | The name of the service |
Example: Retrieve the logs for the service named pg-demo
.
avn service logs pg-demo
avn service maintenance-start
Starts the service maintenance updates.
Maintenance updates do not typically cause any noticeable impact on the service in use but may sometimes cause a short period of lower performance or downtime which will not exceed 1 hour.
Parameter | Information |
---|---|
service_name | The name of the service |
Example: Start the maintenance updates for the service named
pg-demo
.
avn service maintenance-start pg-demo
If there are no updates available, the command will show a
service is up to date, maintenance not required
message.
avn service metrics
Retrieves the metrics for a defined service in Google chart compatible format. The list of service metrics includes:
cpu_usage
: CPU usage percentagedisk_usage
: Disk space usage percentagedisk_ioread
: Disk reads IOPSdisk_iowrites
: Disk writes IOPSload_average
: 5 min CPU load averagemem_usage
: Memory usage percentagenet_receive
: Network traffic received in bytes/snet_send
: Network traffic transmitted in bytes/s
Parameter | Information |
---|---|
service_name | The name of the service |
--period | The time period to retrieve the metrics for (possible values hour , day , week , month , year ); the time period is relative to the current date and time, for example, hour will retrieve metrics for the last hour. |
The granularity of retrieved data changes based on the --period
flag:
hour
: 30 secondsday
: 5 minutesweek
: 30 minutesmonth
: 3 hoursyear
: 1 day
Example: Retrieve the daily metrics for the service named pg-demo
.
avn service metrics pg-demo --period day
avn service migration-status
Get migration status
avn service plans
Lists the service plans available in a selected project for a defined service type.
Parameter | Information |
---|---|
--service-type | The type of service, check avn-cli-service-type for more information |
--cloud | The cloud region |
--monthly | To show the monthly price estimate |
Example: List the service plans available for a PostgreSQL® service
in the google-europe-west3
region.
avn service plans --service-type pg --cloud google-europe-west3
An example of service plans
output:
pg:hobbyist $0.034/h Hobbyist (1 CPU, 2 GB RAM, 8 GB disk)
pg:startup-4 $0.136/h Startup-4 (1 CPU, 4 GB RAM, 80 GB disk)
pg:startup-8 $0.267/h Startup-8 (2 CPU, 8 GB RAM, 175 GB disk)
...
pg:premium-360 $36.027/h Premium-360 (96 CPU, 384 GB RAM, 3000 GB disk) 3-node high availability set
pg:premium-512 $43.836/h Premium-512 (128 CPU, 512 GB RAM, 3000 GB disk) 3-node high availability set
pg:premium-896 $72.329/h Premium-896 (224 CPU, 896 GB RAM, 3000 GB disk) 3-node high availability set
avn service privatelink
Manages Aiven privatelink connections for AWS and Azure.
More information on privatelink availability
, privatelink aws
and
privatelink azure
can be found in
the dedicated page.
avn service queries
Lists the service connections/queries statistics for an Aiven for PostgreSQL® or Aiven for MySQL. The list of queries data points retrievable includes:
- the
public.pg_stat_statements
columns (see the documentation for these statistics columns) for Aiven for PostgreSQL services. - the
performance_schema.events_statements_summary_by_digest
(refer to documentation on the events information from the performance schema) for Aiven for MySQL services.
A description of the retrieved columns for Aiven for PostgreSQL can be found in the dedicated PostgreSQL documentation.
Parameter | Information |
---|---|
service_name | The name of the service |
--format | The format string for output defining the query metrics to retrieve, for example, '{calls} {total_time}' |
Example: List the queries for an Aiven for PostgreSQL service named
pg-demo
including the query blurb, number of calls and both total and
mean execution time.
avn service queries pg-demo --format '{query},{calls},{total_time},{mean_time}'
avn service queries-reset
Resets service connections/queries statistics for an Aiven for PostgreSQL® or Aiven for MySQL service. Resetting query statistics can be useful to measure database behaviour in a precise point in time or after a change has been deployed.
Parameter | Information |
---|---|
service_name | The name of the service |
Example: Reset the queries for a service named pg-demo
.
avn service queries-reset pg-demo
avn service schema
Service Schema commands
avn service schema-registry-acl
Manages Aiven for Apache Kafka® Karapace schema registry authorization.
More information on schema-registry-acl-add
,
schema-registry-acl-delete
, schema-registry-acl-list
can be found in
the dedicated page.
avn service sstableloader
Service sstableloader
commands
avn service tags
Manage service tags.
More information on tags list
, tags replace
and tags update
can be
found in the dedicated page.
avn service task-create
Create a service task
Parameter | Information |
---|---|
service_name | The name of the service |
--project | Project name (defaults to None ) |
--operation | Task operation (default: upgrade_check , possible values: migration_check , upgrade_check ) |
--target-version | Upgrade target version (used for PostgreSQL) (possible values: 11 , 12 , 13 , 14 ) |
--source-service-uri | Migration: source URI for migration |
--ignore-dbs | Migration: comma-separated list of databases to be ignored (MySQL only) |
--format | Format string for output, for example, {name} {retention_hours} |
--json | Raw JSON output |
Example: Create a migration task to migrate a MySQL database to
Aiven to the service mysql
in project myproj
avn service task-create --operation migration_check --source-service-uri mysql://user:password@host:port/databasename --project myproj mysql
An example avn service task-create
output:
TASK_TYPE SUCCESS TASK_ID
===================== ======= ====================================
mysql_migration_check null e2df7736-66c5-4696-b6c9-d33a0fc4cbed
avn service task-get
Get details for a single task for your service
Parameter | Information |
---|---|
service_name | The name of the service |
--project | Project name (defaults to None ) |
--task-id | The task ID to check |
--format | Format string for output, for example, {name} {retention_hours} |
--json | Raw JSON output |
Example: Check the status of your migration task with id
e2df7736-66c5-4696-b6c9-d33a0fc4cbed
for the service named mysql
in
the myproj
project
avn service task-get --task-id e2df7736-66c5-4696-b6c9-d33a0fc4cbed --project myproj mysql
TASK_TYPE SUCCESS TASK_ID RESULT
===================== ======= ==================================== ====================================================================================
mysql_migration_check true e2df7736-66c5-4696-b6c9-d33a0fc4cbed All pre-checks passed successfully, preferred migration method will be [Replication]