Skip to main content

views

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

Overview

Nameviews
TypeResource
Idazure.cost_management.views

Fields

NameDatatypeDescription
idtextResource Id.
nametextResource name.
accumulatedtextfield from the properties object
charttextfield from the properties object
created_ontextfield from the properties object
currencytextfield from the properties object
date_rangetextfield from the properties object
display_nametextfield from the properties object
e_tagtextfield from the properties object
kpistextfield from the properties object
metrictextfield from the properties object
modified_ontextfield from the properties object
pivotstextfield from the properties object
querytextfield from the properties object
scopetextfield from the properties object
typetextResource type.
viewNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTviewNameGets the view by view name.
get_by_scopeSELECTscope, viewNameGets the view for the defined scope by view name.
listSELECTLists all views by tenant and object.
list_by_scopeSELECTscopeLists all views at the given scope.
create_or_updateINSERTviewNameThe operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
deleteDELETEviewNameThe operation to delete a view.
delete_by_scopeDELETEscope, viewNameThe operation to delete a view.

SELECT examples

Lists all views by tenant and object.

SELECT
id,
name,
accumulated,
chart,
created_on,
currency,
date_range,
display_name,
e_tag,
kpis,
metric,
modified_on,
pivots,
query,
scope,
type,
viewName
FROM azure.cost_management.vw_views
;

INSERT example

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

/*+ create */
INSERT INTO azure.cost_management.views (
viewName,
eTag,
properties
)
SELECT
'{{ viewName }}',
'{{ eTag }}',
'{{ properties }}'
;

DELETE example

Deletes the specified views resource.

/*+ delete */
DELETE FROM azure.cost_management.views
WHERE viewName = '{{ viewName }}';