Skip to content

Commit e6ba79b

Browse files
Make RoleArn an optional parameter for the PutEmailMonitoringConfiguration API, and add UnsupportedOperationException to RegisterToWorkMail.
1 parent 5a13e67 commit e6ba79b

File tree

9 files changed

+31
-8
lines changed

9 files changed

+31
-8
lines changed

generator/ServiceModels/workmail/workmail-2017-10-01.api.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,8 @@
12711271
{"shape":"MailDomainNotFoundException"},
12721272
{"shape":"MailDomainStateException"},
12731273
{"shape":"OrganizationNotFoundException"},
1274-
{"shape":"OrganizationStateException"}
1274+
{"shape":"OrganizationStateException"},
1275+
{"shape":"UnsupportedOperationException"}
12751276
],
12761277
"idempotent":true
12771278
},
@@ -3853,7 +3854,6 @@
38533854
"type":"structure",
38543855
"required":[
38553856
"OrganizationId",
3856-
"RoleArn",
38573857
"LogGroupArn"
38583858
],
38593859
"members":{

generator/ServiceModels/workmail/workmail-2017-10-01.docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,7 @@
20312031
"refs": {
20322032
"DescribeEmailMonitoringConfigurationResponse$RoleArn": "<p>The Amazon Resource Name (ARN) of the IAM Role associated with the email monitoring configuration.</p>",
20332033
"DescribeMailboxExportJobResponse$RoleArn": "<p>The ARN of the AWS Identity and Access Management (IAM) role that grants write permission to the Amazon Simple Storage Service (Amazon S3) bucket.</p>",
2034-
"PutEmailMonitoringConfigurationRequest$RoleArn": "<p>The Amazon Resource Name (ARN) of the IAM Role associated with the email monitoring configuration.</p>",
2034+
"PutEmailMonitoringConfigurationRequest$RoleArn": "<p>The Amazon Resource Name (ARN) of the IAM Role associated with the email monitoring configuration. If absent, the IAM Role Arn of AWSServiceRoleForAmazonWorkMailEvents will be used.</p>",
20352035
"StartMailboxExportJobRequest$RoleArn": "<p>The ARN of the AWS Identity and Access Management (IAM) role that grants write permission to the S3 bucket.</p>"
20362036
}
20372037
},

generator/ServiceModels/workmail/workmail-2017-10-01.normal.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,8 @@
13481348
{"shape":"MailDomainNotFoundException"},
13491349
{"shape":"MailDomainStateException"},
13501350
{"shape":"OrganizationNotFoundException"},
1351-
{"shape":"OrganizationStateException"}
1351+
{"shape":"OrganizationStateException"},
1352+
{"shape":"UnsupportedOperationException"}
13521353
],
13531354
"documentation":"<p>Registers an existing and disabled user, group, or resource for WorkMail use by associating a mailbox and calendaring capabilities. It performs no change if the user, group, or resource is enabled and fails if the user, group, or resource is deleted. This operation results in the accumulation of costs. For more information, see <a href=\"https://aws.amazon.com/workmail/pricing\">Pricing</a>. The equivalent console functionality for this operation is <i>Enable</i>.</p> <p>Users can either be created by calling the <a>CreateUser</a> API operation or they can be synchronized from your directory. For more information, see <a>DeregisterFromWorkMail</a>.</p>",
13541355
"idempotent":true
@@ -5484,7 +5485,6 @@
54845485
"type":"structure",
54855486
"required":[
54865487
"OrganizationId",
5487-
"RoleArn",
54885488
"LogGroupArn"
54895489
],
54905490
"members":{
@@ -5494,7 +5494,7 @@
54945494
},
54955495
"RoleArn":{
54965496
"shape":"RoleArn",
5497-
"documentation":"<p>The Amazon Resource Name (ARN) of the IAM Role associated with the email monitoring configuration.</p>"
5497+
"documentation":"<p>The Amazon Resource Name (ARN) of the IAM Role associated with the email monitoring configuration. If absent, the IAM Role Arn of AWSServiceRoleForAmazonWorkMailEvents will be used.</p>"
54985498
},
54995499
"LogGroupArn":{
55005500
"shape":"LogGroupArn",

sdk/src/Services/WorkMail/Generated/Model/Internal/MarshallTransformations/RegisterToWorkMailResponseUnmarshaller.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ public override AmazonServiceException UnmarshallException(JsonUnmarshallerConte
115115
{
116116
return OrganizationStateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
117117
}
118+
if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedOperationException"))
119+
{
120+
return UnsupportedOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
121+
}
118122
}
119123
return new AmazonWorkMailException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
120124
}

