Exports - Create Or Update

내보내기를 만들거나 업데이트하는 작업입니다. 업데이트 작업을 수행하려면 요청에 최신 eTag를 설정해야 합니다. get 작업을 수행하여 최신 eTag를 가져올 수 있습니다. 만들기 작업에는 eTag가 필요하지 않습니다.

PUT https://management.azure.com/{scope}/providers/Microsoft.CostManagement/exports/{exportName}?api-version=2023-11-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
exportName
path True

string

내보내기 이름입니다.

scope
path True

string

내보내기 작업과 연결된 scope. 여기에는 구독 scope 대한 '/subscriptions/{subscriptionId}/'가 포함됩니다. '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope 및 '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scopeEnrollmentAccount scope 대한 , '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' 관리 그룹 scope 대한 '/providers/Microsoft.Management/managementGroups/{managementGroupId} , billingProfile scope 대한 '/providers/Microsoft.Billing/billingAccountS/{billingAccountId}/billingProfiles/{billingProfileId}'invoiceSection scope 대한 , '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' 및 파트너를 위한 '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}'

api-version
query True

string

이 작업에 사용할 API 버전입니다.

요청 본문

Name 필수 형식 Description
properties.definition True

ExportDefinition

내보내기 정의가 있습니다.

properties.deliveryInfo True

ExportDeliveryInfo

내보내기 배달 정보가 있습니다.

eTag

string

리소스의 eTag입니다. 동시 업데이트 시나리오를 처리하기 위해 이 필드는 사용자가 최신 버전을 업데이트하는지 여부를 확인하는 데 사용됩니다.

identity

SystemAssignedServiceIdentity

내보내기와 연결된 관리 ID

location

string

내보내기 관리 ID의 위치입니다. 관리 ID를 사용하는 경우에만 필요합니다.

properties.format

FormatType

배달되는 내보내기의 형식입니다. 현재 'Csv'만 지원됩니다.

properties.partitionData

boolean

true로 설정하면 내보낸 데이터가 크기별로 분할되고 매니페스트 파일과 함께 Blob 디렉터리에 배치됩니다. 참고: 이 옵션은 현재 Microsoft 고객 계약 상거래 범위에만 사용할 수 있습니다.

properties.runHistory

ExportExecutionListResult

요청된 경우 내보내기에서 가장 최근 실행 기록이 있습니다.

properties.schedule

ExportSchedule

내보내기 일정 정보가 있습니다.

응답

Name 형식 Description
200 OK

Export

OK. 요청이 성공했습니다.

201 Created

Export

만들어졌습니다.

Other Status Codes

ErrorResponse

작업이 실패한 이유를 설명하는 오류 응답입니다.

보안

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation 사용자 계정 가장

예제

ExportCreateOrUpdateByBillingAccount
ExportCreateOrUpdateByDepartment
ExportCreateOrUpdateByEnrollmentAccount
ExportCreateOrUpdateByManagementGroup
ExportCreateOrUpdateByResourceGroup
ExportCreateOrUpdateBySubscription

ExportCreateOrUpdateByBillingAccount

Sample Request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

ExportCreateOrUpdateByDepartment

Sample Request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

ExportCreateOrUpdateByEnrollmentAccount

Sample Request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

ExportCreateOrUpdateByManagementGroup

Sample Request

PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

ExportCreateOrUpdateByResourceGroup

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

ExportCreateOrUpdateBySubscription

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

정의

Name Description
CommonExportProperties

내보내기의 공통 속성입니다.

ErrorDetails

오류의 세부 정보입니다.

ErrorResponse

오류 응답은 서비스가 들어오는 요청을 처리할 수 없음을 나타냅니다. 그 이유는 오류 메시지에 제공됩니다.

일부 오류 응답:

  • 429 TooManyRequests - 요청이 제한됩니다. "x-ms-ratelimit-microsoft.consumption-retry-after" 헤더에 지정된 시간을 기다린 후 다시 시도합니다.

  • 503 ServiceUnavailable - 서비스를 일시적으로 사용할 수 없습니다. "Retry-After" 헤더에 지정된 시간 동안 기다린 후 다시 시도합니다.

