az postgres server-arc

Note

This reference is part of the arcdata extension for the Azure CLI (version 2.3.1 or higher). The extension will automatically install the first time you run an az postgres server-arc command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Azure Arc enabled PostgreSQL servers.

Commands

Name Description Type Status
az postgres server-arc create

Create an Azure Arc enabled PostgreSQL server.

Extension Preview
az postgres server-arc delete

Delete an Azure Arc enabled PostgreSQL server.

Extension Preview
az postgres server-arc endpoint

Manage Azure Arc enabled PostgreSQL server endpoints.

Extension Preview
az postgres server-arc endpoint list

List Azure Arc enabled PostgreSQL server endpoints.

Extension Preview
az postgres server-arc list

List Azure Arc enabled PostgreSQL server.

Extension Preview
az postgres server-arc restore

Restore an Azure Arc enabled PostgreSQL server from backup from another server.

Extension Preview
az postgres server-arc show

Show the details of an Azure Arc enabled PostgreSQL server.

Extension Preview
az postgres server-arc update

Update the configuration of an Azure Arc enabled PostgreSQL server.

Extension Preview

az postgres server-arc create

Preview

Command group 'postgres server-arc' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create an Azure Arc enabled PostgreSQL server.

To set the password of the server, please set the environment variable AZDATA_PASSWORD.

az postgres server-arc create --name
                              [--ad-account-name]
                              [--ad-connector-name]
                              [--admin-login-secret]
                              [--cert-private-key-file]
                              [--cert-public-key-file]
                              [--cores-limit]
                              [--cores-request]
                              [--dev]
                              [--dns-name]
                              [--extensions]
                              [--k8s-namespace]
                              [--keytab-secret]
                              [--log-level]
                              [--memory-limit]
                              [--memory-request]
                              [--no-external-endpoint]
                              [--no-wait]
                              [--path]
                              [--port]
                              [--retention-days]
                              [--service-annotations]
                              [--service-cert-secret]
                              [--service-labels]
                              [--service-type]
                              [--storage-class-backups]
                              [--storage-class-data]
                              [--storage-class-logs]
                              [--use-k8s]
                              [--volume-size-backups]
                              [--volume-size-data]
                              [--volume-size-logs]

Examples

Create an Azure Arc enabled PostgreSQL server.

az postgres server-arc create -n pg1 --k8s-namespace namespace --use-k8s

Required Parameters

--name -n

Name of the Azure Arc enabled PostgreSQL server.

Optional Parameters

--ad-account-name

The Active Directory account name for this Azure Arc enabled PostgreSQL server. This account needs to be created prior to the deployment of this instance.

--ad-connector-name

The name of the Active Directory Connector. This parameter indicates an intent to deploy with AD support.

--admin-login-secret

Name of the Kubernetes secret to generate that hosts or will host user admin login account credential.

--cert-private-key-file

Path to the file containing a PEM formatted certificate private key to be used for client SSL connections.

--cert-public-key-file

Path to the file containing a PEM formatted certificate public key to be used for client SSL connections.

--cores-limit

The maximum number of CPU cores that can be used for Azure Arc enabled PostgreSQL server.

--cores-request

The minimum number of CPU cores that must be available per node to schedule the service.

--dev

If this is specified, then it is considered a dev instance and will not be billed for.

--dns-name

The service DNS name exposed to the end-users to connect to this Azure Arc enabled PostgreSQL server (e.g. pginstancename.contoso.com).

--extensions

Comma seperated list of extensions to be enabled. Once enabled, extension can be installed via 'CREATE EXTENSION' command.

--k8s-namespace -k

The Kubernetes namespace where the Azure Arc enabled PostgreSQL server is deployed. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

--keytab-secret

The name of the Kubernetes secret that contains the keytab file for this Azure Arc enabled PostgreSQL server.

--log-level

Sets the log_min_messages setting for the PostgreSQL engine. Valid values are: DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, INFO, NOTICE, WARNING, ERROR, LOG, FATAL, PANIC.

--memory-limit

The memory limit of the Azure Arc enabled PostgreSQL server as a number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).

--memory-request

The memory request of the Azure Arc enabled PostgreSQL server as a number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).

--no-external-endpoint

If specified, no external service will be created. Otherwise, an external service will be created using either the type given with the --service-type argument or the same service type as the data controller.

--no-wait

Do not wait for deployment to be ready before returning.

Default value: False
--path

The path to the source json file for the Azure Arc enabled PostgreSQL server. This is optional.

