createStorageConfiguration method
Creates a new storage configuration, used to enable recording to Amazon S3. When a StorageConfiguration is created, IVS will modify the S3 bucketPolicy of the provided bucket. This will ensure that IVS has sufficient permissions to write content to the provided bucket.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw PendingVerification.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter s3 :
A complex type that contains a storage configuration for where recorded
video will be stored.
Parameter name :
Storage configuration name. The value does not need to be unique.
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.
Implementation
Future<CreateStorageConfigurationResponse> createStorageConfiguration({
required S3StorageConfiguration s3,
String? name,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
's3': s3,
if (name != null) 'name': name,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/CreateStorageConfiguration',
exceptionFnMap: _exceptionFns,
);
return CreateStorageConfigurationResponse.fromJson(response);
}