createInput method

Future<CreateInputResponse> createInput({
  1. List<InputDestinationRequest>? destinations,
  2. List<InputDeviceSettings>? inputDevices,
  3. List<String>? inputSecurityGroups,
  4. List<MediaConnectFlowRequest>? mediaConnectFlows,
  5. String? name,
  6. String? requestId,
  7. String? roleArn,
  8. List<InputSourceRequest>? sources,
  9. Map<String, String>? tags,
  10. InputType? type,
  11. InputVpcRequest? vpc,
})

Create an input

May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException. May throw BadGatewayException. May throw GatewayTimeoutException. May throw TooManyRequestsException.

Parameter destinations : Destination settings for PUSH type inputs.

Parameter inputDevices : Settings for the devices.

Parameter inputSecurityGroups : A list of security groups referenced by IDs to attach to the input.

Parameter mediaConnectFlows : A list of the MediaConnect Flows that you want to use in this input. You can specify as few as one Flow and presently, as many as two. The only requirement is when you have more than one is that each Flow is in a separate Availability Zone as this ensures your EML input is redundant to AZ issues.

Parameter name : Name of the input.

Parameter requestId : Unique identifier of the request to ensure the request is handled exactly once in case of retries.

Parameter roleArn : The Amazon Resource Name (ARN) of the role this input assumes during and after creation.

Parameter sources : The source URLs for a PULL-type input. Every PULL type input needs exactly two source URLs for redundancy. Only specify sources for PULL type Inputs. Leave Destinations empty.

Parameter tags : A collection of key-value pairs.

Implementation

Future<CreateInputResponse> createInput({
  List<InputDestinationRequest>? destinations,
  List<InputDeviceSettings>? inputDevices,
  List<String>? inputSecurityGroups,
  List<MediaConnectFlowRequest>? mediaConnectFlows,
  String? name,
  String? requestId,
  String? roleArn,
  List<InputSourceRequest>? sources,
  Map<String, String>? tags,
  InputType? type,
  InputVpcRequest? vpc,
}) async {
  final $payload = <String, dynamic>{
    if (destinations != null) 'destinations': destinations,
    if (inputDevices != null) 'inputDevices': inputDevices,
    if (inputSecurityGroups != null)
      'inputSecurityGroups': inputSecurityGroups,
    if (mediaConnectFlows != null) 'mediaConnectFlows': mediaConnectFlows,
    if (name != null) 'name': name,
    'requestId': requestId ?? _s.generateIdempotencyToken(),
    if (roleArn != null) 'roleArn': roleArn,
    if (sources != null) 'sources': sources,
    if (tags != null) 'tags': tags,
    if (type != null) 'type': type.toValue(),
    if (vpc != null) 'vpc': vpc,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/prod/inputs',
    exceptionFnMap: _exceptionFns,
  );
  return CreateInputResponse.fromJson(response);
}