Skip to main content

custom_locations

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

Overview

Namecustom_locations
TypeResource
Idazure.custom_locations.custom_locations

Fields

NameDatatypeDescription
authenticationtextfield from the properties object
cluster_extension_idstextfield from the properties object
display_nametextfield from the properties object
host_resource_idtextfield from the properties object
host_typetextfield from the properties object
identitytextIdentity for the resource.
locationtextThe geo-location where the resource lives
namespacetextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
resourceNametextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, resourceName, subscriptionIdGets the details of the customLocation with a specified resource group and name.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGets a list of Custom Locations in the specified subscription and resource group. The operation returns properties of each Custom Location.
list_by_subscriptionSELECTsubscriptionIdGets a list of Custom Locations in the specified subscription. The operation returns properties of each Custom Location
create_or_updateINSERTresourceGroupName, resourceName, subscriptionIdCreates or updates a Custom Location in the specified Subscription and Resource Group
deleteDELETEresourceGroupName, resourceName, subscriptionIdDeletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id.
updateUPDATEresourceGroupName, resourceName, subscriptionIdUpdates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription.
find_target_resource_groupEXECresourceGroupName, resourceName, subscriptionIdReturns 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.

SELECT examples

Gets a list of Custom Locations in the specified subscription. The operation returns properties of each Custom Location

SELECT
authentication,
cluster_extension_ids,
display_name,
host_resource_id,
host_type,
identity,
location,
namespace,
provisioning_state,
resourceGroupName,
resourceName,
subscriptionId,
system_data,
tags
FROM azure.custom_locations.vw_custom_locations
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new custom_locations resource.

/*+ create */
INSERT INTO azure.custom_locations.custom_locations (
resourceGroupName,
resourceName,
subscriptionId,
identity,
properties,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ identity }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a custom_locations resource.

/*+ update */
UPDATE azure.custom_locations.custom_locations
SET
identity = '{{ identity }}',
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified custom_locations resource.

/*+ delete */
DELETE FROM azure.custom_locations.custom_locations
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';