

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# AWS 帳單政策範例
<a name="billing-example-policies"></a>

**注意**  
下列 AWS Identity and Access Management (IAM) 動作已於 2023 年 7 月結束標準支援：  
`aws-portal` 命名空間
`purchase-orders:ViewPurchaseOrders`
`purchase-orders:ModifyPurchaseOrders`
如果您使用的是 AWS Organizations，您可以使用[大量政策 migrator 指令碼](migrate-iam-permissions.md)或大量政策 migrator 從您的付款人帳戶更新政策。也可以使用[舊動作至精細動作對應參考](migrate-granularaccess-iam-mapping-reference.md)來確認需要新增的 IAM 動作。  
如果您有 在 2023 年 3 月 6 日上午 11：00 (PDT) 或之後 AWS Organizations 建立的 AWS 帳戶或 的一部分，則精細動作已在組織中生效。

**重要**  
這些政策需要您在 [Account Settings](https://console.aws.amazon.com/billing/home#/account) (帳戶設定) 主控台頁面上啟用 IAM 使用者對 Billing and Cost Management 主控台的存取權。如需詳細資訊，請參閱[啟用 Billing and Cost Management 主控台的存取權](control-access-billing.md#ControllingAccessWebsite-Activate)。
若要使用 AWS 受管政策，請參閱 [AWS 受管政策](managed-policies.md)。

本主題包含範例政策，您可以將它們連接至您的 IAM 使用者或群組，以控制對於您帳戶之帳單資訊和工具的存取。以下基本規則適用於 Billing and Cost Management 的 IAM 政策：
+ `Version` 始終是 `2012-10-17 `。
+ `Effect` 一律是 `Allow` 或 `Deny`。
+ `Action` 是動作或萬用字元的名稱 (`*`)。

  動作字首`budgets`適用於 AWS Budgets、`cur`Co AWS st and Usage Reports、`aws-portal`B AWS illing 或 `ce` Cost Explorer。
+ `Resource` 一律`*`用於 AWS Billing。

  針對在 `budget` 資源執行的動作，指定預算 Amazon Resource Name (ARN)。
+ 一個政策中可以有多個陳述式。

如需 AWS Cost Management 主控台的動作政策清單，請參閱 [AWS Cost Management 使用者指南中的 Cost Management 政策範例](https://docs.aws.amazon.com/cost-management/latest/userguide/billing-example-policies.html)。 *AWS *

**Topics**
+ [允許 IAM 使用者檢視您的帳單資訊](#example-billing-view-billing-only)
+ [允許 IAM 使用者檢視您的帳單資訊和碳足跡報告](#example-ccft-policy)
+ [允許 IAM 使用者存取 Reports (報告) 主控台頁面](#example-billing-view-reports)
+ [拒絕 IAM 使用者對 Billing and Cost Management 主控台的存取](#example-billing-deny-all)
+ [拒絕成員帳戶的 AWS 主控台成本和用量小工具存取](#example-billing-deny-widget)
+ [拒絕特定 IAM 使用者和角色的 AWS 主控台成本和用量小工具存取](#example-billing-deny-ce)
+ [允許 IAM 使用者檢視您的帳單資訊，但拒絕存取碳足跡報告](#example-ccft-policy-deny)
+ [允許 IAM 使用者存取碳足跡報告，但拒絕存取帳單資訊](#example-ccft-policy-allow)
+ [允許完整存取 AWS 服務，但拒絕 IAM 使用者存取 Billing and Cost Management 主控台](#ExampleAllowAllDenyBilling)
+ [允許 IAM 使用者檢視 Billing and Cost Management 主控台，帳戶設定除外](#example-billing-read-only)
+ [允許 IAM 使用者修改帳單資訊](#example-billing-deny-modifybilling)
+ [拒絕存取帳戶設定，但允許所有其他帳單和用量資訊的完整存取權](#example-billing-deny-modifyaccount)
+ [將報告存入 Simple Storage Service (Amazon S3) 儲存貯體](#example-billing-s3-bucket)
+ [尋找產品和價格](#example-policy-pe-api)
+ [檢視成本和用量](#example-policy-ce-api)
+ [啟用和停用 AWS 區域](#enable-disable-regions)
+ [檢視和管理成本類別](#example-policy-cc-api)
+ [建立、檢視、編輯或刪除 AWS 成本和用量報告](#example-policy-report-definition)
+ [檢視並管理採購訂單](#example-view-manage-purchaseorders)
+ [檢視和更新 Cost Explorer 偏好設定頁面](#example-view-update-ce)
+ [使用 Cost Explorer 報告頁面檢視、建立、更新及刪除](#example-view-ce-reports)
+ [檢視、建立、更新及刪除保留和 Savings Plans 提醒](#example-view-ce-expiration)
+ [允許唯讀存取 AWS 成本異常偵測](#example-policy-ce-ad)
+ [允許 AWS Budgets 套用 IAM 政策和 SCPs](#example-budgets-IAM-SCP)
+ [允許 AWS Budgets 套用 IAM 政策和 SCPs以及目標 EC2 和 RDS 執行個體](#example-budgets-applySCP)
+ [允許 IAM 使用者檢視美國免稅並建立 支援 案例](#example-awstaxexemption)
+ [(適用於帳單或聯絡地址位於印度的客戶) 允許客戶驗證資訊的唯讀存取權](#example-aispl-verification)
+ [(適用於在印度擁有帳單或聯絡地址的客戶) 檢視、建立和更新客戶驗證資訊](#example-aispl-verification-view)
+ [在帳單主控台中檢視AWS Migration Acceleration Program資訊](#read-only-migration-acceleration-program-policy)
+ [允許存取帳單主控台中的 AWS 發票組態](#invoice-config-policy)

## 允許 IAM 使用者檢視您的帳單資訊
<a name="example-billing-view-billing-only"></a>

若要允許 IAM 使用者檢視您的帳單資訊，但不允許 IAM 使用者存取敏感的帳戶資訊，請使用類似以下範例政策的政策。這類政策可防止使用者存取您的密碼和帳戶活動報告。此政策允許 IAM 使用者檢視下列 Billing and Cost Management 主控台頁面，但不提供 **Account Settings** (帳戶設定) 或 **Reports** (報告) 主控台頁面的存取權給他們：
+ **Dashboard (儀表板)**
+ **Cost Explorer**
+ **Bills (帳單)**
+ **Orders and invoices (訂單與發票)**
+ **Consolidated Billing (合併帳單)**
+ **Preferences (偏好設定)**
+ **Credits (點數)**
+ **Advance Payment (預付款)**

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "aws-portal:ViewBilling",
            "Resource": "*"
        }
    ]
}
```

------

## 允許 IAM 使用者檢視您的帳單資訊和碳足跡報告
<a name="example-ccft-policy"></a>

若要允許 IAM 使用者檢視帳單資訊和碳足跡報告，請使用類似以下範例的政策。此政策可防止使用者存取您的密碼和帳戶活動報告。此政策允許 IAM 使用者檢視下列 Billing and Cost Management 主控台頁面，但不提供 **Account Settings** (帳戶設定) 或 **Reports** (報告) 主控台頁面的存取權給他們：
+ **Dashboard (儀表板)**
+ **Cost Explorer**
+ **Bills (帳單)**
+ **Orders and invoices (訂單與發票)**
+ **Consolidated Billing (合併帳單)**
+ **Preferences (偏好設定)**
+ **Credits (點數)**
+ **Advance Payment (預付款)**
+ ** AWS 成本和用量報告頁面的客戶 AWS 碳足跡工具區段**

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {"Effect": "Allow",
            "Action": "aws-portal:ViewBilling",
            "Resource": "*"
        },
        {"Effect": "Allow",
            "Action": "sustainability:GetCarbonFootprintSummary",
            "Resource": "*"
        }
    ]
}
```

------

## 允許 IAM 使用者存取 Reports (報告) 主控台頁面
<a name="example-billing-view-reports"></a>

若要允許 IAM 使用者存取 **Reports** (報告) 主控台頁面以及檢視包含帳戶活動資訊的用量報告，請使用類似此範例政策的政策。

如需每個動作的定義，請參閱 [AWS 帳單主控台動作](security_iam_id-based-policy-examples.md#user-permissions)。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewUsage",
                "aws-portal:ViewBilling",
                "cur:DescribeReportDefinitions",
                "cur:PutReportDefinition",
                "cur:DeleteReportDefinition",
                "cur:ModifyReportDefinition"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## 拒絕 IAM 使用者對 Billing and Cost Management 主控台的存取
<a name="example-billing-deny-all"></a>

若要明確拒絕 IAM 使用者存取所有 Billing and Cost Management 主控台頁面，請使用類似此範例政策的政策。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Deny",
            "Action": "aws-portal:*",
            "Resource": "*"
        }
    ]
}
```

------

## 拒絕成員帳戶的 AWS 主控台成本和用量小工具存取
<a name="example-billing-deny-widget"></a>

若要限制成員 (已連結) 帳戶存取成本和用量資料，請使用管理 (付款人) 帳戶存取 Cost Explorer 偏好設定索引標籤，然後取消選取 **Linked Account Access** (連結帳戶存取)。這將拒絕從 Cost Explorer (AWS 成本管理） 主控台、Cost Explorer API 和 AWS 主控台首頁的成本和用量小工具存取成本和用量資料，無論成員帳戶的 IAM 使用者或角色具有哪些 IAM 動作。

## 拒絕特定 IAM 使用者和角色的 AWS 主控台成本和用量小工具存取
<a name="example-billing-deny-ce"></a>

若要拒絕特定 IAM 使用者和角色的 AWS 主控台成本和用量小工具存取，請使用以下許可政策。

**注意**  
將此政策新增至 IAM 使用者或角色也會拒絕使用者存取 Cost Explorer (AWS 成本管理） 主控台和 Cost Explorer APIs。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Deny",
            "Action": "ce:*",
            "Resource": "*"
        }
    ]
}
```

------

## 允許 IAM 使用者檢視您的帳單資訊，但拒絕存取碳足跡報告
<a name="example-ccft-policy-deny"></a>

若要允許 IAM 使用者在 Billing and Cost Management 主控台中同時存取帳單資訊，但不允許存取 AWS Customer Carbon Footprint Tool。此工具位於 AWS 成本和用量報告頁面。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {"Effect": "Allow",
            "Action": "aws-portal:ViewBilling",
            "Resource": "*"
        },
        {"Effect": "Deny",
            "Action": "sustainability:GetCarbonFootprintSummary",
            "Resource": "*"
        }
    ]
}
```

------

## 允許 IAM 使用者存取碳足跡報告，但拒絕存取帳單資訊
<a name="example-ccft-policy-allow"></a>

若要允許 IAM 使用者存取 AWS 成本和用量報告頁面中的 AWS 客戶碳足跡工具，但拒絕在帳單和成本管理主控台中檢視帳單資訊的存取權。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {"Effect": "Deny",
            "Action": "aws-portal:ViewBilling",
            "Resource": "*"
        },
        {"Effect": "Allow",
            "Action": "sustainability:GetCarbonFootprintSummary",
            "Resource": "*"
        }
    ]
}
```

------

## 允許完整存取 AWS 服務，但拒絕 IAM 使用者存取 Billing and Cost Management 主控台
<a name="ExampleAllowAllDenyBilling"></a>

若要拒絕 IAM 使用者存取 Billing and Cost Management 主控台的所有項目，請使用下列政策。拒絕使用者存取 AWS Identity and Access Management (IAM)，以防止存取控制帳單資訊和工具存取的政策。

**重要**  
此政策不允許任何動作。將此政策與允許特定動作的其他政策結合使用。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Deny",
            "Action": [
                "aws-portal:*",
                "iam:*"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## 允許 IAM 使用者檢視 Billing and Cost Management 主控台，帳戶設定除外
<a name="example-billing-read-only"></a>

此政策允許唯讀存取 Billing and Cost Management 主控台的全部功能。其中包括 **Payments Method (付款方式)** 和 **Reports (報告)** 主控台頁面。不過，此政策拒絕存取 **Account Settings (帳戶設定)**。這表示會保護帳戶密碼、聯絡資訊和安全問題。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "aws-portal:View*",
            "Resource": "*"
        },
        {
            "Effect": "Deny",
            "Action": "aws-portal:*Account",
            "Resource": "*"
        }
    ]
}
```

------

## 允許 IAM 使用者修改帳單資訊
<a name="example-billing-deny-modifybilling"></a>

若要允許 IAM 使用者修改 Billing and Cost Management 主控台的帳戶帳單資訊，請允許 IAM 使用者檢視您的帳單資訊。下列政策範例允許 IAM 使用者修改 **Consolidated Billing** (合併帳單)、**Preferences** (偏好設定) 和 **Credits** (抵用金) 主控台頁面。同時允許 IAM 使用者檢視以下 Billing and Cost Management 主控台頁面：
+ **Dashboard (儀表板)**
+ **Cost Explorer**
+ **Bills (帳單)**
+ **Orders and invoices (訂單與發票)**
+ **Advance Payment (預付款)**

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "aws-portal:*Billing",
            "Resource": "*"
        }
    ]
}
```

------

## 拒絕存取帳戶設定，但允許所有其他帳單和用量資訊的完整存取權
<a name="example-billing-deny-modifyaccount"></a>

為了保護您的帳戶密碼、聯絡資訊和安全性問題，請拒絕 IAM 使用者存取**帳戶設定**，同時啟用 Billing and Cost Management 主控台其他功能的完整存取權。政策範例如下。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "aws-portal:*Billing",
                "aws-portal:*Usage",
                "aws-portal:*PaymentMethods"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Deny",
            "Action": "aws-portal:*Account",
            "Resource": "*"
        }
    ]
}
```

------

## 將報告存入 Simple Storage Service (Amazon S3) 儲存貯體
<a name="example-billing-s3-bucket"></a>

如果您同時擁有 AWS 帳戶和 Amazon S3 儲存貯體，下列政策允許 Billing and Cost Management 將詳細 AWS 帳單儲存至 Amazon S3 儲存貯體。此政策必須套用到 Simple Storage Service (Amazon S3) 儲存貯體，而不是 IAM 使用者。因這是以資源為基礎的政策，而不是使用者為基礎的政策。對於不需要存取您帳單的 IAM 使用者，建議拒絕這些 IAM 使用者存取儲存貯體。

將 {{amzn-s3-demo-bucket1}} 取代為您的儲存貯體名稱。

如需詳細資訊，請參閱 *Amazon Simple Storage Service 使用者指南*中的[使用儲存貯體政策和使用者政策](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-iam-policies.html)。

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
  {
    "Effect": "Allow",
    "Principal": {
      "Service": "billingreports.amazonaws.com"
    },
    "Action": [
      "s3:GetBucketAcl",
      "s3:GetBucketPolicy"
    ],
    "Resource": "arn:aws:s3:::{{amzn-s3-demo-bucket1}}"
  },
  {
    "Effect": "Allow",
    "Principal": {
      "Service": "billingreports.amazonaws.com"
    },
    "Action": "s3:PutObject",
    "Resource": "arn:aws:s3:::{{amzn-s3-demo-bucket1}}/*"
  }
  ]
}
```

------

## 尋找產品和價格
<a name="example-policy-pe-api"></a>

若要允許 IAM 使用者使用 AWS Price List Service API，請使用下列政策授予他們存取權。

此政策授予使用 AWS 價格清單大量 API AWS 價格清單查詢 API 的許可。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "pricing:DescribeServices",
                "pricing:GetAttributeValues",
                "pricing:GetProducts",
                "pricing:GetPriceListFileUrl",
                "pricing:ListPriceLists"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}
```

------

## 檢視成本和用量
<a name="example-policy-ce-api"></a>

若要允許 IAM 使用者使用 AWS Cost Explorer API，請使用下列政策授予他們存取權。

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ce:*"
      ],
      "Resource": [
        "*"
      ]
    }
  ]
}
```

------

## 啟用和停用 AWS 區域
<a name="enable-disable-regions"></a>

如需允許使用者啟用和停用區域的 IAM 政策範例，請參閱《*IAM 使用者指南*》中的[AWS「允許啟用和停用 AWS 區域」](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws-enable-disable-regions.html)。

## 檢視和管理成本類別
<a name="example-policy-cc-api"></a>

若要允許 IAM 使用者使用、檢視及管理成本類別，請使用下列政策為其授與存取權。

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "aws-portal:ViewBilling",
        "ce:GetCostAndUsage",
        "ce:DescribeCostCategoryDefinition",
        "ce:UpdateCostCategoryDefinition",
        "ce:CreateCostCategoryDefinition",
        "ce:DeleteCostCategoryDefinition",
        "ce:ListCostCategoryDefinitions",
        "ce:TagResource",
        "ce:UntagResource",
        "ce:ListTagsForResource",
        "pricing:DescribeServices"
      ],
      "Resource": "*"
    }
  ]
}
```

------

## 建立、檢視、編輯或刪除 AWS 成本和用量報告
<a name="example-policy-report-definition"></a>

此政策允許 IAM 使用者使用 API 建立、檢視、編輯或刪除 `sample-report`。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "ManageSampleReport",
            "Effect": "Allow",
			"Action": [
                "cur:PutReportDefinition", 
                "cur:DeleteReportDefinition",
                "cur:ModifyReportDefinition"
            ],
            "Resource": "arn:aws:cur:*:123456789012:definition/sample-report"
        },
        {
            "Sid": "DescribeReportDefs",
            "Effect": "Allow",
            "Action": "cur:DescribeReportDefinitions",
            "Resource": "*"
        }
    ]
}
```

------

## 檢視並管理採購訂單
<a name="example-view-manage-purchaseorders"></a>

此政策允許 IAM 使用者檢視和管理採購訂單，使用下列政策授予存取權。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling",
                "purchase-orders:*"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## 檢視和更新 Cost Explorer 偏好設定頁面
<a name="example-view-update-ce"></a>

此政策允許 IAM 使用者使用 **Cost Explorer preferences page** (Cost Explorer 偏好設定頁面) 進行檢視和更新。

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "aws-portal:ViewBilling",
        "ce:UpdatePreferences"
       ],
      "Resource": "*"
    }
  ]
}
```

------

下列政策允許 IAM 使用者檢視 Cost Explorer，但拒絕檢視或編輯 **Preferences** (偏好設定) 頁面的許可。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:GetPreferences",
                "ce:UpdatePreferences"
            ],
            "Resource": "*"
        }
    ]
}
```

------

下列政策允許 IAM 使用者檢視 Cost Explorer，但拒絕編輯 **Preferences** (偏好設定) 頁面的許可。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:UpdatePreferences"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## 使用 Cost Explorer 報告頁面檢視、建立、更新及刪除
<a name="example-view-ce-reports"></a>

此政策允許 IAM 使用者使用 **Cost Explorer reports page** (Cost Explorer 報告頁面) 進行檢視、建立、更新和刪除。

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "aws-portal:ViewBilling",
        "ce:CreateReport",
        "ce:UpdateReport",
        "ce:DeleteReport"
       ],
      "Resource": "*"
    }
  ]
}
```

------

下列政策允許 IAM 使用者檢視 Cost Explorer，但拒絕檢視或編輯 **Reports** (報告) 頁面的許可。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:DescribeReport",
                "ce:CreateReport",
                "ce:UpdateReport",
                "ce:DeleteReport"
            ],
            "Resource": "*"
        }
    ]
}
```

------

下列政策允許 IAM 使用者檢視 Cost Explorer，但拒絕編輯 **Reports** (報告) 頁面的許可。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:CreateReport",
                "ce:UpdateReport",
                "ce:DeleteReport"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## 檢視、建立、更新及刪除保留和 Savings Plans 提醒
<a name="example-view-ce-expiration"></a>

此政策允許 IAM 使用者檢視、建立、更新及刪除[保留過期提醒](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ce-ris.html)和[Savings Plans 提醒](https://docs.aws.amazon.com/savingsplans/latest/userguide/sp-overview.html#sp-alert)。若要編輯保留過期提醒或 Savings Plans 提醒，使用者需要全部三個精密動作：`ce:CreateNotificationSubscription`、`ce:UpdateNotificationSubscription`，以及 `ce:DeleteNotificationSubscription`。

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "aws-portal:ViewBilling",
        "ce:CreateNotificationSubscription",
        "ce:UpdateNotificationSubscription",
        "ce:DeleteNotificationSubscription"
       ],
      "Resource": "*"
    }
  ]
}
```

------

下列政策允許 IAM 使用者檢視 Cost Explorer，但拒絕檢視或編輯 **Reservation Expiration Alerts** (保留過期提醒) 和 **Savings Plans alert** (Savings Plans 提醒) 頁面的許可。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:DescribeNotificationSubscription",
                "ce:CreateNotificationSubscription",
                "ce:UpdateNotificationSubscription",
                "ce:DeleteNotificationSubscription"
            ],
            "Resource": "*"
        }
    ]
}
```

------

下列政策允許 IAM 使用者檢視 Cost Explorer，但拒絕編輯 **Reservation Expiration Alerts** (保留過期提醒) 和 **Savings Plans alert** (Savings Plans 提醒) 頁面的許可。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:CreateNotificationSubscription",
                "ce:UpdateNotificationSubscription",
                "ce:DeleteNotificationSubscription"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## 允許唯讀存取 AWS 成本異常偵測
<a name="example-policy-ce-ad"></a>

若要允許 IAM 使用者唯讀存取 AWS 成本異常偵測，請使用下列政策來授予存取權。 `ce:ProvideAnomalyFeedback`是唯讀存取的一部分，是選用的。

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Action": [
        "ce:Get*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
```

------

## 允許 AWS Budgets 套用 IAM 政策和 SCPs
<a name="example-budgets-IAM-SCP"></a>

此政策允許 AWS Budgets 代表使用者套用 IAM 政策和服務控制政策 (SCPs)。

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "iam:AttachGroupPolicy",
        "iam:AttachRolePolicy",
        "iam:AttachUserPolicy",
        "iam:DetachGroupPolicy",
        "iam:DetachRolePolicy",
        "iam:DetachUserPolicy",
        "organizations:AttachPolicy",
        "organizations:DetachPolicy"
      ],
      "Resource": "*"
    }
  ]
}
```

------

## 允許 AWS Budgets 套用 IAM 政策和 SCPs以及目標 EC2 和 RDS 執行個體
<a name="example-budgets-applySCP"></a>

此政策允許 AWS Budgets 代表使用者套用 IAM 政策和服務控制政策 (SCPs)，並將 Amazon EC2 和 Amazon RDS 執行個體設為目標。

信任政策

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "budgets.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
```

------

許可政策

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeInstanceStatus",
        "ec2:StartInstances",
        "ec2:StopInstances",
        "iam:AttachGroupPolicy",
        "iam:AttachRolePolicy",
        "iam:AttachUserPolicy",
        "iam:DetachGroupPolicy",
        "iam:DetachRolePolicy",
        "iam:DetachUserPolicy",
        "organizations:AttachPolicy",
        "organizations:DetachPolicy",
        "rds:DescribeDBInstances",
        "rds:StartDBInstance",
        "rds:StopDBInstance",
        "ssm:StartAutomationExecution"
      ],
      "Resource": "*"
    }
  ]
}
```

------

## 允許 IAM 使用者檢視美國免稅並建立 支援 案例
<a name="example-awstaxexemption"></a>

此政策可讓 IAM 使用者檢視美國免稅，並在免稅主控台中建立上傳免稅憑證的 支援 案例。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": [
                "aws-portal:*",
                "tax:GetExemptions",
                "tax:UpdateExemptions",
                "support:CreateCase",
                "support:AddAttachmentsToSet"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow"
        }
    ]
}
```

------

## (適用於帳單或聯絡地址位於印度的客戶) 允許客戶驗證資訊的唯讀存取權
<a name="example-aispl-verification"></a>

此政策允許 IAM 使用者唯讀存取客戶驗證資訊。

如需每個動作的定義，請參閱 [AWS 帳單主控台動作](security_iam_id-based-policy-examples.md#user-permissions)。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Effect": "Allow",
        "Action": [
            "customer-verification:GetCustomerVerificationEligibility",
            "customer-verification:GetCustomerVerificationDetails"
        ],
        "Resource": "*"
    }]
}
```

------

## (適用於在印度擁有帳單或聯絡地址的客戶) 檢視、建立和更新客戶驗證資訊
<a name="example-aispl-verification-view"></a>

此政策允許 IAM 使用者管理他們的客戶驗證資訊。

如需每個動作的定義，請參閱 [AWS 帳單主控台動作](security_iam_id-based-policy-examples.md#user-permissions)

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Effect": "Allow",
        "Action": [
            "customer-verification:CreateCustomerVerificationDetails",
            "customer-verification:UpdateCustomerVerificationDetails",
            "customer-verification:GetCustomerVerificationEligibility",
            "customer-verification:GetCustomerVerificationDetails"
        ],
        "Resource": "*"
    }]
}
```

------

## 在帳單主控台中檢視AWS Migration Acceleration Program資訊
<a name="read-only-migration-acceleration-program-policy"></a>

此政策允許 IAM 使用者在帳單主控台中檢視付款人帳戶的Migration Acceleration Program協議、點數和合格支出。

如需每個動作的定義，請參閱 [AWS 帳單主控台動作](security_iam_id-based-policy-examples.md#user-permissions)。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Effect": "Allow",
        "Action": [
            "mapcredits:ListQuarterSpend",
            "mapcredits:ListQuarterCredits",
            "mapcredits:ListAssociatedPrograms"
        ],
        "Resource": "*"
    }]
}
```

------

## 允許存取帳單主控台中的 AWS 發票組態
<a name="invoice-config-policy"></a>

此政策允許 IAM 使用者在帳單主控台中存取 AWS 發票組態。

如需每個動作的定義，請參閱 [AWS 帳單主控台動作](security_iam_id-based-policy-examples.md#user-permissions)。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "invoicing:ListInvoiceUnits",
                "invoicing:GetInvoiceUnit",
                "invoicing:CreateInvoiceUnit",
                "invoicing:UpdateInvoiceUnit",
                "invoicing:DeleteInvoiceUnit",
                "invoicing:BatchGetInvoiceProfile"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}
```

------