了解您的报告版本 - Amazon 成本和使用情况报告
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

了解您的报告版本

Amazon每天至少更新一次您的成本和使用情况报告,直到您的费用最终确定。创建报告时,您可以选择创建新的报告版本或在每次更新时覆盖现有的报告版本。

您的报告文件包括.csv 文件或.csv 文件集合和清单文件。您的报告还可以包含支持您的数据与亚马逊 Athena、亚马逊 Redshift 或亚马逊集成的任何其他文件。QuickSight

以下各节描述了基于您选择的报告版本控制的文件组织和命名惯例。

成本和使用情况报告交付时间表

在报告周期内,每次 Amazon 更新报告后,Amazon 都会提供一个新报告和一个新清单文件。Amazon 以之前的报告为基础构建,直到结算期结束。在报告账单周期结束后,Amazon 将生成新报告并且不会使用之前的报告中的任何信息。

创建新的成本和使用情况报告版本

当您选择保留之前的成本和使用情况报告时,您的 Amazon CUR 使用以下 Amazon S3 组织和命名惯例。

<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<assemblyId>/<example-report-name>-<file-number>.csv.<zip|gz>
  • report-prefix = 您为报告分配的前缀。

  • report-name= 您为报告分配的名称。

  • yyyymmdd-yyyymmdd = 报告覆盖的日期范围。报告将于日期范围的末尾最终确定。

  • assemblyId = 每次更新报告后 Amazon 创建的 ID。

  • file-number = 如果更新包含一个大型文件,Amazon 可能会将该文件拆分成多个文件。file-number 跟踪一个更新中的不同文件。

  • csv = 报告文件的格式。

  • zipgz = 应用于报告文件的压缩的类型。

例如,您的报告可能作为以下文件的集合进行传输。

<example-report-prefix>/<example-report-name>/20160101-20160131/<123456789>/<example-report-name>-<1>.csv.<zip> <example-report-prefix>/<example-report-name>/20160101-20160131/<123456789>/<example-report-name>-<2>.csv.<zip> <example-report-prefix>/<example-report-name>/20160101-20160131/<123456789>/<example-report-name>-<3>.csv.<zip> <example-report-prefix>/<example-report-name>/20160101-20160131/<123456789>/<example-report-name>-Manifest.json <example-report-prefix>/<example-report-name>/20160101-20160131/<example-report-name>-Manifest.json

Amazon 会将一个报告日期范围内的所有报告传输到相同的 report-prefix/report-name/yyyymmdd-yyyymmdd 文件夹。Amazon 为每个报告提供了唯一的 ID 并将其传输到日期范围文件夹中的 assemblyId 子文件夹。如果报告作为单个文件过大,则会被拆分成多个文件并传输到相同的 assemblyId 文件夹。

有关保留先前报告时的清单文件的更多信息,请参阅成本和使用情况报告清单文件

改写以前的成本和使用情况报告

当您选择覆盖之前的成本和使用情况报告时,您的 Amazon CUR 使用以下 Amazon S3 组织和命名惯例。

<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-<file-number>.csv.<zip|gz>
  • report-prefix = 您为报告分配的前缀。

  • report-name= 您为报告分配的名称。

  • yyyymmdd-yyyymmdd = 报告覆盖的日期范围。Amazon 在日期范围结束时完成报告。

  • file-number = 如果更新包含一个大型文件,Amazon 可能会将该文件拆分成多个文件。file-number 跟踪一个更新中的不同文件。

  • csv = 报告文件的格式。

  • zipgz = 应用于报告文件的压缩的类型。

例如,您的报告可能作为以下文件的集合进行传输。

<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-<1>.csv.<zip> <example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-<2>.csv.<zip><example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-<3>.csv.<zip> <example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-Manifest.json

雅典娜规格

如果您在创建 Amazon CUR 时选择了 Athena 支持,则除格式和压缩外,文件命名惯例与选择覆盖 Amazon CUR 时的命名惯例相同。改用 .parquet Athena Amazon CUR 文件。例如,您的报告可能作为以下文件的集合进行传输。

<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>.parquet <example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<cost_and_usage_data_status> <example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-Manifest.json <example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-create-table.sql <example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/crawler-cfn.yml

Amazon CloudFormation 规范

除了 Amazon CUR 文件外,Amazon还提供了一个Amazon CloudFormation模板,您可以使用该模板来设置Amazon CloudFormation堆栈,使您能够使用 Athena 查询 Amazon S3 数据。如果您不想使用该Amazon CloudFormation模板,则可以使用提供的 SQL 来创建自己的 Athena 表。有关更多信息,请参阅使用 Amazon Athena 查询成本和使用情况报告

成本和使用情况报告清单文件

Amazon更新 Amazon CUR 时,Amazon还会创建和交付可用于亚马逊 Athena、亚马逊 Redshift 或亚马逊的清单文件。QuickSight

清单文件使用命名约定,并列出以下内容:

  • 迄今为止报告中包含的所有详细信息列

  • 报表文件的列表(如果报表被拆分为多个文件)

  • 报告所涵盖的时间段以及其他信息。

<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-Manifest.json <example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<assemblyId>/<example-report-name>-Manifest.json <example-report-prefix>/<example-report-name>/<example-report-name>/year=2018/month=12/<example-report-name>-Manifest.json

创建新的成本和使用情况报告版本

当您保留先前的成本和使用情况报告时,清单文件将同时传送到日期范围文件夹和assemblyId文件夹。每次为日期范围Amazon创建新的 Amazon CUR 时,都会使用更新的清单文件覆盖存储在日期范围文件夹中的清单文件。 Amazon将相同的更新清单文件连同该更新的文件一起传送到该文件assemblyId夹。assemblyId 文件夹中的清单文件不会被覆盖。

改写之前的成本和使用情况报告

当您覆盖先前的 Amazon CUR 时,清单文件将传送到该month=mm文件夹。清单文件与报表文件一起被覆盖。

亚马逊 Redshift

如果您在 Amazon CUR 中选择了 Amazon Redshift 支持选项,Amazon还会创建并交付一个包含将报告上传到亚马逊 Redshift 所需的 SQL 命令的文件。您可以使用普通文本编辑器打开 SQL 文件。SQL 文件使用以下命名约定。

<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<assemblyId>/<example-report-name>-RedshiftCommands.sql

如果您使用了 RedshiftCommands 文件中的命令,则不需要打开 RedshiftManifest 文件。

重要

manifest 文件决定了 copy 文件中的 RedshiftCommands 命令上传的报告文件。删除或移除 manifest 文件将破坏 RedshiftCommands 文件中的复制命令。

亚马逊 Athena 规格

如果您在 Amazon CUR 中选择了 Amazon Athena 支持选项,Amazon还会创建并提供多个文件以帮助设置所需的所有资源。 Amazon提供一个Amazon CloudFormation模板、一个包含 SQL 的 SQL 文件,用于手动创建 Athena 表,以及一个包含 SQL 的文件,用于检查您的 Amazon CUR 刷新状态。这些文件使用以下命名约定。

<example-report-prefix>/<example-report-name>/<example-report-name>/yyyymmdd-yyyymmdd/crawler-cfn.yml <example-report-prefix>/<example-report-name>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-create-table.sql <example-report-prefix>/<example-report-name>/<example-report-name>/yyyymmdd-yyyymmdd/<cost_and_usage_data_status>