

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# API を使用して Amazon Connect Customer Profiles の計算属性値を検証する
<a name="customerprofiles-calculated-attributes-validating-values"></a>

`GetCalculatedAttributeForProfile` と `ListCalculatedAttributesForProfile` の 2 つの API はプロファイルレベルにあります。
+ **GetCalculatedAttributeForProfile** - 1 つのプロファイルについて単一の計算された属性を取得します。
+ **ListCalculatedAttributesForProfile** - 1 つのプロファイルの計算された属性のリストを取得します

有効なプロファイル ID があれば、計算された属性の値が表示されます。

**レスポンスの例**

```
{   
    "CalculatedAttributeName": "_average_hold_time",
    "DisplayName": "Average hold time",
    "IsDataPartial": "true",
    "Value": "24144"
}
```

**IsDataPartial** - このフラグは、時間範囲 (30 日) またはオブジェクト数のいずれかが達成されていないため、計算された属性がまだ計算中であることを示します。例えば、30 日間の平均を求める場合、30 日が経過した後にのみ、`IsDataPartial` フィールドは false に設定されます。

## 計算された属性のリストの取得
<a name="calculated-attributes-validating-a-list-of-values"></a>

**CLI AWS を使用する**

```
aws customer-profiles list-calculated-attributes-for-profile --region your-region --domain-name your-domain-name --profile-id your-profile-id
```

**カスタム AWS JSON ファイルで CLI を使用する**

次の内容を含む JSON ファイルを作成します。

```
{
    "DomainName": "your-domain-name", 
    "ProfileId" "some-profile-id"
}
```

```
aws customer-profiles list-calculated-attributes-for-profile --region your-region --cli-input-json file://list_calculated_attributes_for_profile_cli.json
```

**エンドポイント**

```
https://profile.your-region.amazonaws.com/domains/your-domain-name/profile/your-profile-id/calculated-attributes/
```

## 1 つの計算された属性を取得
<a name="calculated-attributes-validating-a-single-value"></a>

**CLI AWS を使用します**。

```
aws customer-profiles get-calculated-attributes-for-profile --region your-region --domain-name your-domain-name --calculated-attribute-name your-calculated-attribute-name --profile-id your-profile-id
```

**カスタム AWS JSON ファイルで CLI を使用します**。

次の内容を含む JSON ファイルを作成します。

```
{   
    "DomainName": "your-domain-name", 
    "CalculatedAttributeName": "your-calculated-attribute-name",
    "ProfileId" "your-profile-id"
}
```

```
aws customer-profiles get-calculated-attributes-for-profile --region your-region --cli-input-json file://list_calculated_attributes_for_profile_cli.json
```

**エンドポイント**

```
https://profile.your-region.amazonaws.com/domains/your-domain-name/profile/your-profile-id/calculated-attributes/your-calculated-attribute-name
```