Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions generator/ServiceClientGeneratorLib/ServiceModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,8 @@ public List<Operation> S3AllowListOperations
new Operation(this, "DeleteBucketInventoryConfiguration", DocumentRoot[OperationsKey]["DeleteBucketInventoryConfiguration"]),
new Operation(this,"PutBucketRequestPayment", DocumentRoot[OperationsKey]["PutBucketRequestPayment"]),
new Operation(this, "CreateBucketMetadataConfiguration",DocumentRoot[OperationsKey]["CreateBucketMetadataConfiguration"]),
new Operation(this, "GetBucketMetadataConfiguration", DocumentRoot[OperationsKey]["GetBucketMetadataConfiguration"])
new Operation(this, "GetBucketMetadataConfiguration", DocumentRoot[OperationsKey]["GetBucketMetadataConfiguration"]),
new Operation(this, "DeleteBucketMetadataConfiguration", DocumentRoot[OperationsKey]["DeleteBucketMetadataConfiguration"])

};
}
Expand Down Expand Up @@ -606,7 +607,8 @@ public List<string> S3RequestMarshallerThrowGenericExceptionList
"GetObjectAcl",
"PutBucketAcl",
"CreateBucketMetadataConfiguration",
"GetBucketMetadataConfiguration"
"GetBucketMetadataConfiguration",
"DeleteBucketMetadataConfiguration"
};
}
return _s3RequestMarshallerThrowAmazonS3ExceptionList;
Expand Down
7 changes: 7 additions & 0 deletions generator/ServiceModels/s3/s3.customizations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,13 @@
"ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
}
]
},
"DeleteBucketMetadataConfigurationRequest":{
"modify":[
{
"ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
}
]
}

},
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

