exports
Creates, updates, deletes, gets or lists an exports
resource.
Overview
Name | exports |
Type | Resource |
Id | azure.cost_management.exports |
Fields
The following fields are returned by SELECT
queries:
- get
- list
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
eTag | string | eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. |
identity | object | The managed identity associated with Export |
location | string | The location of the Export's managed identity. Only required when utilizing managed identity. |
properties | object | The properties of the export. (title: Export properties) |
type | string | Resource type. |
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
eTag | string | eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. |
identity | object | The managed identity associated with Export |
location | string | The location of the Export's managed identity. Only required when utilizing managed identity. |
properties | object | The properties of the export. (title: Export properties) |
type | string | Resource type. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | scope , exportName | $expand | The operation to get the export for the defined scope by export name. |
list | select | scope | $expand | The operation to list all exports at the given scope. |
create_or_update | insert | scope , exportName | The operation to create or update a export. 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. | |
delete | delete | scope , exportName | The operation to delete a export. | |
execute | exec | scope , exportName | The operation to run an export. |
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 |
---|---|---|
exportName | string | Export Name. |
scope | string | The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. |
$expand | string | May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last run of each export. |
SELECT
examples
- get
- list
The operation to get the export for the defined scope by export name.
SELECT
id,
name,
eTag,
identity,
location,
properties,
type
FROM azure.cost_management.exports
WHERE scope = '{{ scope }}' -- required
AND exportName = '{{ exportName }}' -- required
AND $expand = '{{ $expand }}'
;
The operation to list all exports at the given scope.
SELECT
id,
name,
eTag,
identity,
location,
properties,
type
FROM azure.cost_management.exports
WHERE scope = '{{ scope }}' -- required
AND $expand = '{{ $expand }}'
;
INSERT
examples
- create_or_update
- Manifest
The operation to create or update a export. 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.
INSERT INTO azure.cost_management.exports (
data__eTag,
data__identity,
data__location,
data__properties,
scope,
exportName
)
SELECT
'{{ eTag }}',
'{{ identity }}',
'{{ location }}',
'{{ properties }}',
'{{ scope }}',
'{{ exportName }}'
RETURNING
id,
name,
eTag,
identity,
location,
properties,
type
;
# Description fields are for documentation purposes
- name: exports
props:
- name: scope
value: string
description: Required parameter for the exports resource.
- name: exportName
value: string
description: Required parameter for the exports resource.
- name: eTag
value: string
description: |
eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- name: identity
value: object
description: |
The managed identity associated with Export
- name: location
value: string
description: |
The location of the Export's managed identity. Only required when utilizing managed identity.
- name: properties
value: object
description: |
The properties of the export.
DELETE
examples
- delete
The operation to delete a export.
DELETE FROM azure.cost_management.exports
WHERE scope = '{{ scope }}' --required
AND exportName = '{{ exportName }}' --required
;
Lifecycle Methods
- execute
The operation to run an export.
EXEC azure.cost_management.exports.execute
@scope='{{ scope }}' --required,
@exportName='{{ exportName }}' --required
;