Skip to content

Commit c7723f9

Browse files
Updating GetDataAccess response for S3 Access Grants to include the matched Grantee for the requested prefix
1 parent 0404dec commit c7723f9

File tree

5 files changed

+35
-1
lines changed

5 files changed

+35
-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
@@ -3416,7 +3416,8 @@
34163416
"type":"structure",
34173417
"members":{
34183418
"Credentials":{"shape":"Credentials"},
3419-
"MatchedGrantTarget":{"shape":"S3Prefix"}
3419+
"MatchedGrantTarget":{"shape":"S3Prefix"},
3420+
"Grantee":{"shape":"Grantee"}
34203421
}
34213422
},
34223423
"GetJobTaggingRequest":{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,6 +1336,7 @@
13361336
"CreateAccessGrantRequest$Grantee": "<p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added your corporate directory to Amazon Web Services IAM Identity Center and associated your Identity Center instance with your S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p>",
13371337
"CreateAccessGrantResult$Grantee": "<p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added your corporate directory to Amazon Web Services IAM Identity Center and associated your Identity Center instance with your S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p>",
13381338
"GetAccessGrantResult$Grantee": "<p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added a corporate directory to Amazon Web Services IAM Identity Center and associated this Identity Center instance with the S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p>",
1339+
"GetDataAccessResult$Grantee": "<p>The user, group, or role that was granted access to the S3 location scope. For directory identities, this API also returns the grants of the IAM role used for the identity-aware request. For more information on identity-aware sessions, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_sts-setcontext.html\">Granting permissions to use identity-aware console sessions</a>. </p>",
13391340
"ListAccessGrantEntry$Grantee": "<p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added your corporate directory to Amazon Web Services IAM Identity Center and associated your Identity Center instance with your S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p>"
13401341
}
13411342
},

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4165,6 +4165,10 @@
41654165
"MatchedGrantTarget":{
41664166
"shape":"S3Prefix",
41674167
"documentation":"<p>The S3 URI path of the data to which you are being granted temporary access credentials. </p>"
4168+
},
4169+
"Grantee":{
4170+
"shape":"Grantee",
4171+
"documentation":"<p>The user, group, or role that was granted access to the S3 location scope. For directory identities, this API also returns the grants of the IAM role used for the identity-aware request. For more information on identity-aware sessions, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_sts-setcontext.html\">Granting permissions to use identity-aware console sessions</a>. </p>"
41684172
}
41694173
}
41704174
},

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace Amazon.S3Control.Model
3535
public partial class GetDataAccessResponse : AmazonWebServiceResponse
3636
{
3737
private Credentials _credentials;
38+
private Grantee _grantee;
3839
private string _matchedGrantTarget;
3940

4041
/// <summary>
@@ -56,6 +57,27 @@ internal bool IsSetCredentials()
5657
return this._credentials != null;
5758
}
5859

60+
/// <summary>
61+
/// Gets and sets the property Grantee.
62+
/// <para>
63+
/// The user, group, or role that was granted access to the S3 location scope. For directory
64+
/// identities, this API also returns the grants of the IAM role used for the identity-aware
65+
/// request. For more information on identity-aware sessions, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_sts-setcontext.html">Granting
66+
/// permissions to use identity-aware console sessions</a>.
67+
/// </para>
68+
/// </summary>
69+
public Grantee Grantee
70+
{
71+
get { return this._grantee; }
72+
set { this._grantee = value; }
73+
}
74+
75+
// Check to see if Grantee property is set
76+
internal bool IsSetGrantee()
77+
{
78+
return this._grantee != null;
79+
}
80+
5981
/// <summary>
6082
/// Gets and sets the property MatchedGrantTarget.
6183
/// <para>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ private static void UnmarshallResult(XmlUnmarshallerContext context, GetDataAcce
7171
response.Credentials = unmarshaller.Unmarshall(context);
7272
continue;
7373
}
74+
if (context.TestExpression("Grantee", targetDepth))
75+
{
76+
var unmarshaller = GranteeUnmarshaller.Instance;
77+
response.Grantee = unmarshaller.Unmarshall(context);
78+
continue;
79+
}
7480
if (context.TestExpression("MatchedGrantTarget", targetDepth))
7581
{
7682
var unmarshaller = StringUnmarshaller.Instance;

0 commit comments

Comments
 (0)