次の方法で共有


az costmanagement export

Note

This reference is part of the costmanagement extension for the Azure CLI (version 2.55.0 or higher). 拡張機能は、az costmanagement export コマンドを初めて実行するときに自動的にインストールされます。 Learn more about extensions.

Costmanagement export.

コマンド

名前 説明 状態
az costmanagement export create

エクスポートを作成する操作。

Extension GA
az costmanagement export delete

エクスポートを削除する操作。

Extension GA
az costmanagement export list

指定されたスコープのすべてのエクスポートを一覧表示する操作。

Extension GA
az costmanagement export show

定義されたスコープのエクスポートの実行履歴をエクスポート名で取得する操作。

Extension GA
az costmanagement export update

エクスポートを更新する操作。

Extension GA

az costmanagement export create

エクスポートを作成する操作。

az costmanagement export create --name
                                --scope
                                --storage-account-id
                                --storage-container
                                --timeframe {BillingMonthToDate, Custom, MonthToDate, TheLastBillingMonth, TheLastMonth, WeekToDate}
                                [--dataset-configuration]
                                [--recurrence {Annually, Daily, Monthly, Weekly}]
                                [--recurrence-period]
                                [--schedule-status {Active, Inactive}]
                                [--storage-directory]
                                [--time-period]
                                [--type {ActualCost, AmortizedCost, Usage}]

ManagementGroup スコープのエクスポートを作成する

az costmanagement export create --name "TestExport" --type "Usage" --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --timeframe "MonthToDate" --storage-container="exports" --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" --storage-directory="ad-hoc" --recurrence "Weekly" --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Management/managementGroups/TestMG"

ResourceGroup スコープのエクスポートを作成する

az costmanagement export create --name "TestExport" --type "Usage" --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --timeframe "MonthToDate" --storage-container="exports" --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" --storage-directory="ad-hoc" --recurrence "Weekly" --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"

サブスクリプション スコープのエクスポートを作成する

az costmanagement export create --name "TestExport" --type "Usage" --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --timeframe "MonthToDate" --storage-container="exports" --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" --storage-directory="ad-hoc" --recurrence "Weekly" --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-0000-000000000000"

必須のパラメーター

--name

Export Name.

--scope

クエリ操作とエクスポート操作に関連付けられているスコープ。 これには、サブスクリプション スコープの '/subscriptions/{subscriptionId}/'、resourceGroup スコープの場合は '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'、管理グループ スコープの場合は '/providers/Microsoft.Management/managementGroups/{managementGroupId} が含まれます。

--storage-account-id

エクスポートを格納するストレージ アカウントの ID。

プロパティ
Parameter group: Delivery Destination Info Arguments
--storage-container

エクスポートを配信するストレージ コンテナー。

プロパティ
Parameter group: Delivery Destination Info Arguments
--timeframe

クエリのデータをプルする期間。 カスタムの場合は、特定の期間を指定する必要があります。

プロパティ
Parameter group: Export Definition Arguments
指定可能な値: BillingMonthToDate, Custom, MonthToDate, TheLastBillingMonth, TheLastMonth, WeekToDate

省略可能のパラメーター

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--dataset-configuration

エクスポート内のデータの構成情報があります。 集計とグループ化が指定されている場合、構成は無視されます。 値が必要です:columns=xx。

プロパティ
Parameter group: Export Definition Arguments
--recurrence

スケジュールの繰り返し。

プロパティ
Parameter group: Schedule Info Arguments
指定可能な値: Annually, Daily, Monthly, Weekly
--recurrence-period

繰り返しの開始日と終了日を指定します。 開始日は将来である必要があります。 存在する場合、終了日は開始日より大きくする必要があります。 予期される値: KEY1=VALUE1 KEY2=VALUE2 ... 、使用可能な KEY は次のとおりです。 時刻形式は 2020-05-01T00:00:00 のようになります。

プロパティ
Parameter group: Schedule Info Arguments
--schedule-status

エクスポートのスケジュールの状態。 非アクティブな場合、エクスポートのスケジュールされた実行は一時停止されます。

プロパティ
Parameter group: Schedule Info Arguments
規定値: Inactive
指定可能な値: Active, Inactive
--storage-directory