sdk/src/Services/WorkMail/Generated/Model/PutEmailMonitoringConfigurationRequest.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ internal bool IsSetOrganizationId()
8282
/// Gets and sets the property RoleArn.
8383
/// <para>
8484
/// The Amazon Resource Name (ARN) of the IAM Role associated with the email monitoring
85-
/// configuration.
85+
/// configuration. If absent, the IAM Role Arn of AWSServiceRoleForAmazonWorkMailEvents
86+
/// will be used.
8687
/// </para>
8788
/// </summary>
88-
[AWSProperty(Required=true, Min=20, Max=2048)]
89+
[AWSProperty(Min=20, Max=2048)]
8990
public string RoleArn
9091
{
9192
get { return this._roleArn; }

sdk/src/Services/WorkMail/Generated/_bcl/AmazonWorkMailClient.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6063,6 +6063,9 @@ public virtual RegisterMailDomainResponse RegisterMailDomain(RegisterMailDomainR
60636063
/// The organization must have a valid state to perform certain operations on the organization
60646064
/// or its members.
60656065
/// </exception>
6066+
/// <exception cref="Amazon.WorkMail.Model.UnsupportedOperationException">
6067+
/// You can't perform a write operation against a read-only directory.
6068+
/// </exception>
60666069
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail">REST API Reference for RegisterToWorkMail Operation</seealso>
60676070
public virtual RegisterToWorkMailResponse RegisterToWorkMail(RegisterToWorkMailRequest request)
60686071
{
@@ -6131,6 +6134,9 @@ public virtual RegisterToWorkMailResponse RegisterToWorkMail(RegisterToWorkMailR
61316134
/// The organization must have a valid state to perform certain operations on the organization
61326135
/// or its members.
61336136
/// </exception>
6137+
/// <exception cref="Amazon.WorkMail.Model.UnsupportedOperationException">
6138+
/// You can't perform a write operation against a read-only directory.
6139+
/// </exception>
61346140
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail">REST API Reference for RegisterToWorkMail Operation</seealso>
61356141
public virtual Task<RegisterToWorkMailResponse> RegisterToWorkMailAsync(RegisterToWorkMailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
61366142
{

sdk/src/Services/WorkMail/Generated/_bcl/IAmazonWorkMail.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4846,6 +4846,9 @@ public partial interface IAmazonWorkMail : IAmazonService, IDisposable
48464846
/// The organization must have a valid state to perform certain operations on the organization
48474847
/// or its members.
48484848
/// </exception>
4849+
/// <exception cref="Amazon.WorkMail.Model.UnsupportedOperationException">
4850+
/// You can't perform a write operation against a read-only directory.
4851+
/// </exception>
48494852
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail">REST API Reference for RegisterToWorkMail Operation</seealso>
48504853
RegisterToWorkMailResponse RegisterToWorkMail(RegisterToWorkMailRequest request);
48514854

@@ -4908,6 +4911,9 @@ public partial interface IAmazonWorkMail : IAmazonService, IDisposable
49084911
/// The organization must have a valid state to perform certain operations on the organization
49094912
/// or its members.
49104913
/// </exception>
4914+
/// <exception cref="Amazon.WorkMail.Model.UnsupportedOperationException">
4915+
/// You can't perform a write operation against a read-only directory.
4916+
/// </exception>
49114917
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail">REST API Reference for RegisterToWorkMail Operation</seealso>
49124918
Task<RegisterToWorkMailResponse> RegisterToWorkMailAsync(RegisterToWorkMailRequest request, CancellationToken cancellationToken = default(CancellationToken));
49134919

sdk/src/Services/WorkMail/Generated/_netstandard/AmazonWorkMailClient.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4188,6 +4188,9 @@ internal virtual RegisterToWorkMailResponse RegisterToWorkMail(RegisterToWorkMai
41884188
/// The organization must have a valid state to perform certain operations on the organization
41894189
/// or its members.
41904190
/// </exception>
4191+
/// <exception cref="Amazon.WorkMail.Model.UnsupportedOperationException">
4192+
/// You can't perform a write operation against a read-only directory.
4193+
/// </exception>
41914194
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail">REST API Reference for RegisterToWorkMail Operation</seealso>
41924195
public virtual Task<RegisterToWorkMailResponse> RegisterToWorkMailAsync(RegisterToWorkMailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
41934196
{

sdk/src/Services/WorkMail/Generated/_netstandard/IAmazonWorkMail.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2804,6 +2804,9 @@ public partial interface IAmazonWorkMail : IAmazonService, IDisposable
28042804
/// The organization must have a valid state to perform certain operations on the organization
28052805
/// or its members.
28062806
/// </exception>
2807+
/// <exception cref="Amazon.WorkMail.Model.UnsupportedOperationException">
2808+
/// You can't perform a write operation against a read-only directory.
2809+
/// </exception>
28072810
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail">REST API Reference for RegisterToWorkMail Operation</seealso>
28082811
Task<RegisterToWorkMailResponse> RegisterToWorkMailAsync(RegisterToWorkMailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
28092812

0 commit comments

Comments
 (0)