

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

# ブループリントの使用
<a name="pipeline-blueprint"></a>

パイプラインの定義をゼロから作成するのではなく、*設定のブループリント*を使用できます。設定のブループリントは、トレース分析や Apache ログなどの一般的な取り込みシナリオ用に事前設定されたテンプレートです。設定のブループリントを使用すると、設定をゼロから作成しなくても、パイプラインを簡単にプロビジョニングできます。

## コンソール
<a name="pipeline-blueprint-console"></a>

**パイプラインのブループリントを使用するには**

1. [https://console.aws.amazon.com/aos/osis/home](https://console.aws.amazon.com/aos/osis/home#osis/ingestion-pipelines) で OpenSearch Ingestion コンソールにサインインします。Pipelines ページが表示されます。

1. **パイプラインの作成** を選択します。

1. ユースケースのリストからブループリントを選択し、**[ブループリントを選択]** を選択します。パイプライン設定には、選択したユースケースのサブパイプラインが入力されます。

   パイプラインのブループリントは、そのままでは有効になりません。選択したソースに応じて、追加の設定を指定する必要があります。

## CLI
<a name="pipeline-blueprint-cli"></a>

を使用して使用可能なすべてのブループリントのリストを取得するには AWS CLI、[list-pipeline-blueprints](https://docs.aws.amazon.com/cli/latest/reference/osis/list-pipeline-blueprints.html) リクエストを送信します。

```
aws osis list-pipeline-blueprints 
```

このリクエストは、利用可能なすべてのブループリントのリストを返します。

特定のブループリントに関する詳細な情報を取得するには、[get-pipeline-blueprint](https://docs.aws.amazon.com/cli/latest/reference/osis/get-pipeline-blueprint.html) コマンドを使用します。

```
aws osis get-pipeline-blueprint --blueprint-name AWS-ApacheLogPipeline
```

このリクエストは、Apache ログパイプラインブループリントの内容を返します。

```
{
   "Blueprint":{
      "PipelineConfigurationBody":"###\n  # Limitations: https://docs.aws.amazon.com/opensearch-service/latest/ingestion/ingestion.html#ingestion-limitations\n###\n###\n  # apache-log-pipeline:\n    # This pipeline receives logs via http (e.g. FluentBit), extracts important values from the logs by matching\n    # the value in the 'log' key against the grok common Apache log pattern. The grokked logs are then sent\n    # to OpenSearch to an index named 'logs'\n###\n\nversion: \"2\"\napache-log-pipeline:\n  source:\n    http:\n      # Provide the path for ingestion. ${pipelineName} will be replaced with pipeline name configured for this pipeline.\n      # In this case it would be \"/apache-log-pipeline/logs\". This will be the FluentBit output URI value.\n      path: \"/${pipelineName}/logs\"\n  processor:\n    - grok:\n        match:\n          log: [ \"%{COMMONAPACHELOG_DATATYPED}\" ]\n  sink:\n    - opensearch:\n        # Provide an AWS OpenSearch Service domain endpoint\n        # hosts: [ \"https://search-mydomain-1a2a3a4a5a6a7a8a9a0a9a8a7a.us-east-1.es.amazonaws.com\" ]\n        aws:\n          # Provide the region of the domain.\n          # region: \"us-east-1\"\n          # Enable the 'serverless' flag if the sink is an Amazon OpenSearch Serverless collection\n          # serverless: true\n        index: \"logs\"\n        # Enable the S3 DLQ to capture any failed requests in an S3 bucket\n        # dlq:\n          # s3:\n            # Provide an S3 bucket\n            # bucket: \"your-dlq-bucket-name\"\n            # Provide a key path prefix for the failed requests\n            # key_path_prefix: \"${pipelineName}/logs/dlq\"\n            # Provide the region of the bucket.\n            # region: \"us-east-1\"\n            # Provide a Role ARN with access to the bucket. This role should have a trust relationship with osis-pipelines.amazonaws.com\n"
      "BlueprintName":"AWS-ApacheLogPipeline"
   }
}
```

## OpenSearch Ingestion API
<a name="pipeline-blueprint-api"></a>

OpenSearch Ingestion API を使用してパイプラインのブループリントに関する情報を取得するには、[ListPipelineBlueprints](https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_osis_ListPipelineBlueprints.html) オペレーションと [GetPipelineBlueprint](https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_osis_GetPipelineBlueprint.html) オペレーションを使用します。