

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

# でタグを使用する AWS IoT SiteWise
<a name="tag-basics"></a>

タグを使用して、ユースケースの目的、所有者、環境、またはその他の分類で AWS IoT SiteWise リソースを分類します。同じ型のリソースが多い場合に、そのタグに基づいて特定のリソースをすばやく識別できます。

各タグは、ユーザーが定義したキーとオプション値で構成されます。例えば、アセットモデルの一連のタグを確立して、それらがサポートする産業プロセスに従って追跡できます。管理するリソースのタイプごとにカスタマイズされたタグキーのセットを開発することをお勧めします。一貫性のある一連のタグキーを使用することで、リソースの管理が容易になります。

## でタグ付けする AWS マネジメントコンソール
<a name="tags-console"></a>

の**タグエディタ** AWS マネジメントコンソール は、すべての AWS サービスからリソースのタグを作成および管理するための一元的な統一された方法を提供します。詳細については、「 リソースのタグ付け」および「タグ[エディタ](https://docs.aws.amazon.com/tag-editor/latest/userguide/gettingstarted.html)ユーザーガイド」の「タグエディタの開始方法」を参照してください。 * AWS *

## AWS IoT SiteWise API でタグ付けする
<a name="tags-api"></a>

 AWS IoT SiteWise API はタグも使用します。タグを作成する前に、タグの制限に注意してください。詳細については、「*AWS 全般のリファレンス*」の「[タグの命名規則と使用規則](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions)」を参照してください。
+ リソースの作成時にタグを追加するには、リソースの `tags` プロパティでタグを定義します。
+ 既存のリソースにタグを追加したり、タグ値を更新するには、[TagResource](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_TagResource.html) オペレーションを使用します。
+ リソースからタグを削除するには、[UntagResource](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_UntagResource.html) オペレーションを使用します。
+ リソースに関連付けられたタグを取得するには、[ListTagsForResource](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_ListTagsForResource.html) オペレーションを使用するか、リソースを取得してその `tags` プロパティを調べます。

次の表に、 AWS IoT SiteWise API とそれに対応する `Create`および `Describe`オペレーションを使用してタグ付けできるリソースを示します。


**タグ付け可能な AWS IoT SiteWise リソース**  

| [リソース]  | 作成オペレーション | オペレーションの説明 | 
| --- | --- | --- | 
| アセットモデルまたはコンポーネントモデル | [CreateAssetModel](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateAssetModel.html) | [DescribeAssetModel](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeAssetModel.html) | 
| アセット | [CreateAsset](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateAsset.html) | [DescribeAsset](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeAsset.html) | 
| SiteWise Edge ゲートウェイ | [CreateGateway](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateGateway.html) | [DescribeGateway](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeGateway.html) | 
| Portal | [CreatePortal](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreatePortal.html) | [DescribePortal](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribePortal.html) | 
| プロジェクト | [CreateProject](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateProject.html) | [DescribeProject](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeProject.html) | 
| ダッシュボード | [CreateDashboard](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateDashboard.html) | [DescribeDashboard](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeDashboard.html) | 
| アクセスポリシー | [CreateAccessPolicy](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateAccessPolicy.html) | [DescribeAccessPolicy](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeAccessPolicy.html) | 
| 時系列 | [BatchPutAssetPropertyValue](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchPutAssetPropertyValue.html) | [DescribeTimeSeries](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeTimeSeries.html) | 

では`[BatchPutAssetPropertyValue](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchPutAssetPropertyValue.html)`、アセットモデルとアセットを作成する AWS IoT SiteWise 前に、 に産業データを送信するようにデータソースを設定できます。 は、機器から raw データのストリームを受信するデータストリーム AWS IoT SiteWise を自動的に作成します。詳細については、「[データインジェストの管理](https://docs.aws.amazon.com//iot-sitewise/latest/userguide/data-streams.html)」を参照してください。

ビューで次のオペレーションを使用して、タグ付けをサポートしているリソースのタグを管理します。
+ [TagResource](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_TagResource.html) - リソースにタグを追加するか、既存のタグの値を更新します。
+ [ListTagsForResource](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_ListTagsForResource.html) - リソースのタグをリストします。
+ [UntagResource](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_UntagResource.html) - リソースからタグを削除します。

任意の時点でリソースにタグを追加または削除します。既存のタグキーの値を更新するには、同じキーと望ましい新しい値を持つ新しいタグをリソースに追加します。このアクションにより、古い値が新しい値に置き換えられます。空の文字列をタグ値として割り当てることはできますが、null 値を割り当てることはできません。

リソースを削除すると、リソースにリンクされたタグも削除されます。