{ "smithy": "2.0", "metadata": { "suppressions": [ { "id": "HttpMethodSemantics", "namespace": "*" }, { "id": "HttpResponseCodeSemantics", "namespace": "*" }, { "id": "PaginatedTrait", "namespace": "*" }, { "id": "HttpHeaderTrait", "namespace": "*" }, { "id": "HttpUriConflict", "namespace": "*" }, { "id": "Service", "namespace": "*" } ] }, "shapes": { "com.amazonaws.workmailmessageflow#GetRawMessageContent": { "type": "operation", "input": { "target": "com.amazonaws.workmailmessageflow#GetRawMessageContentRequest" }, "output": { "target": "com.amazonaws.workmailmessageflow#GetRawMessageContentResponse" }, "errors": [ { "target": "com.amazonaws.workmailmessageflow#ResourceNotFoundException" } ], "traits": { "smithy.api#documentation": "

Retrieves the raw content of an in-transit email message, in MIME format.

", "smithy.api#http": { "method": "GET", "uri": "/messages/{messageId}", "code": 200 } } }, "com.amazonaws.workmailmessageflow#GetRawMessageContentRequest": { "type": "structure", "members": { "messageId": { "target": "com.amazonaws.workmailmessageflow#messageIdType", "traits": { "smithy.api#documentation": "

The identifier of the email message to retrieve.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } } }, "traits": { "smithy.api#input": {} } }, "com.amazonaws.workmailmessageflow#GetRawMessageContentResponse": { "type": "structure", "members": { "messageContent": { "target": "com.amazonaws.workmailmessageflow#messageContentBlob", "traits": { "smithy.api#documentation": "

The raw content of the email message, in MIME format.

", "smithy.api#httpPayload": {}, "smithy.api#required": {} } } }, "traits": { "smithy.api#output": {} } }, "com.amazonaws.workmailmessageflow#GiraffeMessageInTransitService": { "type": "service", "version": "2019-05-01", "operations": [ { "target": "com.amazonaws.workmailmessageflow#GetRawMessageContent" }, { "target": "com.amazonaws.workmailmessageflow#PutRawMessageContent" } ], "traits": { "aws.api#service": { "sdkId": "WorkMailMessageFlow", "arnNamespace": "workmailmessageflow", "cloudFormationName": "WorkMailMessageFlow", "cloudTrailEventSource": "workmailmessageflow.amazonaws.com", "endpointPrefix": "workmailmessageflow" }, "aws.auth#sigv4": { "name": "workmailmessageflow" }, "aws.protocols#restJson1": {}, "smithy.api#documentation": "

The WorkMail Message Flow API provides access to email messages as they are\n being\n sent and received by\n a\n WorkMail organization.

", "smithy.api#title": "Amazon WorkMail Message Flow", "smithy.rules#endpointBdd": { "version": "1.1", "parameters": { "Region": { "builtIn": "AWS::Region", "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "string" }, "UseDualStack": { "builtIn": "AWS::UseDualStack", "required": true, "default": false, "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", "type": "boolean" }, "UseFIPS": { "builtIn": "AWS::UseFIPS", "required": true, "default": false, "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", "type": "boolean" }, "Endpoint": { "builtIn": "SDK::Endpoint", "required": false, "documentation": "Override the endpoint used to send this request", "type": "string" } }, "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Endpoint" } ] }, { "fn": "isSet", "argv": [ { "ref": "Region" } ] }, { "fn": "aws.partition", "argv": [ { "ref": "Region" } ], "assign": "PartitionResult" }, { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] }, { "fn": "booleanEquals", "argv": [ { "ref": "UseDualStack" }, true ] }, { "fn": "booleanEquals", "argv": [ { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsDualStack" ] }, true ] }, { "fn": "booleanEquals", "argv": [ { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsFIPS" ] }, true ] } ], "results": [ { "conditions": [], "error": "Invalid Configuration: FIPS and custom endpoint are not supported", "type": "error" }, { "conditions": [], "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", "type": "error" }, { "conditions": [], "endpoint": { "url": { "ref": "Endpoint" }, "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "endpoint": { "url": "https://workmailmessageflow-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "error": "FIPS and DualStack are enabled, but this partition does not support one or both", "type": "error" }, { "conditions": [], "endpoint": { "url": "https://workmailmessageflow-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "error": "FIPS is enabled but this partition does not support FIPS", "type": "error" }, { "conditions": [], "endpoint": { "url": "https://workmailmessageflow.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "error": "DualStack is enabled but this partition does not support DualStack", "type": "error" }, { "conditions": [], "endpoint": { "url": "https://workmailmessageflow.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "error": "Invalid Configuration: Missing Region", "type": "error" } ], "root": 2, "nodeCount": 13, "nodes": "/////wAAAAH/////AAAAAAAAAAwAAAADAAAAAQAAAAQF9eELAAAAAgAAAAUF9eELAAAAAwAAAAgAAAAGAAAABAAAAAcF9eEKAAAABQX14QgF9eEJAAAABAAAAAoAAAAJAAAABgX14QYF9eEHAAAABQAAAAsF9eEFAAAABgX14QQF9eEFAAAAAwX14QEAAAANAAAABAX14QIF9eED" }, "smithy.rules#endpointRuleSet": { "version": "1.0", "parameters": { "Region": { "builtIn": "AWS::Region", "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "string" }, "UseDualStack": { "builtIn": "AWS::UseDualStack", "required": true, "default": false, "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", "type": "boolean" }, "UseFIPS": { "builtIn": "AWS::UseFIPS", "required": true, "default": false, "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", "type": "boolean" }, "Endpoint": { "builtIn": "SDK::Endpoint", "required": false, "documentation": "Override the endpoint used to send this request", "type": "string" } }, "rules": [ { "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Endpoint" } ] } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] } ], "error": "Invalid Configuration: FIPS and custom endpoint are not supported", "type": "error" }, { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseDualStack" }, true ] } ], "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", "type": "error" }, { "conditions": [], "endpoint": { "url": { "ref": "Endpoint" }, "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" }, { "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Region" } ] } ], "rules": [ { "conditions": [ { "fn": "aws.partition", "argv": [ { "ref": "Region" } ], "assign": "PartitionResult" } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] }, { "fn": "booleanEquals", "argv": [ { "ref": "UseDualStack" }, true ] } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ true, { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsFIPS" ] } ] }, { "fn": "booleanEquals", "argv": [ true, { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsDualStack" ] } ] } ], "rules": [ { "conditions": [], "endpoint": { "url": "https://workmailmessageflow-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" }, { "conditions": [], "error": "FIPS and DualStack are enabled, but this partition does not support one or both", "type": "error" } ], "type": "tree" }, { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsFIPS" ] }, true ] } ], "rules": [ { "conditions": [], "endpoint": { "url": "https://workmailmessageflow-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" }, { "conditions": [], "error": "FIPS is enabled but this partition does not support FIPS", "type": "error" } ], "type": "tree" }, { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseDualStack" }, true ] } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ true, { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, "supportsDualStack" ] } ] } ], "rules": [ { "conditions": [], "endpoint": { "url": "https://workmailmessageflow.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" }, { "conditions": [], "error": "DualStack is enabled but this partition does not support DualStack", "type": "error" } ], "type": "tree" }, { "conditions": [], "endpoint": { "url": "https://workmailmessageflow.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" } ], "type": "tree" }, { "conditions": [], "error": "Invalid Configuration: Missing Region", "type": "error" } ] }, "smithy.rules#endpointTests": { "testCases": [ { "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://workmailmessageflow-fips.us-east-1.api.aws" } }, "params": { "Region": "us-east-1", "UseFIPS": true, "UseDualStack": true } }, { "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { "url": "https://workmailmessageflow-fips.us-east-1.amazonaws.com" } }, "params": { "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false } }, { "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://workmailmessageflow.us-east-1.api.aws" } }, "params": { "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true } }, { "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "url": "https://workmailmessageflow.us-east-1.amazonaws.com" } }, "params": { "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false } }, { "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://workmailmessageflow-fips.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { "Region": "cn-north-1", "UseFIPS": true, "UseDualStack": true } }, { "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { "url": "https://workmailmessageflow-fips.cn-north-1.amazonaws.com.cn" } }, "params": { "Region": "cn-north-1", "UseFIPS": true, "UseDualStack": false } }, { "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://workmailmessageflow.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { "Region": "cn-north-1", "UseFIPS": false, "UseDualStack": true } }, { "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "url": "https://workmailmessageflow.cn-north-1.amazonaws.com.cn" } }, "params": { "Region": "cn-north-1", "UseFIPS": false, "UseDualStack": false } }, { "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://workmailmessageflow-fips.us-gov-east-1.api.aws" } }, "params": { "Region": "us-gov-east-1", "UseFIPS": true, "UseDualStack": true } }, { "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { "url": "https://workmailmessageflow-fips.us-gov-east-1.amazonaws.com" } }, "params": { "Region": "us-gov-east-1", "UseFIPS": true, "UseDualStack": false } }, { "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://workmailmessageflow.us-gov-east-1.api.aws" } }, "params": { "Region": "us-gov-east-1", "UseFIPS": false, "UseDualStack": true } }, { "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "url": "https://workmailmessageflow.us-gov-east-1.amazonaws.com" } }, "params": { "Region": "us-gov-east-1", "UseFIPS": false, "UseDualStack": false } }, { "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { "url": "https://workmailmessageflow-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { "Region": "us-iso-east-1", "UseFIPS": true, "UseDualStack": false } }, { "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "url": "https://workmailmessageflow.us-iso-east-1.c2s.ic.gov" } }, "params": { "Region": "us-iso-east-1", "UseFIPS": false, "UseDualStack": false } }, { "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { "url": "https://workmailmessageflow-fips.us-isob-east-1.sc2s.sgov.gov" } }, "params": { "Region": "us-isob-east-1", "UseFIPS": true, "UseDualStack": false } }, { "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "url": "https://workmailmessageflow.us-isob-east-1.sc2s.sgov.gov" } }, "params": { "Region": "us-isob-east-1", "UseFIPS": false, "UseDualStack": false } }, { "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } }, { "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } }, { "documentation": "For custom endpoint with fips enabled and dualstack disabled", "expect": { "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, "Endpoint": "https://example.com" } }, { "documentation": "For custom endpoint with fips disabled and dualstack enabled", "expect": { "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, "Endpoint": "https://example.com" } }, { "documentation": "Missing region", "expect": { "error": "Invalid Configuration: Missing Region" } } ], "version": "1.0" } } }, "com.amazonaws.workmailmessageflow#InvalidContentLocation": { "type": "structure", "members": { "message": { "target": "com.amazonaws.workmailmessageflow#errorMessage" } }, "traits": { "smithy.api#documentation": "

WorkMail could not access the updated email content. Possible reasons:

\n ", "smithy.api#error": "client" } }, "com.amazonaws.workmailmessageflow#MessageFrozen": { "type": "structure", "members": { "message": { "target": "com.amazonaws.workmailmessageflow#errorMessage" } }, "traits": { "smithy.api#documentation": "

The requested email is not eligible for update. This is usually the case for a redirected email.

", "smithy.api#error": "client" } }, "com.amazonaws.workmailmessageflow#MessageRejected": { "type": "structure", "members": { "message": { "target": "com.amazonaws.workmailmessageflow#errorMessage" } }, "traits": { "smithy.api#documentation": "

The requested email could not be updated due to an error in the MIME content. Check the error message for more information about \n what caused the error.

", "smithy.api#error": "client" } }, "com.amazonaws.workmailmessageflow#PutRawMessageContent": { "type": "operation", "input": { "target": "com.amazonaws.workmailmessageflow#PutRawMessageContentRequest" }, "output": { "target": "com.amazonaws.workmailmessageflow#PutRawMessageContentResponse" }, "errors": [ { "target": "com.amazonaws.workmailmessageflow#InvalidContentLocation" }, { "target": "com.amazonaws.workmailmessageflow#MessageFrozen" }, { "target": "com.amazonaws.workmailmessageflow#MessageRejected" }, { "target": "com.amazonaws.workmailmessageflow#ResourceNotFoundException" } ], "traits": { "smithy.api#documentation": "

Updates the raw content of an in-transit email message, in MIME format.

\n

This example describes how to update in-transit email message. For more information and examples for using this API, see \n \n Updating message content with AWS Lambda.

\n \n

Updates to an in-transit message only appear when you call PutRawMessageContent from an AWS Lambda function \n configured with a synchronous \n Run Lambda rule. If you call PutRawMessageContent on a delivered or sent message, the message remains unchanged,\n even though GetRawMessageContent returns an updated \n message.\n

\n
", "smithy.api#http": { "method": "POST", "uri": "/messages/{messageId}", "code": 200 } } }, "com.amazonaws.workmailmessageflow#PutRawMessageContentRequest": { "type": "structure", "members": { "messageId": { "target": "com.amazonaws.workmailmessageflow#messageIdType", "traits": { "smithy.api#documentation": "

The identifier of the email message being updated.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, "content": { "target": "com.amazonaws.workmailmessageflow#RawMessageContent", "traits": { "smithy.api#documentation": "

Describes the raw message content of the updated email message.

", "smithy.api#required": {} } } }, "traits": { "smithy.api#input": {} } }, "com.amazonaws.workmailmessageflow#PutRawMessageContentResponse": { "type": "structure", "members": {}, "traits": { "smithy.api#output": {} } }, "com.amazonaws.workmailmessageflow#RawMessageContent": { "type": "structure", "members": { "s3Reference": { "target": "com.amazonaws.workmailmessageflow#S3Reference", "traits": { "smithy.api#documentation": "

The S3 reference of an email message.

", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "

Provides the MIME content of the updated email message as an S3 object. All MIME content must meet the following criteria:

\n " } }, "com.amazonaws.workmailmessageflow#ResourceNotFoundException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.workmailmessageflow#errorMessage" } }, "traits": { "smithy.api#documentation": "

The requested email message is not found.

", "smithy.api#error": "client", "smithy.api#httpError": 404 } }, "com.amazonaws.workmailmessageflow#S3Reference": { "type": "structure", "members": { "bucket": { "target": "com.amazonaws.workmailmessageflow#s3BucketIdType", "traits": { "smithy.api#documentation": "

The S3 bucket name.

", "smithy.api#required": {} } }, "key": { "target": "com.amazonaws.workmailmessageflow#s3KeyIdType", "traits": { "smithy.api#documentation": "

The S3 key object name.

", "smithy.api#required": {} } }, "objectVersion": { "target": "com.amazonaws.workmailmessageflow#s3VersionType", "traits": { "smithy.api#documentation": "

If you enable versioning for the bucket, you can specify the object version.

" } } }, "traits": { "smithy.api#documentation": "

Amazon S3 object representing the updated message content, in MIME format.

\n \n

The region for the S3 bucket containing the S3 object must match the region used for WorkMail operations. Also, for WorkMail to process \n an S3 object, it must have permission to access that object. For more information, see \n \n Updating message content with AWS Lambda.

\n
" } }, "com.amazonaws.workmailmessageflow#errorMessage": { "type": "string" }, "com.amazonaws.workmailmessageflow#messageContentBlob": { "type": "blob", "traits": { "smithy.api#streaming": {} } }, "com.amazonaws.workmailmessageflow#messageIdType": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 120 }, "smithy.api#pattern": "^[a-z0-9\\-]*$" } }, "com.amazonaws.workmailmessageflow#s3BucketIdType": { "type": "string", "traits": { "smithy.api#length": { "min": 3, "max": 63 }, "smithy.api#pattern": "^[a-z0-9][a-z0-9\\-]*$" } }, "com.amazonaws.workmailmessageflow#s3KeyIdType": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 1024 }, "smithy.api#pattern": "^[a-zA-Z0-9\\-/]*$" } }, "com.amazonaws.workmailmessageflow#s3VersionType": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 1024 }, "smithy.api#pattern": "^.+$" } } } }