From a6e96bbc91ee01b168317bb050f8058cd71865a8 Mon Sep 17 00:00:00 2001 From: AWS SDK Swift Automation Date: Mon, 14 Oct 2024 18:51:45 +0000 Subject: [PATCH] chore: Updates version to 1.0.19 --- Package.version | 2 +- Package.version.next | 2 +- .../Sources/AWSCodePipeline/Models.swift | 178 +++++- .../Sources/AWSMailManager/Models.swift | 150 ++++- .../Sources/AWSSecurityLake/Models.swift | 70 +-- .../AWSSecurityLake/SecurityLakeClient.swift | 20 +- .../Sources/AWSSupplyChain/Models.swift | 542 ++++++++++++++++++ .../AWSSupplyChain/SupplyChainClient.swift | 368 ++++++++++++ .../Sources/AWSTransfer/Models.swift | 191 +++++- .../Sources/AWSTransfer/Paginators.swift | 32 ++ .../Sources/AWSTransfer/TransferClient.swift | 73 +++ 11 files changed, 1542 insertions(+), 86 deletions(-) diff --git a/Package.version b/Package.version index c678b02c1ad..e7ad390ee29 100644 --- a/Package.version +++ b/Package.version @@ -1 +1 @@ -1.0.18 \ No newline at end of file +1.0.19 \ No newline at end of file diff --git a/Package.version.next b/Package.version.next index e7ad390ee29..450f88ee2c4 100644 --- a/Package.version.next +++ b/Package.version.next @@ -1 +1 @@ -1.0.19 \ No newline at end of file +1.0.20 \ No newline at end of file diff --git a/Sources/Services/AWSCodePipeline/Sources/AWSCodePipeline/Models.swift b/Sources/Services/AWSCodePipeline/Sources/AWSCodePipeline/Models.swift index 705a270cf87..cca54c61d18 100644 --- a/Sources/Services/AWSCodePipeline/Sources/AWSCodePipeline/Models.swift +++ b/Sources/Services/AWSCodePipeline/Sources/AWSCodePipeline/Models.swift @@ -1844,13 +1844,17 @@ extension CodePipelineClientTypes { public enum Result: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { case fail + case retry case rollback + case skip case sdkUnknown(Swift.String) public static var allCases: [Result] { return [ .fail, - .rollback + .retry, + .rollback, + .skip ] } @@ -1862,7 +1866,9 @@ extension CodePipelineClientTypes { public var rawValue: Swift.String { switch self { case .fail: return "FAIL" + case .retry: return "RETRY" case .rollback: return "ROLLBACK" + case .skip: return "SKIP" case let .sdkUnknown(s): return s } } @@ -2447,6 +2453,51 @@ extension CodePipelineClientTypes { } } +extension CodePipelineClientTypes { + + public enum StageRetryMode: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case allActions + case failedActions + case sdkUnknown(Swift.String) + + public static var allCases: [StageRetryMode] { + return [ + .allActions, + .failedActions + ] + } + + public init?(rawValue: Swift.String) { + let value = Self.allCases.first(where: { $0.rawValue == rawValue }) + self = value ?? Self.sdkUnknown(rawValue) + } + + public var rawValue: Swift.String { + switch self { + case .allActions: return "ALL_ACTIONS" + case .failedActions: return "FAILED_ACTIONS" + case let .sdkUnknown(s): return s + } + } + } +} + +extension CodePipelineClientTypes { + + /// The retry configuration specifies automatic retry for a failed stage, along with the configured retry mode. + public struct RetryConfiguration: Swift.Sendable { + /// The method that you want to configure for automatic stage retry on stage failure. You can specify to retry only failed action in the stage or all actions in the stage. + public var retryMode: CodePipelineClientTypes.StageRetryMode? + + public init( + retryMode: CodePipelineClientTypes.StageRetryMode? = nil + ) + { + self.retryMode = retryMode + } + } +} + extension CodePipelineClientTypes { /// The configuration that specifies the result, such as rollback, to occur upon stage failure. @@ -2455,14 +2506,18 @@ extension CodePipelineClientTypes { public var conditions: [CodePipelineClientTypes.Condition]? /// The specified result for when the failure conditions are met, such as rolling back the stage. public var result: CodePipelineClientTypes.Result? + /// The retry configuration specifies automatic retry for a failed stage, along with the configured retry mode. + public var retryConfiguration: CodePipelineClientTypes.RetryConfiguration? public init( conditions: [CodePipelineClientTypes.Condition]? = nil, - result: CodePipelineClientTypes.Result? = nil + result: CodePipelineClientTypes.Result? = nil, + retryConfiguration: CodePipelineClientTypes.RetryConfiguration? = nil ) { self.conditions = conditions self.result = result + self.retryConfiguration = retryConfiguration } } } @@ -3959,6 +4014,7 @@ extension CodePipelineClientTypes { case cancelled case failed case inprogress + case skipped case stopped case stopping case succeeded @@ -3969,6 +4025,7 @@ extension CodePipelineClientTypes { .cancelled, .failed, .inprogress, + .skipped, .stopped, .stopping, .succeeded @@ -3985,6 +4042,7 @@ extension CodePipelineClientTypes { case .cancelled: return "Cancelled" case .failed: return "Failed" case .inprogress: return "InProgress" + case .skipped: return "Skipped" case .stopped: return "Stopped" case .stopping: return "Stopping" case .succeeded: return "Succeeded" @@ -4048,6 +4106,59 @@ extension CodePipelineClientTypes { } } +extension CodePipelineClientTypes { + + public enum RetryTrigger: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case automatedstageretry + case manualstageretry + case sdkUnknown(Swift.String) + + public static var allCases: [RetryTrigger] { + return [ + .automatedstageretry, + .manualstageretry + ] + } + + public init?(rawValue: Swift.String) { + let value = Self.allCases.first(where: { $0.rawValue == rawValue }) + self = value ?? Self.sdkUnknown(rawValue) + } + + public var rawValue: Swift.String { + switch self { + case .automatedstageretry: return "AutomatedStageRetry" + case .manualstageretry: return "ManualStageRetry" + case let .sdkUnknown(s): return s + } + } + } +} + +extension CodePipelineClientTypes { + + /// The details of a specific automatic retry on stage failure, including the attempt number and trigger. + public struct RetryStageMetadata: Swift.Sendable { + /// The number of attempts for a specific stage with automatic retry on stage failure. One attempt is allowed for automatic stage retry on failure. + public var autoStageRetryAttempt: Swift.Int? + /// The latest trigger for a specific stage where manual or automatic retries have been made upon stage failure. + public var latestRetryTrigger: CodePipelineClientTypes.RetryTrigger? + /// The number of attempts for a specific stage where manual retries have been made upon stage failure. + public var manualStageRetryAttempt: Swift.Int? + + public init( + autoStageRetryAttempt: Swift.Int? = nil, + latestRetryTrigger: CodePipelineClientTypes.RetryTrigger? = nil, + manualStageRetryAttempt: Swift.Int? = nil + ) + { + self.autoStageRetryAttempt = autoStageRetryAttempt + self.latestRetryTrigger = latestRetryTrigger + self.manualStageRetryAttempt = manualStageRetryAttempt + } + } +} + extension CodePipelineClientTypes { /// Represents information about the state of the stage. @@ -4068,6 +4179,8 @@ extension CodePipelineClientTypes { public var onFailureConditionState: CodePipelineClientTypes.StageConditionState? /// The state of the success conditions for a stage. public var onSuccessConditionState: CodePipelineClientTypes.StageConditionState? + /// he details of a specific automatic retry on stage failure, including the attempt number and trigger. + public var retryStageMetadata: CodePipelineClientTypes.RetryStageMetadata? /// The name of the stage. public var stageName: Swift.String? @@ -4080,6 +4193,7 @@ extension CodePipelineClientTypes { latestExecution: CodePipelineClientTypes.StageExecution? = nil, onFailureConditionState: CodePipelineClientTypes.StageConditionState? = nil, onSuccessConditionState: CodePipelineClientTypes.StageConditionState? = nil, + retryStageMetadata: CodePipelineClientTypes.RetryStageMetadata? = nil, stageName: Swift.String? = nil ) { @@ -4091,6 +4205,7 @@ extension CodePipelineClientTypes { self.latestExecution = latestExecution self.onFailureConditionState = onFailureConditionState self.onSuccessConditionState = onSuccessConditionState + self.retryStageMetadata = retryStageMetadata self.stageName = stageName } } @@ -6047,35 +6162,6 @@ public struct StageNotRetryableException: ClientRuntime.ModeledError, AWSClientR } } -extension CodePipelineClientTypes { - - public enum StageRetryMode: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { - case allActions - case failedActions - case sdkUnknown(Swift.String) - - public static var allCases: [StageRetryMode] { - return [ - .allActions, - .failedActions - ] - } - - public init?(rawValue: Swift.String) { - let value = Self.allCases.first(where: { $0.rawValue == rawValue }) - self = value ?? Self.sdkUnknown(rawValue) - } - - public var rawValue: Swift.String { - switch self { - case .allActions: return "ALL_ACTIONS" - case .failedActions: return "FAILED_ACTIONS" - case let .sdkUnknown(s): return s - } - } - } -} - /// Represents the input of a RetryStageExecution action. public struct RetryStageExecutionInput: Swift.Sendable { /// The ID of the pipeline execution in the failed stage to be retried. Use the [GetPipelineState] action to retrieve the current pipelineExecutionId of the failed stage @@ -9377,17 +9463,34 @@ extension CodePipelineClientTypes.FailureConditions { guard let value else { return } try writer["conditions"].writeList(value.conditions, memberWritingClosure: CodePipelineClientTypes.Condition.write(value:to:), memberNodeInfo: "member", isFlattened: false) try writer["result"].write(value.result) + try writer["retryConfiguration"].write(value.retryConfiguration, with: CodePipelineClientTypes.RetryConfiguration.write(value:to:)) } static func read(from reader: SmithyJSON.Reader) throws -> CodePipelineClientTypes.FailureConditions { guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } var value = CodePipelineClientTypes.FailureConditions() value.result = try reader["result"].readIfPresent() + value.retryConfiguration = try reader["retryConfiguration"].readIfPresent(with: CodePipelineClientTypes.RetryConfiguration.read(from:)) value.conditions = try reader["conditions"].readListIfPresent(memberReadingClosure: CodePipelineClientTypes.Condition.read(from:), memberNodeInfo: "member", isFlattened: false) return value } } +extension CodePipelineClientTypes.RetryConfiguration { + + static func write(value: CodePipelineClientTypes.RetryConfiguration?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["retryMode"].write(value.retryMode) + } + + static func read(from reader: SmithyJSON.Reader) throws -> CodePipelineClientTypes.RetryConfiguration { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = CodePipelineClientTypes.RetryConfiguration() + value.retryMode = try reader["retryMode"].readIfPresent() + return value + } +} + extension CodePipelineClientTypes.ActionDeclaration { static func write(value: CodePipelineClientTypes.ActionDeclaration?, to writer: SmithyJSON.Writer) throws { @@ -9907,6 +10010,19 @@ extension CodePipelineClientTypes.StageState { value.beforeEntryConditionState = try reader["beforeEntryConditionState"].readIfPresent(with: CodePipelineClientTypes.StageConditionState.read(from:)) value.onSuccessConditionState = try reader["onSuccessConditionState"].readIfPresent(with: CodePipelineClientTypes.StageConditionState.read(from:)) value.onFailureConditionState = try reader["onFailureConditionState"].readIfPresent(with: CodePipelineClientTypes.StageConditionState.read(from:)) + value.retryStageMetadata = try reader["retryStageMetadata"].readIfPresent(with: CodePipelineClientTypes.RetryStageMetadata.read(from:)) + return value + } +} + +extension CodePipelineClientTypes.RetryStageMetadata { + + static func read(from reader: SmithyJSON.Reader) throws -> CodePipelineClientTypes.RetryStageMetadata { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = CodePipelineClientTypes.RetryStageMetadata() + value.autoStageRetryAttempt = try reader["autoStageRetryAttempt"].readIfPresent() + value.manualStageRetryAttempt = try reader["manualStageRetryAttempt"].readIfPresent() + value.latestRetryTrigger = try reader["latestRetryTrigger"].readIfPresent() return value } } diff --git a/Sources/Services/AWSMailManager/Sources/AWSMailManager/Models.swift b/Sources/Services/AWSMailManager/Sources/AWSMailManager/Models.swift index ead359a0096..7394c642c14 100644 --- a/Sources/Services/AWSMailManager/Sources/AWSMailManager/Models.swift +++ b/Sources/Services/AWSMailManager/Sources/AWSMailManager/Models.swift @@ -749,6 +749,8 @@ extension MailManagerClientTypes { public enum ArchiveStringEmailAttribute: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { case cc + case envelopeFrom + case envelopeTo case from case subject case to @@ -757,6 +759,8 @@ extension MailManagerClientTypes { public static var allCases: [ArchiveStringEmailAttribute] { return [ .cc, + .envelopeFrom, + .envelopeTo, .from, .subject, .to @@ -771,6 +775,8 @@ extension MailManagerClientTypes { public var rawValue: Swift.String { switch self { case .cc: return "CC" + case .envelopeFrom: return "ENVELOPE_FROM" + case .envelopeTo: return "ENVELOPE_TO" case .from: return "FROM" case .subject: return "SUBJECT" case .to: return "TO" @@ -2795,6 +2801,30 @@ public struct DeleteTrafficPolicyOutput: Swift.Sendable { public init() { } } +extension MailManagerClientTypes { + + /// The SMTP envelope information of the email. + public struct Envelope: Swift.Sendable { + /// The RCPT FROM given by the host from which the email was received. + public var from: Swift.String? + /// The HELO used by the host from which the email was received. + public var helo: Swift.String? + /// All SMTP TO entries given by the host from which the email was received. + public var to: [Swift.String]? + + public init( + from: Swift.String? = nil, + helo: Swift.String? = nil, + to: [Swift.String]? = nil + ) + { + self.from = from + self.helo = helo + self.to = to + } + } +} + extension MailManagerClientTypes { /// The configuration for exporting email data to an Amazon S3 bucket. @@ -2975,16 +3005,73 @@ public struct GetArchiveMessageInput: Swift.Sendable { } } +extension MailManagerClientTypes { + + /// The metadata about the email. + public struct Metadata: Swift.Sendable { + /// The ID of the ingress endpoint through which the email was received. + public var ingressPointId: Swift.String? + /// The ID of the rule set that processed the email. + public var ruleSetId: Swift.String? + /// The name of the host from which the email was received. + public var senderHostname: Swift.String? + /// The IP address of the host from which the email was received. + public var senderIpAddress: Swift.String? + /// The timestamp of when the email was received. + public var timestamp: Foundation.Date? + /// The TLS cipher suite used to communicate with the host from which the email was received. + public var tlsCipherSuite: Swift.String? + /// The TLS protocol used to communicate with the host from which the email was received. + public var tlsProtocol: Swift.String? + /// The ID of the traffic policy that was in effect when the email was received. + public var trafficPolicyId: Swift.String? + + public init( + ingressPointId: Swift.String? = nil, + ruleSetId: Swift.String? = nil, + senderHostname: Swift.String? = nil, + senderIpAddress: Swift.String? = nil, + timestamp: Foundation.Date? = nil, + tlsCipherSuite: Swift.String? = nil, + tlsProtocol: Swift.String? = nil, + trafficPolicyId: Swift.String? = nil + ) + { + self.ingressPointId = ingressPointId + self.ruleSetId = ruleSetId + self.senderHostname = senderHostname + self.senderIpAddress = senderIpAddress + self.timestamp = timestamp + self.tlsCipherSuite = tlsCipherSuite + self.tlsProtocol = tlsProtocol + self.trafficPolicyId = trafficPolicyId + } + } +} + +extension MailManagerClientTypes.Metadata: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "Metadata(ingressPointId: \(Swift.String(describing: ingressPointId)), ruleSetId: \(Swift.String(describing: ruleSetId)), senderHostname: \(Swift.String(describing: senderHostname)), timestamp: \(Swift.String(describing: timestamp)), tlsCipherSuite: \(Swift.String(describing: tlsCipherSuite)), tlsProtocol: \(Swift.String(describing: tlsProtocol)), trafficPolicyId: \(Swift.String(describing: trafficPolicyId)), senderIpAddress: \"CONTENT_REDACTED\")"} +} + /// The response containing details about the requested archived email message. public struct GetArchiveMessageOutput: Swift.Sendable { + /// The SMTP envelope information of the email. + public var envelope: MailManagerClientTypes.Envelope? /// A pre-signed URL to temporarily download the full message content. public var messageDownloadLink: Swift.String? + /// The metadata about the email. + public var metadata: MailManagerClientTypes.Metadata? public init( - messageDownloadLink: Swift.String? = nil + envelope: MailManagerClientTypes.Envelope? = nil, + messageDownloadLink: Swift.String? = nil, + metadata: MailManagerClientTypes.Metadata? = nil ) { + self.envelope = envelope self.messageDownloadLink = messageDownloadLink + self.metadata = metadata } } @@ -3176,18 +3263,26 @@ extension MailManagerClientTypes { public var cc: Swift.String? /// The date the email was sent. public var date: Swift.String? + /// The SMTP envelope information of the email. + public var envelope: MailManagerClientTypes.Envelope? /// The email address of the sender. public var from: Swift.String? /// A flag indicating if the email has attachments. public var hasAttachments: Swift.Bool? /// The email message ID this is a reply to. public var inReplyTo: Swift.String? + /// The ID of the ingress endpoint through which the email was received. + public var ingressPointId: Swift.String? /// The unique message ID of the email. public var messageId: Swift.String? /// The received headers from the email delivery path. public var receivedHeaders: [Swift.String]? /// The timestamp of when the email was received. public var receivedTimestamp: Foundation.Date? + /// The name of the host from which the email was received. + public var senderHostname: Swift.String? + /// The IP address of the host from which the email was received. + public var senderIpAddress: Swift.String? /// The subject header value of the email. public var subject: Swift.String? /// The email addresses in the To header. @@ -3203,12 +3298,16 @@ extension MailManagerClientTypes { archivedMessageId: Swift.String? = nil, cc: Swift.String? = nil, date: Swift.String? = nil, + envelope: MailManagerClientTypes.Envelope? = nil, from: Swift.String? = nil, hasAttachments: Swift.Bool? = nil, inReplyTo: Swift.String? = nil, + ingressPointId: Swift.String? = nil, messageId: Swift.String? = nil, receivedHeaders: [Swift.String]? = nil, receivedTimestamp: Foundation.Date? = nil, + senderHostname: Swift.String? = nil, + senderIpAddress: Swift.String? = nil, subject: Swift.String? = nil, to: Swift.String? = nil, xMailer: Swift.String? = nil, @@ -3219,12 +3318,16 @@ extension MailManagerClientTypes { self.archivedMessageId = archivedMessageId self.cc = cc self.date = date + self.envelope = envelope self.from = from self.hasAttachments = hasAttachments self.inReplyTo = inReplyTo + self.ingressPointId = ingressPointId self.messageId = messageId self.receivedHeaders = receivedHeaders self.receivedTimestamp = receivedTimestamp + self.senderHostname = senderHostname + self.senderIpAddress = senderIpAddress self.subject = subject self.to = to self.xMailer = xMailer @@ -3234,6 +3337,11 @@ extension MailManagerClientTypes { } } +extension MailManagerClientTypes.Row: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "Row(archivedMessageId: \(Swift.String(describing: archivedMessageId)), cc: \(Swift.String(describing: cc)), date: \(Swift.String(describing: date)), envelope: \(Swift.String(describing: envelope)), from: \(Swift.String(describing: from)), hasAttachments: \(Swift.String(describing: hasAttachments)), inReplyTo: \(Swift.String(describing: inReplyTo)), ingressPointId: \(Swift.String(describing: ingressPointId)), messageId: \(Swift.String(describing: messageId)), receivedHeaders: \(Swift.String(describing: receivedHeaders)), receivedTimestamp: \(Swift.String(describing: receivedTimestamp)), senderHostname: \(Swift.String(describing: senderHostname)), subject: \(Swift.String(describing: subject)), to: \(Swift.String(describing: to)), xMailer: \(Swift.String(describing: xMailer)), xOriginalMailer: \(Swift.String(describing: xOriginalMailer)), xPriority: \(Swift.String(describing: xPriority)), senderIpAddress: \"CONTENT_REDACTED\")"} +} + /// The response containing search results from a completed archive search. public struct GetArchiveSearchResultsOutput: Swift.Sendable { /// The list of email result objects matching the search criteria. @@ -4064,6 +4172,8 @@ public struct StartArchiveExportInput: Swift.Sendable { /// The start of the timestamp range to include emails from. /// This member is required. public var fromTimestamp: Foundation.Date? + /// Whether to include message metadata as JSON files in the export. + public var includeMetadata: Swift.Bool? /// The maximum number of email items to include in the export. public var maxResults: Swift.Int? /// The end of the timestamp range to include emails from. @@ -4075,6 +4185,7 @@ public struct StartArchiveExportInput: Swift.Sendable { exportDestinationConfiguration: MailManagerClientTypes.ExportDestinationConfiguration? = nil, filters: MailManagerClientTypes.ArchiveFilters? = nil, fromTimestamp: Foundation.Date? = nil, + includeMetadata: Swift.Bool? = nil, maxResults: Swift.Int? = nil, toTimestamp: Foundation.Date? = nil ) @@ -4083,6 +4194,7 @@ public struct StartArchiveExportInput: Swift.Sendable { self.exportDestinationConfiguration = exportDestinationConfiguration self.filters = filters self.fromTimestamp = fromTimestamp + self.includeMetadata = includeMetadata self.maxResults = maxResults self.toTimestamp = toTimestamp } @@ -4935,6 +5047,7 @@ extension StartArchiveExportInput { try writer["ExportDestinationConfiguration"].write(value.exportDestinationConfiguration, with: MailManagerClientTypes.ExportDestinationConfiguration.write(value:to:)) try writer["Filters"].write(value.filters, with: MailManagerClientTypes.ArchiveFilters.write(value:to:)) try writer["FromTimestamp"].writeTimestamp(value.fromTimestamp, format: SmithyTimestamps.TimestampFormat.epochSeconds) + try writer["IncludeMetadata"].write(value.includeMetadata) try writer["MaxResults"].write(value.maxResults) try writer["ToTimestamp"].writeTimestamp(value.toTimestamp, format: SmithyTimestamps.TimestampFormat.epochSeconds) } @@ -5249,7 +5362,9 @@ extension GetArchiveMessageOutput { let responseReader = try SmithyJSON.Reader.from(data: data) let reader = responseReader var value = GetArchiveMessageOutput() + value.envelope = try reader["Envelope"].readIfPresent(with: MailManagerClientTypes.Envelope.read(from:)) value.messageDownloadLink = try reader["MessageDownloadLink"].readIfPresent() + value.metadata = try reader["Metadata"].readIfPresent(with: MailManagerClientTypes.Metadata.read(from:)) return value } } @@ -6618,6 +6733,35 @@ extension MailManagerClientTypes.ExportStatus { } } +extension MailManagerClientTypes.Metadata { + + static func read(from reader: SmithyJSON.Reader) throws -> MailManagerClientTypes.Metadata { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = MailManagerClientTypes.Metadata() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) + value.ingressPointId = try reader["IngressPointId"].readIfPresent() + value.trafficPolicyId = try reader["TrafficPolicyId"].readIfPresent() + value.ruleSetId = try reader["RuleSetId"].readIfPresent() + value.senderHostname = try reader["SenderHostname"].readIfPresent() + value.senderIpAddress = try reader["SenderIpAddress"].readIfPresent() + value.tlsCipherSuite = try reader["TlsCipherSuite"].readIfPresent() + value.tlsProtocol = try reader["TlsProtocol"].readIfPresent() + return value + } +} + +extension MailManagerClientTypes.Envelope { + + static func read(from reader: SmithyJSON.Reader) throws -> MailManagerClientTypes.Envelope { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = MailManagerClientTypes.Envelope() + value.helo = try reader["Helo"].readIfPresent() + value.from = try reader["From"].readIfPresent() + value.to = try reader["To"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), memberNodeInfo: "member", isFlattened: false) + return value + } +} + extension MailManagerClientTypes.MessageBody { static func read(from reader: SmithyJSON.Reader) throws -> MailManagerClientTypes.MessageBody { @@ -6662,6 +6806,10 @@ extension MailManagerClientTypes.Row { value.xMailer = try reader["XMailer"].readIfPresent() value.xOriginalMailer = try reader["XOriginalMailer"].readIfPresent() value.xPriority = try reader["XPriority"].readIfPresent() + value.ingressPointId = try reader["IngressPointId"].readIfPresent() + value.senderHostname = try reader["SenderHostname"].readIfPresent() + value.senderIpAddress = try reader["SenderIpAddress"].readIfPresent() + value.envelope = try reader["Envelope"].readIfPresent(with: MailManagerClientTypes.Envelope.read(from:)) return value } } diff --git a/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/Models.swift b/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/Models.swift index b01c7b02c4d..47660e71532 100644 --- a/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/Models.swift +++ b/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/Models.swift @@ -88,12 +88,12 @@ extension SecurityLakeClientTypes { extension SecurityLakeClientTypes { - /// The AWS identity. + /// The Amazon Web Services identity. public struct AwsIdentity: Swift.Sendable { - /// The external ID used to estalish trust relationship with the AWS identity. + /// The external ID used to establish trust relationship with the Amazon Web Services identity. /// This member is required. public var externalId: Swift.String? - /// The AWS identity principal. + /// The Amazon Web Services identity principal. /// This member is required. public var principal: Swift.String? @@ -157,17 +157,17 @@ extension SecurityLakeClientTypes { extension SecurityLakeClientTypes { - /// The Security Lake logs source configuration file describes the information needed to generate Security Lake logs. + /// To add a natively-supported Amazon Web Services service as a log source, use these parameters to specify the configuration settings for the log source. public struct AwsLogSourceConfiguration: Swift.Sendable { /// Specify the Amazon Web Services account information where you want to enable Security Lake. public var accounts: [Swift.String]? /// Specify the Regions where you want to enable Security Lake. /// This member is required. public var regions: [Swift.String]? - /// The name for a Amazon Web Services source. This must be a Regionally unique value. + /// The name for a Amazon Web Services source. /// This member is required. public var sourceName: SecurityLakeClientTypes.AwsLogSourceName? - /// The version for a Amazon Web Services source. This must be a Regionally unique value. + /// The version for a Amazon Web Services source. public var sourceVersion: Swift.String? public init( @@ -367,7 +367,7 @@ public struct CreateAwsLogSourceInput: Swift.Sendable { } public struct CreateAwsLogSourceOutput: Swift.Sendable { - /// Lists all accounts in which enabling a natively supported Amazon Web Service as a Security Lake source failed. The failure occurred as these accounts are not part of an organization. + /// Lists all accounts in which enabling a natively supported Amazon Web Services service as a Security Lake source failed. The failure occurred as these accounts are not part of an organization. public var failed: [Swift.String]? public init( @@ -380,7 +380,7 @@ public struct CreateAwsLogSourceOutput: Swift.Sendable { extension SecurityLakeClientTypes { - /// The configuration for the Glue Crawler for the third-party custom source. + /// The configuration used for the Glue Crawler for a third-party custom source. public struct CustomLogSourceCrawlerConfiguration: Swift.Sendable { /// The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be used by the Glue crawler. The recommended IAM policies are: /// @@ -401,9 +401,9 @@ extension SecurityLakeClientTypes { extension SecurityLakeClientTypes { - /// The configuration for the third-party custom source. + /// The configuration used for the third-party custom source. public struct CustomLogSourceConfiguration: Swift.Sendable { - /// The configuration for the Glue Crawler for the third-party custom source. + /// The configuration used for the Glue Crawler for a third-party custom source. /// This member is required. public var crawlerConfiguration: SecurityLakeClientTypes.CustomLogSourceCrawlerConfiguration? /// The identity of the log provider for the third-party custom source. @@ -422,7 +422,7 @@ extension SecurityLakeClientTypes { } public struct CreateCustomLogSourceInput: Swift.Sendable { - /// The configuration for the third-party custom source. + /// The configuration used for the third-party custom source. /// This member is required. public var configuration: SecurityLakeClientTypes.CustomLogSourceConfiguration? /// The Open Cybersecurity Schema Framework (OCSF) event classes which describes the type of data that the custom source will send to Security Lake. The supported event classes are: @@ -485,7 +485,7 @@ public struct CreateCustomLogSourceInput: Swift.Sendable { /// /// * CLOUD_API public var eventClasses: [Swift.String]? - /// Specify the name for a third-party custom source. This must be a Regionally unique value. + /// Specify the name for a third-party custom source. This must be a Regionally unique value. The sourceName you enter here, is used in the LogProviderRole name which follows the convention AmazonSecurityLake-Provider-{name of the custom source}-{region}. You must use a CustomLogSource name that is shorter than or equal to 20 characters. This ensures that the LogProviderRole name is below the 64 character limit. /// This member is required. public var sourceName: Swift.String? /// Specify the source version for the third-party custom source, to limit log collection to a specific version of custom data source. @@ -578,7 +578,7 @@ extension SecurityLakeClientTypes { } public struct CreateCustomLogSourceOutput: Swift.Sendable { - /// The created third-party custom source. + /// The third-party custom source that was created. public var source: SecurityLakeClientTypes.CustomLogSourceResource? public init( @@ -593,7 +593,7 @@ extension SecurityLakeClientTypes { /// Provides encryption details of Amazon Security Lake object. public struct DataLakeEncryptionConfiguration: Swift.Sendable { - /// The id of KMS encryption key used by Amazon Security Lake to encrypt the Security Lake object. + /// The identifier of KMS encryption key used by Amazon Security Lake to encrypt the Security Lake object. public var kmsKeyId: Swift.String? public init( @@ -837,7 +837,7 @@ extension SecurityLakeClientTypes { /// Provides details of Amazon Security Lake object. public struct DataLakeResource: Swift.Sendable { - /// Retrieves the status of the configuration operation for an account in Amazon Security Lake. + /// Retrieves the status of the CreateDatalake API call for an account in Amazon Security Lake. public var createStatus: SecurityLakeClientTypes.DataLakeStatus? /// The Amazon Resource Name (ARN) created by you to provide to the subscriber. For more information about ARNs and how to use them in policies, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/subscriber-management.html). /// This member is required. @@ -892,7 +892,7 @@ public struct CreateDataLakeOutput: Swift.Sendable { } public struct CreateDataLakeExceptionSubscriptionInput: Swift.Sendable { - /// The expiration period and time-to-live (TTL). + /// The expiration period and time-to-live (TTL). It is the duration of time until which the exception message remains. public var exceptionTimeToLive: Swift.Int? /// The Amazon Web Services account where you want to receive exception notifications. /// This member is required. @@ -959,9 +959,9 @@ public struct CreateDataLakeOrganizationConfigurationOutput: Swift.Sendable { extension SecurityLakeClientTypes { - /// The supported source types from which logs and events are collected in Amazon Security Lake. For a list of supported Amazon Web Services, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html). + /// The supported source types from which logs and events are collected in Amazon Security Lake. For a list of supported Amazon Web Services services, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html). public enum LogSourceResource: Swift.Sendable { - /// Amazon Security Lake supports log and event collection for natively supported Amazon Web Services. For more information, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html). + /// Amazon Security Lake supports log and event collection for natively supported Amazon Web Services services. For more information, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html). case awslogsource(SecurityLakeClientTypes.AwsLogSourceResource) /// Amazon Security Lake supports custom source types. For more information, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/custom-sources.html). case customlogsource(SecurityLakeClientTypes.CustomLogSourceResource) @@ -972,7 +972,7 @@ extension SecurityLakeClientTypes { public struct CreateSubscriberInput: Swift.Sendable { /// The Amazon S3 or Lake Formation access type. public var accessTypes: [SecurityLakeClientTypes.AccessType]? - /// The supported Amazon Web Services from which logs and events are collected. Security Lake supports log and event collection for natively supported Amazon Web Services. + /// The supported Amazon Web Services services from which logs and events are collected. Security Lake supports log and event collection for natively supported Amazon Web Services services. /// This member is required. public var sources: [SecurityLakeClientTypes.LogSourceResource]? /// The description for your subscriber account in Security Lake. @@ -1055,7 +1055,7 @@ extension SecurityLakeClientTypes { public var roleArn: Swift.String? /// The ARN for the Amazon S3 bucket. public var s3BucketArn: Swift.String? - /// Amazon Security Lake supports log and event collection for natively supported Amazon Web Services. For more information, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/source-management.html). + /// Amazon Security Lake supports log and event collection for natively supported Amazon Web Services services. For more information, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/source-management.html). /// This member is required. public var sources: [SecurityLakeClientTypes.LogSourceResource]? /// The subscriber ARN of the Amazon Security Lake subscriber account. @@ -1159,7 +1159,7 @@ extension SecurityLakeClientTypes { extension SecurityLakeClientTypes { - /// The configurations for HTTPS subscriber notification. + /// The configurations used for HTTPS subscriber notification. public struct HttpsNotificationConfiguration: Swift.Sendable { /// The key name for the notification subscription. public var authorizationApiKeyName: Swift.String? @@ -1193,7 +1193,7 @@ extension SecurityLakeClientTypes { extension SecurityLakeClientTypes { - /// The configurations for SQS subscriber notification. + /// The configurations used for EventBridge subscriber notification. public struct SqsNotificationConfiguration: Swift.Sendable { public init() { } @@ -1206,7 +1206,7 @@ extension SecurityLakeClientTypes { public enum NotificationConfiguration: Swift.Sendable { /// The configurations for SQS subscriber notification. case sqsnotificationconfiguration(SecurityLakeClientTypes.SqsNotificationConfiguration) - /// The configurations for HTTPS subscriber notification. + /// The configurations used for HTTPS subscriber notification. case httpsnotificationconfiguration(SecurityLakeClientTypes.HttpsNotificationConfiguration) case sdkUnknown(Swift.String) } @@ -1330,7 +1330,7 @@ public struct GetDataLakeOrganizationConfigurationInput: Swift.Sendable { } public struct GetDataLakeOrganizationConfigurationOutput: Swift.Sendable { - /// The configuration for new accounts. + /// The configuration used for new accounts in Security Lake. public var autoEnableNewAccount: [SecurityLakeClientTypes.DataLakeAutoEnableNewAccountConfiguration]? public init( @@ -1415,7 +1415,7 @@ extension SecurityLakeClientTypes { extension SecurityLakeClientTypes { - /// Amazon Security Lake collects logs and events from supported Amazon Web Services and custom sources. For the list of supported Amazon Web Services, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html). + /// Amazon Security Lake collects logs and events from supported Amazon Web Services services and custom sources. For the list of supported Amazon Web Services services, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html). public struct DataLakeSource: Swift.Sendable { /// The ID of the Security Lake account for which logs are collected. public var account: Swift.String? @@ -1479,7 +1479,7 @@ extension SecurityLakeClientTypes { /// /// * CLOUD_API public var eventClasses: [Swift.String]? - /// The supported Amazon Web Services from which logs and events are collected. Amazon Security Lake supports log and event collection for natively supported Amazon Web Services. + /// The supported Amazon Web Services services from which logs and events are collected. Amazon Security Lake supports log and event collection for natively supported Amazon Web Services services. public var sourceName: Swift.String? /// The log status for the Security Lake account. public var sourceStatuses: [SecurityLakeClientTypes.DataLakeSourceStatus]? @@ -1612,7 +1612,7 @@ public struct ListLogSourcesOutput: Swift.Sendable { } public struct UpdateDataLakeInput: Swift.Sendable { - /// Specify the Region or Regions that will contribute data to the rollup region. + /// Specifies the Region or Regions that will contribute data to the rollup region. /// This member is required. public var configurations: [SecurityLakeClientTypes.DataLakeConfiguration]? /// The Amazon Resource Name (ARN) used to create and update the Glue table. This table contains partitions generated by the ingestion and normalization of Amazon Web Services log sources and custom sources. @@ -1730,7 +1730,7 @@ public struct GetDataLakeExceptionSubscriptionInput: Swift.Sendable { } public struct GetDataLakeExceptionSubscriptionOutput: Swift.Sendable { - /// The expiration period and time-to-live (TTL). + /// The expiration period and time-to-live (TTL). It is the duration of time until which the exception message remains. public var exceptionTimeToLive: Swift.Int? /// The Amazon Web Services account where you receive exception notifications. public var notificationEndpoint: Swift.String? @@ -1775,9 +1775,9 @@ public struct GetSubscriberOutput: Swift.Sendable { } public struct ListDataLakeExceptionsInput: Swift.Sendable { - /// List the maximum number of failures in Security Lake. + /// Lists the maximum number of failures in Security Lake. public var maxResults: Swift.Int? - /// List if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error. + /// Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error. public var nextToken: Swift.String? /// The Amazon Web Services Regions from which exceptions are retrieved. public var regions: [Swift.String]? @@ -1795,9 +1795,9 @@ public struct ListDataLakeExceptionsInput: Swift.Sendable { } public struct ListDataLakeExceptionsOutput: Swift.Sendable { - /// Lists the failures that cannot be retried in the current Region. + /// Lists the failures that cannot be retried. public var exceptions: [SecurityLakeClientTypes.DataLakeException]? - /// List if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error. + /// Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error. public var nextToken: Swift.String? public init( @@ -1886,14 +1886,14 @@ public struct RegisterDataLakeDelegatedAdministratorOutput: Swift.Sendable { } public struct UpdateSubscriberInput: Swift.Sendable { - /// The supported Amazon Web Services from which logs and events are collected. For the list of supported Amazon Web Services, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html). + /// The supported Amazon Web Services services from which logs and events are collected. For the list of supported Amazon Web Services services, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html). public var sources: [SecurityLakeClientTypes.LogSourceResource]? /// The description of the Security Lake account subscriber. public var subscriberDescription: Swift.String? /// A value created by Security Lake that uniquely identifies your subscription. /// This member is required. public var subscriberId: Swift.String? - /// The AWS identity used to access your data. + /// The Amazon Web Services identity used to access your data. public var subscriberIdentity: SecurityLakeClientTypes.AwsIdentity? /// The name of the Security Lake account subscriber. public var subscriberName: Swift.String? @@ -2003,7 +2003,7 @@ public struct UntagResourceOutput: Swift.Sendable { } public struct UpdateDataLakeExceptionSubscriptionInput: Swift.Sendable { - /// The time-to-live (TTL) for the exception message to remain. + /// The time-to-live (TTL) for the exception message to remain. It is the duration of time until which the exception message remains. public var exceptionTimeToLive: Swift.Int? /// The account that is subscribed to receive exception notifications. /// This member is required. diff --git a/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/SecurityLakeClient.swift b/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/SecurityLakeClient.swift index 8e6f6305882..54502e2381c 100644 --- a/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/SecurityLakeClient.swift +++ b/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/SecurityLakeClient.swift @@ -195,7 +195,7 @@ extension SecurityLakeClient { extension SecurityLakeClient { /// Performs the `CreateAwsLogSource` operation on the `SecurityLake` service. /// - /// Adds a natively supported Amazon Web Service as an Amazon Security Lake source. Enables source types for member accounts in required Amazon Web Services Regions, based on the parameters you specify. You can choose any source type in any Region for either accounts that are part of a trusted organization or standalone accounts. Once you add an Amazon Web Service as a source, Security Lake starts collecting logs and events from it. You can use this API only to enable natively supported Amazon Web Services as a source. Use CreateCustomLogSource to enable data collection from a custom source. + /// Adds a natively supported Amazon Web Services service as an Amazon Security Lake source. Enables source types for member accounts in required Amazon Web Services Regions, based on the parameters you specify. You can choose any source type in any Region for either accounts that are part of a trusted organization or standalone accounts. Once you add an Amazon Web Services service as a source, Security Lake starts collecting logs and events from it. You can use this API only to enable natively supported Amazon Web Services services as a source. Use CreateCustomLogSource to enable data collection from a custom source. /// /// - Parameter CreateAwsLogSourceInput : [no documentation found] /// @@ -343,7 +343,7 @@ extension SecurityLakeClient { /// Performs the `CreateDataLake` operation on the `SecurityLake` service. /// - /// Initializes an Amazon Security Lake instance with the provided (or default) configuration. You can enable Security Lake in Amazon Web Services Regions with customized settings before enabling log collection in Regions. To specify particular Regions, configure these Regions using the configurations parameter. If you have already enabled Security Lake in a Region when you call this command, the command will update the Region if you provide new configuration parameters. If you have not already enabled Security Lake in the Region when you call this API, it will set up the data lake in the Region with the specified configurations. When you enable Security Lake, it starts ingesting security data after the CreateAwsLogSource call. This includes ingesting security data from sources, storing data, and making data accessible to subscribers. Security Lake also enables all the existing settings and resources that it stores or maintains for your Amazon Web Services account in the current Region, including security log and event data. For more information, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/what-is-security-lake.html). + /// Initializes an Amazon Security Lake instance with the provided (or default) configuration. You can enable Security Lake in Amazon Web Services Regions with customized settings before enabling log collection in Regions. To specify particular Regions, configure these Regions using the configurations parameter. If you have already enabled Security Lake in a Region when you call this command, the command will update the Region if you provide new configuration parameters. If you have not already enabled Security Lake in the Region when you call this API, it will set up the data lake in the Region with the specified configurations. When you enable Security Lake, it starts ingesting security data after the CreateAwsLogSource call and after you create subscribers using the CreateSubscriber API. This includes ingesting security data from sources, storing data, and making data accessible to subscribers. Security Lake also enables all the existing settings and resources that it stores or maintains for your Amazon Web Services account in the current Region, including security log and event data. For more information, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/what-is-security-lake.html). /// /// - Parameter CreateDataLakeInput : [no documentation found] /// @@ -417,7 +417,7 @@ extension SecurityLakeClient { /// Performs the `CreateDataLakeExceptionSubscription` operation on the `SecurityLake` service. /// - /// Creates the specified notification subscription in Amazon Security Lake for the organization you specify. + /// Creates the specified notification subscription in Amazon Security Lake for the organization you specify. The notification subscription is created for exceptions that cannot be resolved by Security Lake automatically. /// /// - Parameter CreateDataLakeExceptionSubscriptionInput : [no documentation found] /// @@ -565,7 +565,7 @@ extension SecurityLakeClient { /// Performs the `CreateSubscriber` operation on the `SecurityLake` service. /// - /// Creates a subscription permission for accounts that are already enabled in Amazon Security Lake. You can create a subscriber with access to data in the current Amazon Web Services Region. + /// Creates a subscriber for accounts that are already enabled in Amazon Security Lake. You can create a subscriber with access to data in the current Amazon Web Services Region. /// /// - Parameter CreateSubscriberInput : [no documentation found] /// @@ -713,7 +713,7 @@ extension SecurityLakeClient { /// Performs the `DeleteAwsLogSource` operation on the `SecurityLake` service. /// - /// Removes a natively supported Amazon Web Service as an Amazon Security Lake source. You can remove a source for one or more Regions. When you remove the source, Security Lake stops collecting data from that source in the specified Regions and accounts, and subscribers can no longer consume new data from the source. However, subscribers can still consume data that Security Lake collected from the source before removal. You can choose any source type in any Amazon Web Services Region for either accounts that are part of a trusted organization or standalone accounts. + /// Removes a natively supported Amazon Web Services service as an Amazon Security Lake source. You can remove a source for one or more Regions. When you remove the source, Security Lake stops collecting data from that source in the specified Regions and accounts, and subscribers can no longer consume new data from the source. However, subscribers can still consume data that Security Lake collected from the source before removal. You can choose any source type in any Amazon Web Services Region for either accounts that are part of a trusted organization or standalone accounts. /// /// - Parameter DeleteAwsLogSourceInput : [no documentation found] /// @@ -1149,7 +1149,7 @@ extension SecurityLakeClient { /// Performs the `DeleteSubscriberNotification` operation on the `SecurityLake` service. /// - /// Deletes the specified notification subscription in Amazon Security Lake for the organization you specify. + /// Deletes the specified subscription notification in Amazon Security Lake for the organization you specify. /// /// - Parameter DeleteSubscriberNotificationInput : [no documentation found] /// @@ -1291,7 +1291,7 @@ extension SecurityLakeClient { /// Performs the `GetDataLakeExceptionSubscription` operation on the `SecurityLake` service. /// - /// Retrieves the details of exception notifications for the account in Amazon Security Lake. + /// Retrieves the protocol and endpoint that were provided when subscribing to Amazon SNS topics for exception notifications. /// /// - Parameter GetDataLakeExceptionSubscriptionInput : [no documentation found] /// @@ -1724,7 +1724,7 @@ extension SecurityLakeClient { /// Performs the `ListLogSources` operation on the `SecurityLake` service. /// - /// Retrieves the log sources in the current Amazon Web Services Region. + /// Retrieves the log sources. /// /// - Parameter ListLogSourcesInput : [no documentation found] /// @@ -1798,7 +1798,7 @@ extension SecurityLakeClient { /// Performs the `ListSubscribers` operation on the `SecurityLake` service. /// - /// List all subscribers for the specific Amazon Security Lake account ID. You can retrieve a list of subscriptions associated with a specific organization or Amazon Web Services account. + /// Lists all subscribers for the specific Amazon Security Lake account ID. You can retrieve a list of subscriptions associated with a specific organization or Amazon Web Services account. /// /// - Parameter ListSubscribersInput : [no documentation found] /// @@ -2161,7 +2161,7 @@ extension SecurityLakeClient { /// Performs the `UpdateDataLake` operation on the `SecurityLake` service. /// - /// Specifies where to store your security data and for how long. You can add a rollup Region to consolidate data from multiple Amazon Web Services Regions. + /// You can use UpdateDataLake to specify where to store your security data, how it should be encrypted at rest and for how long. You can add a [Rollup Region](https://docs.aws.amazon.com/security-lake/latest/userguide/manage-regions.html#add-rollup-region) to consolidate data from multiple Amazon Web Services Regions, replace default encryption (SSE-S3) with [Customer Manged Key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk), or specify transition and expiration actions through storage [Lifecycle management](https://docs.aws.amazon.com/security-lake/latest/userguide/lifecycle-management.html). The UpdateDataLake API works as an "upsert" operation that performs an insert if the specified item or record does not exist, or an update if it already exists. Security Lake securely stores your data at rest using Amazon Web Services encryption solutions. For more details, see [Data protection in Amazon Security Lake](https://docs.aws.amazon.com/security-lake/latest/userguide/data-protection.html). For example, omitting the key encryptionConfiguration from a Region that is included in an update call that currently uses KMS will leave that Region's KMS key in place, but specifying encryptionConfiguration: {kmsKeyId: 'S3_MANAGED_KEY'} for that same Region will reset the key to S3-managed. For more details about lifecycle management and how to update retention settings for one or more Regions after enabling Security Lake, see the [Amazon Security Lake User Guide](https://docs.aws.amazon.com/security-lake/latest/userguide/lifecycle-management.html). /// /// - Parameter UpdateDataLakeInput : [no documentation found] /// diff --git a/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/Models.swift b/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/Models.swift index 39a0b30ea0c..3e2f4d160a0 100644 --- a/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/Models.swift +++ b/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/Models.swift @@ -962,6 +962,145 @@ public struct CreateDataLakeDatasetOutput: Swift.Sendable { } } +/// The request parameters for CreateInstance. +public struct CreateInstanceInput: Swift.Sendable { + /// The client token for idempotency. + public var clientToken: Swift.String? + /// The AWS Supply Chain instance description. + public var instanceDescription: Swift.String? + /// The AWS Supply Chain instance name. + public var instanceName: Swift.String? + /// The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon Web Services owned KMS key. If you don't provide anything here, AWS Supply Chain uses the Amazon Web Services owned KMS key. + public var kmsKeyArn: Swift.String? + /// The Amazon Web Services tags of an instance to be created. + public var tags: [Swift.String: Swift.String]? + + public init( + clientToken: Swift.String? = nil, + instanceDescription: Swift.String? = nil, + instanceName: Swift.String? = nil, + kmsKeyArn: Swift.String? = nil, + tags: [Swift.String: Swift.String]? = nil + ) + { + self.clientToken = clientToken + self.instanceDescription = instanceDescription + self.instanceName = instanceName + self.kmsKeyArn = kmsKeyArn + self.tags = tags + } +} + +extension SupplyChainClientTypes { + + public enum InstanceState: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case active + case createFailed + case deleted + case deleteFailed + case deleting + case initializing + case sdkUnknown(Swift.String) + + public static var allCases: [InstanceState] { + return [ + .active, + .createFailed, + .deleted, + .deleteFailed, + .deleting, + .initializing + ] + } + + public init?(rawValue: Swift.String) { + let value = Self.allCases.first(where: { $0.rawValue == rawValue }) + self = value ?? Self.sdkUnknown(rawValue) + } + + public var rawValue: Swift.String { + switch self { + case .active: return "Active" + case .createFailed: return "CreateFailed" + case .deleted: return "Deleted" + case .deleteFailed: return "DeleteFailed" + case .deleting: return "Deleting" + case .initializing: return "Initializing" + case let .sdkUnknown(s): return s + } + } + } +} + +extension SupplyChainClientTypes { + + /// The details of the instance. + public struct Instance: Swift.Sendable { + /// The Amazon Web Services account ID that owns the instance. + /// This member is required. + public var awsAccountId: Swift.String? + /// The instance creation timestamp. + public var createdTime: Foundation.Date? + /// The Amazon Web Services Supply Chain instance description. + public var instanceDescription: Swift.String? + /// The Amazon Web Services Supply Chain instance identifier. + /// This member is required. + public var instanceId: Swift.String? + /// The Amazon Web Services Supply Chain instance name. + public var instanceName: Swift.String? + /// The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you optionally provided for encryption. If you did not provide anything here, AWS Supply Chain uses the Amazon Web Services owned KMS key and nothing is returned. + public var kmsKeyArn: Swift.String? + /// The instance last modified timestamp. + public var lastModifiedTime: Foundation.Date? + /// The state of the instance. + /// This member is required. + public var state: SupplyChainClientTypes.InstanceState? + /// The version number of the instance. + public var versionNumber: Swift.Double? + /// The WebApp DNS domain name of the instance. + public var webAppDnsDomain: Swift.String? + + public init( + awsAccountId: Swift.String? = nil, + createdTime: Foundation.Date? = nil, + instanceDescription: Swift.String? = nil, + instanceId: Swift.String? = nil, + instanceName: Swift.String? = nil, + kmsKeyArn: Swift.String? = nil, + lastModifiedTime: Foundation.Date? = nil, + state: SupplyChainClientTypes.InstanceState? = nil, + versionNumber: Swift.Double? = nil, + webAppDnsDomain: Swift.String? = nil + ) + { + self.awsAccountId = awsAccountId + self.createdTime = createdTime + self.instanceDescription = instanceDescription + self.instanceId = instanceId + self.instanceName = instanceName + self.kmsKeyArn = kmsKeyArn + self.lastModifiedTime = lastModifiedTime + self.state = state + self.versionNumber = versionNumber + self.webAppDnsDomain = webAppDnsDomain + } + } +} + +/// The response parameters for CreateInstance. +public struct CreateInstanceOutput: Swift.Sendable { + /// The AWS Supply Chain instance resource data details. + /// This member is required. + public var instance: SupplyChainClientTypes.Instance? + + public init( + instance: SupplyChainClientTypes.Instance? = nil + ) + { + self.instance = instance + } +} + extension SupplyChainClientTypes { public enum DataIntegrationEventType: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { @@ -1478,6 +1617,141 @@ public struct UpdateDataLakeDatasetOutput: Swift.Sendable { } } +/// The request parameters for DeleteInstance. +public struct DeleteInstanceInput: Swift.Sendable { + /// The AWS Supply Chain instance identifier. + /// This member is required. + public var instanceId: Swift.String? + + public init( + instanceId: Swift.String? = nil + ) + { + self.instanceId = instanceId + } +} + +/// The response parameters for DeleteInstance. +public struct DeleteInstanceOutput: Swift.Sendable { + /// The AWS Supply Chain instance resource data details. + /// This member is required. + public var instance: SupplyChainClientTypes.Instance? + + public init( + instance: SupplyChainClientTypes.Instance? = nil + ) + { + self.instance = instance + } +} + +/// The request parameters for GetInstance. +public struct GetInstanceInput: Swift.Sendable { + /// The AWS Supply Chain instance identifier + /// This member is required. + public var instanceId: Swift.String? + + public init( + instanceId: Swift.String? = nil + ) + { + self.instanceId = instanceId + } +} + +/// The response parameters for GetInstance. +public struct GetInstanceOutput: Swift.Sendable { + /// The instance resource data details. + /// This member is required. + public var instance: SupplyChainClientTypes.Instance? + + public init( + instance: SupplyChainClientTypes.Instance? = nil + ) + { + self.instance = instance + } +} + +/// The request parameters for ListInstances. +public struct ListInstancesInput: Swift.Sendable { + /// The filter to ListInstances based on their names. + public var instanceNameFilter: [Swift.String]? + /// The filter to ListInstances based on their state. + public var instanceStateFilter: [SupplyChainClientTypes.InstanceState]? + /// Specify the maximum number of instances to fetch in this paginated request. + public var maxResults: Swift.Int? + /// The pagination token to fetch the next page of instances. + public var nextToken: Swift.String? + + public init( + instanceNameFilter: [Swift.String]? = nil, + instanceStateFilter: [SupplyChainClientTypes.InstanceState]? = nil, + maxResults: Swift.Int? = 10, + nextToken: Swift.String? = nil + ) + { + self.instanceNameFilter = instanceNameFilter + self.instanceStateFilter = instanceStateFilter + self.maxResults = maxResults + self.nextToken = nextToken + } +} + +/// The response parameters for ListInstances. +public struct ListInstancesOutput: Swift.Sendable { + /// The list of instances resource data details. + /// This member is required. + public var instances: [SupplyChainClientTypes.Instance]? + /// The pagination token to fetch the next page of instances. + public var nextToken: Swift.String? + + public init( + instances: [SupplyChainClientTypes.Instance]? = nil, + nextToken: Swift.String? = nil + ) + { + self.instances = instances + self.nextToken = nextToken + } +} + +/// The request parameters for UpdateInstance. +public struct UpdateInstanceInput: Swift.Sendable { + /// The AWS Supply Chain instance description. + public var instanceDescription: Swift.String? + /// The AWS Supply Chain instance identifier. + /// This member is required. + public var instanceId: Swift.String? + /// The AWS Supply Chain instance name. + public var instanceName: Swift.String? + + public init( + instanceDescription: Swift.String? = nil, + instanceId: Swift.String? = nil, + instanceName: Swift.String? = nil + ) + { + self.instanceDescription = instanceDescription + self.instanceId = instanceId + self.instanceName = instanceName + } +} + +/// The response parameters for UpdateInstance. +public struct UpdateInstanceOutput: Swift.Sendable { + /// The instance resource data details. + /// This member is required. + public var instance: SupplyChainClientTypes.Instance? + + public init( + instance: SupplyChainClientTypes.Instance? = nil + ) + { + self.instance = instance + } +} + /// The request parameters of ListTagsForResource. public struct ListTagsForResourceInput: Swift.Sendable { /// The Amazon Web Services Supply chain resource ARN that needs tags to be listed. @@ -1595,6 +1869,13 @@ extension CreateDataLakeDatasetInput { } } +extension CreateInstanceInput { + + static func urlPathProvider(_ value: CreateInstanceInput) -> Swift.String? { + return "/api/instance" + } +} + extension DeleteDataIntegrationFlowInput { static func urlPathProvider(_ value: DeleteDataIntegrationFlowInput) -> Swift.String? { @@ -1624,6 +1905,16 @@ extension DeleteDataLakeDatasetInput { } } +extension DeleteInstanceInput { + + static func urlPathProvider(_ value: DeleteInstanceInput) -> Swift.String? { + guard let instanceId = value.instanceId else { + return nil + } + return "/api/instance/\(instanceId.urlPercentEncoding())" + } +} + extension GetBillOfMaterialsImportJobInput { static func urlPathProvider(_ value: GetBillOfMaterialsImportJobInput) -> Swift.String? { @@ -1666,6 +1957,16 @@ extension GetDataLakeDatasetInput { } } +extension GetInstanceInput { + + static func urlPathProvider(_ value: GetInstanceInput) -> Swift.String? { + guard let instanceId = value.instanceId else { + return nil + } + return "/api/instance/\(instanceId.urlPercentEncoding())" + } +} + extension ListDataIntegrationFlowsInput { static func urlPathProvider(_ value: ListDataIntegrationFlowsInput) -> Swift.String? { @@ -1721,6 +2022,41 @@ extension ListDataLakeDatasetsInput { } } +extension ListInstancesInput { + + static func urlPathProvider(_ value: ListInstancesInput) -> Swift.String? { + return "/api/instance" + } +} + +extension ListInstancesInput { + + static func queryItemProvider(_ value: ListInstancesInput) throws -> [Smithy.URIQueryItem] { + var items = [Smithy.URIQueryItem]() + if let instanceNameFilter = value.instanceNameFilter { + instanceNameFilter.forEach { queryItemValue in + let queryItem = Smithy.URIQueryItem(name: "instanceNameFilter".urlPercentEncoding(), value: Swift.String(queryItemValue).urlPercentEncoding()) + items.append(queryItem) + } + } + if let instanceStateFilter = value.instanceStateFilter { + instanceStateFilter.forEach { queryItemValue in + let queryItem = Smithy.URIQueryItem(name: "instanceStateFilter".urlPercentEncoding(), value: Swift.String(queryItemValue.rawValue).urlPercentEncoding()) + items.append(queryItem) + } + } + if let nextToken = value.nextToken { + let nextTokenQueryItem = Smithy.URIQueryItem(name: "nextToken".urlPercentEncoding(), value: Swift.String(nextToken).urlPercentEncoding()) + items.append(nextTokenQueryItem) + } + if let maxResults = value.maxResults { + let maxResultsQueryItem = Smithy.URIQueryItem(name: "maxResults".urlPercentEncoding(), value: Swift.String(maxResults).urlPercentEncoding()) + items.append(maxResultsQueryItem) + } + return items + } +} + extension ListTagsForResourceInput { static func urlPathProvider(_ value: ListTagsForResourceInput) -> Swift.String? { @@ -1806,6 +2142,16 @@ extension UpdateDataLakeDatasetInput { } } +extension UpdateInstanceInput { + + static func urlPathProvider(_ value: UpdateInstanceInput) -> Swift.String? { + guard let instanceId = value.instanceId else { + return nil + } + return "/api/instance/\(instanceId.urlPercentEncoding())" + } +} + extension CreateBillOfMaterialsImportJobInput { static func write(value: CreateBillOfMaterialsImportJobInput?, to writer: SmithyJSON.Writer) throws { @@ -1836,6 +2182,18 @@ extension CreateDataLakeDatasetInput { } } +extension CreateInstanceInput { + + static func write(value: CreateInstanceInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["clientToken"].write(value.clientToken) + try writer["instanceDescription"].write(value.instanceDescription) + try writer["instanceName"].write(value.instanceName) + try writer["kmsKeyArn"].write(value.kmsKeyArn) + try writer["tags"].writeMap(value.tags, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + } +} + extension SendDataIntegrationEventInput { static func write(value: SendDataIntegrationEventInput?, to writer: SmithyJSON.Writer) throws { @@ -1874,6 +2232,15 @@ extension UpdateDataLakeDatasetInput { } } +extension UpdateInstanceInput { + + static func write(value: UpdateInstanceInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["instanceDescription"].write(value.instanceDescription) + try writer["instanceName"].write(value.instanceName) + } +} + extension CreateBillOfMaterialsImportJobOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> CreateBillOfMaterialsImportJobOutput { @@ -1911,6 +2278,18 @@ extension CreateDataLakeDatasetOutput { } } +extension CreateInstanceOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> CreateInstanceOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = CreateInstanceOutput() + value.instance = try reader["instance"].readIfPresent(with: SupplyChainClientTypes.Instance.read(from:)) + return value + } +} + extension DeleteDataIntegrationFlowOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> DeleteDataIntegrationFlowOutput { @@ -1938,6 +2317,18 @@ extension DeleteDataLakeDatasetOutput { } } +extension DeleteInstanceOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> DeleteInstanceOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = DeleteInstanceOutput() + value.instance = try reader["instance"].readIfPresent(with: SupplyChainClientTypes.Instance.read(from:)) + return value + } +} + extension GetBillOfMaterialsImportJobOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> GetBillOfMaterialsImportJobOutput { @@ -1974,6 +2365,18 @@ extension GetDataLakeDatasetOutput { } } +extension GetInstanceOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> GetInstanceOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = GetInstanceOutput() + value.instance = try reader["instance"].readIfPresent(with: SupplyChainClientTypes.Instance.read(from:)) + return value + } +} + extension ListDataIntegrationFlowsOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListDataIntegrationFlowsOutput { @@ -2000,6 +2403,19 @@ extension ListDataLakeDatasetsOutput { } } +extension ListInstancesOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListInstancesOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = ListInstancesOutput() + value.instances = try reader["instances"].readListIfPresent(memberReadingClosure: SupplyChainClientTypes.Instance.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] + value.nextToken = try reader["nextToken"].readIfPresent() + return value + } +} + extension ListTagsForResourceOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListTagsForResourceOutput { @@ -2062,6 +2478,18 @@ extension UpdateDataLakeDatasetOutput { } } +extension UpdateInstanceOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> UpdateInstanceOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = UpdateInstanceOutput() + value.instance = try reader["instance"].readIfPresent(with: SupplyChainClientTypes.Instance.read(from:)) + return value + } +} + func httpServiceError(baseError: AWSClientRuntime.RestJSONError) throws -> Swift.Error? { switch baseError.code { case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) @@ -2135,6 +2563,26 @@ enum CreateDataLakeDatasetOutputError { } } +enum CreateInstanceOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + if let error = try httpServiceError(baseError: baseError) { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "ConflictException": return try ConflictException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ServiceQuotaExceededException": return try ServiceQuotaExceededException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum DeleteDataIntegrationFlowOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -2172,6 +2620,25 @@ enum DeleteDataLakeDatasetOutputError { } } +enum DeleteInstanceOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + if let error = try httpServiceError(baseError: baseError) { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum GetBillOfMaterialsImportJobOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -2229,6 +2696,25 @@ enum GetDataLakeDatasetOutputError { } } +enum GetInstanceOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + if let error = try httpServiceError(baseError: baseError) { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum ListDataIntegrationFlowsOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -2266,6 +2752,24 @@ enum ListDataLakeDatasetsOutputError { } } +enum ListInstancesOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + if let error = try httpServiceError(baseError: baseError) { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum ListTagsForResourceOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -2382,6 +2886,25 @@ enum UpdateDataLakeDatasetOutputError { } } +enum UpdateInstanceOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + if let error = try httpServiceError(baseError: baseError) { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + extension InternalServerException { static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> InternalServerException { @@ -2526,6 +3049,25 @@ extension SupplyChainClientTypes.DataLakeDatasetSchemaField { } } +extension SupplyChainClientTypes.Instance { + + static func read(from reader: SmithyJSON.Reader) throws -> SupplyChainClientTypes.Instance { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = SupplyChainClientTypes.Instance() + value.instanceId = try reader["instanceId"].readIfPresent() ?? "" + value.awsAccountId = try reader["awsAccountId"].readIfPresent() ?? "" + value.state = try reader["state"].readIfPresent() ?? .sdkUnknown("") + value.webAppDnsDomain = try reader["webAppDnsDomain"].readIfPresent() + value.createdTime = try reader["createdTime"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) + value.lastModifiedTime = try reader["lastModifiedTime"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) + value.instanceName = try reader["instanceName"].readIfPresent() + value.instanceDescription = try reader["instanceDescription"].readIfPresent() + value.kmsKeyArn = try reader["kmsKeyArn"].readIfPresent() + value.versionNumber = try reader["versionNumber"].readIfPresent() + return value + } +} + extension SupplyChainClientTypes.BillOfMaterialsImportJob { static func read(from reader: SmithyJSON.Reader) throws -> SupplyChainClientTypes.BillOfMaterialsImportJob { diff --git a/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/SupplyChainClient.swift b/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/SupplyChainClient.swift index 3b0fa270df8..89830091716 100644 --- a/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/SupplyChainClient.swift +++ b/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/SupplyChainClient.swift @@ -421,6 +421,82 @@ extension SupplyChainClient { return try await op.execute(input: input) } + /// Performs the `CreateInstance` operation on the `GalaxyPublicAPIGateway` service. + /// + /// Create a new instance for AWS Supply Chain. This is an asynchronous operation. Upon receiving a CreateInstance request, AWS Supply Chain immediately returns the instance resource, with instance ID, and the initializing state while simultaneously creating all required Amazon Web Services resources for an instance creation. You can use GetInstance to check the status of the instance. + /// + /// - Parameter CreateInstanceInput : The request parameters for CreateInstance. + /// + /// - Returns: `CreateInstanceOutput` : The response parameters for CreateInstance. + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have the required privileges to perform this action. + /// - `ConflictException` : Updating or deleting a resource can cause an inconsistent state. + /// - `InternalServerException` : Unexpected error during processing of request. + /// - `ResourceNotFoundException` : Request references a resource which does not exist. + /// - `ServiceQuotaExceededException` : Request would cause a service quota to be exceeded. + /// - `ThrottlingException` : Request was denied due to request throttling. + /// - `ValidationException` : The input does not satisfy the constraints specified by an AWS service. + public func createInstance(input: CreateInstanceInput) async throws -> CreateInstanceOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "createInstance") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "scn") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.IdempotencyTokenMiddleware(keyPath: \.clientToken)) + builder.interceptors.add(ClientRuntime.URLPathMiddleware(CreateInstanceInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: CreateInstanceInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(CreateInstanceOutput.httpOutput(from:), CreateInstanceOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "SupplyChain") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "CreateInstance") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `DeleteDataIntegrationFlow` operation on the `GalaxyPublicAPIGateway` service. /// /// Delete the DataIntegrationFlow. @@ -565,6 +641,78 @@ extension SupplyChainClient { return try await op.execute(input: input) } + /// Performs the `DeleteInstance` operation on the `GalaxyPublicAPIGateway` service. + /// + /// Delete the instance. This is an asynchronous operation. Upon receiving a DeleteInstance request, AWS Supply Chain immediately returns a response with the instance resource, delete state while cleaning up all Amazon Web Services resources created during the instance creation process. You can use the GetInstance action to check the instance status. + /// + /// - Parameter DeleteInstanceInput : The request parameters for DeleteInstance. + /// + /// - Returns: `DeleteInstanceOutput` : The response parameters for DeleteInstance. + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have the required privileges to perform this action. + /// - `ConflictException` : Updating or deleting a resource can cause an inconsistent state. + /// - `InternalServerException` : Unexpected error during processing of request. + /// - `ResourceNotFoundException` : Request references a resource which does not exist. + /// - `ServiceQuotaExceededException` : Request would cause a service quota to be exceeded. + /// - `ThrottlingException` : Request was denied due to request throttling. + /// - `ValidationException` : The input does not satisfy the constraints specified by an AWS service. + public func deleteInstance(input: DeleteInstanceInput) async throws -> DeleteInstanceOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .delete) + .withServiceName(value: serviceName) + .withOperation(value: "deleteInstance") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "scn") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(DeleteInstanceInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(DeleteInstanceOutput.httpOutput(from:), DeleteInstanceOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "SupplyChain") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "DeleteInstance") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `GetBillOfMaterialsImportJob` operation on the `GalaxyPublicAPIGateway` service. /// /// Get status and details of a BillOfMaterialsImportJob. @@ -781,6 +929,78 @@ extension SupplyChainClient { return try await op.execute(input: input) } + /// Performs the `GetInstance` operation on the `GalaxyPublicAPIGateway` service. + /// + /// Get the AWS Supply Chain instance details. + /// + /// - Parameter GetInstanceInput : The request parameters for GetInstance. + /// + /// - Returns: `GetInstanceOutput` : The response parameters for GetInstance. + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have the required privileges to perform this action. + /// - `ConflictException` : Updating or deleting a resource can cause an inconsistent state. + /// - `InternalServerException` : Unexpected error during processing of request. + /// - `ResourceNotFoundException` : Request references a resource which does not exist. + /// - `ServiceQuotaExceededException` : Request would cause a service quota to be exceeded. + /// - `ThrottlingException` : Request was denied due to request throttling. + /// - `ValidationException` : The input does not satisfy the constraints specified by an AWS service. + public func getInstance(input: GetInstanceInput) async throws -> GetInstanceOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "getInstance") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "scn") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(GetInstanceInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(GetInstanceOutput.httpOutput(from:), GetInstanceOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "SupplyChain") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "GetInstance") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `ListDataIntegrationFlows` operation on the `GalaxyPublicAPIGateway` service. /// /// Lists all the DataIntegrationFlows in a paginated way. @@ -927,6 +1147,79 @@ extension SupplyChainClient { return try await op.execute(input: input) } + /// Performs the `ListInstances` operation on the `GalaxyPublicAPIGateway` service. + /// + /// List all the AWS Supply Chain instances in a paginated way. + /// + /// - Parameter ListInstancesInput : The request parameters for ListInstances. + /// + /// - Returns: `ListInstancesOutput` : The response parameters for ListInstances. + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have the required privileges to perform this action. + /// - `ConflictException` : Updating or deleting a resource can cause an inconsistent state. + /// - `InternalServerException` : Unexpected error during processing of request. + /// - `ResourceNotFoundException` : Request references a resource which does not exist. + /// - `ServiceQuotaExceededException` : Request would cause a service quota to be exceeded. + /// - `ThrottlingException` : Request was denied due to request throttling. + /// - `ValidationException` : The input does not satisfy the constraints specified by an AWS service. + public func listInstances(input: ListInstancesInput) async throws -> ListInstancesOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "listInstances") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "scn") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(ListInstancesInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.serialize(ClientRuntime.QueryItemMiddleware(ListInstancesInput.queryItemProvider(_:))) + builder.deserialize(ClientRuntime.DeserializeMiddleware(ListInstancesOutput.httpOutput(from:), ListInstancesOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "SupplyChain") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListInstances") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `ListTagsForResource` operation on the `GalaxyPublicAPIGateway` service. /// /// List all the tags for an Amazon Web ServicesSupply Chain resource. @@ -1373,4 +1666,79 @@ extension SupplyChainClient { return try await op.execute(input: input) } + /// Performs the `UpdateInstance` operation on the `GalaxyPublicAPIGateway` service. + /// + /// Update the instance. + /// + /// - Parameter UpdateInstanceInput : The request parameters for UpdateInstance. + /// + /// - Returns: `UpdateInstanceOutput` : The response parameters for UpdateInstance. + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You do not have the required privileges to perform this action. + /// - `ConflictException` : Updating or deleting a resource can cause an inconsistent state. + /// - `InternalServerException` : Unexpected error during processing of request. + /// - `ResourceNotFoundException` : Request references a resource which does not exist. + /// - `ServiceQuotaExceededException` : Request would cause a service quota to be exceeded. + /// - `ThrottlingException` : Request was denied due to request throttling. + /// - `ValidationException` : The input does not satisfy the constraints specified by an AWS service. + public func updateInstance(input: UpdateInstanceInput) async throws -> UpdateInstanceOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .patch) + .withServiceName(value: serviceName) + .withOperation(value: "updateInstance") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "scn") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(UpdateInstanceInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: UpdateInstanceInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(UpdateInstanceOutput.httpOutput(from:), UpdateInstanceOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "SupplyChain") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "UpdateInstance") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + } diff --git a/Sources/Services/AWSTransfer/Sources/AWSTransfer/Models.swift b/Sources/Services/AWSTransfer/Sources/AWSTransfer/Models.swift index acfaa1cdeeb..8d55e87ef76 100644 --- a/Sources/Services/AWSTransfer/Sources/AWSTransfer/Models.swift +++ b/Sources/Services/AWSTransfer/Sources/AWSTransfer/Models.swift @@ -342,7 +342,7 @@ public struct CreateAgreementInput: Swift.Sendable { /// Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use. For AS2 connectors With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer. If you are using Basic authentication for your AS2 connector, the access role requires the secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the kms:Decrypt permission for that key. For SFTP connectors Make sure that the access role provides read and write access to the parent directory of the file location that's used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager. /// This member is required. public var accessRole: Swift.String? - /// The landing directory (folder) for files transferred by using the AS2 protocol. A BaseDirectory example is /DOC-EXAMPLE-BUCKET/home/mydirectory. + /// The landing directory (folder) for files transferred by using the AS2 protocol. A BaseDirectory example is /amzn-s3-demo-bucket/home/mydirectory. /// This member is required. public var baseDirectory: Swift.String? /// A name or short description to identify the agreement. @@ -607,7 +607,7 @@ public struct UpdateAgreementInput: Swift.Sendable { /// A unique identifier for the agreement. This identifier is returned when you create an agreement. /// This member is required. public var agreementId: Swift.String? - /// To change the landing directory (folder) for files that are transferred, provide the bucket folder that you want to use; for example, /DOC-EXAMPLE-BUCKET/home/mydirectory . + /// To change the landing directory (folder) for files that are transferred, provide the bucket folder that you want to use; for example, /amzn-s3-demo-bucket/home/mydirectory . public var baseDirectory: Swift.String? /// To replace the existing description, provide a short description for the agreement. public var description: Swift.String? @@ -1348,6 +1348,71 @@ public struct ConflictException: ClientRuntime.ModeledError, AWSClientRuntime.AW } } +extension TransferClientTypes { + + public enum TransferTableStatus: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case completed + case failed + case inProgress + case queued + case sdkUnknown(Swift.String) + + public static var allCases: [TransferTableStatus] { + return [ + .completed, + .failed, + .inProgress, + .queued + ] + } + + public init?(rawValue: Swift.String) { + let value = Self.allCases.first(where: { $0.rawValue == rawValue }) + self = value ?? Self.sdkUnknown(rawValue) + } + + public var rawValue: Swift.String { + switch self { + case .completed: return "COMPLETED" + case .failed: return "FAILED" + case .inProgress: return "IN_PROGRESS" + case .queued: return "QUEUED" + case let .sdkUnknown(s): return s + } + } + } +} + +extension TransferClientTypes { + + /// A structure that contains the details for files transferred using an SFTP connector, during a single transfer. + public struct ConnectorFileTransferResult: Swift.Sendable { + /// For transfers that fail, this parameter contains a code indicating the reason. For example, RETRIEVE_FILE_NOT_FOUND + public var failureCode: Swift.String? + /// For transfers that fail, this parameter describes the reason for the failure. + public var failureMessage: Swift.String? + /// The filename and path to where the file was sent to or retrieved from. + /// This member is required. + public var filePath: Swift.String? + /// The current status for the transfer. + /// This member is required. + public var statusCode: TransferClientTypes.TransferTableStatus? + + public init( + failureCode: Swift.String? = nil, + failureMessage: Swift.String? = nil, + filePath: Swift.String? = nil, + statusCode: TransferClientTypes.TransferTableStatus? = nil + ) + { + self.failureCode = failureCode + self.failureMessage = failureMessage + self.filePath = filePath + self.statusCode = statusCode + } + } +} + extension TransferClientTypes { /// Contains the details for an SFTP connector object. The connector object is used for transferring files to and from a partner's SFTP server. Because the SftpConnectorConfig data type is used for both creating and updating SFTP connectors, its parameters, TrustedHostKeys and UserSecretId are marked as not required. This is a bit misleading, as they are not required when you are updating an existing SFTP connector, but are required when you are creating a new SFTP connector. @@ -2028,7 +2093,7 @@ extension TransferClientTypes { extension TransferClientTypes { - /// The virtual private cloud (VPC) endpoint settings that are configured for your file transfer protocol-enabled server. With a VPC endpoint, you can restrict access to your server and resources only within your VPC. To control incoming internet traffic, invoke the UpdateServer API and attach an Elastic IP address to your server's endpoint. After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT in your Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you have already created servers with EndpointType=VPC_ENDPOINT in your Amazon Web Servicesaccount on or before May 19, 2021, you will not be affected. After this date, use EndpointType=VPC. For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint. + /// The virtual private cloud (VPC) endpoint settings that are configured for your file transfer protocol-enabled server. With a VPC endpoint, you can restrict access to your server and resources only within your VPC. To control incoming internet traffic, invoke the UpdateServer API and attach an Elastic IP address to your server's endpoint. After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT in your Amazon Web Services account if your account hasn't already done so before May 19, 2021. If you have already created servers with EndpointType=VPC_ENDPOINT in your Amazon Web Services account on or before May 19, 2021, you will not be affected. After this date, use EndpointType=VPC. For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint. It is recommended that you use VPC as the EndpointType. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible with EndpointType set to VPC_ENDPOINT. public struct EndpointDetails: Swift.Sendable { /// A list of address allocation IDs that are required to attach an Elastic IP address to your server's endpoint. An address allocation ID corresponds to the allocation ID of an Elastic IP address. This value can be retrieved from the allocationId field from the Amazon EC2 [Address](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Address.html) data type. One way to retrieve this value is by calling the EC2 [DescribeAddresses](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAddresses.html) API. This parameter is optional. Set this parameter if you want to make your VPC endpoint public-facing. For details, see [Create an internet-facing endpoint for your server](https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#create-internet-facing-endpoint). This property can only be set as follows: /// @@ -2415,9 +2480,9 @@ extension TransferClientTypes { /// Container for the WorkflowDetail data type. It is used by actions that trigger a workflow to begin execution. public struct WorkflowDetails: Swift.Sendable { - /// A trigger that starts a workflow if a file is only partially uploaded. You can attach a workflow to a server that executes whenever there is a partial upload. A partial upload occurs when a file is open when the session disconnects. + /// A trigger that starts a workflow if a file is only partially uploaded. You can attach a workflow to a server that executes whenever there is a partial upload. A partial upload occurs when a file is open when the session disconnects. OnPartialUpload can contain a maximum of one WorkflowDetail object. public var onPartialUpload: [TransferClientTypes.WorkflowDetail]? - /// A trigger that starts a workflow: the workflow begins to execute after a file is uploaded. To remove an associated workflow from a server, you can provide an empty OnUpload object, as in the following example. aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}' + /// A trigger that starts a workflow: the workflow begins to execute after a file is uploaded. To remove an associated workflow from a server, you can provide an empty OnUpload object, as in the following example. aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}'OnUpload can contain a maximum of one WorkflowDetail object. public var onUpload: [TransferClientTypes.WorkflowDetail]? public init( @@ -4631,6 +4696,57 @@ public struct ListExecutionsOutput: Swift.Sendable { } } +public struct ListFileTransferResultsInput: Swift.Sendable { + /// A unique identifier for a connector. This value should match the value supplied to the corresponding StartFileTransfer call. + /// This member is required. + public var connectorId: Swift.String? + /// The maximum number of files to return in a single page. Note that currently you can specify a maximum of 10 file paths in a single [StartFileTransfer](https://docs.aws.amazon.com/transfer/latest/APIReference/API_StartFileTransfer.html) operation. Thus, the maximum number of file transfer results that can be returned in a single page is 10. + public var maxResults: Swift.Int? + /// If there are more file details than returned in this call, use this value for a subsequent call to ListFileTransferResults to retrieve them. + public var nextToken: Swift.String? + /// A unique identifier for a file transfer. This value should match the value supplied to the corresponding StartFileTransfer call. + /// This member is required. + public var transferId: Swift.String? + + public init( + connectorId: Swift.String? = nil, + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil, + transferId: Swift.String? = nil + ) + { + self.connectorId = connectorId + self.maxResults = maxResults + self.nextToken = nextToken + self.transferId = transferId + } +} + +public struct ListFileTransferResultsOutput: Swift.Sendable { + /// Returns the details for the files transferred in the transfer identified by the TransferId and ConnectorId specified. + /// + /// * FilePath: the filename and path to where the file was sent to or retrieved from. + /// + /// * StatusCode: current status for the transfer. The status returned is one of the following values:QUEUED, IN_PROGRESS, COMPLETED, or FAILED + /// + /// * FailureCode: for transfers that fail, this parameter contains a code indicating the reason. For example, RETRIEVE_FILE_NOT_FOUND + /// + /// * FailureMessage: for transfers that fail, this parameter describes the reason for the failure. + /// This member is required. + public var fileTransferResults: [TransferClientTypes.ConnectorFileTransferResult]? + /// Returns a token that you can use to call ListFileTransferResults again and receive additional results, if there are any (against the same TransferId. + public var nextToken: Swift.String? + + public init( + fileTransferResults: [TransferClientTypes.ConnectorFileTransferResult]? = nil, + nextToken: Swift.String? = nil + ) + { + self.fileTransferResults = fileTransferResults + self.nextToken = nextToken + } +} + public struct ListHostKeysInput: Swift.Sendable { /// The maximum number of host keys to return. public var maxResults: Swift.Int? @@ -4975,7 +5091,7 @@ public struct UpdateServerInput: Swift.Sendable { public var certificate: Swift.String? /// The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your endpoint within your VPC, you can make your endpoint accessible only to resources within your VPC, or you can attach Elastic IP addresses and make your endpoint accessible to clients over the internet. Your VPC's default security groups are automatically assigned to your endpoint. public var endpointDetails: TransferClientTypes.EndpointDetails? - /// The type of endpoint that you want your server to use. You can choose to make your server's endpoint publicly accessible (PUBLIC) or host it inside your VPC. With an endpoint that is hosted in a VPC, you can restrict access to your server and resources only within your VPC or choose to make it internet facing by attaching Elastic IP addresses directly to it. After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT in your Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you have already created servers with EndpointType=VPC_ENDPOINT in your Amazon Web Servicesaccount on or before May 19, 2021, you will not be affected. After this date, use EndpointType=VPC. For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint. It is recommended that you use VPC as the EndpointType. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible with EndpointType set to VPC_ENDPOINT. + /// The type of endpoint that you want your server to use. You can choose to make your server's endpoint publicly accessible (PUBLIC) or host it inside your VPC. With an endpoint that is hosted in a VPC, you can restrict access to your server and resources only within your VPC or choose to make it internet facing by attaching Elastic IP addresses directly to it. After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT in your Amazon Web Services account if your account hasn't already done so before May 19, 2021. If you have already created servers with EndpointType=VPC_ENDPOINT in your Amazon Web Services account on or before May 19, 2021, you will not be affected. After this date, use EndpointType=VPC. For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint. It is recommended that you use VPC as the EndpointType. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible with EndpointType set to VPC_ENDPOINT. public var endpointType: TransferClientTypes.EndpointType? /// The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You can add multiple host keys, in case you want to rotate keys, or have a set of active keys that use different algorithms. Use the following command to generate an RSA 2048 bit key with no passphrase: ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key. Use a minimum value of 2048 for the -b option. You can create a stronger key by using 3072 or 4096. Use the following command to generate an ECDSA 256 bit key with no passphrase: ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key. Valid values for the -b option for ECDSA are 256, 384, and 521. Use the following command to generate an ED25519 key with no passphrase: ssh-keygen -t ed25519 -N "" -f my-new-server-key. For all of these commands, you can replace my-new-server-key with a string of your choice. If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, don't update the host key. Accidentally changing a server's host key can be disruptive. For more information, see [Manage host keys for your SFTP-enabled server](https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key) in the Transfer Family User Guide. public var hostKey: Swift.String? @@ -5141,7 +5257,7 @@ public struct StartFileTransferInput: Swift.Sendable { public var remoteDirectoryPath: Swift.String? /// One or more source paths for the partner's SFTP server. Each string represents a source file path for one inbound file transfer. public var retrieveFilePaths: [Swift.String]? - /// One or more source paths for the Amazon S3 storage. Each string represents a source file path for one outbound file transfer. For example, DOC-EXAMPLE-BUCKET/myfile.txt . Replace DOC-EXAMPLE-BUCKET with one of your actual buckets. + /// One or more source paths for the Amazon S3 storage. Each string represents a source file path for one outbound file transfer. For example, amzn-s3-demo-bucket/myfile.txt . Replace amzn-s3-demo-bucket with one of your actual buckets. public var sendFilePaths: [Swift.String]? public init( @@ -5759,6 +5875,13 @@ extension ListExecutionsInput { } } +extension ListFileTransferResultsInput { + + static func urlPathProvider(_ value: ListFileTransferResultsInput) -> Swift.String? { + return "/" + } +} + extension ListHostKeysInput { static func urlPathProvider(_ value: ListHostKeysInput) -> Swift.String? { @@ -6297,6 +6420,17 @@ extension ListExecutionsInput { } } +extension ListFileTransferResultsInput { + + static func write(value: ListFileTransferResultsInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["ConnectorId"].write(value.connectorId) + try writer["MaxResults"].write(value.maxResults) + try writer["NextToken"].write(value.nextToken) + try writer["TransferId"].write(value.transferId) + } +} + extension ListHostKeysInput { static func write(value: ListHostKeysInput?, to writer: SmithyJSON.Writer) throws { @@ -6960,6 +7094,19 @@ extension ListExecutionsOutput { } } +extension ListFileTransferResultsOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListFileTransferResultsOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = ListFileTransferResultsOutput() + value.fileTransferResults = try reader["FileTransferResults"].readListIfPresent(memberReadingClosure: TransferClientTypes.ConnectorFileTransferResult.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] + value.nextToken = try reader["NextToken"].readIfPresent() + return value + } +} + extension ListHostKeysOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListHostKeysOutput { @@ -7879,6 +8026,23 @@ enum ListExecutionsOutputError { } } +enum ListFileTransferResultsOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.AWSJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + switch baseError.code { + case "InternalServiceError": return try InternalServiceError.makeError(baseError: baseError) + case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ServiceUnavailable": return try ServiceUnavailableException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum ListHostKeysOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -9228,6 +9392,19 @@ extension TransferClientTypes.ListedExecution { } } +extension TransferClientTypes.ConnectorFileTransferResult { + + static func read(from reader: SmithyJSON.Reader) throws -> TransferClientTypes.ConnectorFileTransferResult { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = TransferClientTypes.ConnectorFileTransferResult() + value.filePath = try reader["FilePath"].readIfPresent() ?? "" + value.statusCode = try reader["StatusCode"].readIfPresent() ?? .sdkUnknown("") + value.failureCode = try reader["FailureCode"].readIfPresent() + value.failureMessage = try reader["FailureMessage"].readIfPresent() + return value + } +} + extension TransferClientTypes.ListedHostKey { static func read(from reader: SmithyJSON.Reader) throws -> TransferClientTypes.ListedHostKey { diff --git a/Sources/Services/AWSTransfer/Sources/AWSTransfer/Paginators.swift b/Sources/Services/AWSTransfer/Sources/AWSTransfer/Paginators.swift index b181805c2fa..21eefff38ae 100644 --- a/Sources/Services/AWSTransfer/Sources/AWSTransfer/Paginators.swift +++ b/Sources/Services/AWSTransfer/Sources/AWSTransfer/Paginators.swift @@ -72,6 +72,38 @@ extension PaginatorSequence where OperationStackInput == ListExecutionsInput, Op return try await self.asyncCompactMap { item in item.executions } } } +extension TransferClient { + /// Paginate over `[ListFileTransferResultsOutput]` results. + /// + /// When this operation is called, an `AsyncSequence` is created. AsyncSequences are lazy so no service + /// calls are made until the sequence is iterated over. This also means there is no guarantee that the request is valid + /// until then. If there are errors in your request, you will see the failures only after you start iterating. + /// - Parameters: + /// - input: A `[ListFileTransferResultsInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `ListFileTransferResultsOutput` + public func listFileTransferResultsPaginated(input: ListFileTransferResultsInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listFileTransferResults(input:)) + } +} + +extension ListFileTransferResultsInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> ListFileTransferResultsInput { + return ListFileTransferResultsInput( + connectorId: self.connectorId, + maxResults: self.maxResults, + nextToken: token, + transferId: self.transferId + )} +} + +extension PaginatorSequence where OperationStackInput == ListFileTransferResultsInput, OperationStackOutput == ListFileTransferResultsOutput { + /// This paginator transforms the `AsyncSequence` returned by `listFileTransferResultsPaginated` + /// to access the nested member `[TransferClientTypes.ConnectorFileTransferResult]` + /// - Returns: `[TransferClientTypes.ConnectorFileTransferResult]` + public func fileTransferResults() async throws -> [TransferClientTypes.ConnectorFileTransferResult] { + return try await self.asyncCompactMap { item in item.fileTransferResults } + } +} extension TransferClient { /// Paginate over `[ListSecurityPoliciesOutput]` results. /// diff --git a/Sources/Services/AWSTransfer/Sources/AWSTransfer/TransferClient.swift b/Sources/Services/AWSTransfer/Sources/AWSTransfer/TransferClient.swift index 769dbb9853f..2cd15d96952 100644 --- a/Sources/Services/AWSTransfer/Sources/AWSTransfer/TransferClient.swift +++ b/Sources/Services/AWSTransfer/Sources/AWSTransfer/TransferClient.swift @@ -2847,6 +2847,79 @@ extension TransferClient { return try await op.execute(input: input) } + /// Performs the `ListFileTransferResults` operation on the `TransferService` service. + /// + /// Returns real-time updates and detailed information on the status of each individual file being transferred in a specific file transfer operation. You specify the file transfer by providing its ConnectorId and its TransferId. File transfer results are available up to 7 days after an operation has been requested. + /// + /// - Parameter ListFileTransferResultsInput : [no documentation found] + /// + /// - Returns: `ListFileTransferResultsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServiceError` : This exception is thrown when an error occurs in the Transfer Family service. + /// - `InvalidRequestException` : This exception is thrown when the client submits a malformed request. + /// - `ResourceNotFoundException` : This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service. + /// - `ServiceUnavailableException` : The request has failed because the Amazon Web ServicesTransfer Family service is not available. + public func listFileTransferResults(input: ListFileTransferResultsInput) async throws -> ListFileTransferResultsOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "listFileTransferResults") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "transfer") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(ListFileTransferResultsInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(ListFileTransferResultsOutput.httpOutput(from:), ListFileTransferResultsOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.interceptors.add(AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "TransferService.ListFileTransferResults")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: ListFileTransferResultsInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/x-amz-json-1.1")) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "Transfer") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListFileTransferResults") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `ListHostKeys` operation on the `TransferService` service. /// /// Returns a list of host keys for the server that's specified by the ServerId parameter.