/// <summary>
 /// Sets the CORS configuration to apply.
 /// </summary>
 /// <param name="configuration">CORS configuration</param>
 /// <returns>this instance</returns>
 public PutCORSConfigurationRequest WithConfiguration(CORSConfiguration configuration)
 {
     this.configuration = configuration;
     return this;
 }
Exemple #2
0
 /// <summary>
 /// Sets the cors configuration for a bucket.
 /// This API is supported only when AWSConfigs.HttpClient is set to AWSConfigs.HttpClientOption.UnityWebRequest, the default value of this configuration option is AWSConfigs.HttpClientOption.UnityWWW
 /// </summary>
 /// <param name="bucketName">A property of PutCORSConfigurationRequest used to execute the PutCORSConfiguration service method.</param>
 /// <param name="configuration">A property of PutCORSConfigurationRequest used to execute the PutCORSConfiguration service method.</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">
 ///     A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///     procedure using the AsyncState property.
 /// </param>
 /// 
 /// <returns>The response from the PutCORSConfiguration service method, as returned by S3.</returns>
 public void PutCORSConfigurationAsync(string bucketName, CORSConfiguration configuration,  AmazonServiceCallback<PutCORSConfigurationRequest, PutCORSConfigurationResponse> callback, AsyncOptions options = null)
 {
     var request = new PutCORSConfigurationRequest();
     request.BucketName = bucketName;
     request.Configuration = configuration;
     PutCORSConfigurationAsync(request, callback, options);
 }
 /// <summary>
 /// Sets the cors configuration for a bucket.
 /// </summary>
 /// <param name="bucketName">A property of PutCORSConfigurationRequest used to execute the PutCORSConfiguration service method.</param>
 /// <param name="configuration">A property of PutCORSConfigurationRequest used to execute the PutCORSConfiguration service method.</param>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the PutCORSConfiguration service method, as returned by S3.</returns>
 public Task<PutCORSConfigurationResponse> PutCORSConfigurationAsync(string bucketName, CORSConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new PutCORSConfigurationRequest();
     request.BucketName = bucketName;
     request.Configuration = configuration;
     return PutCORSConfigurationAsync(request, cancellationToken);
 }
Exemple #4
0
 /// <summary>
 /// Sets the Configuration property.
 /// </summary>
 /// <param name="configuration">Configuration property</param>
 /// <returns>this instance</returns>
 public PutCORSConfigurationRequest WithConfiguration(CORSConfiguration configuration)
 {
     this.configuration = configuration;
     return(this);
 }
 /// <summary>
 /// Sets the cors configuration for a bucket.
 /// </summary>
 /// <param name="bucketName">A property of PutCORSConfigurationRequest used to execute the PutCORSConfiguration service method.</param>
 /// <param name="configuration">A property of PutCORSConfigurationRequest used to execute the PutCORSConfiguration service method.</param>
 /// 
 /// <returns>The response from the PutCORSConfiguration service method, as returned by S3.</returns>
 public PutCORSConfigurationResponse PutCORSConfiguration(string bucketName, CORSConfiguration configuration)
 {
     var request = new PutCORSConfigurationRequest();
     request.BucketName = bucketName;
     request.Configuration = configuration;
     return PutCORSConfiguration(request);
 }