az costmanagement export

Note

このリファレンスは、Azure CLI (バージョン 2.55.0 以降) の costmanagement 拡張機能の一部です。 拡張機能は、az costmanagement export コマンドを初めて実行するときに自動的にインストールされます。 拡張機能の詳細をご覧ください。

Costmanagement エクスポート。

コマンド

名前 説明 Status
az costmanagement export create

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

拡張子 GA
az costmanagement export delete

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

拡張子 GA
az costmanagement export list

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

拡張子 GA
az costmanagement export show

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

拡張子 GA
az costmanagement export update

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

拡張子 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

エクスポート名。

--scope

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

--storage-account-id

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

--storage-container

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

--timeframe

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

承認された値: BillingMonthToDate, Custom, MonthToDate, TheLastBillingMonth, TheLastMonth, WeekToDate

省略可能のパラメーター

--dataset-configuration

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

--recurrence

スケジュール繰り返し。

承認された値: Annually, Daily, Monthly, Weekly
--recurrence-period

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

--schedule-status

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

承認された値: Active, Inactive
既定値: Inactive
--storage-directory

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

--time-period

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

--type

クエリの種類。

承認された値: ActualCost, AmortizedCost, Usage
既定値: Usage
グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

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

--only-show-errors

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

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

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

--subscription

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

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

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

エクスポート名。

--scope

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

省略可能のパラメーター

--yes -y

確認のダイアログを表示しません。

既定値: False
グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

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

--only-show-errors

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

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

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

--subscription

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

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

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

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

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

--only-show-errors

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

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

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

--subscription

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

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

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

エクスポート名。

--scope

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

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

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

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

--only-show-errors

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

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

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

--subscription

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

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

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

エクスポート名。

--scope

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

省略可能のパラメーター

--dataset-configuration

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

--recurrence

スケジュール繰り返し。

承認された値: Annually, Daily, Monthly, Weekly
--recurrence-period

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

--schedule-status

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

承認された値: Active, Inactive
--storage-account-id

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

--storage-container

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

--storage-directory

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

--time-period

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

--timeframe

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

承認された値: BillingMonthToDate, Custom, MonthToDate, TheLastBillingMonth, TheLastMonth, WeekToDate
グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

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

--only-show-errors

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

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

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

--subscription

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

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。