az costmanagement export

참고

이 참조는 Azure CLI 대한 costmanagement 확장의 일부이며 버전 2.3.1 이상이 필요합니다. az costmanagement export 명령을 처음 실행할 때 확장이 자동으로 설치됩니다. 확장에 대해 자세히 알아보세요.

Costmanagement 내보내기.

명령

az costmanagement export create

내보내기를 만드는 작업입니다.

az costmanagement export delete

내보내기를 삭제하는 작업입니다.

az costmanagement export list

지정된 범위의 모든 내보내기를 나열하는 작업입니다.

az costmanagement export show

내보내기 이름으로 정의된 범위에 대한 내보내기의 실행 기록을 얻는 작업입니다.

az costmanagement export update

내보내기를 업데이트하는 작업입니다.

az costmanagement export create

내보내기를 만드는 작업입니다.

az costmanagement export create --name
                                --scope
                                --storage-account-id
                                --storage-container
                                --timeframe {BillingMonthToDate, Custom, MonthToDate, TheLastBillingMonth, TheLastMonth, WeekToDate}
                                [--dataset-configuration]
                                [--dataset-grouping]
                                [--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" --dataset-grouping name="SubscriptionName" type="Dimension" --dataset-grouping name="Environment" type="Tag" --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" --dataset-grouping name="SubscriptionName" type="Dimension" --dataset-grouping name="Environment" type="Tag" --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" --dataset-grouping name="SubscriptionName" type="Dimension" --dataset-grouping name="Environment" type="Tag" --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.

--dataset-grouping

쿼리에 사용할 group by 식의 배열입니다. 쿼리에는 최대 2개의 group by 절이 있을 수 있습니다. 예상 값: KEY1=VALUE1 KEY2=VALUE2 ... , 사용 가능한 KEY는 type, name입니다.

--recurrence

일정 되풀이입니다.

허용되는 값: Annually, Daily, Monthly, Weekly
--recurrence-period

되풀이의 시작 및 종료 날짜가 있습니다. 시작 날짜는 미래 날짜여야 합니다. 있는 경우 종료 날짜는 시작 날짜보다 커야 합니다. 예상 값: KEY1=VALUE1 KEY2=VALUE2 ... , 사용 가능한 KEY: from, to. 시간 형식은 2020-05-01T00:00:00과 같습니다.

--schedule-status

일정의 상태입니다. 활성 상태인지 여부입니다. 비활성 상태이면 내보내기 예약 실행이 일시 중지됩니다.

허용되는 값: Active, Inactive
--storage-directory

내보내기를 저장할 스토리지 컨테이너의 루트 디렉터리입니다.

--time-period

쿼리에 대한 데이터를 끌어온 기간이 있습니다. 예상 값: from=TIMESTAMP1 to=TIMESTAMP2. 타임스탬프 형식은 2020-05-01T00:00:00과 같습니다. TIMESTAMP1은 나중에 이고 TIMESTAMP2는 TIMESTAMP1보다 커야 합니다.

--type

쿼리의 형식입니다.

허용되는 값: ActualCost, AmortizedCost, Usage

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

확인을 묻는 메시지를 표시하지 마세요.

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}가 포함됩니다.

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}가 포함됩니다.

az costmanagement export update

내보내기를 업데이트하는 작업입니다.

az costmanagement export update --name
                                --scope
                                [--dataset-configuration]
                                [--dataset-grouping]
                                [--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" --dataset-grouping name="SubscriptionName" type="Dimension" --dataset-grouping name="Environment" type="Tag" --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" --dataset-grouping name="SubscriptionName" type="Dimension" --dataset-grouping name="Environment" type="Tag" --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" --dataset-grouping name="SubscriptionName" type="Dimension" --dataset-grouping name="Environment" type="Tag" --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.

--dataset-grouping

쿼리에 사용할 group by 식의 배열입니다. 쿼리에는 최대 2개의 group by 절이 있을 수 있습니다. 예상 값: KEY1=VALUE1 KEY2=VALUE2 ... , 사용 가능한 KEY는 type, name입니다.

--recurrence

일정 되풀이입니다.

허용되는 값: Annually, Daily, Monthly, Weekly
--recurrence-period

되풀이의 시작 및 종료 날짜가 있습니다. 시작 날짜는 미래 날짜여야 합니다. 있는 경우 종료 날짜는 시작 날짜보다 커야 합니다. 예상 값: KEY1=VALUE1 KEY2=VALUE2 ... , 사용 가능한 KEY: from, to. 시간 형식은 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