你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
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
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 of the Azure Arc enabled PostgreSQL server.
Optional Parameters
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.
The name of the Active Directory Connector. This parameter indicates an intent to deploy with AD support.
Name of the Kubernetes secret to generate that hosts or will host user admin login account credential.
Path to the file containing a PEM formatted certificate private key to be used for client SSL connections.
Path to the file containing a PEM formatted certificate public key to be used for client SSL connections.
The maximum number of CPU cores that can be used for Azure Arc enabled PostgreSQL server.
The minimum number of CPU cores that must be available per node to schedule the service.
If this is specified, then it is considered a dev instance and will not be billed for.
The service DNS name exposed to the end-users to connect to this Azure Arc enabled PostgreSQL server (e.g. pginstancename.contoso.com).
Comma seperated list of extensions to be enabled. Once enabled, extension can be installed via 'CREATE EXTENSION' command.
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.
The name of the Kubernetes secret that contains the keytab file for this Azure Arc enabled PostgreSQL server.
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.
The memory limit of the Azure Arc enabled PostgreSQL server as a number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).
The memory request of the Azure Arc enabled PostgreSQL server as a number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).
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.
Do not wait for deployment to be ready before returning.
The path to the source json file for the Azure Arc enabled PostgreSQL server. This is optional.
The port number on which the primary service is exposed to the end-users.
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.
Comma-separated list of annotations to apply to all external services.
Name of the Kubernetes secret to generate that hosts the SSL certificate.
Comma-separated list of labels to apply to all external services.
The type for the primary service.
The storage class to be used for backup persistent volumes.
The storage class to be used for data persistent volumes.
The storage class to be used for logs persistent volumes.
Use local Kubernetes APIs to perform this action.
The size of the storage volume to be used for backups as a positive number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).
The size of the storage volume to be used for data as a positive number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).
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
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server-arc delete
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 of the Azure Arc enabled PostgreSQL server.
Optional Parameters
Delete the Azure Arc enabled PostgreSQL server without confirmation.
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 local Kubernetes APIs to perform this action.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server-arc list
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
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 local Kubernetes APIs to perform this action.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server-arc restore
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
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 of the Azure Arc enabled PostgreSQL server to be created.
The name of the Azure Arc enabled PostgreSQL server to restore from.
Optional Parameters
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.
Do not wait for deployment to be ready before returning.
The storage class to be used for backup persistent volumes.
The storage class to be used for data persistent volumes.
The storage class to be used for logs persistent volumes.
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 local Kubernetes APIs to perform this action.
The size of the storage volume to be used for backups as a positive number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).
The size of the storage volume to be used for data as a positive number followed by Ki (kilobytes), Mi (megabytes), or Gi (gigabytes).
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
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server-arc show
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 of the Azure Arc enabled PostgreSQL server.
Optional Parameters
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.
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 local Kubernetes APIs to perform this action.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server-arc update
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 of the Azure Arc enabled PostgreSQL server that is being updated. The name under which your instance is deployed cannot be changed.
Optional Parameters
Path to the file containing a PEM formatted certificate private key to be used for client SSL connections.
Path to the file containing a PEM formatted certificate public key to be used for client SSL connections.
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.
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.
If this is specified, then it is considered a dev instance and will not be billed for.
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.
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.
The name of the Kubernetes secret that contains the keytab file for this Azure Arc enabled PostgreSQL server.
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.
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.
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.
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.
Do not wait for deployment to be ready before returning.
The path to the source json file for the Azure Arc enabled PostgreSQL server. This is optional.
The port number on which the primary service is exposed to the end-users.
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.
Comma-separated list of annotations to apply to all external services.
Name of the Kubernetes secret to generate that hosts the SSL certificate.
Comma-separated list of labels to apply to all external services.
The type for the primary service.
Use local Kubernetes APIs to perform this action.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.