Skip to main content

datastores

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

Overview

Namedatastores
TypeResource
Idazure_isv.connected_vsphere.datastores

Fields

NameDatatypeDescription
idtextGets or sets the Id.
nametextGets or sets the name.
capacity_gbtextfield from the properties object
custom_resource_nametextfield from the properties object
datastoreNametextfield from the properties object
extended_locationtextfield from the properties object
free_space_gbtextfield from the properties object
inventory_item_idtextfield from the properties object
kindtextMetadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
locationtextGets or sets the location.
mo_nametextfield from the properties object
mo_ref_idtextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
statusestextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextGets or sets the Resource tags.
typetextGets or sets the type of the resource.
uuidtextfield from the properties object
v_center_idtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdatastoreName, resourceGroupName, subscriptionIdImplements datastore GET method.
listSELECTsubscriptionIdList of datastores in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList of datastores in a resource group.
createINSERTdatastoreName, resourceGroupName, subscriptionId, data__location, data__propertiesCreate Or Update datastore.
deleteDELETEdatastoreName, resourceGroupName, subscriptionIdImplements datastore DELETE method.
updateUPDATEdatastoreName, resourceGroupName, subscriptionIdAPI to update certain properties of the datastore resource.

SELECT examples

List of datastores in a subscription.

SELECT
id,
name,
capacity_gb,
custom_resource_name,
datastoreName,
extended_location,
free_space_gb,
inventory_item_id,
kind,
location,
mo_name,
mo_ref_id,
provisioning_state,
resourceGroupName,
statuses,
subscriptionId,
system_data,
tags,
type,
uuid,
v_center_id
FROM azure_isv.connected_vsphere.vw_datastores
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure_isv.connected_vsphere.datastores (
datastoreName,
resourceGroupName,
subscriptionId,
data__location,
data__properties,
properties,
location,
extendedLocation,
systemData,
tags,
kind
)
SELECT
'{{ datastoreName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ location }}',
'{{ extendedLocation }}',
'{{ systemData }}',
'{{ tags }}',
'{{ kind }}'
;

UPDATE example

Updates a datastores resource.

/*+ update */
UPDATE azure_isv.connected_vsphere.datastores
SET
tags = '{{ tags }}'
WHERE
datastoreName = '{{ datastoreName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified datastores resource.

/*+ delete */
DELETE FROM azure_isv.connected_vsphere.datastores
WHERE datastoreName = '{{ datastoreName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';