createIngestConfiguration method
Creates a new IngestConfiguration resource, used to specify the ingest protocol for a stage.
May throw AccessDeniedException.
May throw PendingVerification.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter ingestProtocol :
Type of ingest protocol that the user employs to broadcast. If this is set
to RTMP, insecureIngest must be set to
true.
Parameter attributes :
Application-provided attributes to store in the IngestConfiguration and
attach to a stage. Map keys and values can contain UTF-8 encoded text. The
maximum length of this field is 1 KB total. This field is exposed to
all stage participants and should not be used for personally identifying,
confidential, or sensitive information.
Parameter insecureIngest :
Whether the stage allows insecure RTMP ingest. This must be set to
true, if ingestProtocol is set to
RTMP. Default: false.
Parameter name :
Optional name that can be specified for the IngestConfiguration being
created.
Parameter redundantIngest :
Indicates whether redundant ingest is enabled for the ingest
configuration. Default: false.
Parameter stageArn :
ARN of the stage with which the IngestConfiguration is associated.
Parameter tags :
Tags attached to the resource. Array of maps, each of the form
string:string (key:value). See Best
practices and strategies in Tagging AWS Resources and Tag
Editor for details, including restrictions that apply to tags and "Tag
naming limits and requirements"; Amazon IVS has no constraints on tags
beyond what is documented there.
Parameter userId :
Customer-assigned name to help identify the participant using the
IngestConfiguration; this can be used to link a participant to a user in
the customer’s own systems. This can be any UTF-8 encoded text. This
field is exposed to all stage participants and should not be used for
personally identifying, confidential, or sensitive information.
Implementation
Future<CreateIngestConfigurationResponse> createIngestConfiguration({
required IngestProtocol ingestProtocol,
Map<String, String>? attributes,
bool? insecureIngest,
String? name,
bool? redundantIngest,
String? stageArn,
Map<String, String>? tags,
String? userId,
}) async {
final $payload = <String, dynamic>{
'ingestProtocol': ingestProtocol.value,
if (attributes != null) 'attributes': attributes,
if (insecureIngest != null) 'insecureIngest': insecureIngest,
if (name != null) 'name': name,
if (redundantIngest != null) 'redundantIngest': redundantIngest,
if (stageArn != null) 'stageArn': stageArn,
if (tags != null) 'tags': tags,
if (userId != null) 'userId': userId,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/CreateIngestConfiguration',
exceptionFnMap: _exceptionFns,
);
return CreateIngestConfigurationResponse.fromJson(response);
}