CreatePipelineCommand

Creates an OpenSearch Ingestion pipeline. For more information, see Creating Amazon OpenSearch Ingestion pipelines .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { OSISClient, CreatePipelineCommand } from "@aws-sdk/client-osis"; // ES Modules import
// const { OSISClient, CreatePipelineCommand } = require("@aws-sdk/client-osis"); // CommonJS import
const client = new OSISClient(config);
const input = { // CreatePipelineRequest
  PipelineName: "STRING_VALUE", // required
  MinUnits: Number("int"), // required
  MaxUnits: Number("int"), // required
  PipelineConfigurationBody: "STRING_VALUE", // required
  LogPublishingOptions: { // LogPublishingOptions
    IsLoggingEnabled: true || false,
    CloudWatchLogDestination: { // CloudWatchLogDestination
      LogGroup: "STRING_VALUE", // required
    },
  },
  VpcOptions: { // VpcOptions
    SubnetIds: [ // SubnetIds // required
      "STRING_VALUE",
    ],
    SecurityGroupIds: [ // SecurityGroupIds
      "STRING_VALUE",
    ],
    VpcAttachmentOptions: { // VpcAttachmentOptions
      AttachToVpc: true || false, // required
      CidrBlock: "STRING_VALUE",
    },
    VpcEndpointManagement: "CUSTOMER" || "SERVICE",
  },
  BufferOptions: { // BufferOptions
    PersistentBufferEnabled: true || false, // required
  },
  EncryptionAtRestOptions: { // EncryptionAtRestOptions
    KmsKeyArn: "STRING_VALUE", // required
  },
  Tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE", // required
    },
  ],
};
const command = new CreatePipelineCommand(input);
const response = await client.send(command);
// { // CreatePipelineResponse
//   Pipeline: { // Pipeline
//     PipelineName: "STRING_VALUE",
//     PipelineArn: "STRING_VALUE",
//     MinUnits: Number("int"),
//     MaxUnits: Number("int"),
//     Status: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATE_FAILED" || "UPDATE_FAILED" || "STARTING" || "START_FAILED" || "STOPPING" || "STOPPED",
//     StatusReason: { // PipelineStatusReason
//       Description: "STRING_VALUE",
//     },
//     PipelineConfigurationBody: "STRING_VALUE",
//     CreatedAt: new Date("TIMESTAMP"),
//     LastUpdatedAt: new Date("TIMESTAMP"),
//     IngestEndpointUrls: [ // IngestEndpointUrlsList
//       "STRING_VALUE",
//     ],
//     LogPublishingOptions: { // LogPublishingOptions
//       IsLoggingEnabled: true || false,
//       CloudWatchLogDestination: { // CloudWatchLogDestination
//         LogGroup: "STRING_VALUE", // required
//       },
//     },
//     VpcEndpoints: [ // VpcEndpointsList
//       { // VpcEndpoint
//         VpcEndpointId: "STRING_VALUE",
//         VpcId: "STRING_VALUE",
//         VpcOptions: { // VpcOptions
//           SubnetIds: [ // SubnetIds // required
//             "STRING_VALUE",
//           ],
//           SecurityGroupIds: [ // SecurityGroupIds
//             "STRING_VALUE",
//           ],
//           VpcAttachmentOptions: { // VpcAttachmentOptions
//             AttachToVpc: true || false, // required
//             CidrBlock: "STRING_VALUE",
//           },
//           VpcEndpointManagement: "CUSTOMER" || "SERVICE",
//         },
//       },
//     ],
//     BufferOptions: { // BufferOptions
//       PersistentBufferEnabled: true || false, // required
//     },
//     EncryptionAtRestOptions: { // EncryptionAtRestOptions
//       KmsKeyArn: "STRING_VALUE", // required
//     },
//     VpcEndpointService: "STRING_VALUE",
//     ServiceVpcEndpoints: [ // ServiceVpcEndpointsList
//       { // ServiceVpcEndpoint
//         ServiceName: "OPENSEARCH_SERVERLESS",
//         VpcEndpointId: "STRING_VALUE",
//       },
//     ],
//     Destinations: [ // PipelineDestinationList
//       { // PipelineDestination
//         ServiceName: "STRING_VALUE",
//         Endpoint: "STRING_VALUE",
//       },
//     ],
//     Tags: [ // TagList
//       { // Tag
//         Key: "STRING_VALUE", // required
//         Value: "STRING_VALUE", // required
//       },
//     ],
//   },
// };

CreatePipelineCommand Input

See CreatePipelineCommandInput for more details

Parameter
Type
Description
MaxUnits
Required
number | undefined

The maximum pipeline capacity, in Ingestion Compute Units (ICUs).

MinUnits
Required
number | undefined

The minimum pipeline capacity, in Ingestion Compute Units (ICUs).

PipelineConfigurationBody
Required
string | undefined

The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with n.

PipelineName
Required
string | undefined

The name of the OpenSearch Ingestion pipeline to create. Pipeline names are unique across the pipelines owned by an account within an Amazon Web Services Region.

BufferOptions
BufferOptions | undefined

Key-value pairs to configure persistent buffering for the pipeline.

EncryptionAtRestOptions
EncryptionAtRestOptions | undefined

Key-value pairs to configure encryption for data that is written to a persistent buffer.

LogPublishingOptions
LogPublishingOptions | undefined

Key-value pairs to configure log publishing.

Tags
Tag[] | undefined

List of tags to add to the pipeline upon creation.

VpcOptions
VpcOptions | undefined

Container for the values required to configure VPC access for the pipeline. If you don't specify these values, OpenSearch Ingestion creates the pipeline with a public endpoint.

CreatePipelineCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Pipeline
Pipeline | undefined

Container for information about the created pipeline.

Throws

Name
Fault
Details
AccessDeniedException
client

You don't have permissions to access the resource.

DisabledOperationException
client

Exception is thrown when an operation has been disabled.

InternalException
server

The request failed because of an unknown error, exception, or failure (the failure is internal to the service).

LimitExceededException
client

You attempted to create more than the allowed number of tags.

ResourceAlreadyExistsException
client

You attempted to create a resource that already exists.

ResourceNotFoundException
client

You attempted to access or delete a resource that does not exist.

ValidationException
client

An exception for missing or invalid input fields.

OSISServiceException
Base exception class for all service exceptions from OSIS service.