

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

# 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，您可以使用[大量政策模擬器指令碼](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/migrate-iam-permissions.html)，從您的付款人帳戶更新政策。也可以使用[舊動作至精細動作對應參考](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/migrate-granularaccess-iam-mapping-reference.html)來確認需要新增的 IAM 動作。  
如需詳細資訊，請參閱[AWS 帳單、 AWS 成本管理和帳戶主控台許可的變更](https://aws.amazon.com/blogs/aws-cloud-financial-management/changes-to-aws-billing-cost-management-and-account-consoles-permissions/)部落格。  
如果您有 AWS 帳戶在 2023 年 3 月 6 日上午 11：00 (PDT) 或之後 AWS Organizations 建立的 或 的一部分，則精細動作已在組織中生效。

本主題包含您可以連接到 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)。
+ 一個政策中可以有多個陳述式。

如需帳單主控台的政策範例清單，請參閱[《帳單使用者指南》中的帳單政策範例](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-example-policies.html)。 **

**注意**  
這些政策要求您啟用使用者存取[帳戶設定](https://portal.aws.amazon.com/billing/home#/account)主控台頁面上的 Billing and Cost Management 主控台。如需詳細資訊，請參閱[啟用 Billing and Cost Management 主控台的存取權](control-access-billing.md#ControllingAccessWebsite-Activate)。

**Topics**
+ [拒絕使用者存取 Billing and Cost Management 主控台](#example-billing-deny-all)
+ [拒絕成員帳戶的 AWS 主控台成本和用量小工具存取](#example-billing-deny-widget)
+ [拒絕特定使用者和角色的 AWS 主控台成本和用量小工具存取](#example-billing-deny-ce)
+ [允許完整存取 AWS 服務，但拒絕使用者存取 Billing and Cost Management 主控台](#ExampleAllowAllDenyBilling)
+ [允許使用者檢視 Billing and Cost Management 主控台，帳戶設定除外](#example-billing-read-only)
+ [允許使用者修改帳單資訊](#example-billing-deny-modifybilling)
+ [允許使用者建立預算](#example-billing-allow-createbudgets)
+ [拒絕存取帳戶設定，但允許所有其他帳單和用量資訊的完整存取權](#example-billing-deny-modifyaccount)
+ [將報告存入 Simple Storage Service (Amazon S3) 儲存貯體](#example-billing-s3-bucket)
+ [檢視成本和用量](#example-policy-ce-api)
+ [啟用和停用 AWS 區域](#enable-disable-regions)
+ [檢視和更新 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)
+ [允許使用者在 定價計算器中建立、列出工作負載預估並新增用量](#example-pc-create-list-estimates)
+ [允許使用者在 定價計算器中建立、列出和新增用量和承諾以計費案例](#example-pc-create-list-scenario)
+ [允許使用者在定價計算器中建立帳單預估](#example-pc-create-bill-estimate)
+ [允許使用者在定價計算器中建立偏好設定](#example-pc-create-preferences)
+ [允許使用者建立、管理和共用自訂帳單檢視](#example-billing-view)
+ [允許使用者在存取特定自訂帳單檢視時存取 Cost Explorer](#example-custom-billing-view)

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

若要明確拒絕使用者存取所有 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 動作為何。

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

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

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

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

****  

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

------

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

若要拒絕使用者存取 Billing and Cost Management 主控台上的所有項目，請使用下列政策。在此情況下，您也應該拒絕使用者存取 AWS Identity and Access Management (IAM)，讓使用者無法存取控制帳單資訊和工具存取的政策。

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

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

****  

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

------

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

此政策允許所有 Billing and Cost Management 主控台的唯讀存取，包括 **Payments Method** (付款方式) 和 **Reports** (報告) 主控台頁面，但拒絕存取 A**ccount Settings** (帳戶設定) 頁面，藉此保護帳戶密碼、聯絡資訊和安全問題。

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

****  

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

------

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

若要允許使用者在 Billing and Cost Management 主控台中修改帳戶帳單資訊，您還必須允許使用者檢視您的帳單資訊。下列政策範例允許使用者修改**合併帳單**、**偏好設定**和**點數**主控台頁面。它還允許使用者檢視以下 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-allow-createbudgets"></a>

若要允許使用者在 Billing and Cost Management 主控台中建立預算，您還必須允許使用者檢視帳單資訊、建立 CloudWatch 警示，以及建立 Amazon SNS 通知。下列政策範例允許使用者修改 **Budget** 主控台頁面。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "Stmt1435216493000",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling",
                "aws-portal:ModifyBilling",
                "budgets:ViewBudget",
                "budgets:ModifyBudget"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Sid": "Stmt1435216514000",
            "Effect": "Allow",
            "Action": [
                "cloudwatch:*"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Sid": "Stmt1435216552000",
            "Effect": "Allow",
            "Action": [
                "sns:*"
            ],
            "Resource": [
                "arn:aws:sns:us-east-1::"
            ]
        }
    ]
}
```

------

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

為了保護您的帳戶密碼、聯絡資訊和安全問題，您可以拒絕使用者存取**帳戶設定**，同時仍然啟用 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>

下列政策允許 Billing and Cost Management 將詳細 AWS 帳單儲存到 Amazon S3 儲存貯體，只要您同時擁有 AWS 帳戶和 Amazon S3 儲存貯體。請注意，此政策必須套用至 Amazon S3 儲存貯體，而非使用者。也就是說，它是以資源為基礎的政策，而不是使用者為基礎的政策。對於不需要存取您帳單的 使用者，您應該拒絕這些 使用者存取儲存貯體。

以您的儲存貯體名稱取代 *bucketname*。

如需詳細資訊，請參閱 *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:::bucketname"
  },
  {
    "Effect": "Allow",
    "Principal": {
      "Service": "billingreports.amazonaws.com"
    },
    "Action": "s3:PutObject",
    "Resource": "arn:aws:s3:::bucketname/*"
  }
  ]
}
```

------

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

若要允許使用者使用 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)。

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

此政策允許使用者使用 **Cost Explorer 偏好設定頁面**來檢視和更新。

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

****  

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

------

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

------
#### [ 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": "*"
        }
    ]
}
```

------

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

------
#### [ 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>

此政策允許使用者使用 **Cost Explorer 報告頁面**來檢視、建立、更新和刪除 。

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

****  

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

------

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

------
#### [ 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": "*"
        }
    ]
}
```

------

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

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

此政策允許使用者檢視、建立、更新和刪除[保留過期提醒](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": "*"
    }
  ]
}
```

------

下列政策允許使用者檢視 Cost Explorer，但拒絕檢視或編輯**預留過期提醒**和 **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": "*"
        }
    ]
}
```

------

下列政策允許使用者檢視 Cost Explorer，但拒絕編輯**預留過期提醒**和 **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>

若要允許使用者唯讀存取 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 執行個體為目標。

信任政策

**注意**  
此信任政策允許 AWS Budgets 擔任可代表您呼叫其他 服務的角色。如需跨服務許可最佳實務的詳細資訊，請參閱 [預防跨服務混淆代理人](cross-service-confused-deputy-prevention.md)。

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

****  

```
{
"Version":"2012-10-17",		 	 	 
"Statement": [
  {
    "Effect": "Allow",
    "Principal": {
      "Service": "budgets.amazonaws.com"
    },
    "Action": "sts:AssumeRole",
    "Condition": {
      "ArnLike": {
        "aws:SourceArn": "arn:aws:budgets::123456789012:budget/*"
      },
      "StringEquals": {
        "aws:SourceAccount": "123456789012"
      }
    }
  }
]
}
```

------

許可政策

------
#### [ 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": "*"
    }
  ]
}
```

------

## 允許使用者在 定價計算器中建立、列出工作負載預估並新增用量
<a name="example-pc-create-list-estimates"></a>

此政策允許 IAM 使用者建立、列出工作負載預估，並將用量新增至工作負載預估，以及查詢 Cost Explorer 資料的許可，以取得歷史成本和用量資料。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "WorkloadEstimate",
            "Effect": "Allow",
            "Action": [
                "ce:GetCostCategories",
                "ce:GetDimensionValues",
                "ce:GetCostAndUsage",
                "ce:GetTags",
                "bcm-pricing-calculator:GetWorkloadEstimate",
                "bcm-pricing-calculator:ListWorkloadEstimateUsage",
                "bcm-pricing-calculator:CreateWorkloadEstimate",
                "bcm-pricing-calculator:ListWorkloadEstimates",
                "bcm-pricing-calculator:CreateWorkloadEstimateUsage",
                "bcm-pricing-calculator:UpdateWorkloadEstimateUsage"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## 允許使用者在 定價計算器中建立、列出和新增用量和承諾以計費案例
<a name="example-pc-create-list-scenario"></a>

此政策允許 IAM 使用者建立、列出和新增用量和承諾以計費案例。Cost Explorer 許可不會新增，因此您將無法載入歷史資料。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "BillScenario",
            "Effect": "Allow",
            "Action": [
                "bcm-pricing-calculator:CreateBillScenario",
                "bcm-pricing-calculator:GetBillScenario",
                "bcm-pricing-calculator:ListBillScenarios",
                "bcm-pricing-calculator:CreateBillScenarioUsageModification", 
                "bcm-pricing-calculator:UpdateBillScenarioUsageModification",  
                "bcm-pricing-calculator:ListBillScenarioUsageModifications",
                  
                "bcm-pricing-calculator:ListBillScenarioCommitmentModifications"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## 允許使用者在定價計算器中建立帳單預估
<a name="example-pc-create-bill-estimate"></a>

此政策允許 IAM 使用者建立帳單預估並列出帳單預估明細項目。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "BillEstimate",
            "Effect": "Allow",
            "Action": [
                "bcm-pricing-calculator:CreateBillEstimate",
                "bcm-pricing-calculator:GetBillEstimate",
                "bcm-pricing-calculator:UpdateBillEstimate",
                "bcm-pricing-calculator:ListBillEstimates",
                "bcm-pricing-calculator:ListBillEstimateLineItems",
                "bcm-pricing-calculator:ListBillEstimateCommitments",
                "bcm-pricing-calculator:ListBillEstimateInputUsageModifications",
                "bcm-pricing-calculator:ListBillEstimateInputCommitmentModifications"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## 允許使用者在定價計算器中建立偏好設定
<a name="example-pc-create-preferences"></a>

此政策允許 IAM 使用者建立和取得速率偏好設定。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "RatePreferences",
            "Effect": "Allow",
            "Action": [
                "bcm-pricing-calculator:GetPreferences",
                "bcm-pricing-calculator:UpdatePreferences"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## 允許使用者建立、管理和共用自訂帳單檢視
<a name="example-billing-view"></a>

此政策允許 IAM 使用者建立、管理和共用自訂帳單檢視。他們將需要能夠使用 Billing View 建立和管理自訂帳單檢視，以及能夠使用 Resource Access Manager (AWS RAM) 建立和關聯 AWS 資源共用。

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

****  

```
{
   "Version":"2012-10-17",		 	 	 
   "Statement": [
        {
           "Effect": "Allow",
           "Action": [
               "billing:CreateBillingView",
               "billing:UpdateBillingView",
               "billing:DeleteBillingView",
               "billing:GetBillingView",
               "billing:ListBillingViews",
               "billing:ListTagsForResource",
               "billing:PutResourcePolicy",
               "ce:GetCostAndUsage",
               "ce:GetTags",
               "organizations:ListAccounts",
               "ram:ListResources",
               "ram:ListPermissions",
               "ram:CreateResourceShare",
               "ram:AssociateResourceShare",
               "ram:GetResourceShares",
               "ram:GetResourceShareAssociations",
               "ram:ListResourceSharePermissions",
               "ram:ListResourceTypes",
               "ram:ListPrincipals",
               "ram:DisassociateResourceShare"
           ],
           "Resource": "*"
       }
   ]
}
```

------

## 允許使用者在存取特定自訂帳單檢視時存取 Cost Explorer
<a name="example-custom-billing-view"></a>

此政策允許 IAM 使用者在存取特定自訂帳單檢視時存取 Cost Explorer (`custom-1a2b3c4d`)。`123456789012` 將 取代為 12 位數 AWS 的帳戶 ID，並將 `1a2b3c4d`取代為自訂帳單檢視的唯一識別符。

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

****  

```
{
   "Version":"2012-10-17",		 	 	 
   "Statement": [
       {
           "Effect": "Allow",
           "Action": [
               "ce:GetDimensionValues",
               "ce:GetCostAndUsageWithResources",
               "ce:GetCostAndUsage",
               "ce:GetCostForecast",
               "ce:GetTags",
               "ce:GetUsageForecast",
               "ce:GetCostCategories"
           ],
           "Resource": [
               "arn:aws:billing::123456789012:billingview/custom-1a2b3c4d"
           ]
       },
       {
           "Effect": "Allow",
           "Action": [
               "billing:ListBillingViews",
               "billing:GetBillingView"
           ],
           "Resource": "*"
       }
   ]
}
```

------