createFlow method
- required String name,
- String? availabilityZone,
- List<
GrantEntitlementRequest> ? entitlements, - List<
AddOutputRequest> ? outputs, - SetSourceRequest? source,
- FailoverConfig? sourceFailoverConfig,
- List<
SetSourceRequest> ? sources, - List<
VpcInterfaceRequest> ? vpcInterfaces,
Creates a new flow. The request must include one source. The request optionally can include outputs (up to 50) and entitlements (up to 50).
May throw CreateFlow420Exception. May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException. May throw ServiceUnavailableException. May throw TooManyRequestsException.
Parameter name
:
The name of the flow.
Parameter availabilityZone
:
The Availability Zone that you want to create the flow in. These options
are limited to the Availability Zones within the current AWS Region.
Parameter entitlements
:
The entitlements that you want to grant on a flow.
Parameter outputs
:
The outputs that you want to add to this flow.
Parameter vpcInterfaces
:
The VPC interfaces you want on the flow.
Implementation
Future<CreateFlowResponse> createFlow({
required String name,
String? availabilityZone,
List<GrantEntitlementRequest>? entitlements,
List<AddOutputRequest>? outputs,
SetSourceRequest? source,
FailoverConfig? sourceFailoverConfig,
List<SetSourceRequest>? sources,
List<VpcInterfaceRequest>? vpcInterfaces,
}) async {
ArgumentError.checkNotNull(name, 'name');
final $payload = <String, dynamic>{
'name': name,
if (availabilityZone != null) 'availabilityZone': availabilityZone,
if (entitlements != null) 'entitlements': entitlements,
if (outputs != null) 'outputs': outputs,
if (source != null) 'source': source,
if (sourceFailoverConfig != null)
'sourceFailoverConfig': sourceFailoverConfig,
if (sources != null) 'sources': sources,
if (vpcInterfaces != null) 'vpcInterfaces': vpcInterfaces,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/flows',
exceptionFnMap: _exceptionFns,
);
return CreateFlowResponse.fromJson(response);
}