createPipeline method
- required int maxUnits,
- required int minUnits,
- required String pipelineConfigurationBody,
- required String pipelineName,
- BufferOptions? bufferOptions,
- EncryptionAtRestOptions? encryptionAtRestOptions,
- LogPublishingOptions? logPublishingOptions,
- String? pipelineRoleArn,
- List<
Tag> ? tags, - VpcOptions? vpcOptions,
Creates an OpenSearch Ingestion pipeline. For more information, see Creating Amazon OpenSearch Ingestion pipelines.
May throw AccessDeniedException.
May throw DisabledOperationException.
May throw InternalException.
May throw LimitExceededException.
May throw ResourceAlreadyExistsException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter maxUnits :
The maximum pipeline capacity, in Ingestion Compute Units (ICUs).
Parameter minUnits :
The minimum pipeline capacity, in Ingestion Compute Units (ICUs).
Parameter pipelineConfigurationBody :
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.
Parameter pipelineName :
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.
Parameter bufferOptions :
Key-value pairs to configure persistent buffering for the pipeline.
Parameter encryptionAtRestOptions :
Key-value pairs to configure encryption for data that is written to a
persistent buffer.
Parameter logPublishingOptions :
Key-value pairs to configure log publishing.
Parameter pipelineRoleArn :
The Amazon Resource Name (ARN) of the IAM role that grants the pipeline
permission to access Amazon Web Services resources.
Parameter tags :
List of tags to add to the pipeline upon creation.
Parameter vpcOptions :
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.
Implementation
Future<CreatePipelineResponse> createPipeline({
required int maxUnits,
required int minUnits,
required String pipelineConfigurationBody,
required String pipelineName,
BufferOptions? bufferOptions,
EncryptionAtRestOptions? encryptionAtRestOptions,
LogPublishingOptions? logPublishingOptions,
String? pipelineRoleArn,
List<Tag>? tags,
VpcOptions? vpcOptions,
}) async {
_s.validateNumRange(
'maxUnits',
maxUnits,
1,
1152921504606846976,
isRequired: true,
);
_s.validateNumRange(
'minUnits',
minUnits,
1,
1152921504606846976,
isRequired: true,
);
final $payload = <String, dynamic>{
'MaxUnits': maxUnits,
'MinUnits': minUnits,
'PipelineConfigurationBody': pipelineConfigurationBody,
'PipelineName': pipelineName,
if (bufferOptions != null) 'BufferOptions': bufferOptions,
if (encryptionAtRestOptions != null)
'EncryptionAtRestOptions': encryptionAtRestOptions,
if (logPublishingOptions != null)
'LogPublishingOptions': logPublishingOptions,
if (pipelineRoleArn != null) 'PipelineRoleArn': pipelineRoleArn,
if (tags != null) 'Tags': tags,
if (vpcOptions != null) 'VpcOptions': vpcOptions,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/2022-01-01/osis/createPipeline',
exceptionFnMap: _exceptionFns,
);
return CreatePipelineResponse.fromJson(response);
}