custom_locations
Creates, updates, deletes, gets or lists a custom_locations resource.
Overview
| Name | custom_locations |
| Type | Resource |
| Id | azure.extended_location.custom_locations |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
- list_operations
| 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. |
authentication | object | This is optional input that contains the authentication that should be used to generate the namespace. |
clusterExtensionIds | array | Contains the reference to the add-on that contains charts to deploy CRDs and operators. |
displayName | string | Display name for the Custom Locations location. |
hostResourceId | string | Connected Cluster or AKS Cluster. The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions. |
hostType | string | Type of host the Custom Locations is referencing (Kubernetes, etc...). "Kubernetes" (Kubernetes) |
identity | object | Identity for the resource. |
location | string | The geo-location where the resource lives. Required. |
namespace | string | Kubernetes namespace that will be created on the specified cluster. |
provisioningState | string | Provisioning State for the Custom Location. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
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. |
authentication | object | This is optional input that contains the authentication that should be used to generate the namespace. |
clusterExtensionIds | array | Contains the reference to the add-on that contains charts to deploy CRDs and operators. |
displayName | string | Display name for the Custom Locations location. |
hostResourceId | string | Connected Cluster or AKS Cluster. The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions. |
hostType | string | Type of host the Custom Locations is referencing (Kubernetes, etc...). "Kubernetes" (Kubernetes) |
identity | object | Identity for the resource. |
location | string | The geo-location where the resource lives. Required. |
namespace | string | Kubernetes namespace that will be created on the specified cluster. |
provisioningState | string | Provisioning State for the Custom Location. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
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. |
authentication | object | This is optional input that contains the authentication that should be used to generate the namespace. |
clusterExtensionIds | array | Contains the reference to the add-on that contains charts to deploy CRDs and operators. |
displayName | string | Display name for the Custom Locations location. |
hostResourceId | string | Connected Cluster or AKS Cluster. The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions. |
hostType | string | Type of host the Custom Locations is referencing (Kubernetes, etc...). "Kubernetes" (Kubernetes) |
identity | object | Identity for the resource. |
location | string | The geo-location where the resource lives. Required. |
namespace | string | Kubernetes namespace that will be created on the specified cluster. |
provisioningState | string | Provisioning State for the Custom Location. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the compute operation. |
display | object | Describes the properties of a Custom Locations Operation Value Display. |
isDataAction | boolean | Is this Operation a data plane operation. |
origin | string | The origin of the compute operation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, resource_name, subscription_id | Gets a Custom Location. Gets the details of the customLocation with a specified resource group and name. | |
list_by_resource_group | select | resource_group_name, subscription_id | Gets 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_subscription | select | subscription_id | Gets 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_operations | select | Lists all available Custom Locations operations. | ||
create_or_update | insert | resource_group_name, resource_name, subscription_id, location | Creates or updates a Custom Location. Creates or updates a Custom Location in the specified Subscription and Resource Group. | |
update | update | resource_group_name, resource_name, subscription_id | Updates a Custom Location. Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription. | |
create_or_update | replace | resource_group_name, resource_name, subscription_id, location | Creates or updates a Custom Location. Creates or updates a Custom Location in the specified Subscription and Resource Group. | |
delete | delete | resource_group_name, resource_name, subscription_id | Deletes a Custom Location. Deletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id. | |
list_enabled_resource_types | exec | resource_group_name, resource_name, subscription_id | Gets the list of Enabled Resource Types. Gets the list of the Enabled Resource Types. | |
find_target_resource_group | exec | resource_group_name, resource_name, subscription_id | Gets 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.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
resource_name | string | Custom Locations name. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
- list_operations
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
;
Gets 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.
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 subscription_id = '{{ subscription_id }}' -- required
;
Gets 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.
SELECT
id,
name,
authentication,
clusterExtensionIds,
displayName,
hostResourceId,
hostType,
identity,
location,
namespace,
provisioningState,
systemData,
tags,
type
FROM azure.extended_location.custom_locations
WHERE subscription_id = '{{ subscription_id }}' -- required
;
Lists all available Custom Locations operations.
SELECT
name,
display,
isDataAction,
origin
FROM azure.extended_location.custom_locations
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: custom_locations
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the custom_locations resource.
- name: resource_name
value: "{{ resource_name }}"
description: Required parameter for the custom_locations resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the custom_locations resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
The set of properties specific to a Custom Location.
value:
authentication:
type: "{{ type }}"
value: "{{ value }}"
clusterExtensionIds:
- "{{ clusterExtensionIds }}"
displayName: "{{ displayName }}"
hostResourceId: "{{ hostResourceId }}"
hostType: "{{ hostType }}"
namespace: "{{ namespace }}"
provisioningState: "{{ provisioningState }}"
- name: identity
description: |
Identity for the resource.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
UPDATE examples
- update
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
- create_or_update
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
- delete
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
- list_enabled_resource_types
- find_target_resource_group
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
;
Gets 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.
EXEC azure.extended_location.custom_locations.find_target_resource_group
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"labels": "{{ labels }}"
}'
;