ExecutionStatus

내보내기 실행의 마지막으로 알려진 상태.

ExecutionType

내보내기 실행의 형식입니다.

Export

내보내기 리소스입니다.

ExportDataset

내보내기에서 데이터에 대한 정의입니다.

ExportDatasetConfiguration

데이터 세트 내보내기 구성입니다. 내보내기를 위해 열을 선택할 수 있습니다. 제공되지 않으면 내보내기에서 사용 가능한 모든 열이 포함됩니다.

ExportDefinition

내보내기의 정의입니다.

ExportDeliveryDestination

이는 비용 내보내기를 제공할 Blob Storage 계정 위치를 나타냅니다. 대상을 구성하는 방법에는 두 가지가 있습니다. 대부분의 고객에게 권장되는 방법은 스토리지 계정의 resourceId를 지정하는 것입니다. 이렇게 하려면 Cost Management 서비스에 스토리지에 대한 액세스 권한을 부여하기 위해 Microsoft.CostManagementExports 리소스 공급자에 계정 구독을 일회성으로 등록해야 합니다. Azure Portal 내보내기를 만들 때 이 등록은 자동으로 수행되지만 API 사용자는 구독을 명시적으로 등록해야 할 수 있습니다(자세한 내용은 참조 https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ). 대상을 구성하는 또 다른 방법은 청구 계정의 전역 관리자인 Microsoft 파트너 계약 플랜이 있는 파트너만 사용할 수 있습니다. 이러한 파트너는 스토리지 계정의 resourceId를 지정하는 대신 계정에 대한 SAS 토큰과 함께 스토리지 계정 이름을 지정할 수 있습니다. 이렇게 하면 모든 테넌트에서 스토리지 계정으로 비용을 내보낼 수 있습니다. 서비스/컨테이너/개체 리소스 유형 및 읽기/쓰기/삭제/목록/추가/만들기 권한이 있는 Blob 서비스에 대한 SAS 토큰을 만들어야 합니다(자세한 내용은 참조 https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key ).

ExportDeliveryInfo

내보내기와 연결된 배달 정보입니다.

ExportExecutionListResult

내보내기의 실행 기록을 나열한 결과입니다.

ExportRecurrencePeriod

되풀이 일정의 시작 및 종료 날짜입니다.

ExportRun

내보내기 실행입니다.

ExportSchedule

내보내기와 연결된 일정입니다.

ExportTimePeriod

내보내기에서 데이터의 날짜 범위입니다. 시간 프레임이 '사용자 지정'으로 설정된 경우에만 지정해야 합니다. 최대 날짜 범위는 3개월입니다.

ExportType

내보내기의 형식입니다. '사용량'은 'ActualCost'와 동일하며 서비스 예약에 대한 요금 또는 상각에 대한 데이터를 아직 제공하지 않는 내보내기에도 적용됩니다.

FormatType

배달되는 내보내기의 형식입니다. 현재 'Csv'만 지원됩니다.

GranularityType

내보내기에서 행의 세분성입니다. 현재는 '매일'만 지원됩니다.

RecurrenceType

일정 되풀이입니다.

StatusType

내보내기 일정의 상태. '비활성'이면 내보내기 일정이 일시 중지됩니다.

SystemAssignedServiceIdentity

관리 서비스 ID(시스템 할당 또는 없음)

SystemAssignedServiceIdentityType

관리 서비스 ID 유형(시스템 할당 또는 없음)

TimeframeType

내보내기를 위한 데이터를 끌어당기는 시간 프레임입니다. 사용자 지정하는 경우 특정 기간을 제공해야 합니다.

CommonExportProperties

내보내기의 공통 속성입니다.

Name 형식 Description
definition

ExportDefinition

내보내기 정의가 있습니다.

deliveryInfo

ExportDeliveryInfo

내보내기 배달 정보가 있습니다.

format

FormatType

배달되는 내보내기의 형식입니다. 현재 'Csv'만 지원됩니다.

