linked_server
Creates, updates, deletes, gets or lists a linked_server resource.
Overview
| Name | linked_server |
| Type | Resource |
| Id | azure.redis.linked_server |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
geoReplicatedPrimaryHostName | string | The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for seamless Geo Failover experience. |
linkedRedisCacheId | string | Fully qualified resourceId of the linked redis cache. Required. |
linkedRedisCacheLocation | string | Location of the linked redis cache. Required. |
primaryHostName | string | The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or after the Geo Failover. |
provisioningState | string | Terminal state of the link between primary and secondary redis cache. |
serverRole | string | Role of the linked server. Required. Known values are: "Primary" and "Secondary". (Primary, Secondary) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
geoReplicatedPrimaryHostName | string | The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for seamless Geo Failover experience. |
linkedRedisCacheId | string | Fully qualified resourceId of the linked redis cache. Required. |
linkedRedisCacheLocation | string | Location of the linked redis cache. Required. |
primaryHostName | string | The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or after the Geo Failover. |
provisioningState | string | Terminal state of the link between primary and secondary redis cache. |
serverRole | string | Role of the linked server. Required. Known values are: "Primary" and "Secondary". (Primary, Secondary) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, name, linked_server_name, subscription_id | Gets the detailed information about a linked server of a redis cache (requires Premium SKU). | |
list | select | resource_group_name, name, subscription_id | Gets the list of linked servers associated with this redis cache (requires Premium SKU). | |
create | insert | resource_group_name, name, linked_server_name, subscription_id, properties | Adds a linked server to the Redis cache (requires Premium SKU). | |
delete | delete | resource_group_name, name, linked_server_name, subscription_id | Deletes the linked server from a redis cache (requires Premium SKU). |
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 |
|---|---|---|
linked_server_name | string | The name of the RedisLinkedServerWithProperties. Required. |
name | string | The name of the redis cache. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list
Gets the detailed information about a linked server of a redis cache (requires Premium SKU).
SELECT
id,
name,
geoReplicatedPrimaryHostName,
linkedRedisCacheId,
linkedRedisCacheLocation,
primaryHostName,
provisioningState,
serverRole,
systemData,
type
FROM azure.redis.linked_server
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND name = '{{ name }}' -- required
AND linked_server_name = '{{ linked_server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets the list of linked servers associated with this redis cache (requires Premium SKU).
SELECT
id,
name,
geoReplicatedPrimaryHostName,
linkedRedisCacheId,
linkedRedisCacheLocation,
primaryHostName,
provisioningState,
serverRole,
systemData,
type
FROM azure.redis.linked_server
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND name = '{{ name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Adds a linked server to the Redis cache (requires Premium SKU).
INSERT INTO azure.redis.linked_server (
properties,
resource_group_name,
name,
linked_server_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ name }}',
'{{ linked_server_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: linked_server
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the linked_server resource.
- name: name
value: "{{ name }}"
description: Required parameter for the linked_server resource.
- name: linked_server_name
value: "{{ linked_server_name }}"
description: Required parameter for the linked_server resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the linked_server resource.
- name: properties
description: |
Properties required to create a linked server. Required.
value:
linkedRedisCacheId: "{{ linkedRedisCacheId }}"
linkedRedisCacheLocation: "{{ linkedRedisCacheLocation }}"
serverRole: "{{ serverRole }}"
geoReplicatedPrimaryHostName: "{{ geoReplicatedPrimaryHostName }}"
primaryHostName: "{{ primaryHostName }}"
DELETE examples
- delete
Deletes the linked server from a redis cache (requires Premium SKU).
DELETE FROM azure.redis.linked_server
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND name = '{{ name }}' --required
AND linked_server_name = '{{ linked_server_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;