エクスポートを格納するストレージ コンテナー内のルート ディレクトリ。

プロパティ
Parameter group: Delivery Destination Info Arguments
--time-period

クエリのデータをプルするための期間があります。 期待値: from=TIMESTAMP1 to=TIMESTAMP2。 タイムスタンプ形式は 2020-05-01T00:00:00 のようになります。TIMESTAMP1は将来必要であり、TIMESTAMP2はTIMESTAMP1より大きい必要があります。

プロパティ
Parameter group: Export Definition Arguments
--type

クエリの種類。

プロパティ
Parameter group: Export Definition Arguments
規定値: Usage
指定可能な値: ActualCost, AmortizedCost, Usage
グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

プロパティ
規定値: False
--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

プロパティ
規定値: False
--output -o

Output format.

プロパティ
規定値: json
指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

プロパティ
規定値: False

az costmanagement export delete

エクスポートを削除する操作。

az costmanagement export delete --name
                                --scope
                                [--yes]

ManagementGroup スコープのエクスポートを削除する

az costmanagement export delete --name "TestExport" --scope "providers/Microsoft.Management/managementGroups/TestMG"

ResourceGroup スコープのエクスポートを削除する

az costmanagement export delete --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"

サブスクリプション スコープのエクスポートを削除する

az costmanagement export delete --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-000000000000"

必須のパラメーター

--name

Export Name.

--scope

クエリ操作とエクスポート操作に関連付けられているスコープ。 これには、サブスクリプション スコープの '/subscriptions/{subscriptionId}/'、resourceGroup スコープの場合は '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'、管理グループ スコープの場合は '/providers/Microsoft.Management/managementGroups/{managementGroupId} が含まれます。

省略可能のパラメーター

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--yes -y

確認を求めないでください。

プロパティ
規定値: False
グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

プロパティ
規定値: False
--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

プロパティ
規定値: False
--output -o

Output format.

プロパティ
規定値: json
指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

プロパティ
規定値: False

az costmanagement export list

指定されたスコープのすべてのエクスポートを一覧表示する操作。

az costmanagement export list --scope

ManagementGroup スコープ内のエクスポートを一覧表示する

az costmanagement export list --scope "providers/Microsoft.Management/managementGroups/TestMG"

ResourceGroup スコープ内のエクスポートを一覧表示する

az costmanagement export list --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"

サブスクリプション スコープ内のエクスポートを一覧表示する

az costmanagement export list --scope "subscriptions/00000000-0000-0000-0000-000000000000"

必須のパラメーター

--scope

クエリ操作とエクスポート操作に関連付けられているスコープ。 これには、サブスクリプション スコープの '/subscriptions/{subscriptionId}/'、resourceGroup スコープの場合は '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'、管理グループ スコープの場合は '/providers/Microsoft.Management/managementGroups/{managementGroupId} が含まれます。

グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

プロパティ
規定値: False
--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

プロパティ
規定値: False
--output -o

Output format.

プロパティ
規定値: json
指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

プロパティ
規定値: False

az costmanagement export show

定義されたスコープのエクスポートの実行履歴をエクスポート名で取得する操作。

az costmanagement export show --name
                              --scope

ManagementGroup スコープにエクスポートを表示する

az costmanagement export show --name "TestExport" --scope "providers/Microsoft.Management/managementGroups/TestMG"

ResourceGroup スコープにエクスポートを表示する

az costmanagement export show --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"

サブスクリプション スコープにエクスポートを表示する

az costmanagement export show --name "TestExport" --scope "subscriptions/00000000-0000-0000-0000-000000000000"

必須のパラメーター

--name

Export Name.

--scope

クエリ操作とエクスポート操作に関連付けられているスコープ。 これには、サブスクリプション スコープの '/subscriptions/{subscriptionId}/'、resourceGroup スコープの場合は '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'、管理グループ スコープの場合は '/providers/Microsoft.Management/managementGroups/{managementGroupId} が含まれます。

グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

プロパティ
規定値: False
--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

プロパティ
規定値: False
--output -o

Output format.

プロパティ
規定値: json
指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

プロパティ
規定値: False

