Skip to content

Commit d03ba7c

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

File tree

11 files changed

+37
-8
lines changed

11 files changed

+37
-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
@@ -114,6 +114,10 @@ public override AmazonServiceException UnmarshallException(JsonUnmarshallerConte
114114
{
115115
return OrganizationStateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
116116
}
117+
if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedOperationException"))
118+
{
119+
return UnsupportedOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
120+
}
117121
}
118122
return new AmazonWorkMailException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
119123
}

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/_bcl35/AmazonWorkMailClient.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5792,6 +5792,9 @@ public virtual RegisterMailDomainResponse EndRegisterMailDomain(IAsyncResult asy
57925792
/// The organization must have a valid state to perform certain operations on the organization
57935793
/// or its members.
57945794
/// </exception>
5795+
/// <exception cref="Amazon.WorkMail.Model.UnsupportedOperationException">
5796+
/// You can't perform a write operation against a read-only directory.
5797+
/// </exception>
57955798
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail">REST API Reference for RegisterToWorkMail Operation</seealso>
57965799
public virtual RegisterToWorkMailResponse RegisterToWorkMail(RegisterToWorkMailRequest request)
57975800
{

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

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

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6068,6 +6068,9 @@ public virtual RegisterMailDomainResponse RegisterMailDomain(RegisterMailDomainR
60686068
/// The organization must have a valid state to perform certain operations on the organization
60696069
/// or its members.
60706070
/// </exception>
6071+
/// <exception cref="Amazon.WorkMail.Model.UnsupportedOperationException">
6072+
/// You can't perform a write operation against a read-only directory.
6073+
/// </exception>
60716074
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail">REST API Reference for RegisterToWorkMail Operation</seealso>
60726075
public virtual RegisterToWorkMailResponse RegisterToWorkMail(RegisterToWorkMailRequest request)
60736076
{
@@ -6136,6 +6139,9 @@ public virtual RegisterToWorkMailResponse RegisterToWorkMail(RegisterToWorkMailR
61366139
/// The organization must have a valid state to perform certain operations on the organization
61376140
/// or its members.
61386141
/// </exception>
6142+
/// <exception cref="Amazon.WorkMail.Model.UnsupportedOperationException">
6143+
/// You can't perform a write operation against a read-only directory.
6144+
/// </exception>
61396145
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail">REST API Reference for RegisterToWorkMail Operation</seealso>
61406146
public virtual Task<RegisterToWorkMailResponse> RegisterToWorkMailAsync(RegisterToWorkMailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
61416147
{

sdk/src/Services/WorkMail/Generated/_bcl45/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
@@ -4270,6 +4270,9 @@ internal virtual RegisterToWorkMailResponse RegisterToWorkMail(RegisterToWorkMai
42704270
/// The organization must have a valid state to perform certain operations on the organization
42714271
/// or its members.
42724272
/// </exception>
4273+
/// <exception cref="Amazon.WorkMail.Model.UnsupportedOperationException">
4274+
/// You can't perform a write operation against a read-only directory.
4275+
/// </exception>
42734276
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail">REST API Reference for RegisterToWorkMail Operation</seealso>
42744277
public virtual Task<RegisterToWorkMailResponse> RegisterToWorkMailAsync(RegisterToWorkMailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
42754278
{

0 commit comments

Comments
 (0)