Skip to content

Commit 3ff1f7b

Browse files
Add Tags field to CreateAccessPoint
1 parent e7f5c37 commit 3ff1f7b

File tree

5 files changed

+54
-1
lines changed

5 files changed

+54
-1
lines changed

generator/ServiceModels/s3control/s3control-2018-08-20.api.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2107,7 +2107,8 @@
21072107
"VpcConfiguration":{"shape":"VpcConfiguration"},
21082108
"PublicAccessBlockConfiguration":{"shape":"PublicAccessBlockConfiguration"},
21092109
"BucketAccountId":{"shape":"AccountId"},
2110-
"Scope":{"shape":"Scope"}
2110+
"Scope":{"shape":"Scope"},
2111+
"Tags":{"shape":"TagList"}
21112112
}
21122113
},
21132114
"CreateAccessPointResult":{

generator/ServiceModels/s3control/s3control-2018-08-20.docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3291,6 +3291,7 @@
32913291
"CreateAccessGrantRequest$Tags": "<p>The Amazon Web Services resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources. </p>",
32923292
"CreateAccessGrantsInstanceRequest$Tags": "<p>The Amazon Web Services resource tags that you are adding to the S3 Access Grants instance. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources. </p>",
32933293
"CreateAccessGrantsLocationRequest$Tags": "<p>The Amazon Web Services resource tags that you are adding to the S3 Access Grants location. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.</p>",
3294+
"CreateAccessPointRequest$Tags": "<p>An array of tags that you can apply to an access point. Tags are key-value pairs of metadata used to control access to your access points. For more information about tags, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html\">Using tags with Amazon S3</a>. For information about tagging access points, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac\">Using tags for attribute-based access control (ABAC)</a>.</p>",
32943295
"CreateStorageLensGroupRequest$Tags": "<p> The Amazon Web Services resource tags that you're adding to your Storage Lens group. This parameter is optional. </p>",
32953296
"ListTagsForResourceResult$Tags": "<p> The Amazon Web Services resource tags that are associated with the resource. </p>",
32963297
"TagResourceRequest$Tags": "<p> The Amazon Web Services resource tags that you want to add to the specified S3 resource. </p>"

generator/ServiceModels/s3control/s3control-2018-08-20.normal.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,6 +2481,10 @@
24812481
"Scope":{
24822482
"shape":"Scope",
24832483
"documentation":"<p>For directory buckets, you can filter access control to specific prefixes, API operations, or a combination of both. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html\">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p> <note> <p>Scope is only supported for access points attached to directory buckets.</p> </note>"
2484+
},
2485+
"Tags":{
2486+
"shape":"TagList",
2487+
"documentation":"<p>An array of tags that you can apply to an access point. Tags are key-value pairs of metadata used to control access to your access points. For more information about tags, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html\">Using tags with Amazon S3</a>. For information about tagging access points, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac\">Using tags for attribute-based access control (ABAC)</a>.</p>"
24842488
}
24852489
}
24862490
},

sdk/src/Services/S3Control/Generated/Model/CreateAccessPointRequest.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public partial class CreateAccessPointRequest : AmazonS3ControlRequest
9797
private string _name;
9898
private PublicAccessBlockConfiguration _publicAccessBlockConfiguration;
9999
private Scope _scope;
100+
private List<Tag> _tags = AWSConfigs.InitializeCollections ? new List<Tag>() : null;
100101
private VpcConfiguration _vpcConfiguration;
101102

102103
/// <summary>
@@ -252,6 +253,34 @@ internal bool IsSetScope()
252253
return this._scope != null;
253254
}
254255

256+
/// <summary>
257+
/// Gets and sets the property Tags.
258+
/// <para>
259+
/// An array of tags that you can apply to an access point. Tags are key-value pairs of
260+
/// metadata used to control access to your access points. For more information about
261+
/// tags, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Using
262+
/// tags with Amazon S3</a>. For information about tagging access points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac">Using
263+
/// tags for attribute-based access control (ABAC)</a>.
264+
/// </para>
265+
/// <para />
266+
/// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
267+
/// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
268+
/// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
269+
/// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
270+
/// </summary>
271+
[AWSProperty(Min=0, Max=50)]
272+
public List<Tag> Tags
273+
{
274+
get { return this._tags; }
275+
set { this._tags = value; }
276+
}
277+
278+
// Check to see if Tags property is set
279+
internal bool IsSetTags()
280+
{
281+
return this._tags != null && (this._tags.Count > 0 || !AWSConfigs.InitializeCollections);
282+
}
283+
255284
/// <summary>
256285
/// Gets and sets the property VpcConfiguration.
257286
/// <para>

sdk/src/Services/S3Control/Generated/Model/Internal/MarshallTransformations/CreateAccessPointRequestMarshaller.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,24 @@ public IRequest Marshall(CreateAccessPointRequest publicRequest)
119119
}
120120
xmlWriter.WriteEndElement();
121121
}
122+
var publicRequestTags = publicRequest.Tags;
123+
if (publicRequestTags != null && (publicRequestTags.Count > 0 || !AWSConfigs.InitializeCollections))
124+
{
125+
xmlWriter.WriteStartElement("Tags");
126+
foreach (var publicRequestTagsValue in publicRequestTags)
127+
{
128+
if (publicRequestTagsValue != null)
129+
{
130+
xmlWriter.WriteStartElement("Tag");
131+
if(publicRequestTagsValue.IsSetKey())
132+
xmlWriter.WriteElementString("Key", StringUtils.FromString(publicRequestTagsValue.Key));
133+
if(publicRequestTagsValue.IsSetValue())
134+
xmlWriter.WriteElementString("Value", StringUtils.FromString(publicRequestTagsValue.Value));
135+
xmlWriter.WriteEndElement();
136+
}
137+
}
138+
xmlWriter.WriteEndElement();
139+
}
122140
if (publicRequest.VpcConfiguration != null)
123141
{
124142
xmlWriter.WriteStartElement("VpcConfiguration");

0 commit comments

Comments
 (0)