--port

The port number on which the primary service is exposed to the end-users.

--retention-days

Backup retention period, specified in days. Allowed values are 0 to 35. Default is 7. Setting the retention period to 0 will turn off automatic backups for Azure Arc enabled PostgreSql.

--service-annotations

Comma-separated list of annotations to apply to all external services.

--service-cert-secret

Name of the Kubernetes secret to generate that hosts the SSL certificate.

--service-labels

Comma-separated list of labels to apply to all external services.

--service-type

The type for the primary service.

--storage-class-backups

The storage class to be used for backup persistent volumes.

--storage-class-data

The storage class to be used for data persistent volumes.

--storage-class-logs

The storage class to be used for logs persistent volumes.

--use-k8s

Use local Kubernetes APIs to perform this action.

--volume-size-backups

The size of the storage volume to be used for backups as a positive number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).

--volume-size-data

The size of the storage volume to be used for data as a positive number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).

--volume-size-logs

The size of the storage volume to be used for logs as a positive number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az postgres server-arc delete

Preview

Command group 'postgres server-arc' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete an Azure Arc enabled PostgreSQL server.

az postgres server-arc delete --name
                              [--force]
                              [--k8s-namespace]
                              [--use-k8s]

Examples

Delete an Azure Arc enabled PostgreSQL server.

az postgres server-arc delete -n pg1 --k8s-namespace namespace --use-k8s

Required Parameters

--name -n

Name of the Azure Arc enabled PostgreSQL server.

Optional Parameters

--force -f

Delete the Azure Arc enabled PostgreSQL server without confirmation.

Default value: False
--k8s-namespace -k

The Kubernetes namespace where the Azure Arc enabled PostgreSQL server is deployed. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

--use-k8s

Use local Kubernetes APIs to perform this action.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az postgres server-arc list

Preview

Command group 'postgres server-arc' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List Azure Arc enabled PostgreSQL server.

az postgres server-arc list [--k8s-namespace]
                            [--use-k8s]

Examples

List Azure Arc enabled PostgreSQL server.

az postgres server-arc list --k8s-namespace namespace --use-k8s

Optional Parameters

--k8s-namespace -k

The Kubernetes namespace where the Azure Arc enabled PostgreSQL servers are deployed. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

--use-k8s

Use local Kubernetes APIs to perform this action.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az postgres server-arc restore

Preview

Command group 'postgres server-arc' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Restore an Azure Arc enabled PostgreSQL server from backup from another server.

To set the password of the server, please set the environment variable AZDATA_PASSWORD.

az postgres server-arc restore --k8s-namespace
                               --name
                               --source-server
                               [--dry-run]
                               [--no-wait]
                               [--storage-class-backups]
                               [--storage-class-data]
                               [--storage-class-logs]
                               [--time]
                               [--use-k8s]
                               [--volume-size-backups]
                               [--volume-size-data]
                               [--volume-size-logs]

Examples

Restore an Azure Arc enabled PostgreSQL server.

az postgres server-arc restore -n <to-pg> --source-server <from-pg> --k8s-namespace namespace --use-k8s

Required Parameters

--k8s-namespace -k

The Kubernetes namespace that contains the Azure Arc enabled PostgreSql. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

--name -n

Name of the Azure Arc enabled PostgreSQL server to be created.

--source-server

The name of the Azure Arc enabled PostgreSQL server to restore from.

Optional Parameters

--dry-run

If set, validates the source and destination resources and the time, without performing the restore. The earliest and latest possible restore times are returned in the status of the restore task.

Default value: False
--no-wait

Do not wait for deployment to be ready before returning.

Default value: False
--storage-class-backups

The storage class to be used for backup persistent volumes.

--storage-class-data

The storage class to be used for data persistent volumes.

--storage-class-logs

The storage class to be used for logs persistent volumes.

--time -t

The point in time of the source server that will be restored to create the new Azure Arc enabled PostgreSQL server. Must be greater than or equal to the source database's earliest restore date/time value. Time should be in following format: 'YYYY-MM-DDTHH:MM:SSZ'. If no time is provided, the most recent backup will be restored.

--use-k8s

Use local Kubernetes APIs to perform this action.

--volume-size-backups

The size of the storage volume to be used for backups as a positive number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).

--volume-size-data

The size of the storage volume to be used for data as a positive number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).

--volume-size-logs

The size of the storage volume to be used for logs as a positive number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az postgres server-arc show

Preview

Command group 'postgres server-arc' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show the details of an Azure Arc enabled PostgreSQL server.

