Amazon.S3.AmazonS3Client.DeleteCORSConfigurationAsync C# (CSharp) Method

DeleteCORSConfigurationAsync() public method

Initiates the asynchronous execution of the DeleteCORSConfiguration operation. This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value for this configuration option is AWSConfigs.HttpClientOption.UnityWWW
public DeleteCORSConfigurationAsync ( Amazon.S3.Model.DeleteCORSConfigurationRequest request, DeleteCORSConfigurationResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
request Amazon.S3.Model.DeleteCORSConfigurationRequest Container for the necessary parameters to execute the DeleteCORSConfiguration operation on AmazonS3Client.
callback DeleteCORSConfigurationResponse>.AmazonServiceCallback An Action delegate that is invoked when the operation completes.
options Amazon.Runtime.AsyncOptions A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
return void
        public void DeleteCORSConfigurationAsync(DeleteCORSConfigurationRequest request, AmazonServiceCallback<DeleteCORSConfigurationRequest, DeleteCORSConfigurationResponse> callback, AsyncOptions options = null)
        {
            if (AWSConfigs.HttpClient == AWSConfigs.HttpClientOption.UnityWWW)
            {
                throw new InvalidOperationException("DeleteCORSConfiguration is only allowed with AWSConfigs.HttpClientOption.UnityWebRequest API option");
            }
            options = options == null?new AsyncOptions():options;
            var marshaller = new DeleteCORSConfigurationRequestMarshaller();
            var unmarshaller = DeleteCORSConfigurationResponseUnmarshaller.Instance;
            Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
            if(callback !=null )
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
                    AmazonServiceResult<DeleteCORSConfigurationRequest,DeleteCORSConfigurationResponse> responseObject 
                            = new AmazonServiceResult<DeleteCORSConfigurationRequest,DeleteCORSConfigurationResponse>((DeleteCORSConfigurationRequest)req, (DeleteCORSConfigurationResponse)res, ex , ao.State);    
                        callback(responseObject); 
                };
            BeginInvoke<DeleteCORSConfigurationRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }

Same methods

AmazonS3Client::DeleteCORSConfigurationAsync ( Amazon.S3.Model.DeleteCORSConfigurationRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonS3Client::DeleteCORSConfigurationAsync ( string bucketName, System cancellationToken = default(CancellationToken) ) : Task
AmazonS3Client::DeleteCORSConfigurationAsync ( string bucketName, DeleteCORSConfigurationResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
AmazonS3Client