deleteCorsPolicy method
Deletes the cross-origin resource sharing (CORS) configuration information that is set for the container.
To use this operation, you must have permission to perform the
MediaStore:DeleteCorsPolicy
action. The container owner has
this permission by default and can grant this permission to others.
May throw ContainerInUseException. May throw ContainerNotFoundException. May throw CorsPolicyNotFoundException. May throw InternalServerError.
Parameter containerName
:
The name of the container to remove the policy from.
Implementation
Future<void> deleteCorsPolicy({
required String containerName,
}) async {
ArgumentError.checkNotNull(containerName, 'containerName');
_s.validateStringLength(
'containerName',
containerName,
1,
255,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'MediaStore_20170901.DeleteCorsPolicy'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ContainerName': containerName,
},
);
}