nextRunTimeEstimate

string

내보내기에서 활성 일정이 있는 경우 은 다음 런타임의 예상 시간을 제공합니다.

partitionData

boolean

true로 설정하면 내보낸 데이터가 크기별로 분할되고 매니페스트 파일과 함께 Blob 디렉터리에 배치됩니다. 참고: 이 옵션은 현재 Microsoft 고객 계약 상거래 범위에만 사용할 수 있습니다.

runHistory

ExportExecutionListResult

요청된 경우 내보내기에서 가장 최근 실행 기록이 있습니다.

ErrorDetails

오류의 세부 정보입니다.

Name 형식 Description
code

string

오류 코드

message

string

작업이 실패한 이유를 나타내는 오류 메시지입니다.

ErrorResponse

오류 응답은 서비스가 들어오는 요청을 처리할 수 없음을 나타냅니다. 그 이유는 오류 메시지에 제공됩니다.

일부 오류 응답:

  • 429 TooManyRequests - 요청이 제한됩니다. "x-ms-ratelimit-microsoft.consumption-retry-after" 헤더에 지정된 시간을 기다린 후 다시 시도합니다.

  • 503 ServiceUnavailable - 서비스를 일시적으로 사용할 수 없습니다. "Retry-After" 헤더에 지정된 시간 동안 기다린 후 다시 시도합니다.

Name 형식 Description
error

ErrorDetails

오류의 세부 정보입니다.

ExecutionStatus

내보내기 실행의 마지막으로 알려진 상태.

Name 형식 Description
Completed

string

DataNotAvailable

string

Failed

string

InProgress

string

NewDataNotAvailable

string

Queued

string

Timeout

string

ExecutionType

내보내기 실행의 형식입니다.

Name 형식 Description
OnDemand

string

Scheduled

string

Export

내보내기 리소스입니다.

Name 형식 Description
eTag

string

리소스의 eTag입니다. 동시 업데이트 시나리오를 처리하기 위해 이 필드는 사용자가 최신 버전을 업데이트하는지 여부를 확인하는 데 사용됩니다.

id

string

리소스 ID입니다.

identity

SystemAssignedServiceIdentity

내보내기와 연결된 관리 ID

location

string

내보내기 관리 ID의 위치입니다. 관리 ID를 사용하는 경우에만 필요합니다.

name

string

리소스 이름입니다.

properties.definition

ExportDefinition

내보내기 정의가 있습니다.

properties.deliveryInfo

ExportDeliveryInfo

내보내기 배달 정보가 있습니다.

properties.format

FormatType

배달되는 내보내기의 형식입니다. 현재 'Csv'만 지원됩니다.

properties.nextRunTimeEstimate

string

내보내기에서 활성 일정이 있는 경우 은 다음 런타임의 예상 시간을 제공합니다.

properties.partitionData

boolean

true로 설정하면 내보낸 데이터가 크기별로 분할되고 매니페스트 파일과 함께 Blob 디렉터리에 배치됩니다. 참고: 이 옵션은 현재 Microsoft 고객 계약 상거래 범위에만 사용할 수 있습니다.

properties.runHistory

ExportExecutionListResult

요청된 경우 내보내기에서 가장 최근 실행 기록이 있습니다.

properties.schedule

ExportSchedule

내보내기 일정 정보가 있습니다.

type

string

리소스 종류.

ExportDataset

내보내기에서 데이터에 대한 정의입니다.

Name 형식 Description
configuration

ExportDatasetConfiguration

데이터 세트 내보내기 구성입니다.

granularity

GranularityType

내보내기에서 행의 세분성입니다. 현재는 '매일'만 지원됩니다.

ExportDatasetConfiguration

데이터 세트 내보내기 구성입니다. 내보내기를 위해 열을 선택할 수 있습니다. 제공되지 않으면 내보내기에서 사용 가능한 모든 열이 포함됩니다.

Name 형식 Description
columns

string[]

내보내기에서 포함할 열 이름의 배열입니다. 제공되지 않으면 내보내기에서 사용 가능한 모든 열이 포함됩니다. 사용 가능한 열은 고객 채널에 따라 다를 수 있습니다(예제 참조).

