servers
Creates, updates, deletes, gets or lists a servers
resource.
Overview
Name | servers |
Type | Resource |
Id | azure.postgresql.servers |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list
Name | Datatype | Description |
---|---|---|
identity | object | Describes the identity of the application. |
location | string | The geo-location where the resource lives |
properties | object | Properties of the server. |
sku | object | Sku information related properties of a server. |
tags | object | Resource tags. |
Name | Datatype | Description |
---|---|---|
identity | object | Describes the identity of the application. |
location | string | The geo-location where the resource lives |
properties | object | Properties of the server. |
sku | object | Sku information related properties of a server. |
tags | object | Resource tags. |
Name | Datatype | Description |
---|---|---|
identity | object | Describes the identity of the application. |
location | string | The geo-location where the resource lives |
properties | object | Properties of the server. |
sku | object | Sku information related properties of a server. |
tags | object | Resource tags. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , serverName | Gets information about a server. | |
list_by_resource_group | select | subscriptionId , resourceGroupName | List all the servers in a given resource group. | |
list | select | subscriptionId | List all the servers in a given subscription. | |
create | insert | subscriptionId , resourceGroupName , serverName | Creates a new server. | |
update | update | subscriptionId , resourceGroupName , serverName | Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. | |
delete | delete | subscriptionId , resourceGroupName , serverName | Deletes a server. | |
restart | exec | subscriptionId , resourceGroupName , serverName | Restarts a server. | |
start | exec | subscriptionId , resourceGroupName , serverName | Starts a server. | |
stop | exec | subscriptionId , resourceGroupName , serverName | Stops a server. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
serverName | string | The name of the server. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
SELECT
examples
- get
- list_by_resource_group
- list
Gets information about a server.
SELECT
identity,
location,
properties,
sku,
tags
FROM azure.postgresql.servers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
;
List all the servers in a given resource group.
SELECT
identity,
location,
properties,
sku,
tags
FROM azure.postgresql.servers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
;
List all the servers in a given subscription.
SELECT
identity,
location,
properties,
sku,
tags
FROM azure.postgresql.servers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create
- Manifest
Creates a new server.
INSERT INTO azure.postgresql.servers (
data__sku,
data__identity,
data__properties,
data__tags,
data__location,
subscriptionId,
resourceGroupName,
serverName
)
SELECT
'{{ sku }}',
'{{ identity }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ serverName }}'
RETURNING
identity,
location,
properties,
sku,
tags
;
# Description fields are for documentation purposes
- name: servers
props:
- name: subscriptionId
value: string (uuid)
description: Required parameter for the servers resource.
- name: resourceGroupName
value: string
description: Required parameter for the servers resource.
- name: serverName
value: string
description: Required parameter for the servers resource.
- name: sku
value: object
description: |
Sku information related properties of a server.
- name: identity
value: object
description: |
Describes the identity of the application.
- name: properties
value: object
description: |
Properties of the server.
- name: tags
value: object
description: |
Resource tags.
- name: location
value: string
description: |
The geo-location where the resource lives
UPDATE
examples
- update
Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
UPDATE azure.postgresql.servers
SET
data__sku = '{{ sku }}',
data__identity = '{{ identity }}',
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serverName = '{{ serverName }}' --required
RETURNING
identity,
location,
properties,
sku,
tags;
DELETE
examples
- delete
Deletes a server.
DELETE FROM azure.postgresql.servers
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serverName = '{{ serverName }}' --required
;
Lifecycle Methods
- restart
- start
- stop
Restarts a server.
EXEC azure.postgresql.servers.restart
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@serverName='{{ serverName }}' --required
@@json=
'{
"restartWithFailover": {{ restartWithFailover }},
"failoverMode": "{{ failoverMode }}"
}'
;
Starts a server.
EXEC azure.postgresql.servers.start
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@serverName='{{ serverName }}' --required
;
Stops a server.
EXEC azure.postgresql.servers.stop
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@serverName='{{ serverName }}' --required
;