Skip to main content

linked_server

Creates, updates, deletes, gets or lists a linked_server resource.

Overview

Namelinked_server
TypeResource
Idazure.redis.linked_server

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
geoReplicatedPrimaryHostNamestringThe unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for seamless Geo Failover experience.
linkedRedisCacheIdstringFully qualified resourceId of the linked redis cache. Required.
linkedRedisCacheLocationstringLocation of the linked redis cache. Required.
primaryHostNamestringThe changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or after the Geo Failover.
provisioningStatestringTerminal state of the link between primary and secondary redis cache.
serverRolestringRole of the linked server. Required. Known values are: "Primary" and "Secondary". (Primary, Secondary)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, name, linked_server_name, subscription_idGets the detailed information about a linked server of a redis cache (requires Premium SKU).
listselectresource_group_name, name, subscription_idGets the list of linked servers associated with this redis cache (requires Premium SKU).
createinsertresource_group_name, name, linked_server_name, subscription_id, propertiesAdds a linked server to the Redis cache (requires Premium SKU).
deletedeleteresource_group_name, name, linked_server_name, subscription_idDeletes 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.

NameDatatypeDescription
linked_server_namestringThe name of the RedisLinkedServerWithProperties. Required.
namestringThe name of the redis cache. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

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
;

INSERT examples

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
;

DELETE examples

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
;