az postgres server-arc show --name
                            [--k8s-namespace]
                            [--path]
                            [--use-k8s]

Examples

Show the details of an Azure Arc enabled PostgreSQL server.

az postgres server-arc show -n pg1 --k8s-namespace namespace --use-k8s

Required Parameters

--name -n

Name of the Azure Arc enabled PostgreSQL server.

Optional Parameters

--k8s-namespace -k

The Kubernetes namespace where the Azure Arc enabled PostgreSQL server is deployed. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

--path

A path where the full specification for the Azure Arc enabled PostgreSQL server should be written. If omitted, the specification will be written to standard output.

--use-k8s

Use local Kubernetes APIs to perform this action.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az postgres server-arc update

Preview

Command group 'postgres server-arc' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update the configuration of an Azure Arc enabled PostgreSQL server.

az postgres server-arc update --name
                              [--cert-private-key-file]
                              [--cert-public-key-file]
                              [--cores-limit]
                              [--cores-request]
                              [--dev]
                              [--extensions]
                              [--k8s-namespace]
                              [--keytab-secret]
                              [--log-level]
                              [--memory-limit]
                              [--memory-request]
                              [--no-external-endpoint]
                              [--no-wait]
                              [--path]
                              [--port]
                              [--retention-days]
                              [--service-annotations]
                              [--service-cert-secret]
                              [--service-labels]
                              [--service-type]
                              [--use-k8s]

Examples

Update the configuration of an Azure Arc enabled PostgreSQL server.

az postgres server-arc update --path ./spec.json -n pg1 --k8s-namespace namespace --use-k8s

Enable extensions for an existing Azure Arc enabled PostgreSQL server.

az postgres server-arc update -n pg1 --extensions 'pgaudit,pg_partman' --k8s-namespace namespace --use-k8s

Remove extensions from an Azure Arc enabled PostgreSQL server.

az postgres server-arc update -n pg1 --extensions "''" --k8s-namespace namespace --use-k8s

Required Parameters

--name -n

Name of the Azure Arc enabled PostgreSQL server that is being updated. The name under which your instance is deployed cannot be changed.

Optional Parameters

--cert-private-key-file

Path to the file containing a PEM formatted certificate private key to be used for client SSL connections.

--cert-public-key-file

Path to the file containing a PEM formatted certificate public key to be used for client SSL connections.

--cores-limit

The maximum number of CPU cores for Azure Arc enabled PostgreSQL server that can be used per node. To remove the cores_limit, specify its value as empty string.

--cores-request

The minimum number of CPU cores that must be available per node to schedule the service. To remove the cores_request, specify its value as empty string.

--dev

If this is specified, then it is considered a dev instance and will not be billed for.

--extensions

Comma seperated list of extensions to be enabled. To Add or remove a new extension update the existing list of extensions. Once enabled, extension can be installed via 'CREATE EXTENSION' command.

--k8s-namespace -k

The Kubernetes namespace where the Azure Arc enabled PostgreSQL server is deployed. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

--keytab-secret

The name of the Kubernetes secret that contains the keytab file for this Azure Arc enabled PostgreSQL server.

--log-level

Sets the log_min_messages setting for the PostgreSQL engine. Valid values are: DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, INFO, NOTICE, WARNING, ERROR, LOG, FATAL, PANIC.

--memory-limit

The memory limit for Azure Arc enabled PostgreSQL server as a number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes). To remove the memory_limit, specify its value as empty string.

--memory-request

The memory request for Azure Arc enabled PostgreSQL server as a number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes). To remove the memory_request, specify its value as empty string.

--no-external-endpoint

If specified, no external service will be created. Otherwise, an external service will be created using either the type given with the --service-type argument or the same service type as the data controller.

--no-wait

Do not wait for deployment to be ready before returning.

Default value: False
--path

The path to the source json file for the Azure Arc enabled PostgreSQL server. This is optional.

--port

The port number on which the primary service is exposed to the end-users.

--retention-days

Backup retention period, specified in days. Allowed values are 0 to 35. Default is 7. Setting the retention period to 0 will turn off automatic backups for Azure Arc enabled PostgreSql.

--service-annotations

Comma-separated list of annotations to apply to all external services.

--service-cert-secret

Name of the Kubernetes secret to generate that hosts the SSL certificate.

--service-labels

Comma-separated list of labels to apply to all external services.

--service-type

The type for the primary service.

--use-k8s

Use local Kubernetes APIs to perform this action.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.