az costmanagement export update

エクスポートを更新する操作。

az costmanagement export update --name
                                --scope
                                [--dataset-configuration]
                                [--recurrence {Annually, Daily, Monthly, Weekly}]
                                [--recurrence-period]
                                [--schedule-status {Active, Inactive}]
                                [--storage-account-id]
                                [--storage-container]
                                [--storage-directory]
                                [--time-period]
                                [--timeframe {BillingMonthToDate, Custom, MonthToDate, TheLastBillingMonth, TheLastMonth, WeekToDate}]

ManagementGroup スコープのエクスポートを更新する

az costmanagement export update --name "TestExport" --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --timeframe "MonthToDate" --storage-container="exports" --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" --storage-directory="ad-hoc" --recurrence "Weekly" --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "providers/Microsoft.Management/managementGroups/TestMG"

ResourceGroup スコープのエクスポートを更新する

az costmanagement export update --name "TestExport" --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --timeframe "MonthToDate" --storage-container="exports" --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" --storage-directory="ad-hoc" --recurrence "Weekly" --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"

サブスクリプション スコープでエクスポートを更新する

az costmanagement export update --name "TestExport" --dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="ResourceLocation" columns="PreTaxCost" --timeframe "MonthToDate" --storage-container="exports" --storage-account-id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182" --storage-directory="ad-hoc" --recurrence "Weekly" --recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" --schedule-status "Active" --scope "subscriptions/00000000-0000-0000-0000-000000000000"

必須のパラメーター

--name

Export Name.

--scope

クエリ操作とエクスポート操作に関連付けられているスコープ。 これには、サブスクリプション スコープの '/subscriptions/{subscriptionId}/'、resourceGroup スコープの場合は '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'、管理グループ スコープの場合は '/providers/Microsoft.Management/managementGroups/{managementGroupId} が含まれます。

省略可能のパラメーター

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--dataset-configuration

エクスポート内のデータの構成情報があります。 集計とグループ化が指定されている場合、構成は無視されます。 値が必要です:columns=xx。

プロパティ
Parameter group: Export Definition Arguments
--recurrence

スケジュールの繰り返し。

プロパティ
Parameter group: Schedule Info Arguments
指定可能な値: Annually, Daily, Monthly, Weekly
--recurrence-period

繰り返しの開始日と終了日を指定します。 開始日は将来である必要があります。 存在する場合、終了日は開始日より大きくする必要があります。 予期される値: KEY1=VALUE1 KEY2=VALUE2 ... 、使用可能な KEY は次のとおりです。 時刻形式は 2020-05-01T00:00:00 のようになります。

プロパティ
Parameter group: Schedule Info Arguments
--schedule-status

エクスポートのスケジュールの状態。 非アクティブな場合、エクスポートのスケジュールされた実行は一時停止されます。

プロパティ
Parameter group: Schedule Info Arguments
指定可能な値: Active, Inactive
--storage-account-id

エクスポートを格納するストレージ アカウントの ID。

プロパティ
Parameter group: Delivery Destination Info Arguments
--storage-container

エクスポートを配信するストレージ コンテナー。

プロパティ
Parameter group: Delivery Destination Info Arguments
--storage-directory

エクスポートを格納するストレージ コンテナー内のルート ディレクトリ。

プロパティ
Parameter group: Delivery Destination Info Arguments
--time-period

クエリのデータをプルするための期間があります。 期待値: from=TIMESTAMP1 to=TIMESTAMP2。 タイムスタンプ形式は 2020-05-01T00:00:00 のようになります。TIMESTAMP1は将来必要であり、TIMESTAMP2はTIMESTAMP1より大きい必要があります。

プロパティ
Parameter group: Export Definition Arguments
--timeframe

クエリのデータをプルする期間。 カスタムの場合は、特定の期間を指定する必要があります。

プロパティ
Parameter group: Export Definition Arguments
指定可能な値: BillingMonthToDate, Custom, MonthToDate, TheLastBillingMonth, TheLastMonth, WeekToDate
グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

プロパティ
規定値: False
--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

プロパティ
規定値: False
--output -o

Output format.

プロパティ
規定値: json
指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

プロパティ
規定値: False