ExportDefinition

내보내기의 정의입니다.

Name 형식 Description
dataSet

ExportDataset

내보내기에서 데이터에 대한 정의입니다.

timePeriod

ExportTimePeriod

내보내기에 대한 데이터를 끌어당기는 기간이 있습니다.

timeframe

TimeframeType

내보내기를 위한 데이터를 끌어당기는 시간 프레임입니다. 사용자 지정하는 경우 특정 기간을 제공해야 합니다.

type

ExportType

내보내기의 형식입니다. '사용량'은 'ActualCost'와 동일하며 서비스 예약에 대한 요금 또는 상각에 대한 데이터를 아직 제공하지 않는 내보내기에도 적용됩니다.

ExportDeliveryDestination

이는 비용 내보내기를 제공할 Blob Storage 계정 위치를 나타냅니다. 대상을 구성하는 방법에는 두 가지가 있습니다. 대부분의 고객에게 권장되는 방법은 스토리지 계정의 resourceId를 지정하는 것입니다. 이렇게 하려면 Cost Management 서비스에 스토리지에 대한 액세스 권한을 부여하기 위해 Microsoft.CostManagementExports 리소스 공급자에 계정 구독을 일회성으로 등록해야 합니다. Azure Portal 내보내기를 만들 때 이 등록은 자동으로 수행되지만 API 사용자는 구독을 명시적으로 등록해야 할 수 있습니다(자세한 내용은 참조 https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ). 대상을 구성하는 또 다른 방법은 청구 계정의 전역 관리자인 Microsoft 파트너 계약 플랜이 있는 파트너만 사용할 수 있습니다. 이러한 파트너는 스토리지 계정의 resourceId를 지정하는 대신 계정에 대한 SAS 토큰과 함께 스토리지 계정 이름을 지정할 수 있습니다. 이렇게 하면 모든 테넌트에서 스토리지 계정으로 비용을 내보낼 수 있습니다. 서비스/컨테이너/개체 리소스 유형 및 읽기/쓰기/삭제/목록/추가/만들기 권한이 있는 Blob 서비스에 대한 SAS 토큰을 만들어야 합니다(자세한 내용은 참조 https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key ).

Name 형식 Description
container

string

내보내기를 업로드할 컨테이너의 이름입니다. 컨테이너가 없으면 컨테이너가 만들어집니다.

resourceId

string

내보내기를 배달할 스토리지 계정의 리소스 ID입니다. sasToken 및 storageAccount가 지정된 경우에는 이 작업이 필요하지 않습니다.

rootFolderPath

string

내보내기를 업로드할 디렉터리의 이름입니다.

sasToken

string

스토리지 계정에 대한 SAS 토큰입니다. 제한된 Azure 고객 집합의 경우 resourceId 대신 storageAccount와 함께 지정할 수 있습니다. 참고: 이 속성에 대한 API에서 반환된 값은 항상 난독 처리를 수행합니다. 이 난독 처리된 값을 반환해도 SAS 토큰이 업데이트되지 않습니다. 이 값을 업데이트하려면 새 SAS 토큰을 지정해야 합니다.

storageAccount

string

내보내기를 업로드할 스토리지 계정입니다. 제한된 Azure 고객 집합의 경우 resourceId 대신 sasToken과 함께 지정할 수 있습니다.

ExportDeliveryInfo

내보내기와 연결된 배달 정보입니다.

Name 형식 Description
destination

ExportDeliveryDestination

배달되는 내보내기 대상이 있습니다.

ExportExecutionListResult

내보내기의 실행 기록을 나열한 결과입니다.

Name 형식 Description
value

ExportRun[]

내보내기 실행 목록입니다.

ExportRecurrencePeriod

되풀이 일정의 시작 및 종료 날짜입니다.

Name 형식 Description
from

string

되풀이의 시작 날짜입니다.

to

string

되풀이 종료 날짜입니다.

ExportRun

내보내기 실행입니다.

