Skip to main content

custom_locations

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

Overview

Namecustom_locations
TypeResource
Idazure.extended_location.custom_locations

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.
authenticationobjectThis is optional input that contains the authentication that should be used to generate the namespace.
clusterExtensionIdsarrayContains the reference to the add-on that contains charts to deploy CRDs and operators.
displayNamestringDisplay name for the Custom Locations location.
hostResourceIdstringConnected Cluster or AKS Cluster. The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions.
hostTypestringType of host the Custom Locations is referencing (Kubernetes, etc...). "Kubernetes" (Kubernetes)
identityobjectIdentity for the resource.
locationstringThe geo-location where the resource lives. Required.
namespacestringKubernetes namespace that will be created on the specified cluster.
provisioningStatestringProvisioning State for the Custom Location.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
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, resource_name, subscription_idGets a Custom Location. Gets the details of the customLocation with a specified resource group and name.
list_by_resource_groupselectresource_group_name, subscription_idGets a list of Custom Locations in the specified subscription and resource group. Gets a list of Custom Locations in the specified subscription and resource group. The operation returns properties of each Custom Location.
list_by_subscriptionselectsubscription_idGets a list of Custom Locations in a subscription. Gets a list of Custom Locations in the specified subscription. The operation returns properties of each Custom Location.
list_operationsselectLists all available Custom Locations operations.
create_or_updateinsertresource_group_name, resource_name, subscription_id, locationCreates or updates a Custom Location. Creates or updates a Custom Location in the specified Subscription and Resource Group.
updateupdateresource_group_name, resource_name, subscription_idUpdates a Custom Location. Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription.
create_or_updatereplaceresource_group_name, resource_name, subscription_id, locationCreates or updates a Custom Location. Creates or updates a Custom Location in the specified Subscription and Resource Group.
deletedeleteresource_group_name, resource_name, subscription_idDeletes a Custom Location. Deletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id.
list_enabled_resource_typesexecresource_group_name, resource_name, subscription_idGets the list of Enabled Resource Types. Gets the list of the Enabled Resource Types.
find_target_resource_groupexecresource_group_name, resource_name, subscription_idGets matching target resource group for resource sync. Returns the target resource group associated with the resource sync rules of the Custom Location that match the rules passed in with the Find Target Resource Group Request.

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
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringCustom Locations name. Required.
subscription_idstring

SELECT examples

Gets a Custom Location. Gets the details of the customLocation with a specified resource group and name.

SELECT
id,
name,
authentication,
clusterExtensionIds,
displayName,
hostResourceId,
hostType,
identity,
location,
namespace,
provisioningState,
systemData,
tags,
type
FROM azure.extended_location.custom_locations
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a Custom Location. Creates or updates a Custom Location in the specified Subscription and Resource Group.

INSERT INTO azure.extended_location.custom_locations (
tags,
location,
properties,
identity,
resource_group_name,
resource_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates a Custom Location. Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription.

UPDATE azure.extended_location.custom_locations
SET
identity = '{{ identity }}',
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Creates or updates a Custom Location. Creates or updates a Custom Location in the specified Subscription and Resource Group.

REPLACE azure.extended_location.custom_locations
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a Custom Location. Deletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id.

DELETE FROM azure.extended_location.custom_locations
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets the list of Enabled Resource Types. Gets the list of the Enabled Resource Types.

EXEC azure.extended_location.custom_locations.list_enabled_resource_types 
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;