/*
* Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;

using Amazon.Runtime;
using Amazon.Runtime.Internal;

#pragma warning disable CS0612,CS0618,CS1570
namespace Amazon.S3.Model
{
/// <summary>
/// Container for the parameters to the DeleteBucketMetadataConfiguration operation.
/// Deletes an S3 Metadata configuration from a general purpose bucket. For more information,
/// see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html">Accelerating
/// data discovery with S3 Metadata</a> in the <i>Amazon S3 User Guide</i>.
///
/// <note>
/// <para>
/// You can use the V2 <c>DeleteBucketMetadataConfiguration</c> API operation with V1
/// or V2 metadata configurations. However, if you try to use the V1 <c>DeleteBucketMetadataTableConfiguration</c>
/// API operation with V2 configurations, you will receive an HTTP <c>405 Method Not Allowed</c>
/// error.
/// </para>
/// </note> <dl> <dt>Permissions</dt> <dd>
/// <para>
/// To use this operation, you must have the <c>s3:DeleteBucketMetadataTableConfiguration</c>
/// permission. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html">Setting
/// up permissions for configuring metadata tables</a> in the <i>Amazon S3 User Guide</i>.
///
/// </para>
/// <note>
/// <para>
/// The IAM policy action name is the same for the V1 and V2 API operations.
/// </para>
/// </note> </dd> </dl>
/// <para>
/// The following operations are related to <c>DeleteBucketMetadataConfiguration</c>:
/// </para>
/// <ul> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a>
///
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataConfiguration.html">GetBucketMetadataConfiguration</a>
///
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UpdateBucketMetadataInventoryTableConfiguration.html">UpdateBucketMetadataInventoryTableConfiguration</a>
///
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UpdateBucketMetadataJournalTableConfiguration.html">UpdateBucketMetadataJournalTableConfiguration</a>
///
/// </para>
/// </li> </ul> <important>
/// <para>
/// You must URL encode any signed header values that contain spaces. For example, if
/// your header value is <c>my file.txt</c>, containing two spaces after <c>my</c>, you
/// must URL encode this value to <c>my%20%20file.txt</c>.
/// </para>
/// </important>
/// </summary>
public partial class DeleteBucketMetadataConfigurationRequest : AmazonWebServiceRequest
{
private string _bucketName;
private string _expectedBucketOwner;

/// <summary>
/// Gets and sets the property BucketName.
/// <para>
/// The general purpose bucket that you want to remove the metadata configuration from.
///
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string BucketName
{
get { return this._bucketName; }
set { this._bucketName = value; }
}

// Check to see if BucketName property is set
internal bool IsSetBucketName()
{
return this._bucketName != null;
}

/// <summary>
/// Gets and sets the property ExpectedBucketOwner.
/// <para>
/// The expected bucket owner of the general purpose bucket that you want to remove the
/// metadata table configuration from.
/// </para>
/// </summary>
public string ExpectedBucketOwner
{
get { return this._expectedBucketOwner; }
set { this._expectedBucketOwner = value; }
}

// Check to see if ExpectedBucketOwner property is set
internal bool IsSetExpectedBucketOwner()
{
return !String.IsNullOrEmpty(this._expectedBucketOwner);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations
/// <summary>
/// DeleteBucketMetadataConfiguration Request Marshaller
/// </summary>
public class DeleteBucketMetadataConfigurationRequestMarshaller : IMarshaller<IRequest, DeleteBucketMetadataConfigurationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
public partial class DeleteBucketMetadataConfigurationRequestMarshaller : IMarshaller<IRequest, DeleteBucketMetadataConfigurationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
Expand All @@ -56,6 +56,7 @@ public IRequest Marshall(AmazonWebServiceRequest input)
public IRequest Marshall(DeleteBucketMetadataConfigurationRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.S3");
PreMarshallCustomization(request, publicRequest);
request.HttpMethod = "DELETE";
request.AddSubResource("metadataConfiguration");

Expand All @@ -65,10 +66,9 @@ public IRequest Marshall(DeleteBucketMetadataConfigurationRequest publicRequest)
}
if (!publicRequest.IsSetBucketName())
throw new AmazonS3Exception("Request object does not have required field BucketName set");
request.AddPathResource("{Bucket}", StringUtils.FromString(publicRequest.BucketName));
request.ResourcePath = "/{Bucket}";

request.ResourcePath = "/";

PostMarshallCustomization(request, publicRequest);
return request;
}
private static DeleteBucketMetadataConfigurationRequestMarshaller _instance = new DeleteBucketMetadataConfigurationRequestMarshaller();
Expand All @@ -89,5 +89,7 @@ public static DeleteBucketMetadataConfigurationRequestMarshaller Instance
}
}

partial void PostMarshallCustomization(DefaultRequest defaultRequest, DeleteBucketMetadataConfigurationRequest publicRequest);
partial void PreMarshallCustomization(DefaultRequest defaultRequest, DeleteBucketMetadataConfigurationRequest publicRequest);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations
/// <summary>
/// Response Unmarshaller for DeleteBucketMetadataConfiguration operation
/// </summary>
public class DeleteBucketMetadataConfigurationResponseUnmarshaller : S3ReponseUnmarshaller
public partial class DeleteBucketMetadataConfigurationResponseUnmarshaller : S3ReponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
Expand All @@ -47,6 +47,7 @@ public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext conte
{
DeleteBucketMetadataConfigurationResponse response = new DeleteBucketMetadataConfigurationResponse();

PostUnmarshallCustomization(context, response);
return response;
}

Expand All @@ -60,7 +61,7 @@ public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext conte
/// <returns></returns>
public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = S3ErrorResponseUnmarshaller.Instance.Unmarshall(context);
S3ErrorResponse errorResponse = S3ErrorResponseUnmarshaller.Instance.Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;

Expand All @@ -70,11 +71,17 @@ public override AmazonServiceException UnmarshallException(XmlUnmarshallerContex
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
}
return new AmazonS3Exception(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
return base.ConstructS3Exception(context, errorResponse, innerException, statusCode);
}

partial void PostUnmarshallCustomization(XmlUnmarshallerContext context, DeleteBucketMetadataConfigurationResponse response);

private static DeleteBucketMetadataConfigurationResponseUnmarshaller _instance = new DeleteBucketMetadataConfigurationResponseUnmarshaller();

internal static DeleteBucketMetadataConfigurationResponseUnmarshaller GetInstance()
{
return _instance;
}

/// <summary>
/// Gets the singleton.
Expand Down
Loading