Name 형식 Description
eTag

string

리소스의 eTag입니다. 동시 업데이트 시나리오를 처리하기 위해 이 필드는 사용자가 최신 버전을 업데이트하는지 여부를 확인하는 데 사용됩니다.

id

string

리소스 ID입니다.

name

string

리소스 이름입니다.

properties.error

ErrorDetails

오류의 세부 정보입니다.

properties.executionType

ExecutionType

내보내기 실행의 형식입니다.

properties.fileName

string

내보낸 파일의 이름입니다.

properties.processingEndTime

string

내보내기 실행이 완료된 시간입니다.

properties.processingStartTime

string

내보내기를 실행하기 위해 선택한 시간입니다.

properties.runSettings

CommonExportProperties

이 실행에 적용된 내보내기 설정입니다.

properties.status

ExecutionStatus

내보내기 실행의 마지막으로 알려진 상태.

properties.submittedBy

string

내보내기를 트리거한 엔터티의 식별자입니다. 주문형 실행의 경우 사용자 메일입니다. 예약된 실행의 경우 '시스템'입니다.

properties.submittedTime

string

내보내기를 실행하기 위해 큐에 대기한 시간입니다.

type

string

리소스 종류.

ExportSchedule

내보내기와 연결된 일정입니다.

Name 형식 Description
recurrence

RecurrenceType

일정 되풀이입니다.

recurrencePeriod

ExportRecurrencePeriod

되풀이의 시작 및 종료 날짜가 있습니다. 시작 날짜는 미래여야 합니다. 있는 경우 종료 날짜는 시작 날짜보다 커야 합니다.

status

StatusType

내보내기 일정의 상태. '비활성'이면 내보내기 일정이 일시 중지됩니다.

ExportTimePeriod

내보내기에서 데이터의 날짜 범위입니다. 시간 프레임이 '사용자 지정'으로 설정된 경우에만 지정해야 합니다. 최대 날짜 범위는 3개월입니다.

Name 형식 Description
from

string

데이터 내보내기 시작 날짜입니다.

to

string

데이터 내보내기 종료 날짜입니다.

ExportType

내보내기의 형식입니다. '사용량'은 'ActualCost'와 동일하며 서비스 예약에 대한 요금 또는 상각에 대한 데이터를 아직 제공하지 않는 내보내기에도 적용됩니다.

Name 형식 Description
ActualCost

string

AmortizedCost

string

Usage

string

FormatType

배달되는 내보내기의 형식입니다. 현재 'Csv'만 지원됩니다.

Name 형식 Description
Csv

string

GranularityType

내보내기에서 행의 세분성입니다. 현재는 '매일'만 지원됩니다.

Name 형식 Description
Daily

string

RecurrenceType

일정 되풀이입니다.

Name 형식 Description
Annually

string

Daily

string

Monthly

string

Weekly

string

StatusType

내보내기 일정의 상태. '비활성'이면 내보내기 일정이 일시 중지됩니다.

Name 형식 Description
Active

string

Inactive

string

SystemAssignedServiceIdentity

관리 서비스 ID(시스템 할당 또는 없음)

Name 형식 Description
principalId

string

시스템 할당 ID의 서비스 주체 ID입니다. 이 속성은 시스템 할당 ID에 대해서만 제공됩니다.

tenantId

string

시스템 할당 ID의 테넌트 ID입니다. 이 속성은 시스템 할당 ID에 대해서만 제공됩니다.

type

SystemAssignedServiceIdentityType

관리 서비스 ID 유형(시스템 할당 또는 없음)

SystemAssignedServiceIdentityType

관리 서비스 ID 유형(시스템 할당 또는 없음)

Name 형식 Description
None

string

SystemAssigned

string

TimeframeType

내보내기를 위한 데이터를 끌어당기는 시간 프레임입니다. 사용자 지정하는 경우 특정 기간을 제공해야 합니다.

Name 형식 Description
BillingMonthToDate

string

Custom

string

MonthToDate

string

TheLastBillingMonth

string

TheLastMonth

string

WeekToDate

string